kopia lustrzana https://github.com/micropython/micropython
py: Make arg to MP_BC_RAISE_VARARGS a byte.
rodzic
ad97f2a49e
commit
25042b19d2
2
py/bc0.h
2
py/bc0.h
|
@ -81,7 +81,7 @@
|
|||
#define MP_BC_UNPACK_EX (0x7a) // uint
|
||||
|
||||
#define MP_BC_RETURN_VALUE (0x80)
|
||||
#define MP_BC_RAISE_VARARGS (0x81) // uint
|
||||
#define MP_BC_RAISE_VARARGS (0x81) // byte
|
||||
#define MP_BC_YIELD_VALUE (0x82)
|
||||
#define MP_BC_YIELD_FROM (0x83)
|
||||
|
||||
|
|
|
@ -672,9 +672,9 @@ static void emit_bc_return_value(emit_t *emit) {
|
|||
}
|
||||
|
||||
static void emit_bc_raise_varargs(emit_t *emit, int n_args) {
|
||||
assert(n_args >= 0);
|
||||
assert(0 <= n_args && n_args <= 2);
|
||||
emit_pre(emit, -n_args);
|
||||
emit_write_byte_1_uint(emit, MP_BC_RAISE_VARARGS, n_args);
|
||||
emit_write_byte_1_byte(emit, MP_BC_RAISE_VARARGS, n_args);
|
||||
}
|
||||
|
||||
static void emit_bc_yield_value(emit_t *emit) {
|
||||
|
|
1
py/vm.c
1
py/vm.c
|
@ -479,7 +479,6 @@ bool mp_execute_byte_code_2(const byte **ip_in_out, mp_obj_t *fastn, mp_obj_t **
|
|||
assert(unum == 1);
|
||||
obj1 = POP();
|
||||
nlr_jump(obj1);
|
||||
return false;
|
||||
|
||||
case MP_BC_YIELD_VALUE:
|
||||
nlr_pop();
|
||||
|
|
Ładowanie…
Reference in New Issue