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).
This commit is contained in:
Damien
2013-12-21 18:17:45 +00:00
parent e2880aa2fd
commit d99b05282d
74 changed files with 4808 additions and 3668 deletions

View File

@@ -5,11 +5,11 @@
#include <assert.h>
#include "misc.h"
#include "mpyconfig.h"
#include "mpconfig.h"
#include "lexer.h"
#include "parse.h"
#include "scope.h"
#include "runtime.h"
#include "runtime0.h"
#include "emit.h"
#define EMIT(fun, arg...) (emit_method_table->fun(emit, ##arg))