Skip to content

Commit

Permalink
Teaching interpreter how to handle the new internal opcode 'i_call_fu…
Browse files Browse the repository at this point in the history
…n_last'.
  • Loading branch information
esstrifork committed Dec 5, 2011
1 parent 91f305e commit 5c17640
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/erjang/beam/interpreter/ops.spec
Expand Up @@ -200,6 +200,9 @@ apply arity:
call_fun arity:
PRE_CALL(); int ary=GET(arity); reg[0] = ((EFun)reg[ary]).invoke(proc, reg, 0, ary); POST_CALL();

i_call_fun_last arity:
PRE_CALL(); int ary=GET(arity); return ((EFun)reg[ary]).invoke(proc, reg, 0, ary);

%class II(i1:I i2:I)
apply_last arity dealloc:
STACK_DEALLOC(GET(dealloc)); int ary = GET(arity); EFun fun = ERT.resolve_fun(reg[ary], reg[ary+1], ary); PRE_CALL(); return fun.invoke(proc, REGS_AS_ARRAY(ary));
Expand Down

0 comments on commit 5c17640

Please sign in to comment.