diff options
author | Damien George <damien.p.george@gmail.com> | 2015-02-28 15:04:06 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-02-28 15:04:06 +0000 |
commit | 63f3832e813442dcfc88be65d78ce465b053a33b (patch) | |
tree | 1778184b6ce04f808d3d8a068e16cc0848f6b16a /py/emit.h | |
parent | 0b2fd918903509d0a5b368d328a9fa837880ff1c (diff) |
py: Combine emit functions for jump true/false to reduce code size.
Saves 116 bytes for stmhal and 56 bytes for cc3200 port.
Diffstat (limited to 'py/emit.h')
-rw-r--r-- | py/emit.h | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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); |