Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: src/x87/full-codegen-x87.cc

Issue 595863002: Adding more missing deoptimization points in Turbofan. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/cctest/compiler/test-codegen-deopt.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2767 matching lines...) Expand 10 before | Expand all | Expand 10 after
2778 2778
2779 // Push a copy of the function (found below the arguments) and 2779 // Push a copy of the function (found below the arguments) and
2780 // resolve eval. 2780 // resolve eval.
2781 __ push(Operand(esp, (arg_count + 1) * kPointerSize)); 2781 __ push(Operand(esp, (arg_count + 1) * kPointerSize));
2782 EmitResolvePossiblyDirectEval(arg_count); 2782 EmitResolvePossiblyDirectEval(arg_count);
2783 2783
2784 // The runtime call returns a pair of values in eax (function) and 2784 // The runtime call returns a pair of values in eax (function) and
2785 // edx (receiver). Touch up the stack with the right values. 2785 // edx (receiver). Touch up the stack with the right values.
2786 __ mov(Operand(esp, (arg_count + 0) * kPointerSize), edx); 2786 __ mov(Operand(esp, (arg_count + 0) * kPointerSize), edx);
2787 __ mov(Operand(esp, (arg_count + 1) * kPointerSize), eax); 2787 __ mov(Operand(esp, (arg_count + 1) * kPointerSize), eax);
2788
2789 PrepareForBailoutForId(expr->EvalOrLookupId(), NO_REGISTERS);
2788 } 2790 }
2789 // Record source position for debugger. 2791 // Record source position for debugger.
2790 SetSourcePosition(expr->position()); 2792 SetSourcePosition(expr->position());
2791 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS); 2793 CallFunctionStub stub(isolate(), arg_count, NO_CALL_FUNCTION_FLAGS);
2792 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); 2794 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
2793 __ CallStub(&stub); 2795 __ CallStub(&stub);
2794 RecordJSReturnSite(expr); 2796 RecordJSReturnSite(expr);
2795 // Restore context register. 2797 // Restore context register.
2796 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 2798 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
2797 context()->DropAndPlug(1, eax); 2799 context()->DropAndPlug(1, eax);
(...skipping 11 matching lines...) Expand all
2809 EmitDynamicLookupFastCase(proxy, NOT_INSIDE_TYPEOF, &slow, &done); 2811 EmitDynamicLookupFastCase(proxy, NOT_INSIDE_TYPEOF, &slow, &done);
2810 } 2812 }
2811 __ bind(&slow); 2813 __ bind(&slow);
2812 // Call the runtime to find the function to call (returned in eax) and 2814 // Call the runtime to find the function to call (returned in eax) and
2813 // the object holding it (returned in edx). 2815 // the object holding it (returned in edx).
2814 __ push(context_register()); 2816 __ push(context_register());
2815 __ push(Immediate(proxy->name())); 2817 __ push(Immediate(proxy->name()));
2816 __ CallRuntime(Runtime::kLoadLookupSlot, 2); 2818 __ CallRuntime(Runtime::kLoadLookupSlot, 2);
2817 __ push(eax); // Function. 2819 __ push(eax); // Function.
2818 __ push(edx); // Receiver. 2820 __ push(edx); // Receiver.
2821 PrepareForBailoutForId(expr->EvalOrLookupId(), NO_REGISTERS);
2819 2822
2820 // If fast case code has been generated, emit code to push the function 2823 // If fast case code has been generated, emit code to push the function
2821 // and receiver and have the slow path jump around this code. 2824 // and receiver and have the slow path jump around this code.
2822 if (done.is_linked()) { 2825 if (done.is_linked()) {
2823 Label call; 2826 Label call;
2824 __ jmp(&call, Label::kNear); 2827 __ jmp(&call, Label::kNear);
2825 __ bind(&done); 2828 __ bind(&done);
2826 // Push function. 2829 // Push function.
2827 __ push(eax); 2830 __ push(eax);
2828 // The receiver is implicitly the global receiver. Indicate this by 2831 // The receiver is implicitly the global receiver. Indicate this by
(...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after
4937 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4940 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4938 Assembler::target_address_at(call_target_address, 4941 Assembler::target_address_at(call_target_address,
4939 unoptimized_code)); 4942 unoptimized_code));
4940 return OSR_AFTER_STACK_CHECK; 4943 return OSR_AFTER_STACK_CHECK;
4941 } 4944 }
4942 4945
4943 4946
4944 } } // namespace v8::internal 4947 } } // namespace v8::internal
4945 4948
4946 #endif // V8_TARGET_ARCH_X87 4949 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/cctest/compiler/test-codegen-deopt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698