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

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

Issue 1114563003: Optimize the typeof operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 5 years, 7 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 4495 matching lines...) Expand 10 before | Expand all | Expand 10 after
4506 __ Bind(&done); 4506 __ Bind(&done);
4507 if (context()->IsStackValue()) { 4507 if (context()->IsStackValue()) {
4508 __ Push(result_register()); 4508 __ Push(result_register());
4509 } 4509 }
4510 } 4510 }
4511 break; 4511 break;
4512 } 4512 }
4513 case Token::TYPEOF: { 4513 case Token::TYPEOF: {
4514 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 4514 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
4515 { 4515 {
4516 StackValueContext context(this); 4516 AccumulatorValueContext context(this);
4517 VisitForTypeofValue(expr->expression()); 4517 VisitForTypeofValue(expr->expression());
4518 } 4518 }
4519 __ CallRuntime(Runtime::kTypeof, 1); 4519 __ Mov(x3, x0);
4520 TypeofStub typeof_stub(isolate());
4521 __ CallStub(&typeof_stub);
4520 context()->Plug(x0); 4522 context()->Plug(x0);
4521 break; 4523 break;
4522 } 4524 }
4523 default: 4525 default:
4524 UNREACHABLE(); 4526 UNREACHABLE();
4525 } 4527 }
4526 } 4528 }
4527 4529
4528 4530
4529 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { 4531 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
5509 } 5511 }
5510 } 5512 }
5511 5513
5512 return INTERRUPT; 5514 return INTERRUPT;
5513 } 5515 }
5514 5516
5515 5517
5516 } } // namespace v8::internal 5518 } } // namespace v8::internal
5517 5519
5518 #endif // V8_TARGET_ARCH_ARM64 5520 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698