| 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 2614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2625 Register new_target = r3; | 2625 Register new_target = r3; |
| 2626 | 2626 |
| 2627 Register scratch = r2; | 2627 Register scratch = r2; |
| 2628 Register scratch2 = r6; | 2628 Register scratch2 = r6; |
| 2629 | 2629 |
| 2630 Register spread = r4; | 2630 Register spread = r4; |
| 2631 Register spread_map = r5; | 2631 Register spread_map = r5; |
| 2632 | 2632 |
| 2633 Register spread_len = r5; | 2633 Register spread_len = r5; |
| 2634 | 2634 |
| 2635 Label runtime_call, push_args; |
| 2635 __ ldr(spread, MemOperand(sp, 0)); | 2636 __ ldr(spread, MemOperand(sp, 0)); |
| 2637 __ JumpIfSmi(spread, &runtime_call); |
| 2636 __ ldr(spread_map, FieldMemOperand(spread, HeapObject::kMapOffset)); | 2638 __ ldr(spread_map, FieldMemOperand(spread, HeapObject::kMapOffset)); |
| 2637 | 2639 |
| 2638 Label runtime_call, push_args; | |
| 2639 // Check that the spread is an array. | 2640 // Check that the spread is an array. |
| 2640 __ CompareInstanceType(spread_map, scratch, JS_ARRAY_TYPE); | 2641 __ CompareInstanceType(spread_map, scratch, JS_ARRAY_TYPE); |
| 2641 __ b(ne, &runtime_call); | 2642 __ b(ne, &runtime_call); |
| 2642 | 2643 |
| 2643 // Check that we have the original ArrayPrototype. | 2644 // Check that we have the original ArrayPrototype. |
| 2644 __ ldr(scratch, FieldMemOperand(spread_map, Map::kPrototypeOffset)); | 2645 __ ldr(scratch, FieldMemOperand(spread_map, Map::kPrototypeOffset)); |
| 2645 __ ldr(scratch2, NativeContextMemOperand()); | 2646 __ ldr(scratch2, NativeContextMemOperand()); |
| 2646 __ ldr(scratch2, | 2647 __ ldr(scratch2, |
| 2647 ContextMemOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); | 2648 ContextMemOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); |
| 2648 __ cmp(scratch, scratch2); | 2649 __ cmp(scratch, scratch2); |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3055 __ bkpt(0); | 3056 __ bkpt(0); |
| 3056 } | 3057 } |
| 3057 } | 3058 } |
| 3058 | 3059 |
| 3059 #undef __ | 3060 #undef __ |
| 3060 | 3061 |
| 3061 } // namespace internal | 3062 } // namespace internal |
| 3062 } // namespace v8 | 3063 } // namespace v8 |
| 3063 | 3064 |
| 3064 #endif // V8_TARGET_ARCH_ARM | 3065 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |