Implementation of AMD (Asynchronous Module Definition). The previous CommonJS implementation was found to be buggy, especially with multiple, recursive require calls.
Added back the v8::V8::IdleNotification call to ensure that all objects are garbage collected.
Catch any bailouts from the module loader callback. For example, if you call exit it will catch and throw a V8 exception, where previously it was triggering a segmentation fault.
Better handling of arguments to the define function.
Add the define.amd property for compatibility with libraries that rely on this being present.
Give each module its own clean global scope.
Refactor module loader to its own function.
Reuse modules that have already been loaded.
Correct name of memory limit test.
Added support for more recent version of V8.
The function require can be called identically to define in the top-level execution.
Clear the loaded modules map.
Add the special case @ module identifier prefix.
Enable print and var_dump functions.
Added console.log global function.
Throw exception if define or require is used when there is no module loader.