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

Unified Diff: src/ia32/lithium-codegen-ia32.cc

Issue 5828004: IA32: Optimize instanceof... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years 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 side-by-side diff with in-line comments
Download patch
Index: src/ia32/lithium-codegen-ia32.cc
===================================================================
--- src/ia32/lithium-codegen-ia32.cc (revision 6041)
+++ src/ia32/lithium-codegen-ia32.cc (working copy)
@@ -1699,9 +1699,8 @@
void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
- InstanceofStub stub;
- __ push(ToOperand(instr->left()));
- __ push(ToOperand(instr->right()));
+ // Object and function are in fixed registers eax and edx.
+ InstanceofStub stub(InstanceofStub::kArgsInRegisters);
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
NearLabel true_value, done;
@@ -1719,9 +1718,7 @@
int true_block = chunk_->LookupDestination(instr->true_block_id());
int false_block = chunk_->LookupDestination(instr->false_block_id());
- InstanceofStub stub;
- __ push(ToOperand(instr->left()));
- __ push(ToOperand(instr->right()));
+ InstanceofStub stub(InstanceofStub::kArgsInRegisters);
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
__ test(eax, Operand(eax));
EmitBranch(true_block, false_block, zero);
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | src/v8-counters.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698