Commit e2c4d352 authored by John Zhang's avatar John Zhang

updated pypy.patch

parent 37f6b006
......@@ -26,19 +26,38 @@ index af1d380..7a5c762 100644
got = rffi.cast(lltype.Signed, got)
if got > 0:
target_pos += got
diff --git a/pypy/module/array/interp_array.py b/pypy/module/array/interp_array.py
index fd29b2d..c1e9d98 100644
--- a/pypy/module/array/interp_array.py
+++ b/pypy/module/array/interp_array.py
@@ -839,7 +839,9 @@ def make_array(mytype):
return rffi.cast(lltype.Unsigned, self.buffer)
def _charbuf_stop(self):
- keepalive_until_here(self)
+ from rpython.rlib.objectmodel import we_are_translated_to_mu
+ if not we_are_translated_to_mu():
+ keepalive_until_here(self)
def w_getitem(self, space, idx):
item = self.buffer[idx]
diff --git a/rpython/rlib/jit.py b/rpython/rlib/jit.py
index e973a94..b9752e8 100644
index e973a94..46484e8 100644
--- a/rpython/rlib/jit.py
+++ b/rpython/rlib/jit.py
@@ -472,7 +472,7 @@ def virtual_ref(x):
@@ -472,8 +472,10 @@ def virtual_ref(x):
@specialize.argtype(1)
def virtual_ref_finish(vref, x):
"""See docstring in virtual_ref(x)"""
- keepalive_until_here(x) # otherwise the whole function call is removed
+ # keepalive_until_here(x) # otherwise the whole function call is removed
_virtual_ref_finish(vref, x)
- _virtual_ref_finish(vref, x)
+ from rpython.rlib.objectmodel import we_are_translated_to_mu
+ if not we_are_translated_to_mu():
+ keepalive_until_here(x) # otherwise the whole function call is removed
+ # _virtual_ref_finish(vref, x)
def non_virtual_ref(x):
"""Creates a 'vref' that just returns x when called; nothing more special.
diff --git a/rpython/rlib/rposix.py b/rpython/rlib/rposix.py
index f35e2b7..fd91235 100644
--- a/rpython/rlib/rposix.py
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment