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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 3796 matching lines...) Expand 10 before | Expand all | Expand 10 after
3807 // Load the argument into a0 and call the stub. 3807 // Load the argument into a0 and call the stub.
3808 VisitForAccumulatorValue(args->at(0)); 3808 VisitForAccumulatorValue(args->at(0));
3809 __ mov(a0, result_register()); 3809 __ mov(a0, result_register());
3810 3810
3811 NumberToStringStub stub(isolate()); 3811 NumberToStringStub stub(isolate());
3812 __ CallStub(&stub); 3812 __ CallStub(&stub);
3813 context()->Plug(v0); 3813 context()->Plug(v0);
3814 } 3814 }
3815 3815
3816 3816
3817 void FullCodeGenerator::EmitToLength(CallRuntime* expr) {
3818 ZoneList<Expression*>* args = expr->arguments();
3819 DCHECK_EQ(1, args->length());
3820
3821 // Load the argument into a0 and convert it.
3822 VisitForAccumulatorValue(args->at(0));
3823 __ mov(a0, result_register());
3824
3825 ToLengthStub stub(isolate());
3826 __ CallStub(&stub);
3827 context()->Plug(v0);
3828 }
3829
3830
3817 void FullCodeGenerator::EmitToString(CallRuntime* expr) { 3831 void FullCodeGenerator::EmitToString(CallRuntime* expr) {
3818 ZoneList<Expression*>* args = expr->arguments(); 3832 ZoneList<Expression*>* args = expr->arguments();
3819 DCHECK_EQ(1, args->length()); 3833 DCHECK_EQ(1, args->length());
3820 3834
3821 // Load the argument into a0 and convert it. 3835 // Load the argument into a0 and convert it.
3822 VisitForAccumulatorValue(args->at(0)); 3836 VisitForAccumulatorValue(args->at(0));
3823 __ mov(a0, result_register()); 3837 __ mov(a0, result_register());
3824 3838
3825 ToStringStub stub(isolate()); 3839 ToStringStub stub(isolate());
3826 __ CallStub(&stub); 3840 __ CallStub(&stub);
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
5266 reinterpret_cast<uint64_t>( 5280 reinterpret_cast<uint64_t>(
5267 isolate->builtins()->OsrAfterStackCheck()->entry())); 5281 isolate->builtins()->OsrAfterStackCheck()->entry()));
5268 return OSR_AFTER_STACK_CHECK; 5282 return OSR_AFTER_STACK_CHECK;
5269 } 5283 }
5270 5284
5271 5285
5272 } // namespace internal 5286 } // namespace internal
5273 } // namespace v8 5287 } // namespace v8
5274 5288
5275 #endif // V8_TARGET_ARCH_MIPS64 5289 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698