[pypy-svn] pypy default: Allow the JIT to look into thread.os_local, and use str dicts for thread local storage.
alex_gaynor
commits-noreply at bitbucket.org
Wed Jan 12 14:25:56 CET 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch:
Changeset: r40625:8ec0dbc49c43
Date: 2011-01-12 07:25 -0600
http://bitbucket.org/pypy/pypy/changeset/8ec0dbc49c43/
Log: Allow the JIT to look into thread.os_local, and use str dicts for
thread local storage.
diff --git a/pypy/module/thread/os_local.py b/pypy/module/thread/os_local.py
--- a/pypy/module/thread/os_local.py
+++ b/pypy/module/thread/os_local.py
@@ -23,7 +23,7 @@
except KeyError:
# create a new dict for this thread
space = self.space
- w_dict = self.dicts[ident] = space.newdict()
+ w_dict = self.dicts[ident] = space.newdict(instance=True)
# call __init__
try:
w_self = space.wrap(self)
diff --git a/pypy/module/pypyjit/policy.py b/pypy/module/pypyjit/policy.py
--- a/pypy/module/pypyjit/policy.py
+++ b/pypy/module/pypyjit/policy.py
@@ -7,7 +7,8 @@
modname == '__builtin__.abstractinst' or
modname == '__builtin__.interp_classobj' or
modname == '__builtin__.functional' or
- modname == '__builtin__.descriptor'):
+ modname == '__builtin__.descriptor' or
+ modname == 'thread.os_local'):
return True
if '.' in modname:
modname, _ = modname.split('.', 1)
More information about the Pypy-commit
mailing list