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

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

Issue 1365503005: [es6] Fix invalid ToString in implementation of ToName. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Meh! 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
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/objects.h » ('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 #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 3683 matching lines...) Expand 10 before | Expand all | Expand 10 after
3694 // Load the argument into rax and convert it. 3694 // Load the argument into rax and convert it.
3695 VisitForAccumulatorValue(args->at(0)); 3695 VisitForAccumulatorValue(args->at(0));
3696 3696
3697 // Convert the object to a name. 3697 // Convert the object to a name.
3698 Label convert, done_convert; 3698 Label convert, done_convert;
3699 __ JumpIfSmi(rax, &convert, Label::kNear); 3699 __ JumpIfSmi(rax, &convert, Label::kNear);
3700 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); 3700 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE);
3701 __ CmpObjectType(rax, LAST_NAME_TYPE, rcx); 3701 __ CmpObjectType(rax, LAST_NAME_TYPE, rcx);
3702 __ j(below_equal, &done_convert, Label::kNear); 3702 __ j(below_equal, &done_convert, Label::kNear);
3703 __ bind(&convert); 3703 __ bind(&convert);
3704 ToStringStub stub(isolate()); 3704 __ Push(rax);
3705 __ CallStub(&stub); 3705 __ CallRuntime(Runtime::kToName, 1);
3706 __ bind(&done_convert); 3706 __ bind(&done_convert);
3707 context()->Plug(rax); 3707 context()->Plug(rax);
3708 } 3708 }
3709 3709
3710 3710
3711 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { 3711 void FullCodeGenerator::EmitToObject(CallRuntime* expr) {
3712 ZoneList<Expression*>* args = expr->arguments(); 3712 ZoneList<Expression*>* args = expr->arguments();
3713 DCHECK_EQ(1, args->length()); 3713 DCHECK_EQ(1, args->length());
3714 3714
3715 // Load the argument into rax and convert it. 3715 // Load the argument into rax and convert it.
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after
5142 Assembler::target_address_at(call_target_address, 5142 Assembler::target_address_at(call_target_address,
5143 unoptimized_code)); 5143 unoptimized_code));
5144 return OSR_AFTER_STACK_CHECK; 5144 return OSR_AFTER_STACK_CHECK;
5145 } 5145 }
5146 5146
5147 5147
5148 } // namespace internal 5148 } // namespace internal
5149 } // namespace v8 5149 } // namespace v8
5150 5150
5151 #endif // V8_TARGET_ARCH_X64 5151 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698