1.1 --- a/src/BytecodeEmitter.h Sat Sep 15 19:33:24 2012 -0700
1.2 +++ b/src/BytecodeEmitter.h Sun Sep 16 19:02:23 2012 -0700
1.3 @@ -25,11 +25,13 @@
1.4 #include "NameBinding.h"
1.5 #include "Handles.h"
1.6 #include "CompactBuffer.h"
1.7 +#include "Array.h"
1.8
1.9 namespace ke {
1.10
1.11 class Type;
1.12 class Map;
1.13 +class ArrayMap;
1.14
1.15 typedef PoolList<ScopedRoot<Object> > ObjectList;
1.16
1.17 @@ -436,7 +438,7 @@
1.18 void cvt_i2f() {
1.19 singleByteOp(OP_CVT_I2F);
1.20 }
1.21 - void newarray(Opcode op, Handle<Map> map, Heap::Tenure tenure) {
1.22 + void newarray(Opcode op, Handle<ArrayMap> map, Heap::Tenure tenure) {
1.23 assert(op == OP_NEWFIXED ||
1.24 op == OP_NEWEMPTY ||
1.25 op == OP_NEWSIZED);
1.26 @@ -446,6 +448,10 @@
1.27 writeOp(op);
1.28 writeUint8(tenure);
1.29 writeObject(map);
1.30 +
1.31 + if (op == OP_NEWSIZED)
1.32 + drop(map->type()->levels());
1.33 +
1.34 markOop(1);
1.35 }
1.36 void newstruct(Handle<Map> map, Heap::Tenure tenure) {