Implement: str.join, more float support, ROT_TWO in VM.

This commit is contained in:
Damien
2013-11-02 14:33:10 +00:00
parent 4c51cbdc0b
commit 4ebb32fb95
3 changed files with 154 additions and 36 deletions

View File

@@ -32,7 +32,8 @@ py_obj_t py_execute_byte_code(const byte *code, const py_obj_t *args, uint n_arg
// it shouldn't yield
assert(0);
}
assert(sp == &state[17]);
// TODO check fails if, eg, return from within for loop
//assert(sp == &state[17]);
return *sp;
}
@@ -182,6 +183,12 @@ bool py_execute_byte_code_2(const byte *code, const byte **ip_in_out, py_obj_t *
++sp;
break;
case PYBC_ROT_TWO:
obj1 = sp[0];
sp[0] = sp[1];
sp[1] = obj1;
break;
case PYBC_ROT_THREE:
obj1 = sp[0];
sp[0] = sp[1];