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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 2672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2683 Register argc = eax; | 2683 Register argc = eax; |
2684 | 2684 |
2685 Register scratch = ecx; | 2685 Register scratch = ecx; |
2686 Register scratch2 = edi; | 2686 Register scratch2 = edi; |
2687 | 2687 |
2688 Register spread = ebx; | 2688 Register spread = ebx; |
2689 Register spread_map = edx; | 2689 Register spread_map = edx; |
2690 | 2690 |
2691 Register spread_len = edx; | 2691 Register spread_len = edx; |
2692 | 2692 |
| 2693 Label runtime_call, push_args; |
2693 __ mov(spread, Operand(esp, kPointerSize)); | 2694 __ mov(spread, Operand(esp, kPointerSize)); |
| 2695 __ JumpIfSmi(spread, &runtime_call); |
2694 __ mov(spread_map, FieldOperand(spread, HeapObject::kMapOffset)); | 2696 __ mov(spread_map, FieldOperand(spread, HeapObject::kMapOffset)); |
2695 | 2697 |
2696 Label runtime_call, push_args; | |
2697 // Check that the spread is an array. | 2698 // Check that the spread is an array. |
2698 __ CmpInstanceType(spread_map, JS_ARRAY_TYPE); | 2699 __ CmpInstanceType(spread_map, JS_ARRAY_TYPE); |
2699 __ j(not_equal, &runtime_call); | 2700 __ j(not_equal, &runtime_call); |
2700 | 2701 |
2701 // Check that we have the original ArrayPrototype. | 2702 // Check that we have the original ArrayPrototype. |
2702 __ mov(scratch, FieldOperand(spread_map, Map::kPrototypeOffset)); | 2703 __ mov(scratch, FieldOperand(spread_map, Map::kPrototypeOffset)); |
2703 __ mov(scratch2, NativeContextOperand()); | 2704 __ mov(scratch2, NativeContextOperand()); |
2704 __ cmp(scratch, | 2705 __ cmp(scratch, |
2705 ContextOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); | 2706 ContextOperand(scratch2, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); |
2706 __ j(not_equal, &runtime_call); | 2707 __ j(not_equal, &runtime_call); |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3292 | 3293 |
3293 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3294 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
3294 Generate_OnStackReplacementHelper(masm, true); | 3295 Generate_OnStackReplacementHelper(masm, true); |
3295 } | 3296 } |
3296 | 3297 |
3297 #undef __ | 3298 #undef __ |
3298 } // namespace internal | 3299 } // namespace internal |
3299 } // namespace v8 | 3300 } // namespace v8 |
3300 | 3301 |
3301 #endif // V8_TARGET_ARCH_IA32 | 3302 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |