Browse files

Teaching interpreter how to handle the new internal opcode 'i_call_fu…

…n_last'.
  • Loading branch information...
1 parent 91f305e commit 5c17640a30f4fd5c3665a6fe550cd3ffe27b5c1c @eriksoe eriksoe committed Dec 5, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/main/java/erjang/beam/interpreter/ops.spec
View
3 src/main/java/erjang/beam/interpreter/ops.spec
@@ -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));

0 comments on commit 5c17640

Please sign in to comment.