Commit 4cc320d2 authored by Stefan Behnel's avatar Stefan Behnel

analyse loop variable in scoped comprehensions as local variable (enables...

analyse loop variable in scoped comprehensions as local variable (enables control flow based optimisations)
parent b0be89cc
......@@ -1568,6 +1568,7 @@ class GeneratorExpressionScope(Scope):
cname = '%s%s' % (self.genexp_prefix, self.parent_scope.mangle(Naming.var_prefix, name or self.next_id()))
entry = self.declare(name, cname, type, pos, visibility)
entry.is_variable = 1
entry.is_local = 1
self.var_entries.append(entry)
self.entries[name] = entry
return entry
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment