Index: src/objects-inl.h |
=================================================================== |
--- src/objects-inl.h (revision 8931) |
+++ src/objects-inl.h (working copy) |
@@ -552,7 +552,8 @@ |
return (map == heap->function_context_map() || |
map == heap->catch_context_map() || |
map == heap->with_context_map() || |
- map == heap->global_context_map()); |
+ map == heap->global_context_map() || |
+ map == heap->block_context_map()); |
} |
return false; |
} |
@@ -565,6 +566,13 @@ |
} |
+bool Object::IsSerializedScopeInfo() { |
+ return Object::IsHeapObject() && |
+ HeapObject::cast(this)->map() == |
+ HeapObject::cast(this)->GetHeap()->serialized_scope_info_map(); |
+} |
+ |
+ |
bool Object::IsJSFunction() { |
return Object::IsHeapObject() |
&& HeapObject::cast(this)->map()->instance_type() == JS_FUNCTION_TYPE; |
@@ -1335,14 +1343,14 @@ |
ACCESSORS(JSObject, properties, FixedArray, kPropertiesOffset) |
-HeapObject* JSObject::elements() { |
+FixedArrayBase* JSObject::elements() { |
Object* array = READ_FIELD(this, kElementsOffset); |
ASSERT(array->HasValidElements()); |
- return reinterpret_cast<HeapObject*>(array); |
+ return static_cast<FixedArrayBase*>(array); |
} |
-void JSObject::set_elements(HeapObject* value, WriteBarrierMode mode) { |
+void JSObject::set_elements(FixedArrayBase* value, WriteBarrierMode mode) { |
ASSERT(map()->has_fast_elements() == |
(value->map() == GetHeap()->fixed_array_map() || |
value->map() == GetHeap()->fixed_cow_array_map())); |
@@ -2114,13 +2122,7 @@ |
SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset) |
-SMI_ACCESSORS(ByteArray, length, kLengthOffset) |
-// TODO(1493): Investigate if it's possible to s/INT/SMI/ here (and |
-// subsequently unify H{Fixed,External}ArrayLength). |
-INT_ACCESSORS(ExternalArray, length, kLengthOffset) |
- |
- |
SMI_ACCESSORS(String, length, kLengthOffset) |