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 #include "src/code-stub-assembler.h" | 4 #include "src/code-stub-assembler.h" |
5 #include "src/code-factory.h" | 5 #include "src/code-factory.h" |
6 #include "src/frames-inl.h" | 6 #include "src/frames-inl.h" |
7 #include "src/frames.h" | 7 #include "src/frames.h" |
8 #include "src/ic/handler-configuration.h" | 8 #include "src/ic/handler-configuration.h" |
9 #include "src/ic/stub-cache.h" | 9 #include "src/ic/stub-cache.h" |
10 | 10 |
(...skipping 4667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4678 | 4678 |
4679 GotoUnless(UintPtrLessThan(intptr_index, length), &if_oob); | 4679 GotoUnless(UintPtrLessThan(intptr_index, length), &if_oob); |
4680 | 4680 |
4681 // Check if the element is a double hole, but don't load it. | 4681 // Check if the element is a double hole, but don't load it. |
4682 LoadFixedDoubleArrayElement(elements, intptr_index, MachineType::None(), 0, | 4682 LoadFixedDoubleArrayElement(elements, intptr_index, MachineType::None(), 0, |
4683 INTPTR_PARAMETERS, if_not_found); | 4683 INTPTR_PARAMETERS, if_not_found); |
4684 Goto(if_found); | 4684 Goto(if_found); |
4685 } | 4685 } |
4686 Bind(&if_isdictionary); | 4686 Bind(&if_isdictionary); |
4687 { | 4687 { |
| 4688 // Negative keys must be converted to property names. |
| 4689 GotoIf(IntPtrLessThan(intptr_index, IntPtrConstant(0)), if_bailout); |
| 4690 |
4688 Variable var_entry(this, MachineType::PointerRepresentation()); | 4691 Variable var_entry(this, MachineType::PointerRepresentation()); |
4689 Node* elements = LoadElements(object); | 4692 Node* elements = LoadElements(object); |
4690 NumberDictionaryLookup<SeededNumberDictionary>( | 4693 NumberDictionaryLookup<SeededNumberDictionary>( |
4691 elements, intptr_index, if_found, &var_entry, if_not_found); | 4694 elements, intptr_index, if_found, &var_entry, if_not_found); |
4692 } | 4695 } |
4693 Bind(&if_isfaststringwrapper); | 4696 Bind(&if_isfaststringwrapper); |
4694 { | 4697 { |
4695 CSA_ASSERT(this, HasInstanceType(object, JS_VALUE_TYPE)); | 4698 CSA_ASSERT(this, HasInstanceType(object, JS_VALUE_TYPE)); |
4696 Node* string = LoadJSValueValue(object); | 4699 Node* string = LoadJSValueValue(object); |
4697 CSA_ASSERT(this, IsStringInstanceType(LoadInstanceType(string))); | 4700 CSA_ASSERT(this, IsStringInstanceType(LoadInstanceType(string))); |
(...skipping 4636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9334 STATIC_ASSERT(FAST_HOLEY_ELEMENTS == (FAST_ELEMENTS | 1)); | 9337 STATIC_ASSERT(FAST_HOLEY_ELEMENTS == (FAST_ELEMENTS | 1)); |
9335 STATIC_ASSERT(FAST_HOLEY_DOUBLE_ELEMENTS == (FAST_DOUBLE_ELEMENTS | 1)); | 9338 STATIC_ASSERT(FAST_HOLEY_DOUBLE_ELEMENTS == (FAST_DOUBLE_ELEMENTS | 1)); |
9336 | 9339 |
9337 // Check prototype chain if receiver does not have packed elements. | 9340 // Check prototype chain if receiver does not have packed elements. |
9338 Node* holey_elements = Word32And(elements_kind, Int32Constant(1)); | 9341 Node* holey_elements = Word32And(elements_kind, Int32Constant(1)); |
9339 return Word32Equal(holey_elements, Int32Constant(1)); | 9342 return Word32Equal(holey_elements, Int32Constant(1)); |
9340 } | 9343 } |
9341 | 9344 |
9342 } // namespace internal | 9345 } // namespace internal |
9343 } // namespace v8 | 9346 } // namespace v8 |
OLD | NEW |