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

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

Issue 2051113002: [stubs] ToNumberStub --> ToNumber builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix full-code on non-x64 platforms Created 4 years, 6 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
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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 3212 matching lines...) Expand 10 before | Expand all | Expand 10 after
3223 if (expr->op() == Token::INC) { 3223 if (expr->op() == Token::INC) {
3224 __ sub(eax, Immediate(Smi::FromInt(1))); 3224 __ sub(eax, Immediate(Smi::FromInt(1)));
3225 } else { 3225 } else {
3226 __ add(eax, Immediate(Smi::FromInt(1))); 3226 __ add(eax, Immediate(Smi::FromInt(1)));
3227 } 3227 }
3228 __ jmp(&stub_call, Label::kNear); 3228 __ jmp(&stub_call, Label::kNear);
3229 __ bind(&slow); 3229 __ bind(&slow);
3230 } 3230 }
3231 3231
3232 // Convert old value into a number. 3232 // Convert old value into a number.
3233 ToNumberStub convert_stub(isolate()); 3233 __ Call(isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET);
3234 __ CallStub(&convert_stub);
3235 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER); 3234 PrepareForBailoutForId(expr->ToNumberId(), BailoutState::TOS_REGISTER);
3236 3235
3237 // Save result for postfix expressions. 3236 // Save result for postfix expressions.
3238 if (expr->is_postfix()) { 3237 if (expr->is_postfix()) {
3239 if (!context()->IsEffect()) { 3238 if (!context()->IsEffect()) {
3240 // Save the result on the stack. If we have a named or keyed property 3239 // Save the result on the stack. If we have a named or keyed property
3241 // we store the result under the receiver that is currently on top 3240 // we store the result under the receiver that is currently on top
3242 // of the stack. 3241 // of the stack.
3243 switch (assign_type) { 3242 switch (assign_type) {
3244 case VARIABLE: 3243 case VARIABLE:
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
3718 isolate->builtins()->OnStackReplacement()->entry(), 3717 isolate->builtins()->OnStackReplacement()->entry(),
3719 Assembler::target_address_at(call_target_address, unoptimized_code)); 3718 Assembler::target_address_at(call_target_address, unoptimized_code));
3720 return ON_STACK_REPLACEMENT; 3719 return ON_STACK_REPLACEMENT;
3721 } 3720 }
3722 3721
3723 3722
3724 } // namespace internal 3723 } // namespace internal
3725 } // namespace v8 3724 } // namespace v8
3726 3725
3727 #endif // V8_TARGET_ARCH_IA32 3726 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698