[pypy-commit] pypy use-mmap: Windows translation fix

arigo pypy.commits at gmail.com
Mon Jul 11 16:28:30 EDT 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: use-mmap
Changeset: r85663:2c06183fc692
Date: 2016-07-11 22:29 +0200
http://bitbucket.org/pypy/pypy/changeset/2c06183fc692/

Log:	Windows translation fix

diff --git a/rpython/rlib/nonconst.py b/rpython/rlib/nonconst.py
--- a/rpython/rlib/nonconst.py
+++ b/rpython/rlib/nonconst.py
@@ -39,7 +39,4 @@
 
     def specialize_call(self, hop):
         hop.exception_cannot_occur()
-        retval = Constant(hop.r_result.convert_const(hop.args_v[0].value))
-        retval.concretetype = hop.r_result.lowleveltype
-        return retval
-
+        return hop.inputarg(hop.r_result, arg=0)
diff --git a/rpython/rlib/rmmap.py b/rpython/rlib/rmmap.py
--- a/rpython/rlib/rmmap.py
+++ b/rpython/rlib/rmmap.py
@@ -924,6 +924,7 @@
         flags = MEM_COMMIT | MEM_RESERVE
         prot = PAGE_EXECUTE_READWRITE
         if we_are_translated():
+            null = NonConstant(null)
             flags = NonConstant(flags)
             prot = NonConstant(prot)
         res = VirtualAlloc_safe(null, map_size, flags, prot)
@@ -945,6 +946,7 @@
         flags = MEM_COMMIT | MEM_RESERVE
         prot = PAGE_READWRITE
         if we_are_translated():
+            null = NonConstant(null)
             flags = NonConstant(flags)
             prot = NonConstant(prot)
         res = VirtualAlloc_safe(null, map_size, flags, prot)


More information about the pypy-commit mailing list