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

Side by Side Diff: src/full-codegen/ia32/full-codegen-ia32.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
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 3686 matching lines...) Expand 10 before | Expand all | Expand 10 after
3697 // Load the argument into eax and convert it. 3697 // Load the argument into eax and convert it.
3698 VisitForAccumulatorValue(args->at(0)); 3698 VisitForAccumulatorValue(args->at(0));
3699 3699
3700 // Convert the object to a name. 3700 // Convert the object to a name.
3701 Label convert, done_convert; 3701 Label convert, done_convert;
3702 __ JumpIfSmi(eax, &convert, Label::kNear); 3702 __ JumpIfSmi(eax, &convert, Label::kNear);
3703 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); 3703 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE);
3704 __ CmpObjectType(eax, LAST_NAME_TYPE, ecx); 3704 __ CmpObjectType(eax, LAST_NAME_TYPE, ecx);
3705 __ j(below_equal, &done_convert, Label::kNear); 3705 __ j(below_equal, &done_convert, Label::kNear);
3706 __ bind(&convert); 3706 __ bind(&convert);
3707 ToStringStub stub(isolate()); 3707 __ Push(eax);
3708 __ CallStub(&stub); 3708 __ CallRuntime(Runtime::kToName, 1);
3709 __ bind(&done_convert); 3709 __ bind(&done_convert);
3710 context()->Plug(eax); 3710 context()->Plug(eax);
3711 } 3711 }
3712 3712
3713 3713
3714 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { 3714 void FullCodeGenerator::EmitToObject(CallRuntime* expr) {
3715 ZoneList<Expression*>* args = expr->arguments(); 3715 ZoneList<Expression*>* args = expr->arguments();
3716 DCHECK_EQ(1, args->length()); 3716 DCHECK_EQ(1, args->length());
3717 3717
3718 // Load the argument into eax and convert it. 3718 // Load the argument into eax and convert it.
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
5126 Assembler::target_address_at(call_target_address, 5126 Assembler::target_address_at(call_target_address,
5127 unoptimized_code)); 5127 unoptimized_code));
5128 return OSR_AFTER_STACK_CHECK; 5128 return OSR_AFTER_STACK_CHECK;
5129 } 5129 }
5130 5130
5131 5131
5132 } // namespace internal 5132 } // namespace internal
5133 } // namespace v8 5133 } // namespace v8
5134 5134
5135 #endif // V8_TARGET_ARCH_IA32 5135 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698