Index: src/objects-inl.h |
=================================================================== |
--- src/objects-inl.h (revision 2285) |
+++ src/objects-inl.h (working copy) |
@@ -53,6 +53,13 @@ |
} |
+PropertyDetails PropertyDetails::AsDeleted() { |
+ PropertyDetails d(DONT_ENUM, NORMAL); |
+ Smi* smi = Smi::FromInt(AsSmi()->value() | DeletedField::encode(1)); |
+ return PropertyDetails(smi); |
+} |
+ |
+ |
#define CAST_ACCESSOR(type) \ |
type* type::cast(Object* object) { \ |
ASSERT(object->Is##type()); \ |
@@ -409,6 +416,13 @@ |
} |
+bool Object::IsJSGlobalPropertyCell() { |
+ return Object::IsHeapObject() |
+ && HeapObject::cast(this)->map()->instance_type() |
+ == JS_GLOBAL_PROPERTY_CELL_TYPE; |
+} |
+ |
+ |
bool Object::IsSharedFunctionInfo() { |
return Object::IsHeapObject() && |
(HeapObject::cast(this)->map()->instance_type() == |
@@ -1040,6 +1054,8 @@ |
ACCESSORS(Oddball, to_number, Object, kToNumberOffset) |
+ACCESSORS(JSGlobalPropertyCell, value, Object, kValueOffset) |
+ |
int JSObject::GetHeaderSize() { |
switch (map()->instance_type()) { |
case JS_GLOBAL_PROXY_TYPE: |
@@ -1397,6 +1413,7 @@ |
CAST_ACCESSOR(HeapObject) |
CAST_ACCESSOR(HeapNumber) |
CAST_ACCESSOR(Oddball) |
+CAST_ACCESSOR(JSGlobalPropertyCell) |
CAST_ACCESSOR(SharedFunctionInfo) |
CAST_ACCESSOR(Map) |
CAST_ACCESSOR(JSFunction) |