diff options
author | Damien George <damien.p.george@gmail.com> | 2017-08-30 11:51:25 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-08-30 11:51:25 +1000 |
commit | 414537711dd05531c63eb830bfc9c3eecf657b1e (patch) | |
tree | e885b26c0e1ef94b189955546015893d704aaa1e /py/scope.h | |
parent | 39b465ca831d0ec866c2a137dccbfec7f7badfba (diff) |
py: Add MICROPY_USE_SMALL_HEAP_COMPILER option, disabled by default.
This new option allows the original and new parser/compiler to coexist.
Diffstat (limited to 'py/scope.h')
-rw-r--r-- | py/scope.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/py/scope.h b/py/scope.h index 370de5335..19df1c3d1 100644 --- a/py/scope.h +++ b/py/scope.h @@ -69,7 +69,10 @@ typedef enum { typedef struct _scope_t { scope_kind_t kind; struct _scope_t *parent; - const byte *pn; // points to the node after the scope index node + #if !MICROPY_USE_SMALL_HEAP_COMPILER + struct _scope_t *next; + #endif + mp_parse_node_t pn; // for small-heap compiler, points to the node after the scope index node uint16_t source_file; // a qstr uint16_t simple_name; // a qstr mp_raw_code_t *raw_code; @@ -86,7 +89,7 @@ typedef struct _scope_t { id_info_t *id_info; } scope_t; -scope_t *scope_new(scope_kind_t kind, const byte *pn, qstr source_file, mp_uint_t emit_options); +scope_t *scope_new(scope_kind_t kind, mp_parse_node_t pn, qstr source_file, mp_uint_t emit_options); void scope_free(scope_t *scope); id_info_t *scope_find_or_add_id(scope_t *scope, qstr qstr, bool *added); id_info_t *scope_find(scope_t *scope, qstr qstr); |