[pypy-commit] pypy default: win64 stage 1 is completely synchronized with default. Starting stage 2 soon.
ctismer
noreply at buildbot.pypy.org
Sun Mar 18 02:22:24 CET 2012
Author: Christian Tismer <tismer at stackless.com>
Branch:
Changeset: r53769:42cadb130935
Date: 2012-03-18 02:21 +0100
http://bitbucket.org/pypy/pypy/changeset/42cadb130935/
Log: win64 stage 1 is completely synchronized with default. Starting
stage 2 soon.
diff --git a/pypy/__init__.py b/pypy/__init__.py
--- a/pypy/__init__.py
+++ b/pypy/__init__.py
@@ -1,1 +1,16 @@
# Empty
+
+# XXX Should be empty again, soon.
+# XXX hack for win64:
+# This patch must stay here until the END OF STAGE 1
+# When all tests work, this branch will be merged
+# and the branch stage 2 is started, where we remove this patch.
+import sys
+if hasattr(sys, "maxsize"):
+ if sys.maxint <> sys.maxsize:
+ sys.maxint = sys.maxsize
+ import warnings
+ warnings.warn("""\n
+---> This win64 port is now in stage 1: sys.maxint was modified.
+---> When pypy/__init__.py becomes empty again, we have reached stage 2.
+""")
diff --git a/pypy/rlib/rmmap.py b/pypy/rlib/rmmap.py
--- a/pypy/rlib/rmmap.py
+++ b/pypy/rlib/rmmap.py
@@ -226,6 +226,7 @@
# XXX should be propagate the real type, allowing
# for 2*sys.maxint?
high = high_ref[0]
+ high = rffi.cast(lltype.Signed, high)
# low might just happen to have the value INVALID_FILE_SIZE
# so we need to check the last error also
INVALID_FILE_SIZE = -1
@@ -548,7 +549,7 @@
FILE_BEGIN = 0
high_ref = lltype.malloc(PLONG.TO, 1, flavor='raw')
try:
- high_ref[0] = newsize_high
+ high_ref[0] = rffi.cast(LONG, newsize_high)
SetFilePointer(self.file_handle, newsize_low, high_ref,
FILE_BEGIN)
finally:
@@ -710,7 +711,9 @@
free = c_munmap_safe
elif _MS_WINDOWS:
- def mmap(fileno, length, tagname="", access=_ACCESS_DEFAULT, offset=0):
+ def mmap(fileno, length, flags=0, tagname="", access=_ACCESS_DEFAULT, offset=0):
+ # XXX flags is or-ed into access by now.
+
# check size boundaries
_check_map_size(length)
map_size = length
@@ -792,6 +795,7 @@
offset_hi = 0
offset_lo = offset
+ flProtect |= flags
m.map_handle = CreateFileMapping(m.file_handle, NULL, flProtect,
size_hi, size_lo, m.tagname)
@@ -809,6 +813,11 @@
m.map_handle = INVALID_HANDLE
raise winerror
+ class Hint:
+ pos = -0x4fff0000 # for reproducible results
+ hint = Hint()
+ # XXX this has no effect on windows
+
def alloc(map_size):
"""Allocate memory. This is intended to be used by the JIT,
so the memory has the executable bit set.
diff --git a/pypy/rpython/module/ll_time.py b/pypy/rpython/module/ll_time.py
--- a/pypy/rpython/module/ll_time.py
+++ b/pypy/rpython/module/ll_time.py
@@ -9,7 +9,7 @@
from pypy.rpython.lltypesystem import lltype
from pypy.rpython.extfunc import BaseLazyRegistering, registering, extdef
from pypy.rlib import rposix
-from pypy.rlib.rarithmetic import intmask
+from pypy.rlib.rarithmetic import intmask, maxint32
from pypy.translator.tool.cbuild import ExternalCompilationInfo
if sys.platform == 'win32':
@@ -177,7 +177,7 @@
@registering(time.sleep)
def register_time_sleep(self):
if sys.platform == 'win32':
- MAX = sys.maxint
+ MAX = maxint32
Sleep = self.llexternal('Sleep', [rffi.ULONG], lltype.Void)
def time_sleep_llimpl(secs):
millisecs = secs * 1000.0
diff --git a/pytest.py b/pytest.py
--- a/pytest.py
+++ b/pytest.py
@@ -4,6 +4,20 @@
"""
__all__ = ['main']
+# XXX hack for win64:
+# This patch must stay here until the END OF STAGE 1
+# When all tests work, this branch will be merged
+# and the branch stage 2 is started, where we remove this patch.
+import sys
+if hasattr(sys, "maxsize"):
+ if sys.maxint <> sys.maxsize:
+ sys.maxint = sys.maxsize
+ import warnings
+ warnings.warn("""\n
+---> This win64 port is now in stage 1: sys.maxint was modified.
+---> When pypy/__init__.py becomes empty again, we have reached stage 2.
+""")
+
from _pytest.core import main, UsageError, _preloadplugins
from _pytest import core as cmdline
from _pytest import __version__
More information about the pypy-commit
mailing list