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

Side by Side Diff: src/x64/full-codegen-x64.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/x64/code-stubs-x64.cc ('k') | src/x64/interface-descriptors-x64.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 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
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 4728 matching lines...) Expand 10 before | Expand all | Expand 10 after
4739 } else { 4739 } else {
4740 __ PushRoot(Heap::kFalseValueRootIndex); 4740 __ PushRoot(Heap::kFalseValueRootIndex);
4741 } 4741 }
4742 __ bind(&done); 4742 __ bind(&done);
4743 } 4743 }
4744 break; 4744 break;
4745 } 4745 }
4746 4746
4747 case Token::TYPEOF: { 4747 case Token::TYPEOF: {
4748 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 4748 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
4749 { StackValueContext context(this); 4749 {
4750 AccumulatorValueContext context(this);
4750 VisitForTypeofValue(expr->expression()); 4751 VisitForTypeofValue(expr->expression());
4751 } 4752 }
4752 __ CallRuntime(Runtime::kTypeof, 1); 4753 __ movp(rbx, rax);
4754 TypeofStub typeof_stub(isolate());
4755 __ CallStub(&typeof_stub);
4753 context()->Plug(rax); 4756 context()->Plug(rax);
4754 break; 4757 break;
4755 } 4758 }
4756 4759
4757 default: 4760 default:
4758 UNREACHABLE(); 4761 UNREACHABLE();
4759 } 4762 }
4760 } 4763 }
4761 4764
4762 4765
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
5389 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5392 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5390 Assembler::target_address_at(call_target_address, 5393 Assembler::target_address_at(call_target_address,
5391 unoptimized_code)); 5394 unoptimized_code));
5392 return OSR_AFTER_STACK_CHECK; 5395 return OSR_AFTER_STACK_CHECK;
5393 } 5396 }
5394 5397
5395 5398
5396 } } // namespace v8::internal 5399 } } // namespace v8::internal
5397 5400
5398 #endif // V8_TARGET_ARCH_X64 5401 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/interface-descriptors-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698