Author: Tim Felgentreff <[email protected]>
Branch:
Changeset: r266:15253d8d8891
Date: 2013-04-15 10:13 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/15253d8d8891/
Log: BE_CURSOR can take an optional second argument
diff --git a/spyvm/primitives.py b/spyvm/primitives.py
--- a/spyvm/primitives.py
+++ b/spyvm/primitives.py
@@ -577,8 +577,14 @@
# in case we return normally, we have to restore the removed w_rcvr
return w_rcvr
-@expose_primitive(BE_CURSOR, unwrap_spec=[object])
-def func(interp, s_frame, w_rcvr):
+@expose_primitive(BE_CURSOR)
+def func(interp, s_frame, argcount):
+ if not (0 <= argcount <= 1):
+ raise PrimitiveFailedError()
+ w_rcvr = s_frame.peek(argcount)
+ if argcount == 1:
+ # TODO: use mask
+ w_mask = s_frame.peek(0)
# TODO: Use info from cursor object.
interp.space.objtable['w_cursor'] = w_rcvr
return w_rcvr
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit