summaryrefslogtreecommitdiffstatshomepage
path: root/py/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/compile.c')
-rw-r--r--py/compile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/py/compile.c b/py/compile.c
index 946c8924b2..f2a108074f 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -31,8 +31,8 @@
#include <assert.h>
#include <math.h>
-#include "misc.h"
#include "mpconfig.h"
+#include "misc.h"
#include "qstr.h"
#include "lexer.h"
#include "parse.h"
@@ -111,8 +111,8 @@ STATIC const mp_map_elem_t mp_constants_table[] = {
STATIC const mp_map_t mp_constants_map = {
.all_keys_are_qstrs = 1,
.table_is_fixed_array = 1,
- .used = ARRAY_SIZE(mp_constants_table),
- .alloc = ARRAY_SIZE(mp_constants_table),
+ .used = MP_ARRAY_SIZE(mp_constants_table),
+ .alloc = MP_ARRAY_SIZE(mp_constants_table),
.table = (mp_map_elem_t*)mp_constants_table,
};
@@ -1894,7 +1894,7 @@ void compile_try_except(compiler_t *comp, mp_parse_node_t pn_body, int n_except,
EMIT_ARG(jump, success_label); // jump over exception handler
EMIT_ARG(label_assign, l1); // start of exception handler
- EMIT_ARG(adjust_stack_size, 6); // stack adjust for the 3 exception items, +3 for possible UNWIND_JUMP state
+ EMIT(start_except_handler);
uint l2 = comp_next_label(comp);
@@ -1966,7 +1966,7 @@ void compile_try_except(compiler_t *comp, mp_parse_node_t pn_body, int n_except,
compile_decrease_except_level(comp);
EMIT(end_finally);
- EMIT_ARG(adjust_stack_size, -5); // stack adjust
+ EMIT(end_except_handler);
EMIT_ARG(label_assign, success_label);
compile_node(comp, pn_else); // else block, can be null