[pypy-commit] lang-smalltalk default: added interpreter proxy minor 5 & 6 stubs
lwassermann
noreply at buildbot.pypy.org
Tue Jun 18 16:04:06 CEST 2013
Author: Lars Wassermann <lars.wassermann at gmail.com>
Branch:
Changeset: r449:c4ab2046ee2a
Date: 2013-06-11 11:44 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/c4ab2046ee2a/
Log: added interpreter proxy minor 5 & 6 stubs
diff --git a/spyvm/interpreter_proxy.py b/spyvm/interpreter_proxy.py
--- a/spyvm/interpreter_proxy.py
+++ b/spyvm/interpreter_proxy.py
@@ -705,15 +705,44 @@
# #endif
# #if VM_PROXY_MINOR > 5
-# sqInt (*isArray)(sqInt oop);
-# sqInt (*forceInterruptCheck)(void);
+ at expose_on_virtual_machine_proxy([oop], bool, minor=5)
+def isArray(w_object):
+ if not isinstance(w_object, model.W_PointersObject):
+ return False
+ space = IProxy.space
+ s_class = w_object.shadow_of_my_class(space)
+ if s_class.instsize() == 0 and s_class.isvariable():
+ return True
+ else:
+ return False
+
+ at expose_on_virtual_machine_proxy([], int, minor=5)
+def forceInterruptCheck():
+ print 'Called InterpreterProxy >> forceInterruptCheck'
+ raise ProxyFunctionFailed
# #endif
# #if VM_PROXY_MINOR > 6
-# sqInt (*fetchLong32ofObject)(sqInt fieldFieldIndex, sqInt oop);
-# sqInt (*getThisSessionID)(void);
-# sqInt (*ioFilenamefromStringofLengthresolveAliases)(char* aCharBuffer, char* filenameIndex, sqInt filenameLength, sqInt resolveFlag);
-# sqInt (*vmEndianness)(void);
+ at expose_on_virtual_machine_proxy([int, oop], oop, minor=6)
+def fetchLong32ofObject(fieldFieldIndex, oop):
+ print 'Called InterpreterProxy >> fetchLong32ofObject'
+ raise ProxyFunctionFailed
+
+ at expose_on_virtual_machine_proxy([int, oop], int, minor=6)
+def getThisSessionID(fieldFieldIndex, oop):
+ # return random int
+ print 'Called InterpreterProxy >> getThisSessionID'
+ raise ProxyFunctionFailed
+
+ at expose_on_virtual_machine_proxy([str, str, int, int], oop, minor=6)
+def ioFilenamefromStringofLengthresolveAliases(aCharBuffer, filenameIndex, filenameLength, resolveFlag):
+ print 'Called InterpreterProxy >> ioFilenamefromStringofLengthresolveAliases'
+ raise ProxyFunctionFailed
+
+ at expose_on_virtual_machine_proxy([], int, minor=6)
+def vmEndianness():
+ print 'Called InterpreterProxy >> vmEndianness'
+ return 0 # return 1 for big endian
# #endif
# #if VM_PROXY_MINOR > 7
More information about the pypy-commit
mailing list