Changeset 4523:fcbe3df3989a in livinglogic.python.xist

Show
Ignore:
Timestamp:
07/15/11 17:51:32 (8 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Don't use a temporary Java variable for defining UL4 subtemplates.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/ul4c.py

    r4522 r4523  
    18821882    def _dispatch_enddef(self, opcode): 
    18831883        level = self._stack.pop() 
    1884         varcounter = self._stack[-1].varcounter 
    18851884        # define new template object 
    1886         self._do(u"com.livinglogic.ul4.JSPTemplate template{count} = new com.livinglogic.ul4.JSPTemplate()".format(count=varcounter)) 
     1885        self._do(u"{var}.put({arg}, new com.livinglogic.ul4.JSPTemplate()".format(var=self._stack[-1].variables, arg=misc.javaexpr(level.name))) 
    18871886        self._do(u"{") 
    18881887        self._do(1) 
     
    18991898        self._do(u"}") 
    19001899        self._do(-1) 
    1901         self._do(u"};") 
    1902         self._do(u"{var}.put({arg}, template{count});".format(var=self._stack[-1].variables, arg=misc.javaexpr(level.name), count=varcounter)) 
    1903         self._stack[-1].varcounter += 1 
     1900        self._do(u"});") 
    19041901    def _dispatch_break(self, opcode): 
    19051902        self._do(u"break;")