Author: Lars Wassermann <[email protected]>
Branch: 
Changeset: r252:975a2cd34dda
Date: 2013-04-10 21:28 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/975a2cd34dda/

Log:    added primitive 19 which fails, except when (probably) calling the
        debugger. Then it quits gracefully.

diff --git a/spyvm/primitives.py b/spyvm/primitives.py
--- a/spyvm/primitives.py
+++ b/spyvm/primitives.py
@@ -321,6 +321,14 @@
 
 FAIL = 19
 
+@expose_primitive(FAIL)
+def func(interp, s_frame, argcount):
+    from spyvm.interpreter import ReturnFromTopLevel
+    if s_frame.w_method()._likely_methodname == 'doesNotUnderstand:':
+        print 'Probably Debugger called...'
+        raise ReturnFromTopLevel(interp.space.wrap_string("debugger called"))
+    raise PrimitiveFailedError()
+
 # ___________________________________________________________________________
 # Subscript and Stream Primitives
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to