@@ -429,13 +429,6 @@ def _body(self, body: list[ast.stmt]) -> None:
429429 for stmt in body :
430430 self .visit (stmt )
431431
432- def _to_proxy (self , node : ast .AST ) -> object :
433- assert isinstance (node , ExtendedAST )
434- type_info = node ._type_info
435- if not type_info .contains_tensor ():
436- return type_info .proxy ()
437- return self .visit (node )
438-
439432 def visit_BinOp (self , node : ast .BinOp ) -> object :
440433 return _eval_binary (node .op , self .visit (node .left ), self .visit (node .right ))
441434
@@ -793,15 +786,15 @@ def visit_Call(self, node: ast.Call) -> object:
793786 for arg in node .args :
794787 if isinstance (arg , ast .Starred ):
795788 # pyre-ignore[6]
796- args .extend (self ._to_proxy (arg .value ))
789+ args .extend (self .visit (arg .value ))
797790 else :
798- args .append (self ._to_proxy (arg ))
791+ args .append (self .visit (arg ))
799792 for kwarg in node .keywords :
800793 if kwarg .arg is None :
801794 # pyre-ignore[6]
802- kwargs .update (self ._to_proxy (kwarg .value ))
795+ kwargs .update (self .visit (kwarg .value ))
803796 else :
804- kwargs [kwarg .arg ] = self ._to_proxy (kwarg .value )
797+ kwargs [kwarg .arg ] = self .visit (kwarg .value )
805798
806799 if isinstance (
807800 (func_type_info := node .func ._type_info ), # pyre-ignore[16]
0 commit comments