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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.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_X64 5 #if V8_TARGET_ARCH_X64
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 3685 matching lines...) Expand 10 before | Expand all | Expand 10 after
3696 3696
3697 // Load the argument into rax and convert it. 3697 // Load the argument into rax and convert it.
3698 VisitForAccumulatorValue(args->at(0)); 3698 VisitForAccumulatorValue(args->at(0));
3699 3699
3700 ToStringStub stub(isolate()); 3700 ToStringStub stub(isolate());
3701 __ CallStub(&stub); 3701 __ CallStub(&stub);
3702 context()->Plug(rax); 3702 context()->Plug(rax);
3703 } 3703 }
3704 3704
3705 3705
3706 void FullCodeGenerator::EmitToNumber(CallRuntime* expr) {
3707 ZoneList<Expression*>* args = expr->arguments();
3708 DCHECK_EQ(1, args->length());
3709
3710 // Load the argument into rax and convert it.
3711 VisitForAccumulatorValue(args->at(0));
3712
3713 ToNumberStub stub(isolate());
3714 __ CallStub(&stub);
3715 context()->Plug(rax);
3716 }
3717
3718
3706 void FullCodeGenerator::EmitToName(CallRuntime* expr) { 3719 void FullCodeGenerator::EmitToName(CallRuntime* expr) {
3707 ZoneList<Expression*>* args = expr->arguments(); 3720 ZoneList<Expression*>* args = expr->arguments();
3708 DCHECK_EQ(1, args->length()); 3721 DCHECK_EQ(1, args->length());
3709 3722
3710 // Load the argument into rax and convert it. 3723 // Load the argument into rax and convert it.
3711 VisitForAccumulatorValue(args->at(0)); 3724 VisitForAccumulatorValue(args->at(0));
3712 3725
3713 // Convert the object to a name. 3726 // Convert the object to a name.
3714 Label convert, done_convert; 3727 Label convert, done_convert;
3715 __ JumpIfSmi(rax, &convert, Label::kNear); 3728 __ JumpIfSmi(rax, &convert, Label::kNear);
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
5158 Assembler::target_address_at(call_target_address, 5171 Assembler::target_address_at(call_target_address,
5159 unoptimized_code)); 5172 unoptimized_code));
5160 return OSR_AFTER_STACK_CHECK; 5173 return OSR_AFTER_STACK_CHECK;
5161 } 5174 }
5162 5175
5163 5176
5164 } // namespace internal 5177 } // namespace internal
5165 } // namespace v8 5178 } // namespace v8
5166 5179
5167 #endif // V8_TARGET_ARCH_X64 5180 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698