Make VM stack grow upwards, and so no reversed args arrays.
Change state layout in VM so the stack starts at state[0] and grows
upwards. Locals are at the top end of the state and number downwards.
This cleans up a lot of the interface connecting the VM to C: now all
functions that take an array of Micro Python objects are in order (ie no
longer in reverse).
Also clean up C API with keyword arguments (call_n and call_n_kw
replaced with single call method that takes keyword arguments). And now
make_new takes keyword arguments.
emitnative.c has not yet been changed to comply with the new order of
stack layout.
diff --git a/py/obj.c b/py/obj.c
index 9ca3d5d..bf7013a 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -63,7 +63,7 @@
return false;
} else {
mp_obj_base_t *o = o_in;
- return o->type->call_n != NULL;
+ return o->type->call != NULL;
}
}