From: Armin R. <ar...@us...> - 2002-01-15 12:42:12
|
Update of /cvsroot/psyco/psyco/py-utils In directory usw-pr-cvs1:/tmp/cvs-serv4446/py-utils Modified Files: xam.py Log Message: New tactics for fast promotion of values. Big win on programs than handles e.g. homogenuous lists. Index: xam.py =================================================================== RCS file: /cvsroot/psyco/psyco/py-utils/xam.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xam.py 2002/01/12 07:55:08 1.3 --- xam.py 2002/01/15 12:42:09 1.4 *************** *** 93,103 **** if attr == 'cache_text': # produce the disassembly listing f = open(tmpfile, 'wb') ! f.write(self.data) f.close() try: ! g = os.popen(objdump % {'file': tmpfile, 'origin': self.addr}, 'r') ! self.cache_text = g.readlines() g.close() finally: --- 93,116 ---- if attr == 'cache_text': # produce the disassembly listing + data = self.data + addr = self.addr + if data[:4] == '\x66\x66\x66\x66': + # detected a rt_local_buf_t structure + next, key = struct.unpack('ll', data[4:12]) + data = data[12:] + addr += 12 + self.cache_text = [ + 'Created by promotion of the value 0x%x\n' % key, + 'Next promoted value at buffer 0x%x\n' % next, + ] + else: + self.cache_text = [] f = open(tmpfile, 'wb') ! f.write(data) f.close() try: ! g = os.popen(objdump % {'file': tmpfile, 'origin': addr}, 'r') ! self.cache_text += g.readlines() g.close() finally: |