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

Unified Diff: runtime/vm/intermediate_language_dbc.cc

Issue 2162953005: DBC: A bit of Polymorphic instance call (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « runtime/vm/constants_dbc.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_dbc.cc
diff --git a/runtime/vm/intermediate_language_dbc.cc b/runtime/vm/intermediate_language_dbc.cc
index e9c87095442e8fa777d57f50de49b5d3cffa7497..74586cea2c6c0f79d61ca0d035d6056d280cf2d4 100644
--- a/runtime/vm/intermediate_language_dbc.cc
+++ b/runtime/vm/intermediate_language_dbc.cc
@@ -242,6 +242,24 @@ LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary(
void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ ASSERT(ic_data().NumArgsTested() == 1);
+ if (!with_checks()) {
+ ASSERT(ic_data().HasOneTarget());
+ const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0));
+ const Array& arguments_descriptor =
+ Array::Handle(ArgumentsDescriptor::New(
+ instance_call()->ArgumentCount(),
+ instance_call()->argument_names()));
+ const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor);
+
+ __ PushConstant(target);
+ __ StaticCall(instance_call()->ArgumentCount(), argdesc_kidx);
+ compiler->AddCurrentDescriptor(RawPcDescriptors::kOther,
+ deopt_id(), instance_call()->token_pos());
+ compiler->RecordAfterCall(this);
+ __ PopLocal(locs()->out(0).reg());
+ return;
+ }
Unsupported(compiler);
UNREACHABLE();
}
« no previous file with comments | « runtime/vm/constants_dbc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698