[pypy-commit] pypy jit-usable_retrace_3: kill whitespaces in bytecode

hakanardo noreply at buildbot.pypy.org
Mon Jan 14 19:17:36 CET 2013


Author: Hakan Ardo <hakan at debian.org>
Branch: jit-usable_retrace_3
Changeset: r60063:1537f18caa0c
Date: 2013-01-13 21:02 +0100
http://bitbucket.org/pypy/pypy/changeset/1537f18caa0c/

Log:	kill whitespaces in bytecode

diff --git a/pypy/jit/metainterp/test/test_random_loops.py b/pypy/jit/metainterp/test/test_random_loops.py
--- a/pypy/jit/metainterp/test/test_random_loops.py
+++ b/pypy/jit/metainterp/test/test_random_loops.py
@@ -1,5 +1,6 @@
 from pypy.jit.metainterp.test.support import LLJitMixin
 from pypy.rlib.jit import JitDriver
+import re
 
 class IntBox(object):
     def __init__(self, val):
@@ -29,6 +30,7 @@
 
 class RandomLoopBase(object):
     def check(self, bytecode, args=(0,0,0,0,0), **kwargs):
+        bytecode = re.subn('\s', '', bytecode)[0]
         offsets = self.offsets(bytecode)
         def get_printable_location(pc):
             return bytecode[pc]
@@ -101,8 +103,6 @@
                         pc += offsets[pc]
                 elif op == ')':
                     value = IntBox(0)
-                elif op in ' \n':
-                    pass
                 else:
                     raise UnknonwOpCode
 


More information about the pypy-commit mailing list