summaryrefslogtreecommitdiffstatshomepage
path: root/py/emitbc.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-05-05 22:15:42 +0100
committerDamien George <damien.p.george@gmail.com>2015-05-05 22:15:42 +0100
commit8872abcbc4107c8d3eaf148a03813e607aa30bfb (patch)
tree1ada91c0578c1aac3770bf145a4611a16a58b94d /py/emitbc.c
parent37c6555b4419eb6027a345ee0c3e759d50da771f (diff)
downloadmicropython-8872abcbc4107c8d3eaf148a03813e607aa30bfb.tar.gz
micropython-8872abcbc4107c8d3eaf148a03813e607aa30bfb.zip
py: Remove LOAD_CONST_ELLIPSIS bytecode, use LOAD_CONST_OBJ instead.
Ellipsis constant is rarely used so no point having an extra bytecode for it.
Diffstat (limited to 'py/emitbc.c')
-rw-r--r--py/emitbc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/emitbc.c b/py/emitbc.c
index b9304fd82d..624b98dd42 100644
--- a/py/emitbc.c
+++ b/py/emitbc.c
@@ -454,7 +454,7 @@ void mp_emit_bc_load_const_tok(emit_t *emit, mp_token_kind_t tok) {
case MP_TOKEN_KW_NONE: emit_write_bytecode_byte(emit, MP_BC_LOAD_CONST_NONE); break;
case MP_TOKEN_KW_TRUE: emit_write_bytecode_byte(emit, MP_BC_LOAD_CONST_TRUE); break;
no_other_choice:
- case MP_TOKEN_ELLIPSIS: emit_write_bytecode_byte(emit, MP_BC_LOAD_CONST_ELLIPSIS); break;
+ case MP_TOKEN_ELLIPSIS: emit_write_bytecode_byte_ptr(emit, MP_BC_LOAD_CONST_OBJ, (void*)&mp_const_ellipsis_obj); break;
default: assert(0); goto no_other_choice; // to help flow control analysis
}
}