diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-10 14:11:31 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-10 14:11:31 +0100 |
commit | 6f355fd3b914dfb31f9d8527670448a9fc323e81 (patch) | |
tree | 5562de18a95f7b12cad9033a05fc920a99839524 /py/emit.h | |
parent | bf8ae4d96eebc66bc92ef302757d22d9c79baf9b (diff) | |
download | micropython-6f355fd3b914dfb31f9d8527670448a9fc323e81.tar.gz micropython-6f355fd3b914dfb31f9d8527670448a9fc323e81.zip |
py: Make labels unsigned ints (converted from int).
Labels should never be negative, and this modified type signature
reflects that.
Diffstat (limited to 'py/emit.h')
-rw-r--r-- | py/emit.h | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -32,7 +32,7 @@ typedef struct _emit_method_table_t { void (*store_id)(emit_t *emit, qstr qstr); void (*delete_id)(emit_t *emit, qstr qstr); - void (*label_assign)(emit_t *emit, int l); + void (*label_assign)(emit_t *emit, uint l); void (*import_name)(emit_t *emit, qstr qstr); void (*import_from)(emit_t *emit, qstr qstr); void (*import_star)(emit_t *emit); @@ -68,21 +68,21 @@ typedef struct _emit_method_table_t { void (*pop_top)(emit_t *emit); void (*rot_two)(emit_t *emit); void (*rot_three)(emit_t *emit); - void (*jump)(emit_t *emit, int label); - void (*pop_jump_if_true)(emit_t *emit, int label); - void (*pop_jump_if_false)(emit_t *emit, int label); - void (*jump_if_true_or_pop)(emit_t *emit, int label); - void (*jump_if_false_or_pop)(emit_t *emit, int label); - void (*setup_loop)(emit_t *emit, int label); - void (*break_loop)(emit_t *emit, int label, int except_depth); - void (*continue_loop)(emit_t *emit, int label, int except_depth); - void (*setup_with)(emit_t *emit, int label); + void (*jump)(emit_t *emit, uint label); + void (*pop_jump_if_true)(emit_t *emit, uint label); + void (*pop_jump_if_false)(emit_t *emit, uint label); + void (*jump_if_true_or_pop)(emit_t *emit, uint label); + void (*jump_if_false_or_pop)(emit_t *emit, uint label); + void (*setup_loop)(emit_t *emit, uint label); + void (*break_loop)(emit_t *emit, uint label, int except_depth); + void (*continue_loop)(emit_t *emit, uint label, int except_depth); + void (*setup_with)(emit_t *emit, uint label); void (*with_cleanup)(emit_t *emit); - void (*setup_except)(emit_t *emit, int label); - void (*setup_finally)(emit_t *emit, int label); + void (*setup_except)(emit_t *emit, uint label); + void (*setup_finally)(emit_t *emit, uint label); void (*end_finally)(emit_t *emit); void (*get_iter)(emit_t *emit); - void (*for_iter)(emit_t *emit, int label); + void (*for_iter)(emit_t *emit, uint label); void (*for_iter_end)(emit_t *emit); void (*pop_block)(emit_t *emit); void (*pop_except)(emit_t *emit); @@ -136,7 +136,7 @@ typedef struct _emit_inline_asm_method_table_t { void (*start_pass)(emit_inline_asm_t *emit, pass_kind_t pass, scope_t *scope); void (*end_pass)(emit_inline_asm_t *emit); int (*count_params)(emit_inline_asm_t *emit, int n_params, mp_parse_node_t *pn_params); - void (*label)(emit_inline_asm_t *emit, int label_num, qstr label_id); + void (*label)(emit_inline_asm_t *emit, uint label_num, qstr label_id); void (*op)(emit_inline_asm_t *emit, qstr op, int n_args, mp_parse_node_t *pn_args); } emit_inline_asm_method_table_t; |