1.1 --- a/jitcraft/API.cpp Fri Jul 20 00:03:10 2012 -0700
1.2 +++ b/jitcraft/API.cpp Mon Jul 23 01:19:44 2012 -0700
1.3 @@ -110,7 +110,17 @@
1.4 Scope::Allocate(tree);
1.5
1.6 BytecodeCompiler compiler(ZONE(), tree, NULL);
1.7 - return compiler.compile();
1.8 + ke::Local<Module> module(ke::ZONE(), compiler.compile());
1.9 + if (!module)
1.10 + return NULL;
1.11 +
1.12 + ke::InvokeArgs args;
1.13 + if (!ke::ZONE()->stack().pushModuleFrame(module, args))
1.14 + return NULL;
1.15 + if (!ke::Interpret(ke::ZONE(), NULL, NULL))
1.16 + return NULL;
1.17 +
1.18 + return module;
1.19 }
1.20
1.21 Ke::Local<Ke::Module>