aboutsummaryrefslogtreecommitdiff
path: root/py/compile.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-06 11:48:15 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-06 11:48:15 +0100
commit65cad12d388423f7d9b04a5ae3d7c1b5b176a2da (patch)
treef88eeb76a6ccb42931ab7b887507e41c695887e3 /py/compile.h
parentdeed087e2c083821f22a849fdb4de62004bd010f (diff)
py: Add option to compiler to specify default code emitter.
Also add command line option to unix port to select emitter.
Diffstat (limited to 'py/compile.h')
-rw-r--r--py/compile.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/py/compile.h b/py/compile.h
index 552d36fa5..d4a17b7a8 100644
--- a/py/compile.h
+++ b/py/compile.h
@@ -1 +1,9 @@
-mp_obj_t mp_compile(mp_parse_node_t pn, qstr source_file, bool is_repl);
+enum {
+ MP_EMIT_OPT_NONE,
+ MP_EMIT_OPT_BYTE_CODE,
+ MP_EMIT_OPT_NATIVE_PYTHON,
+ MP_EMIT_OPT_VIPER,
+ MP_EMIT_OPT_ASM_THUMB,
+};
+
+mp_obj_t mp_compile(mp_parse_node_t pn, qstr source_file, uint emit_opt, bool is_repl);