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

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

Issue 1412963002: [runtime] Implement %_ToLength via ToLengthStub. (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
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/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 3677 matching lines...) Expand 10 before | Expand all | Expand 10 after
3688 3688
3689 // Load the argument into eax and call the stub. 3689 // Load the argument into eax and call the stub.
3690 VisitForAccumulatorValue(args->at(0)); 3690 VisitForAccumulatorValue(args->at(0));
3691 3691
3692 NumberToStringStub stub(isolate()); 3692 NumberToStringStub stub(isolate());
3693 __ CallStub(&stub); 3693 __ CallStub(&stub);
3694 context()->Plug(eax); 3694 context()->Plug(eax);
3695 } 3695 }
3696 3696
3697 3697
3698 void FullCodeGenerator::EmitToLength(CallRuntime* expr) {
3699 ZoneList<Expression*>* args = expr->arguments();
3700 DCHECK_EQ(1, args->length());
3701
3702 // Load the argument into eax and convert it.
3703 VisitForAccumulatorValue(args->at(0));
3704
3705 ToLengthStub stub(isolate());
3706 __ CallStub(&stub);
3707 context()->Plug(eax);
3708 }
3709
3710
3698 void FullCodeGenerator::EmitToString(CallRuntime* expr) { 3711 void FullCodeGenerator::EmitToString(CallRuntime* expr) {
3699 ZoneList<Expression*>* args = expr->arguments(); 3712 ZoneList<Expression*>* args = expr->arguments();
3700 DCHECK_EQ(1, args->length()); 3713 DCHECK_EQ(1, args->length());
3701 3714
3702 // Load the argument into eax and convert it. 3715 // Load the argument into eax and convert it.
3703 VisitForAccumulatorValue(args->at(0)); 3716 VisitForAccumulatorValue(args->at(0));
3704 3717
3705 ToStringStub stub(isolate()); 3718 ToStringStub stub(isolate());
3706 __ CallStub(&stub); 3719 __ CallStub(&stub);
3707 context()->Plug(eax); 3720 context()->Plug(eax);
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
5162 Assembler::target_address_at(call_target_address, 5175 Assembler::target_address_at(call_target_address,
5163 unoptimized_code)); 5176 unoptimized_code));
5164 return OSR_AFTER_STACK_CHECK; 5177 return OSR_AFTER_STACK_CHECK;
5165 } 5178 }
5166 5179
5167 5180
5168 } // namespace internal 5181 } // namespace internal
5169 } // namespace v8 5182 } // namespace v8
5170 5183
5171 #endif // V8_TARGET_ARCH_IA32 5184 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698