Skip to content

Commit

Permalink
the compiler now needs a reference to the context
Browse files Browse the repository at this point in the history
  • Loading branch information
qmx committed May 5, 2012
1 parent b0dc625 commit a8d65b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ public CodeBlock getCodeBlock() {
.aastore();
}

codeBlock = getRuntime(codeBlock);
codeBlock = getRuntime(codeBlock)
.aload(1);
codeBlock = retrieveFromSlot(slot, codeBlock);
codeBlock = codeBlock
.aload(4)
.invokevirtual(DynJSCompiler.Types.RUNTIME, "compile", sig(Function.class, CodeBlock.class, String[].class));
.invokevirtual(DynJSCompiler.Types.RUNTIME, "compile", sig(Object.class, DynThreadContext.class, CodeBlock.class, String[].class));

if (identifier != null) {
// TODO DRY
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/dynjs/runtime/DynJS.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ private void initBuiltins(Scope globalScope) {
}
}

public Function compile(CodeBlock codeBlock, final String[] args) {
return this.compiler.compile(new DynFunction(codeBlock) {
public Object compile(DynThreadContext context, CodeBlock codeBlock, final String[] args) {
return this.compiler.compile(context, new DynFunction(codeBlock) {
public String[] getArguments() {
return args;
}
Expand Down

0 comments on commit a8d65b8

Please sign in to comment.