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

pull/4157/head
Damien George 2018-09-15 12:15:19 +10:00
rodzic abb536da49
commit 3751512e9d
3 zmienionych plików z 10 dodań i 10 usunięć

Wyświetl plik

@ -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);

Wyświetl plik

@ -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,

Wyświetl plik

@ -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;