[pypy-svn] r77657 - pypy/trunk/pypy/jit/backend/x86

fijal at codespeak.net fijal at codespeak.net
Wed Oct 6 18:22:49 CEST 2010


Author: fijal
Date: Wed Oct  6 18:22:47 2010
New Revision: 77657

Modified:
   pypy/trunk/pypy/jit/backend/x86/assembler.py
Log:
Don't be too smart. We get clashes if we try to index loops by code name
(why not on the other hand). Instead keep numbers. Also simplify the way
it's written out.


Modified: pypy/trunk/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/x86/assembler.py	(original)
+++ pypy/trunk/pypy/jit/backend/x86/assembler.py	Wed Oct  6 18:22:47 2010
@@ -244,7 +244,7 @@
             f = open_file_as_stream(output_log, "w")
             for i in range(len(self.loop_run_counters)):
                 name, struct = self.loop_run_counters[i]
-                f.write(str(struct.i) + " " * (8 - len(str(struct.i))) + name + "\n")
+                f.write(str(name) + ":" +  str(struct.i) + "\n")
             f.close()
 
     def _build_float_constants(self):
@@ -401,7 +401,7 @@
         if self._debug:
             struct = lltype.malloc(DEBUG_COUNTER, flavor='raw')
             struct.i = 0
-            self.loop_run_counters.append((funcname, struct))
+            self.loop_run_counters.append((len(self.loop_run_counters), struct))
         return funcname
         
     def patch_jump_for_descr(self, faildescr, adr_new_target):



More information about the Pypy-commit mailing list