Author: Tim Felgentreff <[email protected]>
Branch:
Changeset: r587:c1149fc4f6a4
Date: 2014-01-17 13:02 +0100
http://bitbucket.org/pypy/lang-smalltalk/changeset/c1149fc4f6a4/
Log: re-enable simulateCopyBits usage properly
diff --git a/spyvm/primitives.py b/spyvm/primitives.py
--- a/spyvm/primitives.py
+++ b/spyvm/primitives.py
@@ -643,21 +643,23 @@
interp.image.lastWindowSize = ((ary[4] & 0xffff) << 16) | (ary[5]
& 0xffff)
return w_rcvr
-@expose_primitive(BITBLT_COPY_BITS, clean_stack=False, no_result=True,
compiled_method=True)
+@expose_primitive(BITBLT_COPY_BITS, clean_stack=False, no_result=False,
compiled_method=True)
def func(interp, s_frame, argcount, s_method):
from spyvm.interpreter import Return
+ w_rcvr = s_frame.peek(0)
try:
s_frame._sendSelfSelector(interp.image.w_simulateCopyBits, 0, interp)
except Return:
- w_rcvr = s_frame.peek(0)
w_dest_form = w_rcvr.fetch(interp.space, 0)
- if w_dest_form.is_same_object(interp.space.objtable['w_display']):
- w_bitmap = w_dest_form.fetch(interp.space, 0)
+ w_display = interp.space.objtable['w_display']
+ if w_dest_form.is_same_object(w_display):
+ w_bitmap = w_display.fetch(interp.space, 0)
assert isinstance(w_bitmap, model.W_DisplayBitmap)
w_bitmap.flush_to_screen()
+ return w_rcvr
except shadow.MethodNotFound:
from spyvm.plugins.bitblt import BitBltPlugin
- BitBltPlugin.call("primitiveCopyBits", interp, s_frame, argcount,
s_method)
+ return BitBltPlugin.call("primitiveCopyBits", interp, s_frame,
argcount, s_method)
@expose_primitive(BE_CURSOR)
def func(interp, s_frame, argcount):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit