[pypy-svn] pypy default: ll_thread.getident is a loop invariant.
alex_gaynor
commits-noreply at bitbucket.org
Sat Apr 2 22:08:23 CEST 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch:
Changeset: r43121:188c4e729ee3
Date: 2011-04-02 16:07 -0400
http://bitbucket.org/pypy/pypy/changeset/188c4e729ee3/
Log: ll_thread.getident is a loop invariant.
diff --git a/pypy/module/thread/ll_thread.py b/pypy/module/thread/ll_thread.py
--- a/pypy/module/thread/ll_thread.py
+++ b/pypy/module/thread/ll_thread.py
@@ -1,10 +1,10 @@
-from pypy.rpython.lltypesystem import rffi
-from pypy.rpython.lltypesystem import lltype, llmemory
+from pypy.rpython.lltypesystem import rffi, lltype, llmemory
from pypy.rpython.tool import rffi_platform as platform
from pypy.translator.tool.cbuild import ExternalCompilationInfo
import py, os
from pypy.rpython.extregistry import ExtRegistryEntry
+from pypy.rlib import jit
from pypy.rlib.debug import ll_assert
from pypy.rlib.objectmodel import we_are_translated
from pypy.rpython.lltypesystem.lloperation import llop
@@ -79,6 +79,7 @@
# wrappers...
+ at jit.loop_invariant
def get_ident():
return rffi.cast(lltype.Signed, c_thread_get_ident())
More information about the Pypy-commit
mailing list