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

Method eval

src/main/java/org/dynjs/runtime/ExecutionContext.java:185–197  ·  view source on GitHub ↗
(JSProgram eval, boolean direct)

Source from the content-addressed store, hash-verified

183 }
184
185 public Object eval(JSProgram eval, boolean direct) {
186 BlockManager originalBlockManager = this.blockManager;
187 try {
188 ExecutionContext evalContext = createEvalExecutionContext(eval, direct);
189 evalContext.blockManager = eval.getBlockManager();
190 ThreadContextManager.pushContext(evalContext);
191 Completion result = eval.execute(evalContext);
192 return result.value;
193 } finally {
194 ThreadContextManager.popContext();
195 this.blockManager = originalBlockManager;
196 }
197 }
198
199 public Object call(JSFunction function, Object self, Object... args) {
200 return call(null, function, self, args);

Callers 1

evaluateMethod · 0.45

Calls 5

pushContextMethod · 0.95
popContextMethod · 0.95
getBlockManagerMethod · 0.65
executeMethod · 0.65

Tested by

no test coverage detected