From 63f3832e813442dcfc88be65d78ce465b053a33b Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 28 Feb 2015 15:04:06 +0000 Subject: py: Combine emit functions for jump true/false to reduce code size. Saves 116 bytes for stmhal and 56 bytes for cc3200 port. --- py/emit.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'py/emit.h') diff --git a/py/emit.h b/py/emit.h index 47ea4ec8c..ea8c3a655 100644 --- a/py/emit.h +++ b/py/emit.h @@ -106,10 +106,8 @@ typedef struct _emit_method_table_t { void (*rot_two)(emit_t *emit); void (*rot_three)(emit_t *emit); void (*jump)(emit_t *emit, mp_uint_t label); - void (*pop_jump_if_true)(emit_t *emit, mp_uint_t label); - void (*pop_jump_if_false)(emit_t *emit, mp_uint_t label); - void (*jump_if_true_or_pop)(emit_t *emit, mp_uint_t label); - void (*jump_if_false_or_pop)(emit_t *emit, mp_uint_t label); + void (*pop_jump_if)(emit_t *emit, bool cond, mp_uint_t label); + void (*jump_if_or_pop)(emit_t *emit, bool cond, mp_uint_t label); void (*break_loop)(emit_t *emit, mp_uint_t label, mp_uint_t except_depth); void (*continue_loop)(emit_t *emit, mp_uint_t label, mp_uint_t except_depth); void (*setup_with)(emit_t *emit, mp_uint_t label); -- cgit v1.2.3