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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 3489 matching lines...) Expand 10 before | Expand all | Expand 10 after
3500 3500
3501 // Load the argument into x0 and call the stub. 3501 // Load the argument into x0 and call the stub.
3502 VisitForAccumulatorValue(args->at(0)); 3502 VisitForAccumulatorValue(args->at(0));
3503 3503
3504 NumberToStringStub stub(isolate()); 3504 NumberToStringStub stub(isolate());
3505 __ CallStub(&stub); 3505 __ CallStub(&stub);
3506 context()->Plug(x0); 3506 context()->Plug(x0);
3507 } 3507 }
3508 3508
3509 3509
3510 void FullCodeGenerator::EmitToLength(CallRuntime* expr) {
3511 ZoneList<Expression*>* args = expr->arguments();
3512 DCHECK_EQ(1, args->length());
3513
3514 // Load the argument into x0 and convert it.
3515 VisitForAccumulatorValue(args->at(0));
3516
3517 ToLengthStub stub(isolate());
3518 __ CallStub(&stub);
3519 context()->Plug(x0);
3520 }
3521
3522
3510 void FullCodeGenerator::EmitToString(CallRuntime* expr) { 3523 void FullCodeGenerator::EmitToString(CallRuntime* expr) {
3511 ZoneList<Expression*>* args = expr->arguments(); 3524 ZoneList<Expression*>* args = expr->arguments();
3512 DCHECK_EQ(1, args->length()); 3525 DCHECK_EQ(1, args->length());
3513 3526
3514 // Load the argument into x0 and convert it. 3527 // Load the argument into x0 and convert it.
3515 VisitForAccumulatorValue(args->at(0)); 3528 VisitForAccumulatorValue(args->at(0));
3516 3529
3517 ToStringStub stub(isolate()); 3530 ToStringStub stub(isolate());
3518 __ CallStub(&stub); 3531 __ CallStub(&stub);
3519 context()->Plug(x0); 3532 context()->Plug(x0);
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after
5276 } 5289 }
5277 5290
5278 return INTERRUPT; 5291 return INTERRUPT;
5279 } 5292 }
5280 5293
5281 5294
5282 } // namespace internal 5295 } // namespace internal
5283 } // namespace v8 5296 } // namespace v8
5284 5297
5285 #endif // V8_TARGET_ARCH_ARM64 5298 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698