[pypy-svn] r53294 - in pypy/branch/jit-hotpath/pypy/jit/codegen/ia32: . test
fijal at codespeak.net
fijal at codespeak.net
Thu Apr 3 22:03:18 CEST 2008
Author: fijal
Date: Thu Apr 3 22:03:16 2008
New Revision: 53294
Modified:
pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/rgenop.py
pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/test/test_rgenop.py
Log:
don't try to be too smart...
Modified: pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/rgenop.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/rgenop.py (original)
+++ pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/rgenop.py Thu Apr 3 22:03:16 2008
@@ -40,6 +40,7 @@
p[0] = value
class Var(GenVar):
+ token = 'x'
def __init__(self, stackpos):
# 'stackpos' is an index relative to the pushed arguments
@@ -79,6 +80,7 @@
class AddressVar(IntVar):
ll_type = llmemory.Address
token = 'a'
+ SIZE = 1
class BoolVar(Var):
# represents a boolean as an integer which *must* be exactly 0 or 1
@@ -107,11 +109,11 @@
LL_TO_GENVAR = {}
TOKEN_TO_GENVAR = {}
TOKEN_TO_SIZE = {}
-for value in locals().values():
- if hasattr(value, 'll_type'):
- LL_TO_GENVAR[value.ll_type] = value.token
- TOKEN_TO_GENVAR[value.token] = value
- TOKEN_TO_SIZE[value.token] = value.SIZE
+for value in [IntVar, FloatVar, BoolVar, AddressVar]:
+ assert hasattr(value, 'll_type')
+ LL_TO_GENVAR[value.ll_type] = value.token
+ TOKEN_TO_GENVAR[value.token] = value
+ TOKEN_TO_SIZE[value.token] = value.SIZE
LL_TO_GENVAR[lltype.Unsigned] = 'i'
LL_TO_GENVAR[lltype.Void] = 'v'
Modified: pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/test/test_rgenop.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/test/test_rgenop.py (original)
+++ pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/test/test_rgenop.py Thu Apr 3 22:03:16 2008
@@ -13,6 +13,3 @@
class TestRI386GenopCompile(AbstractRGenOpTestsCompile):
RGenOp = RI386GenOp
from pypy.jit.codegen.ia32.test.test_operation import RGenOpPacked
-
- def setup_class(cls):
- py.test.skip("skip compilation tests")
More information about the Pypy-commit
mailing list