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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
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 2651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2662 Register scratch = t0; | 2662 Register scratch = t0; |
2663 Register scratch2 = t1; | 2663 Register scratch2 = t1; |
2664 | 2664 |
2665 Register spread = a2; | 2665 Register spread = a2; |
2666 Register spread_map = a4; | 2666 Register spread_map = a4; |
2667 | 2667 |
2668 Register spread_len = a4; | 2668 Register spread_len = a4; |
2669 | 2669 |
2670 Register native_context = a5; | 2670 Register native_context = a5; |
2671 | 2671 |
| 2672 Label runtime_call, push_args; |
2672 __ ld(spread, MemOperand(sp, 0)); | 2673 __ ld(spread, MemOperand(sp, 0)); |
| 2674 __ JumpIfSmi(spread, &runtime_call); |
2673 __ ld(spread_map, FieldMemOperand(spread, HeapObject::kMapOffset)); | 2675 __ ld(spread_map, FieldMemOperand(spread, HeapObject::kMapOffset)); |
2674 __ ld(native_context, NativeContextMemOperand()); | 2676 __ ld(native_context, NativeContextMemOperand()); |
2675 | 2677 |
2676 Label runtime_call, push_args; | |
2677 // Check that the spread is an array. | 2678 // Check that the spread is an array. |
2678 __ lbu(scratch, FieldMemOperand(spread_map, Map::kInstanceTypeOffset)); | 2679 __ lbu(scratch, FieldMemOperand(spread_map, Map::kInstanceTypeOffset)); |
2679 __ Branch(&runtime_call, ne, scratch, Operand(JS_ARRAY_TYPE)); | 2680 __ Branch(&runtime_call, ne, scratch, Operand(JS_ARRAY_TYPE)); |
2680 | 2681 |
2681 // Check that we have the original ArrayPrototype. | 2682 // Check that we have the original ArrayPrototype. |
2682 __ ld(scratch, FieldMemOperand(spread_map, Map::kPrototypeOffset)); | 2683 __ ld(scratch, FieldMemOperand(spread_map, Map::kPrototypeOffset)); |
2683 __ ld(scratch2, ContextMemOperand(native_context, | 2684 __ ld(scratch2, ContextMemOperand(native_context, |
2684 Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); | 2685 Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); |
2685 __ Branch(&runtime_call, ne, scratch, Operand(scratch2)); | 2686 __ Branch(&runtime_call, ne, scratch, Operand(scratch2)); |
2686 | 2687 |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3152 __ break_(0xCC); | 3153 __ break_(0xCC); |
3153 } | 3154 } |
3154 } | 3155 } |
3155 | 3156 |
3156 #undef __ | 3157 #undef __ |
3157 | 3158 |
3158 } // namespace internal | 3159 } // namespace internal |
3159 } // namespace v8 | 3160 } // namespace v8 |
3160 | 3161 |
3161 #endif // V8_TARGET_ARCH_MIPS64 | 3162 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |