- Added some code for generating VM code from FxExpressions. This is completely untested, since

it isn't even used anywhere yet. In retrospect, I probably should have targeted an intermediate
  representation and done codegen with that instead, since that would be something I can reuse.

SVN r1908 (scripting)
This commit is contained in:
Randy Heit 2009-10-11 00:02:14 +00:00
commit 3001708d16
8 changed files with 1434 additions and 34 deletions

View file

@ -30,8 +30,8 @@
#define JMPOFS(x) ((*(VM_SWORD *)(x) >> 6) & ~3)
#endif
#define KC (konst[C])
#define RC (reg.i[C])
#define KC (konstd[C])
#define RC (reg.d[C])
#define PA (reg.a[A])
#define PB (reg.a[B])
@ -61,11 +61,12 @@ enum
X_READ_NIL,
X_WRITE_NIL,
X_TOO_MANY_TRIES,
X_ARRAY_OUT_OF_BOUNDS
};
#define GETADDR(a,o,x) \
if (a == 0) { THROW(x); } \
ptr = (VM_SBYTE *)a + x \
if (a == NULL) { THROW(x); } \
ptr = (VM_SBYTE *)a + o
static const VM_UWORD ZapTable[16] =
{