From 20006dbba9d2d84ead036fdfab7190e88b2337ce Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 18 Jan 2014 14:10:48 +0000 Subject: 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. --- py/objmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/objmodule.c') diff --git a/py/objmodule.c b/py/objmodule.c index 50d2bb35e..e97e73192 100644 --- a/py/objmodule.c +++ b/py/objmodule.c @@ -26,7 +26,7 @@ static void module_load_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_obj_module_t *self = self_in; mp_map_elem_t *elem = mp_map_lookup(self->globals, MP_OBJ_NEW_QSTR(attr), MP_MAP_LOOKUP); if (elem != NULL) { - dest[1] = elem->value; + dest[0] = elem->value; } } -- cgit v1.2.3