| 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 __ pop(esi); // Callee's context. | 679 __ pop(esi); // Callee's context. |
| 680 __ leave(); // Leave the frame so we can tail call. | 680 __ leave(); // Leave the frame so we can tail call. |
| 681 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 681 __ mov(ecx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
| 682 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kCodeOffset)); | 682 __ mov(ecx, FieldOperand(ecx, SharedFunctionInfo::kCodeOffset)); |
| 683 __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); | 683 __ lea(ecx, FieldOperand(ecx, Code::kHeaderSize)); |
| 684 __ mov(FieldOperand(edi, JSFunction::kCodeEntryOffset), ecx); | 684 __ mov(FieldOperand(edi, JSFunction::kCodeEntryOffset), ecx); |
| 685 __ RecordWriteCodeEntryField(edi, ecx, ebx); | 685 __ RecordWriteCodeEntryField(edi, ecx, ebx); |
| 686 __ jmp(ecx); | 686 __ jmp(ecx); |
| 687 } | 687 } |
| 688 | 688 |
| 689 void Builtins::Generate_InterpreterMarkBaselineOnReturn(MacroAssembler* masm) { | |
| 690 // Save the function and context for call to CompileBaseline. | |
| 691 __ mov(edi, Operand(ebp, StandardFrameConstants::kFunctionOffset)); | |
| 692 __ mov(kContextRegister, | |
| 693 Operand(ebp, StandardFrameConstants::kContextOffset)); | |
| 694 | |
| 695 // Leave the frame before recompiling for baseline so that we don't count as | |
| 696 // an activation on the stack. | |
| 697 LeaveInterpreterFrame(masm, ebx, ecx); | |
| 698 | |
| 699 { | |
| 700 FrameScope frame_scope(masm, StackFrame::INTERNAL); | |
| 701 // Push return value. | |
| 702 __ push(eax); | |
| 703 | |
| 704 // Push function as argument and compile for baseline. | |
| 705 __ push(edi); | |
| 706 __ CallRuntime(Runtime::kCompileBaseline); | |
| 707 | |
| 708 // Restore return value. | |
| 709 __ pop(eax); | |
| 710 } | |
| 711 __ ret(0); | |
| 712 } | |
| 713 | |
| 714 static void Generate_StackOverflowCheck(MacroAssembler* masm, Register num_args, | 689 static void Generate_StackOverflowCheck(MacroAssembler* masm, Register num_args, |
| 715 Register scratch1, Register scratch2, | 690 Register scratch1, Register scratch2, |
| 716 Label* stack_overflow, | 691 Label* stack_overflow, |
| 717 bool include_receiver = false) { | 692 bool include_receiver = false) { |
| 718 // Check the stack for overflow. We are not trying to catch | 693 // Check the stack for overflow. We are not trying to catch |
| 719 // interruptions (e.g. debug break and preemption) here, so the "real stack | 694 // interruptions (e.g. debug break and preemption) here, so the "real stack |
| 720 // limit" is checked. | 695 // limit" is checked. |
| 721 ExternalReference real_stack_limit = | 696 ExternalReference real_stack_limit = |
| 722 ExternalReference::address_of_real_stack_limit(masm->isolate()); | 697 ExternalReference::address_of_real_stack_limit(masm->isolate()); |
| 723 __ mov(scratch1, Operand::StaticVariable(real_stack_limit)); | 698 __ mov(scratch1, Operand::StaticVariable(real_stack_limit)); |
| (...skipping 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3154 | 3129 |
| 3155 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3130 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
| 3156 Generate_OnStackReplacementHelper(masm, true); | 3131 Generate_OnStackReplacementHelper(masm, true); |
| 3157 } | 3132 } |
| 3158 | 3133 |
| 3159 #undef __ | 3134 #undef __ |
| 3160 } // namespace internal | 3135 } // namespace internal |
| 3161 } // namespace v8 | 3136 } // namespace v8 |
| 3162 | 3137 |
| 3163 #endif // V8_TARGET_ARCH_X87 | 3138 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |