py: Remove unused "use_stack" argument from for_iter_end emit function.

This commit is contained in:
Damien George 2017-01-17 15:30:18 +11:00
parent 088740ecc4
commit 30b42dd72d
4 changed files with 8 additions and 8 deletions

View File

@ -1484,7 +1484,7 @@ STATIC void compile_for_stmt(compiler_t *comp, mp_parse_node_struct_t *pns) {
EMIT_ARG(jump, continue_label);
}
EMIT_ARG(label_assign, pop_label);
EMIT_ARG(for_iter_end, true);
EMIT(for_iter_end);
// break/continue apply to outer loop (if any) in the else block
END_BREAK_CONTINUE_BLOCK
@ -2906,7 +2906,7 @@ STATIC void compile_scope_comp_iter(compiler_t *comp, mp_parse_node_struct_t *pn
EMIT_ARG(jump, l_top);
EMIT_ARG(label_assign, l_end);
EMIT_ARG(for_iter_end, true);
EMIT(for_iter_end);
}
STATIC void check_for_doc_string(compiler_t *comp, mp_parse_node_t pn) {

View File

@ -112,7 +112,7 @@ typedef struct _emit_method_table_t {
void (*end_finally)(emit_t *emit);
void (*get_iter)(emit_t *emit, bool use_stack);
void (*for_iter)(emit_t *emit, mp_uint_t label);
void (*for_iter_end)(emit_t *emit, bool use_stack);
void (*for_iter_end)(emit_t *emit);
void (*pop_block)(emit_t *emit);
void (*pop_except)(emit_t *emit);
void (*unary_op)(emit_t *emit, mp_unary_op_t op);
@ -230,7 +230,7 @@ void mp_emit_bc_setup_finally(emit_t *emit, mp_uint_t label);
void mp_emit_bc_end_finally(emit_t *emit);
void mp_emit_bc_get_iter(emit_t *emit, bool use_stack);
void mp_emit_bc_for_iter(emit_t *emit, mp_uint_t label);
void mp_emit_bc_for_iter_end(emit_t *emit, bool use_stack);
void mp_emit_bc_for_iter_end(emit_t *emit);
void mp_emit_bc_pop_block(emit_t *emit);
void mp_emit_bc_pop_except(emit_t *emit);
void mp_emit_bc_unary_op(emit_t *emit, mp_unary_op_t op);

View File

@ -787,8 +787,8 @@ void mp_emit_bc_for_iter(emit_t *emit, mp_uint_t label) {
emit_write_bytecode_byte_unsigned_label(emit, MP_BC_FOR_ITER, label);
}
void mp_emit_bc_for_iter_end(emit_t *emit, bool use_stack) {
emit_bc_pre(emit, -(use_stack ? sizeof(mp_obj_iter_buf_t) / sizeof(mp_obj_t) : 1));
void mp_emit_bc_for_iter_end(emit_t *emit) {
emit_bc_pre(emit, -(sizeof(mp_obj_iter_buf_t) / sizeof(mp_obj_t)));
}
void mp_emit_bc_pop_block(emit_t *emit) {

View File

@ -1827,10 +1827,10 @@ STATIC void emit_native_for_iter(emit_t *emit, mp_uint_t label) {
emit_post_push_reg(emit, VTYPE_PYOBJ, REG_RET);
}
STATIC void emit_native_for_iter_end(emit_t *emit, bool use_stack) {
STATIC void emit_native_for_iter_end(emit_t *emit) {
// adjust stack counter (we get here from for_iter ending, which popped the value for us)
emit_native_pre(emit);
adjust_stack(emit, -(use_stack ? sizeof(mp_obj_iter_buf_t) / sizeof(mp_obj_t) : 1));
adjust_stack(emit, -(sizeof(mp_obj_iter_buf_t) / sizeof(mp_obj_t)));
emit_post(emit);
}