(1)内置C++模块
定义:#include "node.h"
........
NODE_MODULE(modname, node::Initialize)
内置C++模块需要到node_extensions.h注册
加载:process.binding(modname)->Binding->binding_cache->get_builtin_module->initialize
(2)内置JS模块
编译:js2c转化成C++数组
(启动时)预加载(源码):process.binding('natives')->Binding->DefineJavaScript
加载:NativeModule.require(modname)->执行
(3)外部C++模块
(4)外部JS模块
(5)外部JSON模块