summaryrefslogtreecommitdiffstatshomepage
path: root/py/emitbc.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-05-10 18:16:21 +0100
committerDamien George <damien.p.george@gmail.com>2014-05-10 18:16:21 +0100
commit0fb80c303a2685372fe93ff23cecad9f7dfc67fe (patch)
treeaee53be5aeede7dff6a27e21a1192cd9f44046a8 /py/emitbc.c
parent9597771fe4c0aa42f20514d7315e706bf6dc51cf (diff)
downloadmicropython-0fb80c303a2685372fe93ff23cecad9f7dfc67fe.tar.gz
micropython-0fb80c303a2685372fe93ff23cecad9f7dfc67fe.zip
py: Compress a little the bytecode emitter structure.
Diffstat (limited to 'py/emitbc.c')
-rw-r--r--py/emitbc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/py/emitbc.c b/py/emitbc.c
index bfd378b5e5..06f63b6f6c 100644
--- a/py/emitbc.c
+++ b/py/emitbc.c
@@ -48,9 +48,11 @@
#define DUMMY_DATA_SIZE (BYTES_FOR_INT)
struct _emit_t {
- pass_kind_t pass;
+ pass_kind_t pass : 8;
+ uint last_emit_was_return_value : 8;
+ byte dummy_data[DUMMY_DATA_SIZE];
+
int stack_size;
- bool last_emit_was_return_value;
scope_t *scope;
@@ -65,7 +67,6 @@ struct _emit_t {
uint bytecode_offset;
uint bytecode_size;
byte *code_base; // stores both byte code and code info
- byte dummy_data[DUMMY_DATA_SIZE];
};
STATIC void emit_bc_rot_two(emit_t *emit);