1.1 --- a/src/Interpreter.cpp Sat Aug 04 17:51:43 2012 -0700
1.2 +++ b/src/Interpreter.cpp Sat Aug 04 19:33:06 2012 -0700
1.3 @@ -25,6 +25,7 @@
1.4 #include "Reference.h"
1.5 #include "Strings.h"
1.6 #include "Environments.h"
1.7 +#include "Structures.h"
1.8 #include "Heap-inl.h"
1.9
1.10 using namespace ke;
1.11 @@ -699,6 +700,17 @@
1.12 break;
1.13 }
1.14
1.15 +case OP_NEWSTRUCT:
1.16 +{
1.17 + Heap::Tenure tenure = (Heap::Tenure)top.pc[1];
1.18 + Local<StructMap> map(zone, StructMap::cast(top.fp->code()->map(READ_UINT32(top.pc + 1))));
1.19 + top.sp->obj = Struct::New(zone, map, tenure);
1.20 + if (!top.sp->obj)
1.21 + goto error;
1.22 + top.sp++;
1.23 + break;
1.24 +}
1.25 +
1.26 case OP_SAVELIFO:
1.27 {
1.28 unsigned slot = READ_UINT32(top.pc);