File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -142,15 +142,7 @@ def apply_function_specialization(
142142 builder : IRBuilder , expr : CallExpr , callee : RefExpr
143143) -> Value | None :
144144 """Invoke the Specializer callback for a function if one has been registered"""
145- if (
146- isinstance (callee , NameExpr )
147- # and isinstance(callee.node, Var)
148- # NOTE: why is this not a weakref rprimitive?
149- # TODO: fix to weakref rprimitive so _apply_specialization can use the custom_op
150- and is_weakref_rprimitive (builder .node_type (callee ))
151- # and str(callee.node.type).startswith("weakref.ReferenceType")
152- and len (expr .args ) == 0
153- ):
145+ if is_weakref_rprimitive (builder .node_type (callee )) and len (expr .args ) == 0 :
154146 return builder .call_c (weakref_deref_op , [builder .accept (expr .callee )], expr .line )
155147 return _apply_specialization (builder , expr , callee , callee .fullname )
156148
You can’t perform that action at this time.
0 commit comments