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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 2018363004: VM: Add result cid information for recognized methods. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: clean up Created 4 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/flow_graph_type_propagator.cc
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
index d0ffe7707e57d67f1eb6093a54c55ddaaffc28af..2ee8ed12520d69003970ed9446da48be58a76ca4 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -888,6 +888,15 @@ CompileType AllocateUninitializedContextInstr::ComputeType() const {
}
+CompileType PolymorphicInstanceCallInstr::ComputeType() const {
+ if (!HasSingleRecognizedTarget()) return CompileType::Dynamic();
+ const Function& target = Function::Handle(ic_data().GetTargetAt(0));
+ return (target.recognized_kind() != MethodRecognizer::kUnknown)
+ ? CompileType::FromCid(MethodRecognizer::ResultCid(target))
+ : CompileType::Dynamic();
+}
+
+
CompileType StaticCallInstr::ComputeType() const {
if (result_cid_ != kDynamicCid) {
return CompileType::FromCid(result_cid_);

Powered by Google App Engine
This is Rietveld 408576698