aboutsummaryrefslogtreecommitdiff
path: root/py/emit.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-04-20 13:29:31 +0000
committerDamien George <damien.p.george@gmail.com>2015-04-20 13:29:31 +0000
commitc8b60f013b9d624a74ad502460f2bc7d00c39644 (patch)
tree4fdc71a6e6963961e0591b3abc621d672bb1c645 /py/emit.h
parent2bb5f41611ddc90cf44090e87efd94523580008b (diff)
py: Make viper codegen raise proper exception (ViperTypeError) on error.
This fixes a long standing problem that viper code generation gave terrible error messages, and actually no errors on pyboard where assertions are disabled. Now all compile-time errors are raised as proper Python exceptions, and are of type ViperTypeError. Addresses issue #940.
Diffstat (limited to 'py/emit.h')
-rw-r--r--py/emit.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/py/emit.h b/py/emit.h
index 268c9d66c..35ba08db9 100644
--- a/py/emit.h
+++ b/py/emit.h
@@ -172,10 +172,10 @@ extern const mp_emit_method_table_id_ops_t mp_emit_bc_method_table_delete_id_ops
emit_t *emit_cpython_new(void);
emit_t *emit_bc_new(void);
-emit_t *emit_native_x64_new(mp_uint_t max_num_labels);
-emit_t *emit_native_x86_new(mp_uint_t max_num_labels);
-emit_t *emit_native_thumb_new(mp_uint_t max_num_labels);
-emit_t *emit_native_arm_new(mp_uint_t max_num_labels);
+emit_t *emit_native_x64_new(mp_obj_t *error_slot, mp_uint_t max_num_labels);
+emit_t *emit_native_x86_new(mp_obj_t *error_slot, mp_uint_t max_num_labels);
+emit_t *emit_native_thumb_new(mp_obj_t *error_slot, mp_uint_t max_num_labels);
+emit_t *emit_native_arm_new(mp_obj_t *error_slot, mp_uint_t max_num_labels);
void emit_cpython_set_max_num_labels(emit_t* emit, mp_uint_t max_num_labels);
void emit_bc_set_max_num_labels(emit_t* emit, mp_uint_t max_num_labels);