summaryrefslogtreecommitdiff
path: root/py/emitcpy.c
diff options
context:
space:
mode:
authorDamien <damien.p.george@gmail.com>2013-12-21 18:17:45 +0000
committerDamien <damien.p.george@gmail.com>2013-12-21 18:17:45 +0000
commitd99b05282d14ceb0163cbcd059aa37bdb415af43 (patch)
tree978135f9fe83d3c4d5b3c95f84cb104c0092936a /py/emitcpy.c
parente2880aa2fdc75298df487df7519d483acb03959c (diff)
Change object representation from 1 big union to individual structs.
A big change. Micro Python objects are allocated as individual structs with the first element being a pointer to the type information (which is itself an object). This scheme follows CPython. Much more flexible, not necessarily slower, uses same heap memory, and can allocate objects statically. Also change name prefix, from py_ to mp_ (mp for Micro Python).
Diffstat (limited to 'py/emitcpy.c')
-rw-r--r--py/emitcpy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/py/emitcpy.c b/py/emitcpy.c
index cb8bef479..52f804925 100644
--- a/py/emitcpy.c
+++ b/py/emitcpy.c
@@ -6,12 +6,12 @@
#include <assert.h>
#include "misc.h"
-#include "mpyconfig.h"
+#include "mpconfig.h"
#include "lexer.h"
#include "parse.h"
#include "compile.h"
#include "scope.h"
-#include "runtime.h"
+#include "runtime0.h"
#include "emit.h"
#if MICROPY_EMIT_CPYTHON
@@ -136,9 +136,9 @@ static void emit_cpy_load_const_tok(emit_t *emit, py_token_kind_t tok) {
if (emit->pass == PASS_3) {
printf("LOAD_CONST ");
switch (tok) {
- case PY_TOKEN_KW_FALSE: printf("False"); break;
- case PY_TOKEN_KW_NONE: printf("None"); break;
- case PY_TOKEN_KW_TRUE: printf("True"); break;
+ case MP_TOKEN_KW_FALSE: printf("False"); break;
+ case MP_TOKEN_KW_NONE: printf("None"); break;
+ case MP_TOKEN_KW_TRUE: printf("True"); break;
default: printf("?=%d\n", tok); return; assert(0);
}
printf("\n");