Author: Lars Wassermann <[email protected]>
Branch:
Changeset: r377:e325aacc62e1
Date: 2013-05-06 14:58 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/e325aacc62e1/
Log: fixed problem with terminate: when setting the stackpointer of an
object, switch based on the existence of a shadow, don't assume it
is already existent
diff --git a/spyvm/primitives.py b/spyvm/primitives.py
--- a/spyvm/primitives.py
+++ b/spyvm/primitives.py
@@ -487,8 +487,11 @@
assert stackp >= 0
if not isinstance(w_frame, model.W_PointersObject):
raise PrimitiveFailedError
- s_frame = w_frame.as_context_get_shadow(interp.space)
- s_frame.store_stackpointer(stackp)
+ if w_frame.has_shadow():
+ s_frame = w_frame.as_context_get_shadow(interp.space)
+ s_frame.store_stackpointer(stackp)
+ else:
+ w_frame.store(interp.space, constants.CTXPART_STACKP_INDEX, stackp)
return w_frame
@expose_primitive(SOME_INSTANCE, unwrap_spec=[object])
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit