diff options
author | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-12-02 20:45:55 +0000 |
---|---|---|
committer | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-12-02 20:45:55 +0000 |
commit | 125e2785025ed1a4363800d712bdf4e782a94cd4 (patch) | |
tree | 651515557228acae2d40ea60f4ca3ac67b7cf1cb /builtin.c | |
parent | 251f221b85216ca50329c4ef1788fc617863ce06 (diff) |
Clean up calls to C functions, unify opcodes
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -238,24 +238,24 @@ static void f_type(jv input[], jv output[]) { } static struct cfunction function_list[] = { - {f_plus, "_plus", CALL_BUILTIN_3_1}, - {f_minus, "_minus", CALL_BUILTIN_3_1}, - {f_multiply, "_multiply", CALL_BUILTIN_3_1}, - {f_divide, "_divide", CALL_BUILTIN_3_1}, - {f_tonumber, "tonumber", CALL_BUILTIN_1_1}, - {f_tostring, "tostring", CALL_BUILTIN_1_1}, - {f_keys, "keys", CALL_BUILTIN_1_1}, - {f_equal, "_equal", CALL_BUILTIN_3_1}, - {f_notequal, "_notequal", CALL_BUILTIN_3_1}, - {f_less, "_less", CALL_BUILTIN_3_1}, - {f_greater, "_greater", CALL_BUILTIN_3_1}, - {f_lesseq, "_lesseq", CALL_BUILTIN_3_1}, - {f_greatereq, "_greatereq", CALL_BUILTIN_3_1}, - {f_contains, "_contains", CALL_BUILTIN_3_1}, - {f_length, "length", CALL_BUILTIN_1_1}, - {f_type, "type", CALL_BUILTIN_1_1}, - {f_add, "add", CALL_BUILTIN_1_1}, - {f_sort, "sort", CALL_BUILTIN_1_1}, + {f_plus, "_plus", 3}, + {f_minus, "_minus", 3}, + {f_multiply, "_multiply", 3}, + {f_divide, "_divide", 3}, + {f_tonumber, "tonumber", 1}, + {f_tostring, "tostring", 1}, + {f_keys, "keys", 1}, + {f_equal, "_equal", 3}, + {f_notequal, "_notequal", 3}, + {f_less, "_less", 3}, + {f_greater, "_greater", 3}, + {f_lesseq, "_lesseq", 3}, + {f_greatereq, "_greatereq", 3}, + {f_contains, "_contains", 3}, + {f_length, "length", 1}, + {f_type, "type", 1}, + {f_add, "add", 1}, + {f_sort, "sort", 1}, }; static struct symbol_table cbuiltins = {function_list, sizeof(function_list)/sizeof(function_list[0])}; |