aboutsummaryrefslogtreecommitdiff
path: root/py/nativeglue.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-09-14 17:40:59 +1000
committerDamien George <damien.p.george@gmail.com>2018-09-15 22:39:27 +1000
commit43f1848bfa81aa3cb0acd1e34eece0a11aa130d0 (patch)
tree525de05e2d2fffaa8700ff010204a888d0838b07 /py/nativeglue.c
parent460954734e12074d29056b446d1406a27e2aed9f (diff)
py: Make viper functions have the same entry signature as native.
This commit makes viper functions have the same signature as native functions, at the level of the emitter/assembler. This means that viper functions can now be wrapped in the same uPy object as native functions. Viper functions are now responsible for parsing their arguments (before it was done by the runtime), and this makes calling them more efficient (in most cases) because the viper entry code can be custom generated to suit the signature of the function. This change also opens the way forward for viper functions to take arbitrary numbers of arguments, and for them to handle globals correctly, among other things.
Diffstat (limited to 'py/nativeglue.c')
-rw-r--r--py/nativeglue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/nativeglue.c b/py/nativeglue.c
index 7ff8273f9..a15a2eae3 100644
--- a/py/nativeglue.c
+++ b/py/nativeglue.c
@@ -185,6 +185,7 @@ void *const mp_fun_table[MP_F_NUMBER_OF] = {
mp_delete_global,
mp_obj_new_cell,
mp_make_closure_from_raw_code,
+ mp_arg_check_num_sig,
mp_setup_code_state,
mp_small_int_floor_divide,
mp_small_int_modulo,