Index: src/layout-descriptor-inl.h |
diff --git a/src/layout-descriptor-inl.h b/src/layout-descriptor-inl.h |
index e682cd6eeb672874890c3bc0f39d28a6eaf4fb60..ba76704d5fc1f5c8883838a61de046268129c0d9 100644 |
--- a/src/layout-descriptor-inl.h |
+++ b/src/layout-descriptor-inl.h |
@@ -22,7 +22,7 @@ |
} |
length = GetSlowModeBackingStoreLength(length); |
return Handle<LayoutDescriptor>::cast( |
- isolate->factory()->NewJSTypedArray(UINT32_ELEMENTS, length)); |
+ isolate->factory()->NewFixedTypedArray(length, kExternalUint32Array)); |
} |
@@ -48,7 +48,7 @@ |
} |
*layout_word_index = field_index / kNumberOfBits; |
- CHECK((!IsSmi() && (*layout_word_index < Smi::cast(length())->value())) || |
+ CHECK((!IsSmi() && (*layout_word_index < length())) || |
(IsSmi() && (*layout_word_index < 1))); |
*layout_bit_index = field_index % kNumberOfBits; |
@@ -123,20 +123,7 @@ |
int LayoutDescriptor::capacity() { |
- return IsSlowLayout() ? (Smi::cast(length())->value() * kNumberOfBits) |
- : kSmiValueSize; |
-} |
- |
- |
-uint32_t LayoutDescriptor::get_scalar(int index) { |
- DCHECK(IsSlowLayout()); |
- return GcSafeElements()->get_scalar(index); |
-} |
- |
- |
-void LayoutDescriptor::set(int index, uint32_t value) { |
- DCHECK(IsSlowLayout()); |
- GcSafeElements()->set(index, value); |
+ return IsSlowLayout() ? (length() * kNumberOfBits) : kSmiValueSize; |
} |
@@ -227,16 +214,6 @@ |
} |
-FixedTypedArray<Uint32ArrayTraits>* LayoutDescriptor::GcSafeElements() { |
- MapWord map_word = HeapObject::cast(elements())->map_word(); |
- if (map_word.IsForwardingAddress()) { |
- return FixedTypedArray<Uint32ArrayTraits>::cast( |
- map_word.ToForwardingAddress()); |
- } |
- return FixedTypedArray<Uint32ArrayTraits>::cast(elements()); |
-} |
- |
- |
// InobjectPropertiesHelper is a helper class for querying whether inobject |
// property at offset is Double or not. |
LayoutDescriptorHelper::LayoutDescriptorHelper(Map* map) |