1.1 --- a/src/Reference.h Sun Aug 05 02:17:40 2012 -0700
1.2 +++ b/src/Reference.h Sun Aug 05 12:55:51 2012 -0700
1.3 @@ -25,18 +25,23 @@
1.4 namespace ke {
1.5
1.6 class Array;
1.7 +class Struct;
1.8
1.9 // A Reference is a typed pointer to another location in memory.
1.10 class Reference : public Object
1.11 {
1.12 void *location_;
1.13 + Barriered<Object> base_;
1.14 +
1.15 + // We do not compute references to objects, so this does not need to be
1.16 + // traced.
1.17 LocalSlot slot_;
1.18 - Barriered<Array> base_;
1.19
1.20 public:
1.21 static Reference *NewStack(Zone *zone, void *location, Heap::Tenure tenure = Heap::Tenure_Default);
1.22 static Reference *NewStack(Zone *zone, const LocalSlot &slot, Heap::Tenure tenure = Heap::Tenure_Default);
1.23 static Reference *NewArray(Zone *zone, Handle<Array> base, size_t index, Heap::Tenure tenure = Heap::Tenure_Default);
1.24 + static Reference *NewField(Zone *zone, Handle<Struct> obj, size_t index, Heap::Tenure tenure = Heap::Tenure_Default);
1.25
1.26 int getInt() {
1.27 return *reinterpret_cast<int *>(location_);