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

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

Issue 1384443002: [es6] Fix missing bits for full @@toPrimitive support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove useless cctest. Created 5 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
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/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 3688 matching lines...) Expand 10 before | Expand all | Expand 10 after
3699 3699
3700 // Load the argument into eax and convert it. 3700 // Load the argument into eax and convert it.
3701 VisitForAccumulatorValue(args->at(0)); 3701 VisitForAccumulatorValue(args->at(0));
3702 3702
3703 ToStringStub stub(isolate()); 3703 ToStringStub stub(isolate());
3704 __ CallStub(&stub); 3704 __ CallStub(&stub);
3705 context()->Plug(eax); 3705 context()->Plug(eax);
3706 } 3706 }
3707 3707
3708 3708
3709 void FullCodeGenerator::EmitToNumber(CallRuntime* expr) {
3710 ZoneList<Expression*>* args = expr->arguments();
3711 DCHECK_EQ(1, args->length());
3712
3713 // Load the argument into eax and convert it.
3714 VisitForAccumulatorValue(args->at(0));
3715
3716 ToNumberStub stub(isolate());
3717 __ CallStub(&stub);
3718 context()->Plug(eax);
3719 }
3720
3721
3709 void FullCodeGenerator::EmitToName(CallRuntime* expr) { 3722 void FullCodeGenerator::EmitToName(CallRuntime* expr) {
3710 ZoneList<Expression*>* args = expr->arguments(); 3723 ZoneList<Expression*>* args = expr->arguments();
3711 DCHECK_EQ(1, args->length()); 3724 DCHECK_EQ(1, args->length());
3712 3725
3713 // Load the argument into eax and convert it. 3726 // Load the argument into eax and convert it.
3714 VisitForAccumulatorValue(args->at(0)); 3727 VisitForAccumulatorValue(args->at(0));
3715 3728
3716 // Convert the object to a name. 3729 // Convert the object to a name.
3717 Label convert, done_convert; 3730 Label convert, done_convert;
3718 __ JumpIfSmi(eax, &convert, Label::kNear); 3731 __ JumpIfSmi(eax, &convert, Label::kNear);
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after
5142 Assembler::target_address_at(call_target_address, 5155 Assembler::target_address_at(call_target_address,
5143 unoptimized_code)); 5156 unoptimized_code));
5144 return OSR_AFTER_STACK_CHECK; 5157 return OSR_AFTER_STACK_CHECK;
5145 } 5158 }
5146 5159
5147 5160
5148 } // namespace internal 5161 } // namespace internal
5149 } // namespace v8 5162 } // namespace v8
5150 5163
5151 #endif // V8_TARGET_ARCH_IA32 5164 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698