--- a/Context.st Mon Apr 27 19:04:59 2015 +0200
+++ b/Context.st Mon Apr 27 19:06:10 2015 +0200
@@ -1669,9 +1669,7 @@
argStringFor:someObject
|s|
%{
-#ifdef __SCHTEAM__
- ERROR("unimplemented");
-#else
+#ifndef __SCHTEAM__
/*
* special handling for (invalid) free objects.
* these only appear if some primitiveCode does not correctly use SEND macros,
@@ -1681,7 +1679,7 @@
if (__isNonNilObject(someObject) && (__qClass(someObject)==nil)) {
s = __MKSTRING("FreeObject");
}
-#endif
+#endif /* not SCHTEAM */
%}.
s isNil ifTrue:[
s := someObject displayString.
@@ -1914,7 +1912,7 @@
|receiverClass receiverClassName implementorClass|
- receiverClassName := self safeReceiverClassName.
+ receiverClassName := self safeReceiverClassNameIfInvalid.
receiverClassName notNil ifTrue:[
"if we come here, this is a context with an illegal class"
receiverClassName printOn:aStream.
@@ -2009,34 +2007,25 @@
"
!
-safeReceiverClassName
- "return the receiver's class-name string or nil, if the receiver is invalid.
+safeReceiverClassNameIfInvalid
+ "if the receiver refers to an invalid object,
+ return a replacement string. otherwise nil.
This cares for invalid (free) objects which may appear with bad primitive code,
and prevents a crash in such a case."
- |receiverClassName|
-
%{
-#ifdef __SCHTEAM__
- {
- STObject rcvr = self.asSTContinuation().stSelf(context);
- STClass cls = rcvr.clazz();
-
- return context._RETURN( cls.className() );
- }
- /* NOT REACHED */
-#else
+#ifndef __SCHTEAM__
/*
* special handling for (invalid) free objects.
* these only appear if some primitiveCode does not correctly use SEND macros,
* which may lead to sends to free objects. In normal operation, this 'cannot' happen.
*/
if (__isNonNilObject(__INST(receiver)) && (__qClass(__INST(receiver))==nil)) {
- receiverClassName = __MKSTRING("FreeObject");
+ RETURN( __MKSTRING("FreeObject") );
}
-#endif
+#endif /* not SCHTEAM */
%}.
- ^ receiverClassName
+ ^ nil
"Created: / 21-05-2007 / 13:19:37 / cg"
! !
@@ -2853,11 +2842,11 @@
!Context class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.219 2015-04-26 14:57:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.220 2015-04-27 17:06:10 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.219 2015-04-26 14:57:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.220 2015-04-27 17:06:10 cg Exp $'
!
version_HG