Remove unnecessary pushing/popping for integer literal expressions
authorDavid Kerkeslager <kerkeslager@gmail.com>
Wed, 24 Jul 2019 17:20:35 +0000 (13:20 -0400)
committerDavid Kerkeslager <kerkeslager@gmail.com>
Wed, 24 Jul 2019 17:20:35 +0000 (13:20 -0400)
normalization.py

index 5eef1db..71f1fba 100644 (file)
@@ -120,16 +120,10 @@ NormalProgram = collections.namedtuple(
 )
 
 def normalize_integer_literal_expression(counter, expression):
-    variable = '${}'.format(counter)
     return (
-        counter + 1,
-        (
-            NormalVariableInitializationStatement(
-                variable=variable,
-                expression=NormalIntegerLiteralExpression(integer=expression.integer),
-            ),
-        ),
-        NormalVariableExpression(variable=variable),
+        counter,
+        (),
+        NormalIntegerLiteralExpression(integer=expression.integer),
     )
 
 def normalize_lambda_expression(counter, expression):