1.1 --- a/src/Box.h Sun Aug 05 21:24:41 2012 -0700
1.2 +++ b/src/Box.h Mon Aug 06 02:03:36 2012 -0700
1.3 @@ -40,7 +40,8 @@
1.4 public:
1.5 static Box *New(Zone *zone, Handle<Type> type, int i32, Heap::Tenure = Heap::Tenure_Default);
1.6 static Box *New(Zone *zone, Handle<Type> type, float f, Heap::Tenure = Heap::Tenure_Default);
1.7 - static Box *New(Zone *zone, Handle<Type> type, Object *obj, Heap::Tenure = Heap::Tenure_Default);
1.8 + static Box *NewObj(Zone *zone, Handle<Type> type, Handle<Object> obj,
1.9 + Heap::Tenure = Heap::Tenure_Default);
1.10
1.11 Type *type() {
1.12 return type_;
1.13 @@ -54,6 +55,10 @@
1.14 assert(type()->pod() == PrimitiveType_Float);
1.15 return u.f;
1.16 }
1.17 + Object *toObject() {
1.18 + assert(type()->isTraceable());
1.19 + return u.obj;
1.20 + }
1.21
1.22 // Begin GC descriptor.
1.23 static inline size_t offsetOfType() {