MCPcopy Create free account
hub / github.com/dynjs/dynjs / compile

Method compile

src/main/java/org/dynjs/ir/JITCompiler.java:31–44  ·  view source on GitHub ↗
(final ExecutionContext context, final IRJSFunction function, final CompilerCallback callback)

Source from the content-addressed store, hash-verified

29 }
30
31 public void compile(final ExecutionContext context, final IRJSFunction function, final CompilerCallback callback) {
32 if (context.getConfig().isJitAsync()) {
33 compilationQueue.execute(new Runnable() {
34 @Override
35 public void run() {
36 // compile
37 callback.done(compileFunction(context, function));
38 }
39 });
40 } else {
41 final JSFunction jsFunction = compileFunction(context, function);
42 callback.done(jsFunction);
43 }
44 }
45
46 private JSFunction compileFunction(ExecutionContext context, IRJSFunction function) {
47 return function.compile(context);

Callers 1

tryCompileMethod · 0.95

Calls 5

compileFunctionMethod · 0.95
isJitAsyncMethod · 0.80
getConfigMethod · 0.65
executeMethod · 0.65
doneMethod · 0.65

Tested by

no test coverage detected