summaryrefslogtreecommitdiffstats
path: root/opcode.c
diff options
context:
space:
mode:
authorStephen Dolan <mu@netsoc.tcd.ie>2012-12-04 00:39:21 +0000
committerStephen Dolan <mu@netsoc.tcd.ie>2012-12-04 00:39:21 +0000
commit616e8f9924ad9df22acf58c79c5d49ef6030fcb8 (patch)
tree05f9754c3b927e419d183fc012f0d29a0d7fed3a /opcode.c
parenta88d53d2fda9a755c9c972a09a1206d54ca0d8b2 (diff)
Refactor function argument passing into what it always should have been.
Most visible change is that error messages when a function is called with the wrong number of arguments are much better.
Diffstat (limited to 'opcode.c')
-rw-r--r--opcode.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/opcode.c b/opcode.c
index 9b3e5ca3..4e785b8f 100644
--- a/opcode.c
+++ b/opcode.c
@@ -5,9 +5,8 @@
#define CONSTANT OP_HAS_CONSTANT, 2
#define VARIABLE (OP_HAS_VARIABLE | OP_HAS_BINDING), 3
#define BRANCH OP_HAS_BRANCH, 2
-#define CFUNC OP_HAS_CFUNC, 3
-#define UFUNC OP_HAS_UFUNC, 2
-#define CALLSEQ_END_IMM (OP_IS_CALL_PSEUDO), 0
+#define CFUNC (OP_HAS_CFUNC | OP_HAS_BINDING), 3
+#define UFUNC (OP_HAS_UFUNC | OP_HAS_BINDING | OP_IS_CALL_PSEUDO), 4
#define DEFINITION (OP_IS_CALL_PSEUDO | OP_HAS_BINDING), 0
#define CLOSURE_REF_IMM (OP_IS_CALL_PSEUDO | OP_HAS_BINDING), 2