OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 2763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2774 ContextMemOperand( | 2774 ContextMemOperand( |
2775 scratch2, Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_MAP_INDEX)); | 2775 scratch2, Context::INITIAL_ARRAY_ITERATOR_PROTOTYPE_MAP_INDEX)); |
2776 __ cmp(scratch, scratch2); | 2776 __ cmp(scratch, scratch2); |
2777 __ b(ne, &runtime_call); | 2777 __ b(ne, &runtime_call); |
2778 | 2778 |
2779 // For FastPacked kinds, iteration will have the same effect as simply | 2779 // For FastPacked kinds, iteration will have the same effect as simply |
2780 // accessing each property in order. | 2780 // accessing each property in order. |
2781 Label no_protector_check; | 2781 Label no_protector_check; |
2782 __ ldr(scratch, FieldMemOperand(spread_map, Map::kBitField2Offset)); | 2782 __ ldr(scratch, FieldMemOperand(spread_map, Map::kBitField2Offset)); |
2783 __ DecodeField<Map::ElementsKindBits>(scratch); | 2783 __ DecodeField<Map::ElementsKindBits>(scratch); |
2784 __ cmp(scratch, Operand(LAST_FAST_ELEMENTS_KIND)); | 2784 __ cmp(scratch, Operand(FAST_HOLEY_ELEMENTS)); |
2785 __ b(hi, &runtime_call); | 2785 __ b(hi, &runtime_call); |
2786 // For non-FastHoley kinds, we can skip the protector check. | 2786 // For non-FastHoley kinds, we can skip the protector check. |
2787 __ cmp(scratch, Operand(FAST_SMI_ELEMENTS)); | 2787 __ cmp(scratch, Operand(FAST_SMI_ELEMENTS)); |
2788 __ b(eq, &no_protector_check); | 2788 __ b(eq, &no_protector_check); |
2789 __ cmp(scratch, Operand(FAST_ELEMENTS)); | 2789 __ cmp(scratch, Operand(FAST_ELEMENTS)); |
2790 __ b(eq, &no_protector_check); | 2790 __ b(eq, &no_protector_check); |
2791 __ cmp(scratch, Operand(FAST_DOUBLE_ELEMENTS)); | |
2792 __ b(eq, &no_protector_check); | |
2793 // Check the ArrayProtector cell. | 2791 // Check the ArrayProtector cell. |
2794 __ LoadRoot(scratch, Heap::kArrayProtectorRootIndex); | 2792 __ LoadRoot(scratch, Heap::kArrayProtectorRootIndex); |
2795 __ ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset)); | 2793 __ ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset)); |
2796 __ cmp(scratch, Operand(Smi::FromInt(Isolate::kProtectorValid))); | 2794 __ cmp(scratch, Operand(Smi::FromInt(Isolate::kProtectorValid))); |
2797 __ b(ne, &runtime_call); | 2795 __ b(ne, &runtime_call); |
2798 | 2796 |
2799 __ bind(&no_protector_check); | 2797 __ bind(&no_protector_check); |
2800 // Load the FixedArray backing store. | 2798 // Load the FixedArray backing store. |
2801 __ ldr(spread, FieldMemOperand(spread, JSArray::kElementsOffset)); | 2799 __ ldr(spread, FieldMemOperand(spread, JSArray::kElementsOffset)); |
2802 __ b(&push_args); | 2800 __ b(&push_args); |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3024 __ bkpt(0); | 3022 __ bkpt(0); |
3025 } | 3023 } |
3026 } | 3024 } |
3027 | 3025 |
3028 #undef __ | 3026 #undef __ |
3029 | 3027 |
3030 } // namespace internal | 3028 } // namespace internal |
3031 } // namespace v8 | 3029 } // namespace v8 |
3032 | 3030 |
3033 #endif // V8_TARGET_ARCH_ARM | 3031 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |