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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 2962333002: VM-codegen: Restrict widening class ranges in method dispatch (Closed)
Patch Set: Created 3 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/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 4df1384d844211693e82d3f5a26591b4074e1c43..74aef8565abac970fac71d35d3f46549421054a2 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -1767,7 +1767,8 @@ const CallTargets* FlowGraphCompiler::ResolveCallTargetsForReceiverCid(
bool FlowGraphCompiler::LookupMethodFor(int class_id,
const String& name,
const ArgumentsDescriptor& args_desc,
- Function* fn_return) {
+ Function* fn_return,
+ bool* class_is_abstract_return) {
Thread* thread = Thread::Current();
Isolate* isolate = thread->isolate();
Zone* zone = thread->zone();
@@ -1781,6 +1782,9 @@ bool FlowGraphCompiler::LookupMethodFor(int class_id,
if (!cls.is_finalized()) return false;
if (Array::Handle(cls.functions()).IsNull()) return false;
+ if (class_is_abstract_return != NULL) {
+ *class_is_abstract_return = cls.is_abstract();
+ }
const bool allow_add = false;
Function& target_function =
Function::Handle(zone, Resolver::ResolveDynamicForReceiverClass(

Powered by Google App Engine
This is Rietveld 408576698