Commit 87ccc971 authored by Stefan Behnel's avatar Stefan Behnel

avoid unnecessary safety temping of function arguments that are builtins or...

avoid unnecessary safety temping of function arguments that are builtins or read-only variables (e.g. extension types)
parent 25f71745
......@@ -1617,7 +1617,9 @@ class NameNode(AtomicExprNode):
if ExprNode.nonlocally_immutable(self):
return True
entry = self.entry
return entry and (entry.is_local or entry.is_arg) and not entry.in_closure
if not entry or entry.in_closure:
return False
return entry.is_local or entry.is_arg or entry.is_builtin or entry.is_readonly
def calculate_target_results(self, env):
pass
......
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