| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.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 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2715 Register argc = eax; | 2715 Register argc = eax; |
| 2716 | 2716 |
| 2717 Register scratch = ecx; | 2717 Register scratch = ecx; |
| 2718 Register scratch2 = edi; | 2718 Register scratch2 = edi; |
| 2719 | 2719 |
| 2720 Register spread = ebx; | 2720 Register spread = ebx; |
| 2721 Register spread_map = edx; | 2721 Register spread_map = edx; |
| 2722 | 2722 |
| 2723 Register spread_len = edx; | 2723 Register spread_len = edx; |
| 2724 | 2724 |
| 2725 Label runtime_call, push_args; |
| 2725 __ mov(spread, Operand(esp, kPointerSize)); | 2726 __ mov(spread, Operand(esp, kPointerSize)); |
| 2727 __ JumpIfSmi(spread, &runtime_call); |
| 2726 __ mov(spread_map, FieldOperand(spread, HeapObject::kMapOffset)); | 2728 __ mov(spread_map, FieldOperand(spread, HeapObject::kMapOffset)); |
| 2727 | 2729 |
| 2728 Label runtime_call, push_args; | |
| 2729 // Check that the spread is an array. | 2730 // Check that the spread is an array. |
| 2730 __ CmpInstanceType(spread_map, JS_ARRAY_TYPE); | 2731 __ CmpInstanceType(spread_map, JS_ARRAY_TYPE); |
| 2731 __ j(not_equal, &runtime_call); | 2732 __ j(not_equal, &runtime_call); |
| 2732 | 2733 |
| 2733 // Check that we have the original ArrayPrototype. | 2734 // Check that we have the original ArrayPrototype. |
| 2734 __ mov(scratch, FieldOperand(spread_map, Map::kPrototypeOffset)); | 2735 __ mov(scratch, FieldOperand(spread_map, Map::kPrototypeOffset)); |
| 2735 __ mov(scratch2, NativeContextOperand()); | 2736 __ mov(scratch2, NativeContextOperand()); |
| 2736 __ cmp(scratch, | 2737 __ cmp(scratch, |
| 2737 ContextOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); | 2738 ContextOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); |
| 2738 __ j(not_equal, &runtime_call); | 2739 __ j(not_equal, &runtime_call); |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3342 | 3343 |
| 3343 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3344 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
| 3344 Generate_OnStackReplacementHelper(masm, true); | 3345 Generate_OnStackReplacementHelper(masm, true); |
| 3345 } | 3346 } |
| 3346 | 3347 |
| 3347 #undef __ | 3348 #undef __ |
| 3348 } // namespace internal | 3349 } // namespace internal |
| 3349 } // namespace v8 | 3350 } // namespace v8 |
| 3350 | 3351 |
| 3351 #endif // V8_TARGET_ARCH_X87 | 3352 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |