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

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

Issue 841443004: [turbofan] Allow deoptimization for JSToNumber operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 11 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
« no previous file with comments | « src/compiler/operator-properties.cc ('k') | src/mips/full-codegen-mips.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_IA32 7 #if V8_TARGET_ARCH_IA32
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 4603 matching lines...) Expand 10 before | Expand all | Expand 10 after
4614 if (expr->op() == Token::INC) { 4614 if (expr->op() == Token::INC) {
4615 __ sub(eax, Immediate(Smi::FromInt(1))); 4615 __ sub(eax, Immediate(Smi::FromInt(1)));
4616 } else { 4616 } else {
4617 __ add(eax, Immediate(Smi::FromInt(1))); 4617 __ add(eax, Immediate(Smi::FromInt(1)));
4618 } 4618 }
4619 __ jmp(&stub_call, Label::kNear); 4619 __ jmp(&stub_call, Label::kNear);
4620 __ bind(&slow); 4620 __ bind(&slow);
4621 } 4621 }
4622 ToNumberStub convert_stub(isolate()); 4622 ToNumberStub convert_stub(isolate());
4623 __ CallStub(&convert_stub); 4623 __ CallStub(&convert_stub);
4624 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG);
4624 4625
4625 // Save result for postfix expressions. 4626 // Save result for postfix expressions.
4626 if (expr->is_postfix()) { 4627 if (expr->is_postfix()) {
4627 if (!context()->IsEffect()) { 4628 if (!context()->IsEffect()) {
4628 // Save the result on the stack. If we have a named or keyed property 4629 // Save the result on the stack. If we have a named or keyed property
4629 // we store the result under the receiver that is currently on top 4630 // we store the result under the receiver that is currently on top
4630 // of the stack. 4631 // of the stack.
4631 switch (assign_type) { 4632 switch (assign_type) {
4632 case VARIABLE: 4633 case VARIABLE:
4633 __ push(eax); 4634 __ push(eax);
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
5176 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5177 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5177 Assembler::target_address_at(call_target_address, 5178 Assembler::target_address_at(call_target_address,
5178 unoptimized_code)); 5179 unoptimized_code));
5179 return OSR_AFTER_STACK_CHECK; 5180 return OSR_AFTER_STACK_CHECK;
5180 } 5181 }
5181 5182
5182 5183
5183 } } // namespace v8::internal 5184 } } // namespace v8::internal
5184 5185
5185 #endif // V8_TARGET_ARCH_IA32 5186 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/compiler/operator-properties.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698