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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 | 794 |
795 // Push slot for the receiver to be constructed. | 795 // Push slot for the receiver to be constructed. |
796 __ Push(Immediate(0)); | 796 __ Push(Immediate(0)); |
797 | 797 |
798 Generate_InterpreterPushArgs(masm, false); | 798 Generate_InterpreterPushArgs(masm, false); |
799 | 799 |
800 // Push return address in preparation for the tail-call. | 800 // Push return address in preparation for the tail-call. |
801 __ PushReturnAddressFrom(kScratchRegister); | 801 __ PushReturnAddressFrom(kScratchRegister); |
802 | 802 |
803 // Call the constructor (rax, rdx, rdi passed on). | 803 // Call the constructor (rax, rdx, rdi passed on). |
804 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 804 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
805 } | 805 } |
806 | 806 |
807 | 807 |
808 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { | 808 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { |
809 CallRuntimePassFunction(masm, Runtime::kCompileLazy); | 809 CallRuntimePassFunction(masm, Runtime::kCompileLazy); |
810 GenerateTailCallToReturnedCode(masm); | 810 GenerateTailCallToReturnedCode(masm); |
811 } | 811 } |
812 | 812 |
813 | 813 |
814 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { | 814 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 // Loop over the arguments array, pushing each value to the stack | 1197 // Loop over the arguments array, pushing each value to the stack |
1198 Generate_PushAppliedArguments(masm, kVectorOffset, kArgumentsOffset, | 1198 Generate_PushAppliedArguments(masm, kVectorOffset, kArgumentsOffset, |
1199 kIndexOffset, kLimitOffset); | 1199 kIndexOffset, kLimitOffset); |
1200 | 1200 |
1201 // Use undefined feedback vector | 1201 // Use undefined feedback vector |
1202 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex); | 1202 __ LoadRoot(rbx, Heap::kUndefinedValueRootIndex); |
1203 __ movp(rdi, Operand(rbp, kFunctionOffset)); | 1203 __ movp(rdi, Operand(rbp, kFunctionOffset)); |
1204 __ movp(rdx, Operand(rbp, kNewTargetOffset)); | 1204 __ movp(rdx, Operand(rbp, kNewTargetOffset)); |
1205 | 1205 |
1206 // Call the function. | 1206 // Call the function. |
1207 __ Call(masm->isolate()->builtins()->Construct(), | 1207 __ Call(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
1208 RelocInfo::CONSTRUCT_CALL); | |
1209 | 1208 |
1210 // Leave internal frame. | 1209 // Leave internal frame. |
1211 } | 1210 } |
1212 // remove this, target, arguments and newTarget | 1211 // remove this, target, arguments and newTarget |
1213 __ ret(kStackSize * kPointerSize); | 1212 __ ret(kStackSize * kPointerSize); |
1214 } | 1213 } |
1215 | 1214 |
1216 | 1215 |
1217 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { | 1216 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { |
1218 Generate_ApplyHelper(masm, false); | 1217 Generate_ApplyHelper(masm, false); |
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2062 __ ret(0); | 2061 __ ret(0); |
2063 } | 2062 } |
2064 | 2063 |
2065 | 2064 |
2066 #undef __ | 2065 #undef __ |
2067 | 2066 |
2068 } // namespace internal | 2067 } // namespace internal |
2069 } // namespace v8 | 2068 } // namespace v8 |
2070 | 2069 |
2071 #endif // V8_TARGET_ARCH_X64 | 2070 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |