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

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

Issue 1370283003: X87: [es6] Fix invalid ToString in implementation of ToName. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | no next file » | 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_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 3677 matching lines...) Expand 10 before | Expand all | Expand 10 after
3688 // Load the argument into eax and convert it. 3688 // Load the argument into eax and convert it.
3689 VisitForAccumulatorValue(args->at(0)); 3689 VisitForAccumulatorValue(args->at(0));
3690 3690
3691 // Convert the object to a name. 3691 // Convert the object to a name.
3692 Label convert, done_convert; 3692 Label convert, done_convert;
3693 __ JumpIfSmi(eax, &convert, Label::kNear); 3693 __ JumpIfSmi(eax, &convert, Label::kNear);
3694 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); 3694 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE);
3695 __ CmpObjectType(eax, LAST_NAME_TYPE, ecx); 3695 __ CmpObjectType(eax, LAST_NAME_TYPE, ecx);
3696 __ j(below_equal, &done_convert, Label::kNear); 3696 __ j(below_equal, &done_convert, Label::kNear);
3697 __ bind(&convert); 3697 __ bind(&convert);
3698 ToStringStub stub(isolate()); 3698 __ Push(eax);
3699 __ CallStub(&stub); 3699 __ CallRuntime(Runtime::kToName, 1);
3700 __ bind(&done_convert); 3700 __ bind(&done_convert);
3701 context()->Plug(eax); 3701 context()->Plug(eax);
3702 } 3702 }
3703 3703
3704 3704
3705 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { 3705 void FullCodeGenerator::EmitToObject(CallRuntime* expr) {
3706 ZoneList<Expression*>* args = expr->arguments(); 3706 ZoneList<Expression*>* args = expr->arguments();
3707 DCHECK_EQ(1, args->length()); 3707 DCHECK_EQ(1, args->length());
3708 3708
3709 // Load the argument into eax and convert it. 3709 // Load the argument into eax and convert it.
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
5117 Assembler::target_address_at(call_target_address, 5117 Assembler::target_address_at(call_target_address,
5118 unoptimized_code)); 5118 unoptimized_code));
5119 return OSR_AFTER_STACK_CHECK; 5119 return OSR_AFTER_STACK_CHECK;
5120 } 5120 }
5121 5121
5122 5122
5123 } // namespace internal 5123 } // namespace internal
5124 } // namespace v8 5124 } // namespace v8
5125 5125
5126 #endif // V8_TARGET_ARCH_X87 5126 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698