forked from lcompilers/lpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3aa78c6
commit f0205e8
Showing
6 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
(Module [(AsyncFunctionDef func ([] [(param1 () ()) (param2 () ())] [] [] [] [] []) [(Expr (Await (Call (Attribute (Name asyncio Load) sleep Load) [(ConstantInt 1 ())] []))) (Expr (Call (Name do_something Load) [] [])) (AsyncFor (Name x Store) (Name y Load) [(Expr (Call (Name do_something Load) [(Name x Load)] []))] [] ()) (AsyncWith [((Call (Name open Load) [(ConstantStr "examples/expr2.py" ()) (ConstantStr "r" ())] []) (Name file Store))] [(Assign [(Name x Store)] (Call (Attribute (Name file Load) read Load) [] []) ())] ())] [] () ()) (AsyncFunctionDef test_01 ([] [] [] [] [] [] []) [(Assign [(Name results Store)] (Await (Call (Attribute (Name tasks Load) gather Load) [(Starred (ListComp (Call (Attribute (Name ag Load) aclose Load) [] []) [((Name ag Store) (Name closing_agens Load) [] 0)]) Load)] [(return_exceptions (ConstantBool .true. ()))])) ()) (With [((Await (Name lock Load)) ())] [(Pass)] ()) (AugAssign (Name data Store) Add (Await (Call (Attribute (Attribute (Name self Load) loop Load) sock_recv Load) [(Name sock Load) (Name DATA_SIZE Load)] []))) (Return (Await (Call (Attribute (Name self Load) run_in_executor Load) [(ConstantNone ()) (Name getaddr_func Load) (Name host Load) (Name port Load) (Name family Load) (Name type Load) (Name proto Load) (Name flags Load)] [])))] [] () ()) (AsyncFunctionDef test_02 ([] [] [] [] [] [] []) [(Assign [(Name items Store)] (ListComp (Await (Call (Attribute (Name q Load) get Load) [] [])) [((Name _ Store) (Call (Name range Load) [(ConstantInt 3 ())] []) [] 0)]) ()) (Expr (SetComp (Await (Name c Load)) [((Name c Store) (List [(Call (Name f Load) [(ConstantInt 1 ())] []) (Call (Name f Load) [(ConstantInt 41 ())] [])] Load) [] 0)])) (Expr (DictComp (Name i Load) (Await (Name c Load)) [((Tuple [(Name i Store) (Name c Store)] Store) (Call (Name enumerate Load) [(List [(Call (Name f Load) [(ConstantInt 1 ())] []) (Call (Name f Load) [(ConstantInt 41 ())] [])] Load)] []) [] 0)])) (Expr (ListComp (Name s Load) [((Name c Store) (List [(Call (Name f Load) [(ConstantStr "" ())] []) (Call (Name f Load) [(ConstantStr "abc" ())] []) (Call (Name f Load) [(ConstantStr "" ())] []) (Call (Name f Load) [(List [(ConstantStr "de" ()) (ConstantStr "fg" ())] Load)] [])] Load) [] 0) ((Name s Store) (Await (Name c Load)) [] 0)])) (Return (GeneratorExp (BinOp (Name i Load) Mult (ConstantInt 2 ())) [((Name i Store) (Call (Name range Load) [(Name n Load)] []) [(Await (Call (Name wrap Load) [(Name i Load)] []))] 0)]))] [] () ())] []) | ||
(Module [(AsyncFunctionDef func ([] [(param1 () ()) (param2 () ())] [] [] [] [] []) [(Expr (Await (Call (Attribute (Name asyncio Load) sleep Load) [(ConstantInt 1 ())] []))) (Expr (Call (Name do_something Load) [] [])) (AsyncFor (Name x Store) (Name y Load) [(Expr (Call (Name do_something Load) [(Name x Load)] []))] [] ()) (AsyncWith [((Call (Name open Load) [(ConstantStr "examples/expr2.py" ()) (ConstantStr "r" ())] []) (Name file Store))] [(Assign [(Name x Store)] (Call (Attribute (Name file Load) read Load) [] []) ())] ())] [] () ()) (AsyncFunctionDef test_01 ([] [] [] [] [] [] []) [(Assign [(Name results Store)] (Await (Call (Attribute (Name tasks Load) gather Load) [(Starred (ListComp (Call (Attribute (Name ag Load) aclose Load) [] []) [((Name ag Store) (Name closing_agens Load) [] 0)]) Load)] [(return_exceptions (ConstantBool .true. ()))])) ()) (With [((Await (Name lock Load)) ())] [(Pass)] ()) (AugAssign (Name data Store) Add (Await (Call (Attribute (Attribute (Name self Load) loop Load) sock_recv Load) [(Name sock Load) (Name DATA_SIZE Load)] []))) (Return (Await (Call (Attribute (Name self Load) run_in_executor Load) [(ConstantNone ()) (Name getaddr_func Load) (Name host Load) (Name port Load) (Name family Load) (Name type Load) (Name proto Load) (Name flags Load)] [])))] [] () ()) (AsyncFunctionDef test_02 ([] [] [] [] [] [] []) [(Assign [(Name items Store)] (ListComp (Await (Call (Attribute (Name q Load) get Load) [] [])) [((Name _ Store) (Call (Name range Load) [(ConstantInt 3 ())] []) [] 0)]) ()) (Expr (SetComp (Await (Name c Load)) [((Name c Store) (List [(Call (Name f Load) [(ConstantInt 1 ())] []) (Call (Name f Load) [(ConstantInt 41 ())] [])] Load) [] 0)])) (Expr (DictComp (Name i Load) (Await (Name c Load)) [((Tuple [(Name i Store) (Name c Store)] Store) (Call (Name enumerate Load) [(List [(Call (Name f Load) [(ConstantInt 1 ())] []) (Call (Name f Load) [(ConstantInt 41 ())] [])] Load)] []) [] 0)])) (Expr (ListComp (Name s Load) [((Name c Store) (List [(Call (Name f Load) [(ConstantStr "" ())] []) (Call (Name f Load) [(ConstantStr "abc" ())] []) (Call (Name f Load) [(ConstantStr "" ())] []) (Call (Name f Load) [(List [(ConstantStr "de" ()) (ConstantStr "fg" ())] Load)] [])] Load) [] 0) ((Name s Store) (Await (Name c Load)) [] 0)])) (Return (GeneratorExp (BinOp (Name i Load) Mult (ConstantInt 2 ())) [((Name i Store) (Call (Name range Load) [(Name n Load)] []) [(Await (Call (Name wrap Load) [(Name i Load)] []))] 0)]))] [] () ()) (AsyncFunctionDef t ([] [] [] [] [] [] []) [(Expr (Call (Attribute (Name results Load) append Load) [(Await (Call (Name anext Load) [(Name g Load)] []))] [])) (Expr (Call (Attribute (Name self Load) assertIn Load) [(ConstantStr "..." ()) (Call (Name repr Load) [(Await (Call (Attribute (Name asyncio Load) wait_for Load) [(Call (Name func Load) [] [])] [(timeout (ConstantInt 10 ()))]))] [])] [])) (Assign [(Name x Store)] (UnaryOp USub (Await (Call (Name bar Load) [] []))) ()) (Return (BinOp (BinOp (BinOp (BinOp (Await (Call (Name bar Load) [] [])) Add (Await (Call (Call (Name wrap Load) [] []) [] []))) Add (Await (Call (Call (Call (Subscript (Name db Load) (ConstantStr "b" ()) Load) [] []) [] []) [] []))) Add (BinOp (Await (Call (Name bar Load) [] [])) Mult (ConstantInt 1000 ()))) Add (Await (Call (Call (Attribute (Name DB Load) b Load) [] []) [] []))))] [] () ())] []) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
(Module [(Expr (Call (Call (Call (Name getattr Load) [(Name x Load) (Name y Load)] []) [(Name a Load) (Name b Load)] []) [(ConstantInt 5 ())] [(a (Name a Load)) (b (ConstantInt 0 ()))])) (Expr (Call (Call (Name func Load) [(Name a Load) (Name _op Load)] []) [(Name s Load)] [])) (Expr (Call (Call (Name test Load) [] []) [] [])) (Assign [(Name a Store)] (Subscript (List [(ConstantInt 1 ()) (ConstantInt 2 ())] Load) (ConstantInt 0 ()) Load) ()) (Assign [(Tuple [(Name a Store) (Name b Store)] Store)] (Subscript (BinOp (List [(ConstantInt 1 ()) (ConstantInt 2 ())] Load) Add (List [(ConstantInt 0 ()) (ConstantInt 0 ())] Load)) (Slice () (ConstantInt 2 ()) ()) Load) ()) (Assign [(Tuple [(Name a Store) (Name b Store)] Store)] (Subscript (BinOp (Call (Attribute (Name c Load) d Load) [] []) Add (List [(ConstantInt 1 ()) (ConstantInt 0 ())] Load)) (Slice () () ()) Load) ()) (Expr (Subscript (Dict [(ConstantStr "a" ()) (ConstantStr "b" ())] [(Name a Load) (Name b Load)]) (Name val Load) Load)) (If (Compare (Subscript (Subscript (Name args Load) (Name i Load) Load) (Slice () (ConstantInt 1 ()) ()) Load) In [(List [(ConstantStr "" ()) (ConstantStr "." ())] Load)]) [(Pass)] []) (Assign [(Name x Store)] (List [(Subscript (ListComp (BinOp (UnaryOp USub (Name c Load)) Mod (Name self Load)) [((Name c Store) (Call (Name reversed Load) [(Attribute (Attribute (Name T Load) rep Load) rep Load)] []) [] 0)]) (Slice () (UnaryOp USub (ConstantInt 1 ())) ()) Load)] Load) ()) (Expr (Subscript (ListComp (Name x Load) [((Name x Store) (Name G Load) [(Call (Attribute (Attribute (Name self Load) ring Load) is_unit Load) [(Subscript (Name x Load) (ConstantInt 0 ()) Load)] [])] 0)]) (ConstantInt 0 ()) Load)) (If (Compare (Name x Load) NotIn [(Name z Load)]) [(Expr (ConstantEllipsis ()))] []) (If (Compare (Name x Load) NotIn [(Name z Load)]) [(Expr (ConstantEllipsis ()))] []) (If (Compare (Name x Load) NotIn [(Name z Load)]) [(Expr (ConstantEllipsis ()))] []) (FunctionDef imatmul ([] [(a () ()) (b () ())] [] [] [] [] []) [(Expr (ConstantStr "Same as a @= b." ())) (AugAssign (Name a Store) MatMult (Name b Load)) (Return (Name a Load))] [] () ())] []) | ||
(Module [(Expr (Call (Call (Call (Name getattr Load) [(Name x Load) (Name y Load)] []) [(Name a Load) (Name b Load)] []) [(ConstantInt 5 ())] [(a (Name a Load)) (b (ConstantInt 0 ()))])) (Expr (Call (Call (Name func Load) [(Name a Load) (Name _op Load)] []) [(Name s Load)] [])) (Expr (Call (Call (Name test Load) [] []) [] [])) (Assign [(Name a Store)] (Subscript (List [(ConstantInt 1 ()) (ConstantInt 2 ())] Load) (ConstantInt 0 ()) Load) ()) (Assign [(Tuple [(Name a Store) (Name b Store)] Store)] (Subscript (BinOp (List [(ConstantInt 1 ()) (ConstantInt 2 ())] Load) Add (List [(ConstantInt 0 ()) (ConstantInt 0 ())] Load)) (Slice () (ConstantInt 2 ()) ()) Load) ()) (Assign [(Tuple [(Name a Store) (Name b Store)] Store)] (Subscript (BinOp (Call (Attribute (Name c Load) d Load) [] []) Add (List [(ConstantInt 1 ()) (ConstantInt 0 ())] Load)) (Slice () () ()) Load) ()) (Expr (Subscript (Dict [(ConstantStr "a" ()) (ConstantStr "b" ())] [(Name a Load) (Name b Load)]) (Name val Load) Load)) (If (Compare (Subscript (Subscript (Name args Load) (Name i Load) Load) (Slice () (ConstantInt 1 ()) ()) Load) In [(List [(ConstantStr "" ()) (ConstantStr "." ())] Load)]) [(Pass)] []) (Assign [(Name x Store)] (List [(Subscript (ListComp (BinOp (UnaryOp USub (Name c Load)) Mod (Name self Load)) [((Name c Store) (Call (Name reversed Load) [(Attribute (Attribute (Name T Load) rep Load) rep Load)] []) [] 0)]) (Slice () (UnaryOp USub (ConstantInt 1 ())) ()) Load)] Load) ()) (Expr (Subscript (ListComp (Name x Load) [((Name x Store) (Name G Load) [(Call (Attribute (Attribute (Name self Load) ring Load) is_unit Load) [(Subscript (Name x Load) (ConstantInt 0 ()) Load)] [])] 0)]) (ConstantInt 0 ()) Load)) (If (Compare (Name x Load) NotIn [(Name z Load)]) [(Expr (ConstantEllipsis ()))] []) (If (Compare (Name x Load) NotIn [(Name z Load)]) [(Expr (ConstantEllipsis ()))] []) (If (Compare (Name x Load) NotIn [(Name z Load)]) [(Expr (ConstantEllipsis ()))] []) (If (Compare (Name x Load) NotIn [(Name z Load)]) [(Expr (ConstantEllipsis ()))] []) (FunctionDef imatmul ([] [(a () ()) (b () ())] [] [] [] [] []) [(Expr (ConstantStr "Same as a @= b." ())) (AugAssign (Name a Store) MatMult (Name b Load)) (Return (Name a Load))] [] () ())] []) |