| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index df56d5ce5b14260ad439532e45f1ceda5cb473ca..b39bf682c3d9db8a14fb02740c95547735a14182 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -134,14 +134,6 @@
|
| }
|
|
|
|
|
| -bool Object::IsFixedArray() const {
|
| - if (!IsHeapObject()) return false;
|
| - InstanceType instance_type = HeapObject::cast(this)->map()->instance_type();
|
| - return instance_type == FIXED_ARRAY_TYPE ||
|
| - instance_type == TRANSITION_ARRAY_TYPE;
|
| -}
|
| -
|
| -
|
| // External objects are not extensible, so the map check is enough.
|
| bool Object::IsExternal() const {
|
| return Object::IsHeapObject() &&
|
| @@ -725,9 +717,9 @@
|
| TYPE_CHECKER(JSWeakSet, JS_WEAK_SET_TYPE)
|
| TYPE_CHECKER(JSContextExtensionObject, JS_CONTEXT_EXTENSION_OBJECT_TYPE)
|
| TYPE_CHECKER(Map, MAP_TYPE)
|
| +TYPE_CHECKER(FixedArray, FIXED_ARRAY_TYPE)
|
| TYPE_CHECKER(FixedDoubleArray, FIXED_DOUBLE_ARRAY_TYPE)
|
| TYPE_CHECKER(WeakFixedArray, FIXED_ARRAY_TYPE)
|
| -TYPE_CHECKER(TransitionArray, TRANSITION_ARRAY_TYPE)
|
|
|
|
|
| bool Object::IsJSWeakCollection() const {
|
| @@ -745,6 +737,11 @@
|
|
|
| bool Object::IsLayoutDescriptor() const {
|
| return IsSmi() || IsFixedTypedArrayBase();
|
| +}
|
| +
|
| +
|
| +bool Object::IsTransitionArray() const {
|
| + return IsFixedArray();
|
| }
|
|
|
|
|
| @@ -2409,7 +2406,7 @@
|
|
|
| void FixedArray::set(int index, Object* value) {
|
| DCHECK_NE(GetHeap()->fixed_cow_array_map(), map());
|
| - DCHECK(IsFixedArray());
|
| + DCHECK_EQ(FIXED_ARRAY_TYPE, map()->instance_type());
|
| DCHECK(index >= 0 && index < this->length());
|
| int offset = kHeaderSize + index * kPointerSize;
|
| WRITE_FIELD(this, offset, value);
|
| @@ -4459,8 +4456,7 @@
|
| if (instance_size != kVariableSizeSentinel) return instance_size;
|
| // Only inline the most frequent cases.
|
| InstanceType instance_type = map->instance_type();
|
| - if (instance_type == FIXED_ARRAY_TYPE ||
|
| - instance_type == TRANSITION_ARRAY_TYPE) {
|
| + if (instance_type == FIXED_ARRAY_TYPE) {
|
| return FixedArray::SizeFor(
|
| reinterpret_cast<FixedArray*>(this)->synchronized_length());
|
| }
|
|
|