diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-06 11:48:15 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-06 11:48:15 +0100 |
commit | 65cad12d388423f7d9b04a5ae3d7c1b5b176a2da (patch) | |
tree | f88eeb76a6ccb42931ab7b887507e41c695887e3 /py/compile.h | |
parent | deed087e2c083821f22a849fdb4de62004bd010f (diff) | |
download | micropython-65cad12d388423f7d9b04a5ae3d7c1b5b176a2da.tar.gz micropython-65cad12d388423f7d9b04a5ae3d7c1b5b176a2da.zip |
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.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/py/compile.h b/py/compile.h index 552d36fa5a..d4a17b7a81 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); |