Author: fperrad
Date: Fri May 25 02:37:15 2007
New Revision: 18641
Modified:
trunk/compilers/past-pm/POST/Node.pir
Log:
[PAST-pm]
- emit .return only when it's needed
Modified: trunk/compilers/past-pm/POST/Node.pir
==============================================================================
--- trunk/compilers/past-pm/POST/Node.pir (original)
+++ trunk/compilers/past-pm/POST/Node.pir Fri May 25 02:37:15 2007
@@ -332,7 +332,10 @@
iter_end:
.local string value
value = self.'result'()
- code.'emit'(" .return (%0)\n.end\n", value)
+ if value == '' goto no_return
+ code.'emit'(" .return (%0)\n", value)
+ no_return:
+ code.'emit'(".end\n")
$P0 = get_hll_global ['POST'], '$!subpir'
code .= $P0
set_hll_global ['POST'], '$!subpir', code