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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 2809583002: Use off-heap data for type feedback in PolymorphicInstanceCallInstr (Closed)
Patch Set: Created 3 years, 8 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 92a4d78ae6827d40867f056abe5b192822238939..99967c638e2e60439d106e29b592e4bc99196ef3 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -296,8 +296,8 @@ void FlowGraphTypePropagator::VisitInstanceCall(InstanceCallInstr* instr) {
void FlowGraphTypePropagator::VisitPolymorphicInstanceCall(
PolymorphicInstanceCallInstr* instr) {
- if (instr->instance_call()->has_unique_selector()) {
- SetCid(instr->ArgumentAt(0), instr->ic_data().GetReceiverClassIdAt(0));
+ if (instr->HasSingleRecognizedCid()) {
Vyacheslav Egorov (Google) 2017/04/10 10:59:27 These changes are highly suspect. They definitely
erikcorry 2017/04/19 15:06:40 The change to HasSingleRecognizedCid was reverted.
+ SetCid(instr->ArgumentAt(0), instr->SingleCid());
return;
}
CheckNonNullSelector(instr, instr->ArgumentAt(0),
@@ -1024,8 +1024,8 @@ CompileType AllocateUninitializedContextInstr::ComputeType() const {
CompileType PolymorphicInstanceCallInstr::ComputeType() const {
- if (!HasSingleRecognizedTarget()) return CompileType::Dynamic();
- const Function& target = Function::Handle(ic_data().GetTargetAt(0));
+ if (!HasSingleRecognizedCid()) return CompileType::Dynamic();
erikcorry 2017/04/19 15:06:40 The change in this 'if' also reverted
+ const Function& target = *targets_[0].target;
return (target.recognized_kind() != MethodRecognizer::kUnknown)
? CompileType::FromCid(MethodRecognizer::ResultCid(target))
: CompileType::Dynamic();

Powered by Google App Engine
This is Rietveld 408576698