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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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_X87 5 #if V8_TARGET_ARCH_X87
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 3679 matching lines...) Expand 10 before | Expand all | Expand 10 after
3690 3690
3691 // Load the argument into eax and convert it. 3691 // Load the argument into eax and convert it.
3692 VisitForAccumulatorValue(args->at(0)); 3692 VisitForAccumulatorValue(args->at(0));
3693 3693
3694 ToStringStub stub(isolate()); 3694 ToStringStub stub(isolate());
3695 __ CallStub(&stub); 3695 __ CallStub(&stub);
3696 context()->Plug(eax); 3696 context()->Plug(eax);
3697 } 3697 }
3698 3698
3699 3699
3700 void FullCodeGenerator::EmitToNumber(CallRuntime* expr) {
3701 ZoneList<Expression*>* args = expr->arguments();
3702 DCHECK_EQ(1, args->length());
3703
3704 // Load the argument into eax and convert it.
3705 VisitForAccumulatorValue(args->at(0));
3706
3707 ToNumberStub stub(isolate());
3708 __ CallStub(&stub);
3709 context()->Plug(eax);
3710 }
3711
3712
3700 void FullCodeGenerator::EmitToName(CallRuntime* expr) { 3713 void FullCodeGenerator::EmitToName(CallRuntime* expr) {
3701 ZoneList<Expression*>* args = expr->arguments(); 3714 ZoneList<Expression*>* args = expr->arguments();
3702 DCHECK_EQ(1, args->length()); 3715 DCHECK_EQ(1, args->length());
3703 3716
3704 // Load the argument into eax and convert it. 3717 // Load the argument into eax and convert it.
3705 VisitForAccumulatorValue(args->at(0)); 3718 VisitForAccumulatorValue(args->at(0));
3706 3719
3707 // Convert the object to a name. 3720 // Convert the object to a name.
3708 Label convert, done_convert; 3721 Label convert, done_convert;
3709 __ JumpIfSmi(eax, &convert, Label::kNear); 3722 __ JumpIfSmi(eax, &convert, Label::kNear);
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after
5133 Assembler::target_address_at(call_target_address, 5146 Assembler::target_address_at(call_target_address,
5134 unoptimized_code)); 5147 unoptimized_code));
5135 return OSR_AFTER_STACK_CHECK; 5148 return OSR_AFTER_STACK_CHECK;
5136 } 5149 }
5137 5150
5138 5151
5139 } // namespace internal 5152 } // namespace internal
5140 } // namespace v8 5153 } // namespace v8
5141 5154
5142 #endif // V8_TARGET_ARCH_X87 5155 #endif // V8_TARGET_ARCH_X87
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698