oppc/pseudocode: simplify call arguments
authorDmitry Selyutin <ghostmansd@gmail.com>
Fri, 12 Jan 2024 20:13:34 +0000 (23:13 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 16 Jan 2024 19:10:07 +0000 (22:10 +0300)
src/openpower/oppc/pc_pseudocode.py

index a04a99249907a87d40374470241e3dbce54788d4..b9d1b96434ce9522435a86e7db9c75f2cf47fd94 100644 (file)
@@ -34,10 +34,9 @@ class PseudocodeVisitor(pc_util.Visitor):
     def Call(self, node):
         yield node
         args = []
-        for subnode in node.args:
-            for (level, stmt) in self[subnode]:
-                assert level == 0
-                args.append(stmt)
+        for (level, stmt) in self[node.args]:
+            assert level == 0
+            args.append(stmt)
         args = ", ".join(args)
         stmt = f"{node.name}({args})"
         self[node].emit(stmt=stmt)