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/keyed-store-generic.h" | 5 #include "src/ic/keyed-store-generic.h" |
6 | 6 |
7 #include "src/compiler/code-assembler.h" | 7 #include "src/compiler/code-assembler.h" |
8 #include "src/contexts.h" | 8 #include "src/contexts.h" |
9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
10 | 10 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 var_target_map.Bind(LoadContextElement( | 132 var_target_map.Bind(LoadContextElement( |
133 native_context, Context::ArrayMapIndex(holey_to_kind))); | 133 native_context, Context::ArrayMapIndex(holey_to_kind))); |
134 Goto(&perform_transition); | 134 Goto(&perform_transition); |
135 } | 135 } |
136 | 136 |
137 // Found a supported transition target map, perform the transition! | 137 // Found a supported transition target map, perform the transition! |
138 Bind(&perform_transition); | 138 Bind(&perform_transition); |
139 { | 139 { |
140 if (IsFastDoubleElementsKind(from_kind) != | 140 if (IsFastDoubleElementsKind(from_kind) != |
141 IsFastDoubleElementsKind(to_kind)) { | 141 IsFastDoubleElementsKind(to_kind)) { |
142 Node* capacity = LoadFixedArrayBaseLength(elements); | 142 Node* capacity = SmiUntag(LoadFixedArrayBaseLength(elements)); |
143 GrowElementsCapacity(receiver, elements, from_kind, to_kind, capacity, | 143 GrowElementsCapacity(receiver, elements, from_kind, to_kind, capacity, |
144 capacity, INTPTR_PARAMETERS, bailout); | 144 capacity, INTPTR_PARAMETERS, bailout); |
145 } | 145 } |
146 StoreObjectField(receiver, JSObject::kMapOffset, var_target_map.value()); | 146 StoreObjectField(receiver, JSObject::kMapOffset, var_target_map.value()); |
147 } | 147 } |
148 } | 148 } |
149 | 149 |
150 void KeyedStoreGenericAssembler::TryChangeToHoleyMapHelper( | 150 void KeyedStoreGenericAssembler::TryChangeToHoleyMapHelper( |
151 Node* receiver, Node* receiver_map, Node* native_context, | 151 Node* receiver, Node* receiver_map, Node* native_context, |
152 ElementsKind packed_kind, ElementsKind holey_kind, Label* done, | 152 ElementsKind packed_kind, ElementsKind holey_kind, Label* done, |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 Bind(&slow); | 540 Bind(&slow); |
541 { | 541 { |
542 Comment("KeyedStoreGeneric_slow"); | 542 Comment("KeyedStoreGeneric_slow"); |
543 TailCallRuntime(Runtime::kSetProperty, p->context, p->receiver, p->name, | 543 TailCallRuntime(Runtime::kSetProperty, p->context, p->receiver, p->name, |
544 p->value, SmiConstant(language_mode)); | 544 p->value, SmiConstant(language_mode)); |
545 } | 545 } |
546 } | 546 } |
547 | 547 |
548 } // namespace internal | 548 } // namespace internal |
549 } // namespace v8 | 549 } // namespace v8 |
OLD | NEW |