summaryrefslogtreecommitdiffstatshomepage
path: root/py/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/vm.c')
-rw-r--r--py/vm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/py/vm.c b/py/vm.c
index adf84c0e02..2821d40470 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -268,6 +268,13 @@ py_obj_t py_execute_byte_code(const byte *code, uint len, const py_obj_t *args,
*sp = rt_compare_op(unum, obj1, obj2);
break;
+ case PYBC_BUILD_TUPLE:
+ DECODE_UINT;
+ obj1 = rt_build_tuple(unum, sp);
+ sp += unum - 1;
+ *sp = obj1;
+ break;
+
case PYBC_BUILD_LIST:
DECODE_UINT;
obj1 = rt_build_list(unum, sp);
@@ -275,6 +282,13 @@ py_obj_t py_execute_byte_code(const byte *code, uint len, const py_obj_t *args,
*sp = obj1;
break;
+ case PYBC_LIST_APPEND:
+ DECODE_UINT;
+ // I think it's guaranteed by the compiler that sp[unum] is a list
+ rt_list_append(sp[unum], sp[0]);
+ sp++;
+ break;
+
case PYBC_BUILD_MAP:
DECODE_UINT;
PUSH(rt_build_map(unum));