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