py: Remove mp_load_const_str and replace uses with inlined version.
This commit is contained in:
@@ -167,7 +167,6 @@
|
||||
STATIC byte mp_f_n_args[MP_F_NUMBER_OF] = {
|
||||
[MP_F_CONVERT_OBJ_TO_NATIVE] = 2,
|
||||
[MP_F_CONVERT_NATIVE_TO_OBJ] = 2,
|
||||
[MP_F_LOAD_CONST_STR] = 1,
|
||||
[MP_F_LOAD_CONST_BYTES] = 1,
|
||||
[MP_F_LOAD_NAME] = 1,
|
||||
[MP_F_LOAD_GLOBAL] = 1,
|
||||
@@ -1311,10 +1310,10 @@ STATIC void emit_native_load_const_str(emit_t *emit, qstr qst, bool bytes) {
|
||||
{
|
||||
if (bytes) {
|
||||
emit_call_with_imm_arg(emit, MP_F_LOAD_CONST_BYTES, qst, REG_ARG_1);
|
||||
emit_post_push_reg(emit, VTYPE_PYOBJ, REG_RET);
|
||||
} else {
|
||||
emit_call_with_imm_arg(emit, MP_F_LOAD_CONST_STR, qst, REG_ARG_1);
|
||||
emit_post_push_imm(emit, VTYPE_PYOBJ, (mp_uint_t)MP_OBJ_NEW_QSTR(qst));
|
||||
}
|
||||
emit_post_push_reg(emit, VTYPE_PYOBJ, REG_RET);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user