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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
941 Bind(&if_dictionary); | 941 Bind(&if_dictionary); |
942 { | 942 { |
943 Comment("dictionary elements"); | 943 Comment("dictionary elements"); |
944 GotoIf(IntPtrLessThan(intptr_index, IntPtrConstant(0)), out_of_bounds); | 944 GotoIf(IntPtrLessThan(intptr_index, IntPtrConstant(0)), out_of_bounds); |
945 Variable var_entry(this, MachineType::PointerRepresentation()); | 945 Variable var_entry(this, MachineType::PointerRepresentation()); |
946 Label if_found(this); | 946 Label if_found(this); |
947 NumberDictionaryLookup<SeededNumberDictionary>( | 947 NumberDictionaryLookup<SeededNumberDictionary>( |
948 elements, intptr_index, &if_found, &var_entry, if_hole); | 948 elements, intptr_index, &if_found, &var_entry, if_hole); |
949 Bind(&if_found); | 949 Bind(&if_found); |
950 // Check that the value is a data property. | 950 // Check that the value is a data property. |
951 Node* details_index = EntryToIndex<SeededNumberDictionary>( | 951 Node* index = EntryToIndex<SeededNumberDictionary>(var_entry.value()); |
952 var_entry.value(), SeededNumberDictionary::kEntryDetailsIndex); | 952 Node* details = |
953 Node* details = SmiToWord32(LoadFixedArrayElement(elements, details_index)); | 953 LoadDetailsByKeyIndex<SeededNumberDictionary>(elements, index); |
954 Node* kind = DecodeWord32<PropertyDetails::KindField>(details); | 954 Node* kind = DecodeWord32<PropertyDetails::KindField>(details); |
955 // TODO(jkummerow): Support accessors without missing? | 955 // TODO(jkummerow): Support accessors without missing? |
956 GotoUnless(Word32Equal(kind, Int32Constant(kData)), miss); | 956 GotoUnless(Word32Equal(kind, Int32Constant(kData)), miss); |
957 // Finally, load the value. | 957 // Finally, load the value. |
958 Node* value_index = EntryToIndex<SeededNumberDictionary>( | 958 exit_point->Return( |
959 var_entry.value(), SeededNumberDictionary::kEntryValueIndex); | 959 LoadValueByKeyIndex<SeededNumberDictionary>(elements, index)); |
960 exit_point->Return(LoadFixedArrayElement(elements, value_index)); | |
961 } | 960 } |
962 | 961 |
963 Bind(&if_typed_array); | 962 Bind(&if_typed_array); |
964 { | 963 { |
965 Comment("typed elements"); | 964 Comment("typed elements"); |
966 // Check if buffer has been neutered. | 965 // Check if buffer has been neutered. |
967 Node* buffer = LoadObjectField(object, JSArrayBufferView::kBufferOffset); | 966 Node* buffer = LoadObjectField(object, JSArrayBufferView::kBufferOffset); |
968 GotoIf(IsDetachedBuffer(buffer), miss); | 967 GotoIf(IsDetachedBuffer(buffer), miss); |
969 | 968 |
970 // Bounds check. | 969 // Bounds check. |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1982 Node* slot = Parameter(Descriptor::kSlot); | 1981 Node* slot = Parameter(Descriptor::kSlot); |
1983 Node* context = Parameter(Descriptor::kContext); | 1982 Node* context = Parameter(Descriptor::kContext); |
1984 Node* vector = LoadFeedbackVectorForStub(); | 1983 Node* vector = LoadFeedbackVectorForStub(); |
1985 | 1984 |
1986 StoreICParameters p(context, receiver, name, value, slot, vector); | 1985 StoreICParameters p(context, receiver, name, value, slot, vector); |
1987 KeyedStoreIC(&p, language_mode); | 1986 KeyedStoreIC(&p, language_mode); |
1988 } | 1987 } |
1989 | 1988 |
1990 } // namespace internal | 1989 } // namespace internal |
1991 } // namespace v8 | 1990 } // namespace v8 |
OLD | NEW |