summaryrefslogtreecommitdiffstats
path: root/builtin.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 /builtin.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 'builtin.c')
-rw-r--r--builtin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin.c b/builtin.c
index ef447935..2c5787da 100644
--- a/builtin.c
+++ b/builtin.c
@@ -285,7 +285,8 @@ static block bind_bytecoded_builtins(block b) {
};
block builtins = gen_noop();
for (unsigned i=0; i<sizeof(builtin_defs)/sizeof(builtin_defs[0]); i++) {
- builtins = BLOCK(builtins, gen_function(builtin_defs[i].name, builtin_defs[i].code));
+ builtins = BLOCK(builtins, gen_function(builtin_defs[i].name, gen_noop(),
+ builtin_defs[i].code));
}
return block_bind(builtins, b, OP_IS_CALL_PSEUDO);
}