Commit 5d66b427 authored by Damien George's avatar Damien George
Browse files

py/emit: Change type of arg of load_const_obj from void* to mp_obj_t.

parent c3f64d97
...@@ -85,7 +85,7 @@ typedef struct _emit_method_table_t { ...@@ -85,7 +85,7 @@ typedef struct _emit_method_table_t {
void (*load_const_tok)(emit_t *emit, mp_token_kind_t tok); void (*load_const_tok)(emit_t *emit, mp_token_kind_t tok);
void (*load_const_small_int)(emit_t *emit, mp_int_t arg); void (*load_const_small_int)(emit_t *emit, mp_int_t arg);
void (*load_const_str)(emit_t *emit, qstr qst); void (*load_const_str)(emit_t *emit, qstr qst);
void (*load_const_obj)(emit_t *emit, void *obj); void (*load_const_obj)(emit_t *emit, mp_obj_t obj);
void (*load_null)(emit_t *emit); void (*load_null)(emit_t *emit);
void (*load_attr)(emit_t *emit, qstr qst); void (*load_attr)(emit_t *emit, qstr qst);
void (*load_method)(emit_t *emit, qstr qst); void (*load_method)(emit_t *emit, qstr qst);
...@@ -205,7 +205,7 @@ void mp_emit_bc_import_star(emit_t *emit); ...@@ -205,7 +205,7 @@ void mp_emit_bc_import_star(emit_t *emit);
void mp_emit_bc_load_const_tok(emit_t *emit, mp_token_kind_t tok); void mp_emit_bc_load_const_tok(emit_t *emit, mp_token_kind_t tok);
void mp_emit_bc_load_const_small_int(emit_t *emit, mp_int_t arg); void mp_emit_bc_load_const_small_int(emit_t *emit, mp_int_t arg);
void mp_emit_bc_load_const_str(emit_t *emit, qstr qst); void mp_emit_bc_load_const_str(emit_t *emit, qstr qst);
void mp_emit_bc_load_const_obj(emit_t *emit, void *obj); void mp_emit_bc_load_const_obj(emit_t *emit, mp_obj_t obj);
void mp_emit_bc_load_null(emit_t *emit); void mp_emit_bc_load_null(emit_t *emit);
void mp_emit_bc_load_attr(emit_t *emit, qstr qst); void mp_emit_bc_load_attr(emit_t *emit, qstr qst);
void mp_emit_bc_load_method(emit_t *emit, qstr qst); void mp_emit_bc_load_method(emit_t *emit, qstr qst);
......
...@@ -542,7 +542,7 @@ void mp_emit_bc_load_const_str(emit_t *emit, qstr qst) { ...@@ -542,7 +542,7 @@ void mp_emit_bc_load_const_str(emit_t *emit, qstr qst) {
emit_write_bytecode_byte_qstr(emit, MP_BC_LOAD_CONST_STRING, qst); emit_write_bytecode_byte_qstr(emit, MP_BC_LOAD_CONST_STRING, qst);
} }
void mp_emit_bc_load_const_obj(emit_t *emit, void *obj) { void mp_emit_bc_load_const_obj(emit_t *emit, mp_obj_t obj) {
emit_bc_pre(emit, 1); emit_bc_pre(emit, 1);
emit_write_bytecode_byte_obj(emit, MP_BC_LOAD_CONST_OBJ, obj); emit_write_bytecode_byte_obj(emit, MP_BC_LOAD_CONST_OBJ, obj);
} }
......
...@@ -1344,7 +1344,7 @@ STATIC void emit_native_load_const_str(emit_t *emit, qstr qst) { ...@@ -1344,7 +1344,7 @@ STATIC void emit_native_load_const_str(emit_t *emit, qstr qst) {
} }
} }
STATIC void emit_native_load_const_obj(emit_t *emit, void *obj) { STATIC void emit_native_load_const_obj(emit_t *emit, mp_obj_t obj) {
emit_native_pre(emit); emit_native_pre(emit);
need_reg_single(emit, REG_RET, 0); need_reg_single(emit, REG_RET, 0);
ASM_MOV_ALIGNED_IMM_TO_REG(emit->as, (mp_uint_t)obj, REG_RET); ASM_MOV_ALIGNED_IMM_TO_REG(emit->as, (mp_uint_t)obj, REG_RET);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment