To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit 7b87d30a authored by John Zhang's avatar John Zhang
Browse files

updated pypy.patch

parent 2942d83c
......@@ -56,6 +56,44 @@ index f35e2b7..6aad4b8 100644
@replace_os_function('makedev')
@jit.dont_look_inside
diff --git a/rpython/rlib/rthread.py b/rpython/rlib/rthread.py
index cf9fecf..ca5fa64 100644
--- a/rpython/rlib/rthread.py
+++ b/rpython/rlib/rthread.py
@@ -381,17 +381,18 @@ class ThreadLocalReference(ThreadLocalField):
def __init__(self, Cls, loop_invariant=False):
"NOT_RPYTHON: must be prebuilt"
+ from rpython.rtyper import rclass
self.Cls = Cls
unique_id = ThreadLocalReference._COUNT
ThreadLocalReference._COUNT += 1
- ThreadLocalField.__init__(self, lltype.Signed, 'tlref%d' % unique_id,
+ ThreadLocalField.__init__(self, rclass.OBJECTPTR, 'tlref%d' % unique_id,
loop_invariant=loop_invariant)
setraw = self.setraw
offset = self._offset
def get():
if we_are_translated():
- from rpython.rtyper import rclass
+ # from rpython.rtyper import rclass
from rpython.rtyper.annlowlevel import cast_base_ptr_to_instance
_threadlocalref_seeme(self)
ptr = llop.threadlocalref_get(rclass.OBJECTPTR, offset)
@@ -403,9 +404,10 @@ class ThreadLocalReference(ThreadLocalField):
def set(value):
assert isinstance(value, Cls) or value is None
if we_are_translated():
- from rpython.rtyper.annlowlevel import cast_instance_to_gcref
+ from rpython.rtyper.annlowlevel import cast_instance_to_gcref, cast_instance_to_base_ptr
gcref = cast_instance_to_gcref(value)
- value = lltype.cast_ptr_to_int(gcref)
+ # value = lltype.cast_ptr_to_int(gcref)
+ value = cast_instance_to_base_ptr(value)
setraw(value)
rgc.register_custom_trace_hook(TRACETLREF, _lambda_trace_tlref)
rgc.ll_writebarrier(_tracetlref_obj)
diff --git a/rpython/rlib/test/test_rposix.py b/rpython/rlib/test/test_rposix.py
index b3bc6ed..4edfcaa 100644
--- a/rpython/rlib/test/test_rposix.py
......@@ -122,24 +160,8 @@ index 051668b..d44ed79 100644
if ofiles:
dirname = ofiles[0].dirpath()
else:
diff --git a/rpython/translator/platform/darwin.py b/rpython/translator/platform/darwin.py
index 628c26a..3b816a8 100644
--- a/rpython/translator/platform/darwin.py
+++ b/rpython/translator/platform/darwin.py
@@ -30,6 +30,11 @@ class Darwin(posix.BasePosix):
print 'in get_rpath_flags, rel_libdirs is not fixed up',rel_libdirs
return self.rpath_flags
+ def _args_for_shared_exec(self, args, target):
+ return (list(self.shared_only)
+ + ['-dynamiclib', '-install_name', '@rpath/' + target, '-undefined', 'dynamic_lookup', '-flat_namespace']
+ + args)
+
def _args_for_shared(self, args):
return (list(self.shared_only)
+ ['-dynamiclib', '-install_name', '@rpath/$(TARGET)', '-undefined', 'dynamic_lookup', '-flat_namespace']
diff --git a/rpython/translator/platform/posix.py b/rpython/translator/platform/posix.py
index cafc9b1..380db0d 100644
index cafc9b1..a03109e 100644
--- a/rpython/translator/platform/posix.py
+++ b/rpython/translator/platform/posix.py
@@ -15,6 +15,7 @@ class BasePosix(Platform):
......@@ -150,15 +172,3 @@ index cafc9b1..380db0d 100644
def __init__(self, cc=None):
self.cc = cc or os.environ.get('CC', self.DEFAULT_CC)
@@ -53,7 +54,10 @@ class BasePosix(Platform):
args = [str(ofile) for ofile in ofiles] + link_args
args += ['-o', str(exe_name)]
if not standalone:
- args = self._args_for_shared(args)
+ if hasattr(self, '_args_for_shared_exec'):
+ args = self._args_for_shared_exec(args, exe_name.basename)
+ else:
+ args = self._args_for_shared(args)
self._execute_c_compiler(cc, args, exe_name,
cwd=str(exe_name.dirpath()))
return exe_name
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