OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/ic/accessor-assembler.h" | 5 #include "src/ic/accessor-assembler.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/ic/handler-configuration.h" | 9 #include "src/ic/handler-configuration.h" |
10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 Bind(&if_dictionary); | 938 Bind(&if_dictionary); |
939 { | 939 { |
940 Comment("dictionary elements"); | 940 Comment("dictionary elements"); |
941 GotoIf(IntPtrLessThan(intptr_index, IntPtrConstant(0)), out_of_bounds); | 941 GotoIf(IntPtrLessThan(intptr_index, IntPtrConstant(0)), out_of_bounds); |
942 Variable var_entry(this, MachineType::PointerRepresentation()); | 942 Variable var_entry(this, MachineType::PointerRepresentation()); |
943 Label if_found(this); | 943 Label if_found(this); |
944 NumberDictionaryLookup<SeededNumberDictionary>( | 944 NumberDictionaryLookup<SeededNumberDictionary>( |
945 elements, intptr_index, &if_found, &var_entry, if_hole); | 945 elements, intptr_index, &if_found, &var_entry, if_hole); |
946 Bind(&if_found); | 946 Bind(&if_found); |
947 // Check that the value is a data property. | 947 // Check that the value is a data property. |
948 Node* details_index = EntryToIndex<SeededNumberDictionary>( | 948 Node* index = EntryToIndex<SeededNumberDictionary>(var_entry.value()); |
949 var_entry.value(), SeededNumberDictionary::kEntryDetailsIndex); | 949 Node* details = |
950 Node* details = SmiToWord32(LoadFixedArrayElement(elements, details_index)); | 950 LoadDetailsForKeyIndex<SeededNumberDictionary>(elements, index); |
951 Node* kind = DecodeWord32<PropertyDetails::KindField>(details); | 951 Node* kind = DecodeWord32<PropertyDetails::KindField>(details); |
952 // TODO(jkummerow): Support accessors without missing? | 952 // TODO(jkummerow): Support accessors without missing? |
953 GotoUnless(Word32Equal(kind, Int32Constant(kData)), miss); | 953 GotoUnless(Word32Equal(kind, Int32Constant(kData)), miss); |
954 // Finally, load the value. | 954 // Finally, load the value. |
955 Node* value_index = EntryToIndex<SeededNumberDictionary>( | 955 Return(LoadValueForKeyIndex<SeededNumberDictionary>(elements, index)); |
956 var_entry.value(), SeededNumberDictionary::kEntryValueIndex); | |
957 Return(LoadFixedArrayElement(elements, value_index)); | |
958 } | 956 } |
959 | 957 |
960 Bind(&if_typed_array); | 958 Bind(&if_typed_array); |
961 { | 959 { |
962 Comment("typed elements"); | 960 Comment("typed elements"); |
963 // Check if buffer has been neutered. | 961 // Check if buffer has been neutered. |
964 Node* buffer = LoadObjectField(object, JSArrayBufferView::kBufferOffset); | 962 Node* buffer = LoadObjectField(object, JSArrayBufferView::kBufferOffset); |
965 GotoIf(IsDetachedBuffer(buffer), miss); | 963 GotoIf(IsDetachedBuffer(buffer), miss); |
966 | 964 |
967 // Bounds check. | 965 // Bounds check. |
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1948 Node* slot = Parameter(Descriptor::kSlot); | 1946 Node* slot = Parameter(Descriptor::kSlot); |
1949 Node* context = Parameter(Descriptor::kContext); | 1947 Node* context = Parameter(Descriptor::kContext); |
1950 Node* vector = LoadFeedbackVectorForStub(); | 1948 Node* vector = LoadFeedbackVectorForStub(); |
1951 | 1949 |
1952 StoreICParameters p(context, receiver, name, value, slot, vector); | 1950 StoreICParameters p(context, receiver, name, value, slot, vector); |
1953 KeyedStoreIC(&p, language_mode); | 1951 KeyedStoreIC(&p, language_mode); |
1954 } | 1952 } |
1955 | 1953 |
1956 } // namespace internal | 1954 } // namespace internal |
1957 } // namespace v8 | 1955 } // namespace v8 |
OLD | NEW |