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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 | 749 |
750 Generate_InterpreterPushArgs(masm, eax); | 750 Generate_InterpreterPushArgs(masm, eax); |
751 | 751 |
752 // Restore number of arguments from slot on stack. | 752 // Restore number of arguments from slot on stack. |
753 __ mov(eax, Operand(esp, -kPointerSize)); | 753 __ mov(eax, Operand(esp, -kPointerSize)); |
754 | 754 |
755 // Re-push return address. | 755 // Re-push return address. |
756 __ Push(ecx); | 756 __ Push(ecx); |
757 | 757 |
758 // Call the constructor with unmodified eax, edi, ebi values. | 758 // Call the constructor with unmodified eax, edi, ebi values. |
759 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 759 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
760 } | 760 } |
761 | 761 |
762 | 762 |
763 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { | 763 void Builtins::Generate_CompileLazy(MacroAssembler* masm) { |
764 CallRuntimePassFunction(masm, Runtime::kCompileLazy); | 764 CallRuntimePassFunction(masm, Runtime::kCompileLazy); |
765 GenerateTailCallToReturnedCode(masm); | 765 GenerateTailCallToReturnedCode(masm); |
766 } | 766 } |
767 | 767 |
768 | 768 |
769 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { | 769 void Builtins::Generate_CompileOptimized(MacroAssembler* masm) { |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 // Loop over the arguments array, pushing each value to the stack | 1150 // Loop over the arguments array, pushing each value to the stack |
1151 Generate_PushAppliedArguments(masm, kVectorOffset, kArgumentsOffset, | 1151 Generate_PushAppliedArguments(masm, kVectorOffset, kArgumentsOffset, |
1152 kIndexOffset, kLimitOffset); | 1152 kIndexOffset, kLimitOffset); |
1153 | 1153 |
1154 // Use undefined feedback vector | 1154 // Use undefined feedback vector |
1155 __ LoadRoot(ebx, Heap::kUndefinedValueRootIndex); | 1155 __ LoadRoot(ebx, Heap::kUndefinedValueRootIndex); |
1156 __ mov(edi, Operand(ebp, kFunctionOffset)); | 1156 __ mov(edi, Operand(ebp, kFunctionOffset)); |
1157 __ mov(edx, Operand(ebp, kNewTargetOffset)); | 1157 __ mov(edx, Operand(ebp, kNewTargetOffset)); |
1158 | 1158 |
1159 // Call the function. | 1159 // Call the function. |
1160 __ Call(masm->isolate()->builtins()->Construct(), | 1160 __ Call(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
1161 RelocInfo::CONSTRUCT_CALL); | |
1162 | 1161 |
1163 // Leave internal frame. | 1162 // Leave internal frame. |
1164 } | 1163 } |
1165 // remove this, target, arguments, and newTarget | 1164 // remove this, target, arguments, and newTarget |
1166 __ ret(kStackSize * kPointerSize); | 1165 __ ret(kStackSize * kPointerSize); |
1167 } | 1166 } |
1168 | 1167 |
1169 | 1168 |
1170 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { | 1169 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { |
1171 Generate_ApplyHelper(masm, false); | 1170 Generate_ApplyHelper(masm, false); |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1994 | 1993 |
1995 __ bind(&ok); | 1994 __ bind(&ok); |
1996 __ ret(0); | 1995 __ ret(0); |
1997 } | 1996 } |
1998 | 1997 |
1999 #undef __ | 1998 #undef __ |
2000 } // namespace internal | 1999 } // namespace internal |
2001 } // namespace v8 | 2000 } // namespace v8 |
2002 | 2001 |
2003 #endif // V8_TARGET_ARCH_IA32 | 2002 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |