[pypy-commit] pypy win64-stage1: some cleanups and removals
ctismer
noreply at buildbot.pypy.org
Thu Mar 15 04:05:14 CET 2012
Author: Christian Tismer <tismer at stackless.com>
Branch: win64-stage1
Changeset: r53648:cf53670906d0
Date: 2012-03-14 20:04 -0700
http://bitbucket.org/pypy/pypy/changeset/cf53670906d0/
Log: some cleanups and removals
diff --git a/pypy/rpython/llinterp.py b/pypy/rpython/llinterp.py
--- a/pypy/rpython/llinterp.py
+++ b/pypy/rpython/llinterp.py
@@ -1022,7 +1022,6 @@
def op_int_neg_ovf(self, x):
assert is_valid_int(x)
- assert isinstance(x, (int, long))
try:
return ovfcheck(-x)
except OverflowError:
@@ -1030,7 +1029,6 @@
def op_int_abs_ovf(self, x):
assert is_valid_int(x)
- assert isinstance(x, (int, long))
try:
return ovfcheck(abs(x))
except OverflowError:
@@ -1039,7 +1037,6 @@
def op_int_lshift_ovf(self, x, y):
assert is_valid_int(x)
assert is_valid_int(y)
- assert isinstance(y, (int, long))
try:
return ovfcheck(x << y)
except OverflowError:
@@ -1112,7 +1109,7 @@
x = x.default
# if type(x) is a subclass of Symbolic, bool(x) will usually raise
# a TypeError -- unless __nonzero__ has been explicitly overridden.
- assert isinstance(x, (int, long, Symbolic))
+ assert is_valid_int(x) or isinstance(x, Symbolic)
return bool(x)
# hack for jit.codegen.llgraph
@@ -1134,7 +1131,7 @@
def op_oonewarray(self, ARRAY, length):
assert isinstance(ARRAY, ootype.Array)
- assert isinstance(length, (int, long))
+ assert is_valid_int(length)
return ootype.oonewarray(ARRAY, length)
def op_runtimenew(self, class_):
diff --git a/pypy/tool/nullpath.py b/pypy/tool/nullpath.py
--- a/pypy/tool/nullpath.py
+++ b/pypy/tool/nullpath.py
@@ -1,10 +1,5 @@
import py, os
-if os.name <> 'nt':
- NULLPATHNAME = '/dev/null'
-else:
- NULLPATHNAME = 'NUL'
-
class NullPyPathLocal(py.path.local):
def join(self, *args):
diff --git a/pypy/tool/test/test_nullpath.py b/pypy/tool/test/test_nullpath.py
--- a/pypy/tool/test/test_nullpath.py
+++ b/pypy/tool/test/test_nullpath.py
@@ -1,6 +1,6 @@
import sys, os
import py
-from pypy.tool.nullpath import NullPyPathLocal, NULLPATHNAME
+from pypy.tool.nullpath import NullPyPathLocal
def test_nullpath(tmpdir):
path = NullPyPathLocal(tmpdir)
More information about the pypy-commit
mailing list