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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 1184093004: Faster checks in polymorphic instance calls if Smi-s are involved (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intermediate_language_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index b5f8482caa8cc58f1b3a0e5f17c479e5dde2397a..a4b444b25cbf7621fdb4dcf19681b146ebc88a48 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -5701,23 +5701,18 @@ void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
return;
}
- // Load receiver into EAX.
- __ movl(EAX,
- Address(ESP, (instance_call()->ArgumentCount() - 1) * kWordSize));
-
Label* deopt = compiler->AddDeoptStub(
deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail);
- LoadValueCid(compiler, EDI, EAX,
- (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt);
-
+ Label ok;
compiler->EmitTestAndCall(ic_data(),
- EDI, // Class id register.
instance_call()->ArgumentCount(),
instance_call()->argument_names(),
deopt,
+ &ok,
deopt_id(),
instance_call()->token_pos(),
locs());
+ __ Bind(&ok);
}

Powered by Google App Engine
This is Rietveld 408576698