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

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

Issue 1124263005: X87: Optimize the typeof operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/x87/code-stubs-x87.cc ('k') | src/x87/interface-descriptors-x87.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_X87 7 #if V8_TARGET_ARCH_X87
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 4695 matching lines...) Expand 10 before | Expand all | Expand 10 after
4706 } else { 4706 } else {
4707 __ Push(isolate()->factory()->false_value()); 4707 __ Push(isolate()->factory()->false_value());
4708 } 4708 }
4709 __ bind(&done); 4709 __ bind(&done);
4710 } 4710 }
4711 break; 4711 break;
4712 } 4712 }
4713 4713
4714 case Token::TYPEOF: { 4714 case Token::TYPEOF: {
4715 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 4715 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
4716 { StackValueContext context(this); 4716 {
4717 AccumulatorValueContext context(this);
4717 VisitForTypeofValue(expr->expression()); 4718 VisitForTypeofValue(expr->expression());
4718 } 4719 }
4719 __ CallRuntime(Runtime::kTypeof, 1); 4720 __ mov(ebx, eax);
4721 TypeofStub typeof_stub(isolate());
4722 __ CallStub(&typeof_stub);
4720 context()->Plug(eax); 4723 context()->Plug(eax);
4721 break; 4724 break;
4722 } 4725 }
4723 4726
4724 default: 4727 default:
4725 UNREACHABLE(); 4728 UNREACHABLE();
4726 } 4729 }
4727 } 4730 }
4728 4731
4729 4732
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
5359 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5362 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5360 Assembler::target_address_at(call_target_address, 5363 Assembler::target_address_at(call_target_address,
5361 unoptimized_code)); 5364 unoptimized_code));
5362 return OSR_AFTER_STACK_CHECK; 5365 return OSR_AFTER_STACK_CHECK;
5363 } 5366 }
5364 5367
5365 5368
5366 } } // namespace v8::internal 5369 } } // namespace v8::internal
5367 5370
5368 #endif // V8_TARGET_ARCH_X87 5371 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/code-stubs-x87.cc ('k') | src/x87/interface-descriptors-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698