Index: src/code-stub-assembler.cc |
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
index 0c698b92009845de76678295a43d7ec05a8c3333..56e429b652beea713eb5fd565c5b8bbf906b06dd 100644 |
--- a/src/code-stub-assembler.cc |
+++ b/src/code-stub-assembler.cc |
@@ -967,6 +967,11 @@ Node* CodeStubAssembler::LoadMapInstanceType(Node* map) { |
return LoadObjectField(map, Map::kInstanceTypeOffset, MachineType::Uint8()); |
} |
+Node* CodeStubAssembler::LoadMapElementsKind(Node* map) { |
+ Node* bit_field2 = LoadMapBitField2(map); |
+ return BitFieldDecode<Map::ElementsKindBits>(bit_field2); |
+} |
+ |
Node* CodeStubAssembler::LoadMapDescriptors(Node* map) { |
return LoadObjectField(map, Map::kDescriptorsOffset); |
} |
@@ -3708,8 +3713,7 @@ void CodeStubAssembler::TryLookupElement(Node* object, Node* map, |
Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)), |
if_bailout); |
- Node* bit_field2 = LoadMapBitField2(map); |
- Node* elements_kind = BitFieldDecode<Map::ElementsKindBits>(bit_field2); |
+ Node* elements_kind = LoadMapElementsKind(map); |
// TODO(verwaest): Support other elements kinds as well. |
Label if_isobjectorsmi(this), if_isdouble(this), if_isdictionary(this), |
@@ -4819,8 +4823,7 @@ void CodeStubAssembler::KeyedLoadICGeneric(const LoadICParameters* p) { |
Comment("integer index"); |
Node* index = var_index.value(); |
Node* elements = LoadElements(receiver); |
- Node* bitfield2 = LoadMapBitField2(receiver_map); |
- Node* elements_kind = BitFieldDecode<Map::ElementsKindBits>(bitfield2); |
+ Node* elements_kind = LoadMapElementsKind(receiver_map); |
Node* is_jsarray_condition = |
Word32Equal(instance_type, Int32Constant(JS_ARRAY_TYPE)); |
Variable var_double_value(this, MachineRepresentation::kFloat64); |