--- a/Context.st Tue Apr 14 13:04:28 2015 +0200
+++ b/Context.st Tue Apr 14 21:44:09 2015 +0200
@@ -360,8 +360,7 @@
"/ some machines have the arguments/receiver etc. kept in register vars ...
"/ the unfix updates the machine-stack version of the receiver.
%{
-#ifdef __JAVA__
-#else
+#ifndef __JAVA__
__UNFIXCONTEXT(self, 0);
#endif
%}.
@@ -394,7 +393,19 @@
%{
#ifdef __JAVA__
- ERROR("unimplemented");
+ {
+ int idx = context.stArg(0).intValue("[instVarAt:]");
+
+ if (idx == I_sender) {
+ return context._RETURN( ((STContext)self).currentContinuation.caller() );
+ }
+ if (idx == I_retvalTemp) {
+ return context._RETURN( Nil );
+ }
+ if (idx == I_handle) {
+ return context._RETURN( Nil );
+ }
+ }
#else
if (index == __MKSMALLINT(__SLOT_CONTEXT_SENDER)) { // sender - must be accessed specially
what = @symbol(sender);
@@ -405,6 +416,9 @@
}
#endif
%}.
+ what == #sender ifTrue:[
+ ^ self sender
+ ].
^ super instVarAt:index
!
@@ -432,7 +446,7 @@
"/ some machines have the arguments kept in register vars ...
"/ the unfix updates the machine-stack version of the receiver.
%{
-#ifdef __JAVA__
+#ifndef __JAVA__
__UNFIXCONTEXT(self, 0);
#endif
%}.
@@ -2798,11 +2812,11 @@
!Context class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.211 2015-04-07 20:17:36 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.212 2015-04-14 19:44:09 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.211 2015-04-07 20:17:36 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.212 2015-04-14 19:44:09 cg Exp $'
!
version_HG