| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 2693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2704 Register new_target = x3; | 2704 Register new_target = x3; |
| 2705 | 2705 |
| 2706 Register scratch = x2; | 2706 Register scratch = x2; |
| 2707 Register scratch2 = x6; | 2707 Register scratch2 = x6; |
| 2708 | 2708 |
| 2709 Register spread = x4; | 2709 Register spread = x4; |
| 2710 Register spread_map = x5; | 2710 Register spread_map = x5; |
| 2711 | 2711 |
| 2712 Register spread_len = x5; | 2712 Register spread_len = x5; |
| 2713 | 2713 |
| 2714 Label runtime_call, push_args; |
| 2714 __ Peek(spread, 0); | 2715 __ Peek(spread, 0); |
| 2716 __ JumpIfSmi(spread, &runtime_call); |
| 2715 __ Ldr(spread_map, FieldMemOperand(spread, HeapObject::kMapOffset)); | 2717 __ Ldr(spread_map, FieldMemOperand(spread, HeapObject::kMapOffset)); |
| 2716 | 2718 |
| 2717 Label runtime_call, push_args; | |
| 2718 // Check that the spread is an array. | 2719 // Check that the spread is an array. |
| 2719 __ CompareInstanceType(spread_map, scratch, JS_ARRAY_TYPE); | 2720 __ CompareInstanceType(spread_map, scratch, JS_ARRAY_TYPE); |
| 2720 __ B(ne, &runtime_call); | 2721 __ B(ne, &runtime_call); |
| 2721 | 2722 |
| 2722 // Check that we have the original ArrayPrototype. | 2723 // Check that we have the original ArrayPrototype. |
| 2723 __ Ldr(scratch, FieldMemOperand(spread_map, Map::kPrototypeOffset)); | 2724 __ Ldr(scratch, FieldMemOperand(spread_map, Map::kPrototypeOffset)); |
| 2724 __ Ldr(scratch2, NativeContextMemOperand()); | 2725 __ Ldr(scratch2, NativeContextMemOperand()); |
| 2725 __ Ldr(scratch2, | 2726 __ Ldr(scratch2, |
| 2726 ContextMemOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); | 2727 ContextMemOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); |
| 2727 __ Cmp(scratch, scratch2); | 2728 __ Cmp(scratch, scratch2); |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3160 __ Unreachable(); | 3161 __ Unreachable(); |
| 3161 } | 3162 } |
| 3162 } | 3163 } |
| 3163 | 3164 |
| 3164 #undef __ | 3165 #undef __ |
| 3165 | 3166 |
| 3166 } // namespace internal | 3167 } // namespace internal |
| 3167 } // namespace v8 | 3168 } // namespace v8 |
| 3168 | 3169 |
| 3169 #endif // V8_TARGET_ARCH_ARM | 3170 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |