[pypy-commit] pypy jvm-improvements: Declare oo_primitives that should implement some rffi operations.

benol noreply at buildbot.pypy.org
Tue Jan 17 10:10:23 CET 2012


Author: Michal Bendowski <michal at bendowski.pl>
Branch: jvm-improvements
Changeset: r51377:6b650a500d68
Date: 2012-01-14 19:04 +0100
http://bitbucket.org/pypy/pypy/changeset/6b650a500d68/

Log:	Declare oo_primitives that should implement some rffi operations.

	For now the actual implementations are missing, but once we get the
	JVM backend to work in some way, this will have to be revisited.

diff --git a/pypy/rlib/longlong2float.py b/pypy/rlib/longlong2float.py
--- a/pypy/rlib/longlong2float.py
+++ b/pypy/rlib/longlong2float.py
@@ -79,19 +79,23 @@
 longlong2float = rffi.llexternal(
     "pypy__longlong2float", [rffi.LONGLONG], rffi.DOUBLE,
     _callable=longlong2float_emulator, compilation_info=eci,
-    _nowrapper=True, elidable_function=True, sandboxsafe=True)
+    _nowrapper=True, elidable_function=True, sandboxsafe=True,
+    oo_primitive="pypy__longlong2float")
 
 float2longlong = rffi.llexternal(
     "pypy__float2longlong", [rffi.DOUBLE], rffi.LONGLONG,
     _callable=float2longlong_emulator, compilation_info=eci,
-    _nowrapper=True, elidable_function=True, sandboxsafe=True)
+    _nowrapper=True, elidable_function=True, sandboxsafe=True,
+    oo_primitive="pypy__float2longlong")
 
 uint2singlefloat = rffi.llexternal(
     "pypy__uint2singlefloat", [rffi.UINT], rffi.FLOAT,
     _callable=uint2singlefloat_emulator, compilation_info=eci,
-    _nowrapper=True, elidable_function=True, sandboxsafe=True)
+    _nowrapper=True, elidable_function=True, sandboxsafe=True,
+    oo_primitive="pypy__uint2singlefloat")
 
 singlefloat2uint = rffi.llexternal(
     "pypy__singlefloat2uint", [rffi.FLOAT], rffi.UINT,
     _callable=singlefloat2uint_emulator, compilation_info=eci,
-    _nowrapper=True, elidable_function=True, sandboxsafe=True)
+    _nowrapper=True, elidable_function=True, sandboxsafe=True,
+    oo_primitive="pypy__singlefloat2uint")
diff --git a/pypy/rlib/rmd5.py b/pypy/rlib/rmd5.py
--- a/pypy/rlib/rmd5.py
+++ b/pypy/rlib/rmd5.py
@@ -51,7 +51,7 @@
     _rotateLeft = rffi.llexternal(
         "pypy__rotateLeft", [lltype.Unsigned, lltype.Signed], lltype.Unsigned,
         _callable=_rotateLeft_emulator, compilation_info=eci,
-        _nowrapper=True, elidable_function=True)
+        _nowrapper=True, elidable_function=True, oo_primitive='pypy__rotateLeft') # TODO implement the oo_primitive
     # we expect the function _rotateLeft to be actually inlined
 
 


More information about the pypy-commit mailing list