1.1 --- a/jitcraft/FixedArray.h Sat Jun 30 19:38:53 2012 -0700
1.2 +++ b/jitcraft/FixedArray.h Sat Jun 30 20:20:39 2012 -0700
1.3 @@ -25,19 +25,18 @@
1.4 // A fixed-length array that contains Object * slots.
1.5 class FixedArray : public Object
1.6 {
1.7 - OBJECT_FIELD(uint32, length);
1.8 + uint32 length_;
1.9
1.10 private:
1.11 Object **vec() {
1.12 return reinterpret_cast<Object **>(this + 1);
1.13 }
1.14 - void init(unsigned length);
1.15
1.16 public:
1.17 static FixedArray *New(Zone *zone, unsigned length, Heap::Tenure tenure);
1.18
1.19 unsigned length() {
1.20 - return READ_FIELD(length);
1.21 + return length_;
1.22 }
1.23 Object *at(size_t i) {
1.24 assert(i < length());
1.25 @@ -61,19 +60,18 @@
1.26 // A fixed-length array containing raw bytes.
1.27 class ByteArray : public Object
1.28 {
1.29 - OBJECT_FIELD(uint32, length);
1.30 + uint32 length_;
1.31
1.32 private:
1.33 Object **vec() {
1.34 return reinterpret_cast<Object **>(this + 1);
1.35 }
1.36 - void init(unsigned length);
1.37
1.38 public:
1.39 static ByteArray *New(Zone *zone, unsigned length, Heap::Tenure tenure);
1.40
1.41 unsigned length() {
1.42 - return READ_FIELD(length);
1.43 + return length_;
1.44 }
1.45 uint8 *raw() {
1.46 return reinterpret_cast<uint8 *>(this + 1);