py/vm: Consistently indent #if guards to match the code they surround.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
893a5c8341
commit
b878fc042f
25
py/vm.c
25
py/vm.c
@ -307,14 +307,14 @@ outer_dispatch_loop:
|
|||||||
// loop to execute byte code
|
// loop to execute byte code
|
||||||
for (;;) {
|
for (;;) {
|
||||||
dispatch_loop:
|
dispatch_loop:
|
||||||
#if MICROPY_OPT_COMPUTED_GOTO
|
#if MICROPY_OPT_COMPUTED_GOTO
|
||||||
DISPATCH();
|
DISPATCH();
|
||||||
#else
|
#else
|
||||||
TRACE(ip);
|
TRACE(ip);
|
||||||
MARK_EXC_IP_GLOBAL();
|
MARK_EXC_IP_GLOBAL();
|
||||||
TRACE_TICK(ip, sp, false);
|
TRACE_TICK(ip, sp, false);
|
||||||
switch (*ip++) {
|
switch (*ip++) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ENTRY(MP_BC_LOAD_CONST_FALSE):
|
ENTRY(MP_BC_LOAD_CONST_FALSE):
|
||||||
PUSH(mp_const_false);
|
PUSH(mp_const_false);
|
||||||
@ -831,7 +831,7 @@ unwind_jump:;
|
|||||||
mp_obj_dict_store(sp[0], sp[2], sp[1]);
|
mp_obj_dict_store(sp[0], sp[2], sp[1]);
|
||||||
DISPATCH();
|
DISPATCH();
|
||||||
|
|
||||||
#if MICROPY_PY_BUILTINS_SET
|
#if MICROPY_PY_BUILTINS_SET
|
||||||
ENTRY(MP_BC_BUILD_SET): {
|
ENTRY(MP_BC_BUILD_SET): {
|
||||||
MARK_EXC_IP_SELECTIVE();
|
MARK_EXC_IP_SELECTIVE();
|
||||||
DECODE_UINT;
|
DECODE_UINT;
|
||||||
@ -839,9 +839,9 @@ unwind_jump:;
|
|||||||
SET_TOP(mp_obj_new_set(unum, sp));
|
SET_TOP(mp_obj_new_set(unum, sp));
|
||||||
DISPATCH();
|
DISPATCH();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MICROPY_PY_BUILTINS_SLICE
|
#if MICROPY_PY_BUILTINS_SLICE
|
||||||
ENTRY(MP_BC_BUILD_SLICE): {
|
ENTRY(MP_BC_BUILD_SLICE): {
|
||||||
MARK_EXC_IP_SELECTIVE();
|
MARK_EXC_IP_SELECTIVE();
|
||||||
mp_obj_t step = mp_const_none;
|
mp_obj_t step = mp_const_none;
|
||||||
@ -854,7 +854,7 @@ unwind_jump:;
|
|||||||
SET_TOP(mp_obj_new_slice(start, stop, step));
|
SET_TOP(mp_obj_new_slice(start, stop, step));
|
||||||
DISPATCH();
|
DISPATCH();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ENTRY(MP_BC_STORE_COMP): {
|
ENTRY(MP_BC_STORE_COMP): {
|
||||||
MARK_EXC_IP_SELECTIVE();
|
MARK_EXC_IP_SELECTIVE();
|
||||||
@ -1248,7 +1248,7 @@ yield:
|
|||||||
mp_import_all(POP());
|
mp_import_all(POP());
|
||||||
DISPATCH();
|
DISPATCH();
|
||||||
|
|
||||||
#if MICROPY_OPT_COMPUTED_GOTO
|
#if MICROPY_OPT_COMPUTED_GOTO
|
||||||
ENTRY(MP_BC_LOAD_CONST_SMALL_INT_MULTI):
|
ENTRY(MP_BC_LOAD_CONST_SMALL_INT_MULTI):
|
||||||
PUSH(MP_OBJ_NEW_SMALL_INT((mp_int_t)ip[-1] - MP_BC_LOAD_CONST_SMALL_INT_MULTI - MP_BC_LOAD_CONST_SMALL_INT_MULTI_EXCESS));
|
PUSH(MP_OBJ_NEW_SMALL_INT((mp_int_t)ip[-1] - MP_BC_LOAD_CONST_SMALL_INT_MULTI - MP_BC_LOAD_CONST_SMALL_INT_MULTI_EXCESS));
|
||||||
DISPATCH();
|
DISPATCH();
|
||||||
@ -1276,7 +1276,7 @@ yield:
|
|||||||
|
|
||||||
ENTRY_DEFAULT:
|
ENTRY_DEFAULT:
|
||||||
MARK_EXC_IP_SELECTIVE();
|
MARK_EXC_IP_SELECTIVE();
|
||||||
#else
|
#else
|
||||||
ENTRY_DEFAULT:
|
ENTRY_DEFAULT:
|
||||||
if (ip[-1] < MP_BC_LOAD_CONST_SMALL_INT_MULTI + MP_BC_LOAD_CONST_SMALL_INT_MULTI_NUM) {
|
if (ip[-1] < MP_BC_LOAD_CONST_SMALL_INT_MULTI + MP_BC_LOAD_CONST_SMALL_INT_MULTI_NUM) {
|
||||||
PUSH(MP_OBJ_NEW_SMALL_INT((mp_int_t)ip[-1] - MP_BC_LOAD_CONST_SMALL_INT_MULTI - MP_BC_LOAD_CONST_SMALL_INT_MULTI_EXCESS));
|
PUSH(MP_OBJ_NEW_SMALL_INT((mp_int_t)ip[-1] - MP_BC_LOAD_CONST_SMALL_INT_MULTI - MP_BC_LOAD_CONST_SMALL_INT_MULTI_EXCESS));
|
||||||
@ -1296,9 +1296,8 @@ yield:
|
|||||||
SET_TOP(mp_binary_op(ip[-1] - MP_BC_BINARY_OP_MULTI, lhs, rhs));
|
SET_TOP(mp_binary_op(ip[-1] - MP_BC_BINARY_OP_MULTI, lhs, rhs));
|
||||||
DISPATCH();
|
DISPATCH();
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif // MICROPY_OPT_COMPUTED_GOTO
|
||||||
{
|
{
|
||||||
|
|
||||||
mp_obj_t obj = mp_obj_new_exception_msg(&mp_type_NotImplementedError, MP_ERROR_TEXT("opcode"));
|
mp_obj_t obj = mp_obj_new_exception_msg(&mp_type_NotImplementedError, MP_ERROR_TEXT("opcode"));
|
||||||
nlr_pop();
|
nlr_pop();
|
||||||
code_state->state[0] = obj;
|
code_state->state[0] = obj;
|
||||||
@ -1306,9 +1305,9 @@ yield:
|
|||||||
return MP_VM_RETURN_EXCEPTION;
|
return MP_VM_RETURN_EXCEPTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !MICROPY_OPT_COMPUTED_GOTO
|
#if !MICROPY_OPT_COMPUTED_GOTO
|
||||||
} // switch
|
} // switch
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pending_exception_check:
|
pending_exception_check:
|
||||||
// We've just done a branch, use this as a convenient point to
|
// We've just done a branch, use this as a convenient point to
|
||||||
|
Loading…
Reference in New Issue
Block a user