[pypy-commit] pypy win64-stage1: test_ajit works now in win32 and win64
ctismer
noreply at buildbot.pypy.org
Wed Mar 14 03:17:51 CET 2012
Author: Christian Tismer <tismer at stackless.com>
Branch: win64-stage1
Changeset: r53524:b821821fc62c
Date: 2012-03-13 19:17 -0700
http://bitbucket.org/pypy/pypy/changeset/b821821fc62c/
Log: test_ajit works now in win32 and win64
diff --git a/pypy/jit/metainterp/optimizeopt/intutils.py b/pypy/jit/metainterp/optimizeopt/intutils.py
--- a/pypy/jit/metainterp/optimizeopt/intutils.py
+++ b/pypy/jit/metainterp/optimizeopt/intutils.py
@@ -15,8 +15,8 @@
self.lower = lower
# check for unexpected overflows:
if not we_are_translated():
- assert is_valid_int(upper)
- assert is_valid_int(lower)
+ assert type(upper) is not long or is_valid_int(upper)
+ assert type(lower) is not long or is_valid_int(lower)
# Returns True if the bound was updated
def make_le(self, other):
diff --git a/pypy/jit/metainterp/test/test_ajit.py b/pypy/jit/metainterp/test/test_ajit.py
--- a/pypy/jit/metainterp/test/test_ajit.py
+++ b/pypy/jit/metainterp/test/test_ajit.py
@@ -14,7 +14,7 @@
loop_invariant, elidable, promote, jit_debug, assert_green,
AssertGreenFailed, unroll_safe, current_trace_length, look_inside_iff,
isconstant, isvirtual, promote_string, set_param, record_known_class)
-from pypy.rlib.rarithmetic import ovfcheck
+from pypy.rlib.rarithmetic import ovfcheck, is_valid_int
from pypy.rpython.lltypesystem import lltype, llmemory, rffi
from pypy.rpython.ootypesystem import ootype
@@ -2296,7 +2296,7 @@
self.check_resops(int_rshift=3)
bigval = 1
- while (bigval << 3).__class__ is int:
+ while is_valid_int(bigval << 3):
bigval = bigval << 1
assert self.meta_interp(f, [bigval, 5]) == 0
@@ -2341,7 +2341,7 @@
self.check_resops(int_rshift=3)
bigval = 1
- while (bigval << 3).__class__ is int:
+ while is_valid_int(bigval << 3):
bigval = bigval << 1
assert self.meta_interp(f, [bigval, 5]) == 0
diff --git a/pypy/rlib/rarithmetic.py b/pypy/rlib/rarithmetic.py
--- a/pypy/rlib/rarithmetic.py
+++ b/pypy/rlib/rarithmetic.py
@@ -92,7 +92,10 @@
We therefore can no longer use the int type as it is, but need
to use long everywhere.
"""
-
+
+# XXX returning int(n) should not be necessary and should be simply n.
+# XXX TODO: replace all int(n) by long(n) and fix everything that breaks.
+# XXX Then relax it and replace int(n) by n.
def intmask(n):
if isinstance(n, objectmodel.Symbolic):
return n # assume Symbolics don't overflow
More information about the pypy-commit
mailing list