Context.st
branchjv
changeset 18062 014678b4657a
parent 18060 3708e12e9aa8
parent 15269 427878e0fa9c
child 18066 89d51443ba6f
--- a/Context.st	Tue May 28 00:23:55 2013 +0100
+++ b/Context.st	Fri May 31 00:35:21 2013 +0100
@@ -731,7 +731,12 @@
 !
 
 senderIsNil
-    "return true, if I have no sender"
+    "return true, if I have no sender.
+     This little ugly piece of code is needed (instead of the obvious
+     'sender isNil') because sender is a protected field, which cannot be
+     directly accessed by smalltalk code. The reason is that the sender field
+     is lazily filled in by the VM, in the sender-accessor, and is usually
+     invalid until needed."
 
 %{  /* NOCONTEXT */
     if ( __INST(sender_) == nil ) {
@@ -739,7 +744,6 @@
     }
     RETURN (false);
 %}.
-    ^ self sender isNil
 !
 
 setLineNumber:aNumber
@@ -880,8 +884,10 @@
 !
 
 invalidReturnOrRestart:returnValue
-    "this message is sent by the VM, when a methods context
-     which was compiled non-returnable is about to return again.
+    "this message is sent by the VM, when a method's or block's context
+     which was compiled non-returnable is about to return again,
+     or a non-restartable context is tried to be restarted.
+     In ST/X, not all contexts are restartable/returnable.
      We raise a signal here, to allow catching of that situation."
 
     ^ CannotReturnError
@@ -2477,11 +2483,11 @@
 !Context class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.182 2013-05-10 18:46:37 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.184 2013-05-24 18:13:31 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.182 2013-05-10 18:46:37 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.184 2013-05-24 18:13:31 cg Exp $'
 !
 
 version_SVN