| 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 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 2625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2636 Register scratch = t0; | 2636 Register scratch = t0; |
| 2637 Register scratch2 = t1; | 2637 Register scratch2 = t1; |
| 2638 | 2638 |
| 2639 Register spread = a2; | 2639 Register spread = a2; |
| 2640 Register spread_map = t3; | 2640 Register spread_map = t3; |
| 2641 | 2641 |
| 2642 Register spread_len = t3; | 2642 Register spread_len = t3; |
| 2643 | 2643 |
| 2644 Register native_context = t4; | 2644 Register native_context = t4; |
| 2645 | 2645 |
| 2646 Label runtime_call, push_args; |
| 2646 __ lw(spread, MemOperand(sp, 0)); | 2647 __ lw(spread, MemOperand(sp, 0)); |
| 2648 __ JumpIfSmi(spread, &runtime_call); |
| 2647 __ lw(spread_map, FieldMemOperand(spread, HeapObject::kMapOffset)); | 2649 __ lw(spread_map, FieldMemOperand(spread, HeapObject::kMapOffset)); |
| 2648 __ lw(native_context, NativeContextMemOperand()); | 2650 __ lw(native_context, NativeContextMemOperand()); |
| 2649 | 2651 |
| 2650 Label runtime_call, push_args; | |
| 2651 // Check that the spread is an array. | 2652 // Check that the spread is an array. |
| 2652 __ lbu(scratch, FieldMemOperand(spread_map, Map::kInstanceTypeOffset)); | 2653 __ lbu(scratch, FieldMemOperand(spread_map, Map::kInstanceTypeOffset)); |
| 2653 __ Branch(&runtime_call, ne, scratch, Operand(JS_ARRAY_TYPE)); | 2654 __ Branch(&runtime_call, ne, scratch, Operand(JS_ARRAY_TYPE)); |
| 2654 | 2655 |
| 2655 // Check that we have the original ArrayPrototype. | 2656 // Check that we have the original ArrayPrototype. |
| 2656 __ lw(scratch, FieldMemOperand(spread_map, Map::kPrototypeOffset)); | 2657 __ lw(scratch, FieldMemOperand(spread_map, Map::kPrototypeOffset)); |
| 2657 __ lw(scratch2, ContextMemOperand(native_context, | 2658 __ lw(scratch2, ContextMemOperand(native_context, |
| 2658 Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); | 2659 Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); |
| 2659 __ Branch(&runtime_call, ne, scratch, Operand(scratch2)); | 2660 __ Branch(&runtime_call, ne, scratch, Operand(scratch2)); |
| 2660 | 2661 |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3128 __ break_(0xCC); | 3129 __ break_(0xCC); |
| 3129 } | 3130 } |
| 3130 } | 3131 } |
| 3131 | 3132 |
| 3132 #undef __ | 3133 #undef __ |
| 3133 | 3134 |
| 3134 } // namespace internal | 3135 } // namespace internal |
| 3135 } // namespace v8 | 3136 } // namespace v8 |
| 3136 | 3137 |
| 3137 #endif // V8_TARGET_ARCH_MIPS | 3138 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |