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

Unified Diff: runtime/vm/parser.cc

Issue 2761933002: Add Genericity enum in VM to distinguish how a type is uninstantiated. (Closed)
Patch Set: sync Created 3 years, 9 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/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index a1b5c73528b189f07185d76fe5aa556489569503..20ab695405b4df8ebd5c0bf1a742b9424a1f3918 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -12588,16 +12588,10 @@ bool Parser::AreFunctionInstantiatorsRequired() const {
bool Parser::InGenericFunctionScope() const {
if (!innermost_function().IsNull()) {
// With one more free tag bit in Function, we could cache this information.
- if (innermost_function().IsGeneric()) {
+ if (innermost_function().IsGeneric() ||
+ innermost_function().HasGenericParent()) {
return true;
}
- Function& parent = Function::Handle(innermost_function().parent_function());
- while (!parent.IsNull()) {
- if (parent.IsGeneric()) {
- return true;
- }
- parent = parent.parent_function();
- }
}
return false;
}
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698