Skip to content
Snippets Groups Projects
Commit 3751512e authored by Damien George's avatar Damien George
Browse files

py/emit: Move MP_EMIT_OPT_xxx enums from compile.h to emitglue.h.

parent abb536da
No related branches found
No related tags found
No related merge requests found
......@@ -30,15 +30,6 @@
#include "py/parse.h"
#include "py/emitglue.h"
// These must fit in 8 bits; see scope.h
enum {
MP_EMIT_OPT_NONE,
MP_EMIT_OPT_BYTECODE,
MP_EMIT_OPT_NATIVE_PYTHON,
MP_EMIT_OPT_VIPER,
MP_EMIT_OPT_ASM,
};
// the compiler will raise an exception if an error occurred
// the compiler will clear the parse tree before it returns
mp_obj_t mp_compile(mp_parse_tree_t *parse_tree, qstr source_file, uint emit_opt, bool is_repl);
......
......@@ -30,6 +30,15 @@
// These variables and functions glue the code emitters to the runtime.
// These must fit in 8 bits; see scope.h
enum {
MP_EMIT_OPT_NONE,
MP_EMIT_OPT_BYTECODE,
MP_EMIT_OPT_NATIVE_PYTHON,
MP_EMIT_OPT_VIPER,
MP_EMIT_OPT_ASM,
};
typedef enum {
MP_CODE_UNUSED,
MP_CODE_RESERVED,
......
......@@ -75,7 +75,7 @@ typedef struct _scope_t {
uint16_t simple_name; // a qstr
mp_raw_code_t *raw_code;
uint8_t scope_flags; // see runtime0.h
uint8_t emit_options; // see compile.h
uint8_t emit_options; // see emitglue.h
uint16_t num_pos_args;
uint16_t num_kwonly_args;
uint16_t num_def_pos_args;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment