| 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 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 2746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2757 // 3. Call to something that is not callable. | 2757 // 3. Call to something that is not callable. |
| 2758 __ bind(&non_callable); | 2758 __ bind(&non_callable); |
| 2759 { | 2759 { |
| 2760 FrameScope scope(masm, StackFrame::INTERNAL); | 2760 FrameScope scope(masm, StackFrame::INTERNAL); |
| 2761 __ Push(rdi); | 2761 __ Push(rdi); |
| 2762 __ CallRuntime(Runtime::kThrowCalledNonCallable); | 2762 __ CallRuntime(Runtime::kThrowCalledNonCallable); |
| 2763 } | 2763 } |
| 2764 } | 2764 } |
| 2765 | 2765 |
| 2766 static void CheckSpreadAndPushToStack(MacroAssembler* masm) { | 2766 static void CheckSpreadAndPushToStack(MacroAssembler* masm) { |
| 2767 Label runtime_call, push_args; |
| 2767 // Load the spread argument into rbx. | 2768 // Load the spread argument into rbx. |
| 2768 __ movp(rbx, Operand(rsp, kPointerSize)); | 2769 __ movp(rbx, Operand(rsp, kPointerSize)); |
| 2770 __ JumpIfSmi(rbx, &runtime_call); |
| 2769 // Load the map of the spread into r15. | 2771 // Load the map of the spread into r15. |
| 2770 __ movp(r15, FieldOperand(rbx, HeapObject::kMapOffset)); | 2772 __ movp(r15, FieldOperand(rbx, HeapObject::kMapOffset)); |
| 2771 // Load native context into r14. | 2773 // Load native context into r14. |
| 2772 __ movp(r14, NativeContextOperand()); | 2774 __ movp(r14, NativeContextOperand()); |
| 2773 | 2775 |
| 2774 Label runtime_call, push_args; | |
| 2775 // Check that the spread is an array. | 2776 // Check that the spread is an array. |
| 2776 __ CmpInstanceType(r15, JS_ARRAY_TYPE); | 2777 __ CmpInstanceType(r15, JS_ARRAY_TYPE); |
| 2777 __ j(not_equal, &runtime_call); | 2778 __ j(not_equal, &runtime_call); |
| 2778 | 2779 |
| 2779 // Check that we have the original ArrayPrototype. | 2780 // Check that we have the original ArrayPrototype. |
| 2780 __ movp(rcx, FieldOperand(r15, Map::kPrototypeOffset)); | 2781 __ movp(rcx, FieldOperand(r15, Map::kPrototypeOffset)); |
| 2781 __ cmpp(rcx, ContextOperand(r14, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); | 2782 __ cmpp(rcx, ContextOperand(r14, Context::INITIAL_ARRAY_PROTOTYPE_INDEX)); |
| 2782 __ j(not_equal, &runtime_call); | 2783 __ j(not_equal, &runtime_call); |
| 2783 | 2784 |
| 2784 // Check that the ArrayPrototype hasn't been modified in a way that would | 2785 // Check that the ArrayPrototype hasn't been modified in a way that would |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3200 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3201 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
| 3201 Generate_OnStackReplacementHelper(masm, true); | 3202 Generate_OnStackReplacementHelper(masm, true); |
| 3202 } | 3203 } |
| 3203 | 3204 |
| 3204 #undef __ | 3205 #undef __ |
| 3205 | 3206 |
| 3206 } // namespace internal | 3207 } // namespace internal |
| 3207 } // namespace v8 | 3208 } // namespace v8 |
| 3208 | 3209 |
| 3209 #endif // V8_TARGET_ARCH_X64 | 3210 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |