Commit b5a2401a authored by Stefan Behnel's avatar Stefan Behnel

avoid some useless incref-decrefs around isinstance() checks

parent 132bdceb
...@@ -2187,7 +2187,8 @@ class OptimizeBuiltinCalls(Visitor.MethodDispatcherTransform): ...@@ -2187,7 +2187,8 @@ class OptimizeBuiltinCalls(Visitor.MethodDispatcherTransform):
temp = None temp = None
if isinstance(types, ExprNodes.TupleNode): if isinstance(types, ExprNodes.TupleNode):
types = types.args types = types.args
arg = temp = UtilNodes.ResultRefNode(arg) if arg.is_attribute or not arg.is_simple():
arg = temp = UtilNodes.ResultRefNode(arg)
elif types.type is Builtin.type_type: elif types.type is Builtin.type_type:
types = [types] types = [types]
else: else:
......
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