joyent/node — pull request #8386 by thlorenz (2014-09-17 17:03:18+00:00)
Title: first working version of linked modules

This PR is mainly to get some guidance if I'm on the right track (i.e. what @tjfontaine had in mind).
It enables to include C++ modules simply by adding them to the `node.gyp` file and loading them from JS via `process.linkedBinding`.

It is based on `v0.12`, but I can rebase on `master` if that is better.
Please lmk what else needs to be done to get this completed, i.e do we need tests (a little hard to do since it needs to rebuild node to run) and/or an example of how this is used?

- introduced NM_F_LINKED flag to identify linked modules
- setting node_is_initialized after calling V8::Initialize in order to
make the right decision during initial module registration
- introduced modlist_linked in order to track modules that were
pre-registered in order to complete it once node is initialized
- completing registration of linked module similarly to the way it's
done inside DLOpen