summaryrefslogtreecommitdiffstatshomepage
path: root/py/compile.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-17 22:10:53 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-17 22:10:53 +0100
commit729f7b42d65c016c9d5f27fb8a8122869f06c129 (patch)
tree8d8d8c2a89ff9011b06650c256a2d5f2458c930c /py/compile.c
parentde7c425139c92745280b62f7ebb756def96d072a (diff)
downloadmicropython-729f7b42d65c016c9d5f27fb8a8122869f06c129.tar.gz
micropython-729f7b42d65c016c9d5f27fb8a8122869f06c129.zip
py: Merge BINARY_OP_SUBSCR and store_subscr (w/ delete) into subscr.
mp_obj_t->subscr now does load/store/delete.
Diffstat (limited to 'py/compile.c')
-rw-r--r--py/compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/compile.c b/py/compile.c
index 7a3d810f9d..b0f1f9e00d 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -670,7 +670,7 @@ void c_assign_power(compiler_t *comp, mp_parse_node_struct_t *pns, assign_kind_t
compile_node(comp, pns1->nodes[0]);
if (assign_kind == ASSIGN_AUG_LOAD) {
EMIT(dup_top_two);
- EMIT_ARG(binary_op, MP_BINARY_OP_SUBSCR);
+ EMIT(load_subscr);
} else {
EMIT(store_subscr);
}
@@ -2599,7 +2599,7 @@ void compile_trailer_paren(compiler_t *comp, mp_parse_node_struct_t *pns) {
void compile_trailer_bracket(compiler_t *comp, mp_parse_node_struct_t *pns) {
// object who's index we want is on top of stack
compile_node(comp, pns->nodes[0]); // the index
- EMIT_ARG(binary_op, MP_BINARY_OP_SUBSCR);
+ EMIT(load_subscr);
}
void compile_trailer_period(compiler_t *comp, mp_parse_node_struct_t *pns) {