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

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: REBASE. 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
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/arm64/interface-descriptors-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4464 matching lines...) Expand 10 before | Expand all | Expand 10 after
4475 __ Bind(&done); 4475 __ Bind(&done);
4476 if (context()->IsStackValue()) { 4476 if (context()->IsStackValue()) {
4477 __ Push(result_register()); 4477 __ Push(result_register());
4478 } 4478 }
4479 } 4479 }
4480 break; 4480 break;
4481 } 4481 }
4482 case Token::TYPEOF: { 4482 case Token::TYPEOF: {
4483 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 4483 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
4484 { 4484 {
4485 StackValueContext context(this); 4485 AccumulatorValueContext context(this);
4486 VisitForTypeofValue(expr->expression()); 4486 VisitForTypeofValue(expr->expression());
4487 } 4487 }
4488 __ CallRuntime(Runtime::kTypeof, 1); 4488 __ Mov(x3, x0);
4489 TypeofStub typeof_stub(isolate());
4490 __ CallStub(&typeof_stub);
4489 context()->Plug(x0); 4491 context()->Plug(x0);
4490 break; 4492 break;
4491 } 4493 }
4492 default: 4494 default:
4493 UNREACHABLE(); 4495 UNREACHABLE();
4494 } 4496 }
4495 } 4497 }
4496 4498
4497 4499
4498 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { 4500 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
5478 } 5480 }
5479 } 5481 }
5480 5482
5481 return INTERRUPT; 5483 return INTERRUPT;
5482 } 5484 }
5483 5485
5484 5486
5485 } } // namespace v8::internal 5487 } } // namespace v8::internal
5486 5488
5487 #endif // V8_TARGET_ARCH_ARM64 5489 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/arm64/interface-descriptors-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698