Update of /cvsroot/jython/jython/Tools/jythonc
In directory usw-pr-cvs1:/tmp/cvs-serv25292
Modified Files:
SimpleCompiler.py
Log Message:
Added support for array type temporary vars. Needed for #448485.
Index: SimpleCompiler.py
===================================================================
RCS file: /cvsroot/jython/jython/Tools/jythonc/SimpleCompiler.py,v
retrieving revision 2.15
retrieving revision 2.16
diff -C2 -d -r2.15 -r2.16
*** SimpleCompiler.py 2001/07/29 14:59:13 2.15
--- SimpleCompiler.py 2001/10/28 14:44:39 2.16
***************
*** 98,103 ****
temps.append(None)
! tname = "t$%d$%s" % (index, type)
temp = jast.Identifier(tname)
temps[index] = temp
#print 'get temp', index, type, temps
--- 98,104 ----
temps.append(None)
! tname = "t$%d$%s" % (index, type.replace("[]", "__"))
temp = jast.Identifier(tname)
+ temp.type = type
temps[index] = temp
#print 'get temp', index, type, temps
***************
*** 107,111 ****
parts = temp.name.split('$')
index = int(parts[1])
! type = parts[2]
temps = self.gettemps(type)
--- 108,112 ----
parts = temp.name.split('$')
index = int(parts[1])
! type = temp.type
temps = self.gettemps(type)
***************
*** 208,212 ****
names = []
for index in range(len(temps)):
! names.append("t$%d$%s" % (index, type))
ident = "%s %s" % (type, COMMASPACE.join(names))
decs.append(jast.Identifier(ident))
--- 209,213 ----
names = []
for index in range(len(temps)):
! names.append("t$%d$%s" % (index, type.replace("[]", "__")))
ident = "%s %s" % (type, COMMASPACE.join(names))
decs.append(jast.Identifier(ident))
|