Behavior.st
changeset 19943 6f8e2d23fdae
parent 19904 28e5df23d412
child 19948 be658f466bca
child 20024 13ac22ebb436
--- a/Behavior.st	Sun Jun 05 09:53:28 2016 +0200
+++ b/Behavior.st	Sun Jun 05 10:00:14 2016 +0200
@@ -14,7 +14,8 @@
 "{ NameSpace: Smalltalk }"
 
 Object subclass:#Behavior
-	instanceVariableNames:'superclass flags methodDictionary lookupObject instSize'
+	instanceVariableNames:'superclass flags methodDictionary
+	lookupCache lookupObject instSize'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Kernel-Classes'
@@ -50,10 +51,10 @@
 
 
     Behavior provides minimum support for all class-like objects, which define behavior
-    of other objects. Additional stuff (meta info) is found in ClassDescription and Class. 
-    Behavior provides all mechanisms needed to create instances (on the class side), 
-    and send messages to them. 
-    However, Behavior does not provide the (symbolic) information needed to compile methods 
+    of other objects. Additional stuff (meta info) is found in ClassDescription and Class.
+    Behavior provides all mechanisms needed to create instances (on the class side),
+    and send messages to them.
+    However, Behavior does not provide the (symbolic) information needed to compile methods
     for a class or to get useful information in inspectors or browsers.
 
     For experts:
@@ -71,25 +72,25 @@
 
     [Instance variables:]
 
-        superclass        <Class>            the classes superclass
-
-        methodDictionary  <MethodDictionary> inst-selectors and methods
-
-        instSize          <SmallInteger>     the number of instance variables
-
-        flags             <SmallInteger>     special flag bits coded in a number
-                                             not for application use
+	superclass        <Class>            the classes superclass
+
+	methodDictionary  <MethodDictionary> inst-selectors and methods
+
+	instSize          <SmallInteger>     the number of instance variables
+
+	flags             <SmallInteger>     special flag bits coded in a number
+					     not for application use
 
     flag bits (see stc.h):
 
     NOTICE: layout known by compiler and runtime system; be careful when changing
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 
     [see also:]
-        Class ClassDescription Metaclass
-        Method MethodDictionary
+	Class ClassDescription Metaclass
+	Method MethodDictionary
 "
 !
 
@@ -2527,7 +2528,7 @@
 %{  /* NOCONTEXT */
 #ifdef __SCHTEAM__
     if (anInteger.isSmallInteger()) {
-        return __c__._RETURN( self.basicNew( anInteger.intValue()) );
+	return __c__._RETURN( self.basicNew( anInteger.intValue()) );
     }
 #else
     OBJ newobj;
@@ -2546,295 +2547,295 @@
     double *dp;
 
     if (__isSmallInteger(anInteger)) {
-        nindexedinstvars = __intVal(anInteger);
-        if (nindexedinstvars >= 0) {
-            nInstVars = __intVal(__INST(instSize));
-            flags = __intVal(__INST(flags)) & ARRAYMASK;
-            switch (flags) {
-                case BYTEARRAY:
-                    nBytes = nindexedinstvars + __OBJS2BYTES__(nInstVars);
-                    instsize = OHDR_SIZE + nBytes;
-                    if (__CanDoQuickNew(instsize)) {        /* OBJECT ALLOCATION */
-                        /*
-                         * the most common case
-                         */
-                        __qCheckedNew(newobj, instsize);
-                        __InstPtr(newobj)->o_class = self;
-                        __qSTORE(newobj, self);
-                nilIt:
-                        cp = (char *)__InstPtr(newobj)->i_instvars;
+	nindexedinstvars = __intVal(anInteger);
+	if (nindexedinstvars >= 0) {
+	    nInstVars = __intVal(__INST(instSize));
+	    flags = __intVal(__INST(flags)) & ARRAYMASK;
+	    switch (flags) {
+		case BYTEARRAY:
+		    nBytes = nindexedinstvars + __OBJS2BYTES__(nInstVars);
+		    instsize = OHDR_SIZE + nBytes;
+		    if (__CanDoQuickNew(instsize)) {        /* OBJECT ALLOCATION */
+			/*
+			 * the most common case
+			 */
+			__qCheckedNew(newobj, instsize);
+			__InstPtr(newobj)->o_class = self;
+			__qSTORE(newobj, self);
+		nilIt:
+			cp = (char *)__InstPtr(newobj)->i_instvars;
 # if defined(memset4) && defined(FAST_ARRAY_MEMSET4) || defined(FAST_MEMSET4)
-                        memset4(cp, 0, (nBytes+3) >> 2);
+			memset4(cp, 0, (nBytes+3) >> 2);
 # elif defined(FAST_ARRAY_MEMSET)
-                        memset(cp, 0, nBytes);
+			memset(cp, 0, nBytes);
 # else
-                        while (nBytes >= (sizeof(INT) * 8L)) {
-                            ((INT *)cp)[0] = (INT)0;
-                            ((INT *)cp)[1] = (INT)0;
-                            ((INT *)cp)[2] = (INT)0;
-                            ((INT *)cp)[3] = (INT)0;
-                            ((INT *)cp)[4] = (INT)0;
-                            ((INT *)cp)[5] = (INT)0;
-                            ((INT *)cp)[6] = (INT)0;
-                            ((INT *)cp)[7] = (INT)0;
-                            cp += (sizeof(INT) * 8L);
-                            nBytes -= (sizeof(INT) * 8L);
-                        }
-                        while (nBytes >= sizeof(INT)) {
-                            *(INT *)cp = (INT)0;
-                            cp += sizeof(INT);
-                            nBytes -= sizeof(INT);
-                        }
-                        while (nBytes--)
-                            *cp++ = 0;
+			while (nBytes >= (sizeof(INT) * 8L)) {
+			    ((INT *)cp)[0] = (INT)0;
+			    ((INT *)cp)[1] = (INT)0;
+			    ((INT *)cp)[2] = (INT)0;
+			    ((INT *)cp)[3] = (INT)0;
+			    ((INT *)cp)[4] = (INT)0;
+			    ((INT *)cp)[5] = (INT)0;
+			    ((INT *)cp)[6] = (INT)0;
+			    ((INT *)cp)[7] = (INT)0;
+			    cp += (sizeof(INT) * 8L);
+			    nBytes -= (sizeof(INT) * 8L);
+			}
+			while (nBytes >= sizeof(INT)) {
+			    *(INT *)cp = (INT)0;
+			    cp += sizeof(INT);
+			    nBytes -= sizeof(INT);
+			}
+			while (nBytes--)
+			    *cp++ = 0;
 # endif
-                        RETURN ( newobj );
-                    }
-                    __PROTECT_CONTEXT__
-                    __qNew(newobj, instsize);   /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
-                    goto nilIt;
-                    break;
-
-                case WORDARRAY:
-                case SWORDARRAY:
-                    nBytes = __OBJS2BYTES__(nInstVars) + nindexedinstvars * 2;
-                    instsize = OHDR_SIZE + nBytes;
-                    __PROTECT_CONTEXT__
-                    __qNew(newobj, instsize);   /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
-                    goto nilIt;
-
-               case LONGARRAY:
-               case SLONGARRAY:
-                    nBytes = __OBJS2BYTES__(nInstVars) + nindexedinstvars * 4;
-                    instsize = OHDR_SIZE + nBytes;
-                    __PROTECT_CONTEXT__
-                    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
-                    goto nilIt;
-
-               case LONGLONGARRAY:
-               case SLONGLONGARRAY:
-                    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
+			RETURN ( newobj );
+		    }
+		    __PROTECT_CONTEXT__
+		    __qNew(newobj, instsize);   /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
+		    goto nilIt;
+		    break;
+
+		case WORDARRAY:
+		case SWORDARRAY:
+		    nBytes = __OBJS2BYTES__(nInstVars) + nindexedinstvars * 2;
+		    instsize = OHDR_SIZE + nBytes;
+		    __PROTECT_CONTEXT__
+		    __qNew(newobj, instsize);   /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
+		    goto nilIt;
+
+	       case LONGARRAY:
+	       case SLONGARRAY:
+		    nBytes = __OBJS2BYTES__(nInstVars) + nindexedinstvars * 4;
+		    instsize = OHDR_SIZE + nBytes;
+		    __PROTECT_CONTEXT__
+		    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
+		    goto nilIt;
+
+	       case LONGLONGARRAY:
+	       case SLONGLONGARRAY:
+		    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
 # ifdef __NEED_LONGLONG_ALIGN
-                    instsize = ((instsize-1) + __LONGLONG_ALIGN) & ~(__LONGLONG_ALIGN-1);
+		    instsize = ((instsize-1) + __LONGLONG_ALIGN) & ~(__LONGLONG_ALIGN-1);
 # endif
-                    instsize += nindexedinstvars * 8;
-                    nBytes = instsize - OHDR_SIZE;
-
-                    __PROTECT_CONTEXT__
-                    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
-                    goto nilIt;
-                    break;
-
-               case FLOATARRAY:
-                    nBytes = __OBJS2BYTES__(nInstVars) + nindexedinstvars * sizeof(float);
-                    instsize = OHDR_SIZE + nBytes;
-
-                    __PROTECT_CONTEXT__
-                    __qNew(newobj, instsize);   /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
+		    instsize += nindexedinstvars * 8;
+		    nBytes = instsize - OHDR_SIZE;
+
+		    __PROTECT_CONTEXT__
+		    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
+		    goto nilIt;
+		    break;
+
+	       case FLOATARRAY:
+		    nBytes = __OBJS2BYTES__(nInstVars) + nindexedinstvars * sizeof(float);
+		    instsize = OHDR_SIZE + nBytes;
+
+		    __PROTECT_CONTEXT__
+		    __qNew(newobj, instsize);   /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
 
 # if defined(__FLOAT0_IS_INT0) /* knowin that float 0.0 is all-zeros */
-                    goto nilIt;
+		    goto nilIt;
 # else
-                    op = __InstPtr(newobj)->i_instvars;
-                    while (nInstVars-- != 0)
-                        *op++ = nil;
-                    fp = (float *)op;
-                    while (nindexedinstvars-- != 0)
-                        *fp++ = 0.0;
+		    op = __InstPtr(newobj)->i_instvars;
+		    while (nInstVars-- != 0)
+			*op++ = nil;
+		    fp = (float *)op;
+		    while (nindexedinstvars-- != 0)
+			*fp++ = 0.0;
 # endif
-                    RETURN ( newobj );
-                    break;
-
-               case DOUBLEARRAY:
-                    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
+		    RETURN ( newobj );
+		    break;
+
+	       case DOUBLEARRAY:
+		    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
 # ifdef __NEED_DOUBLE_ALIGN
-                    instsize = ((instsize-1) + __DOUBLE_ALIGN) & ~(__DOUBLE_ALIGN-1);
+		    instsize = ((instsize-1) + __DOUBLE_ALIGN) & ~(__DOUBLE_ALIGN-1);
 # endif
-                    instsize += nindexedinstvars * sizeof(double);
-                    nBytes = instsize - OHDR_SIZE;
-
-                    __PROTECT_CONTEXT__
-                    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
+		    instsize += nindexedinstvars * sizeof(double);
+		    nBytes = instsize - OHDR_SIZE;
+
+		    __PROTECT_CONTEXT__
+		    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
 
 # if defined(__DOUBLE0_IS_INT0) /* knowin that double 0.0 is all-zeros */
-                    goto nilIt;
+		    goto nilIt;
 # else
-                    op = __InstPtr(newobj)->i_instvars;
-                    while (nInstVars-- != 0)
-                        *op++ = nil;
+		    op = __InstPtr(newobj)->i_instvars;
+		    while (nInstVars-- != 0)
+			*op++ = nil;
 
 #  ifdef __NEED_DOUBLE_ALIGN
-                    /*
-                     * care for double alignment
-                     * add filler.
-                     */
-                    if ((INT)op & (__DOUBLE_ALIGN-1)) {
-                        *op++ = nil;
-                    }
+		    /*
+		     * care for double alignment
+		     * add filler.
+		     */
+		    if ((INT)op & (__DOUBLE_ALIGN-1)) {
+			*op++ = nil;
+		    }
 #  endif
-                    dp = (double *)op;
-                    while (nindexedinstvars-- != 0)
-                        *dp++ = 0.0;
+		    dp = (double *)op;
+		    while (nindexedinstvars-- != 0)
+			*dp++ = 0.0;
 # endif
-                    RETURN ( newobj );
-                    break;
-
-                case WKPOINTERARRAY:
-                case POINTERARRAY:
-                    nInstVars += nindexedinstvars;
-                    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
-                    __PROTECT_CONTEXT__
-                    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
-                    __UNPROTECT_CONTEXT__
-                    if (newobj == nil) {
-                        break;
-                    }
-                    __InstPtr(newobj)->o_class = self;
-                    __qSTORE(newobj, self);
+		    RETURN ( newobj );
+		    break;
+
+		case WKPOINTERARRAY:
+		case POINTERARRAY:
+		    nInstVars += nindexedinstvars;
+		    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
+		    __PROTECT_CONTEXT__
+		    __qAlignedNew(newobj, instsize);    /* OBJECT ALLOCATION */
+		    __UNPROTECT_CONTEXT__
+		    if (newobj == nil) {
+			break;
+		    }
+		    __InstPtr(newobj)->o_class = self;
+		    __qSTORE(newobj, self);
 
 # if defined(memset4) && defined(FAST_ARRAY_MEMSET4) || defined(FAST_MEMSET4)
-                    memset4(__InstPtr(newobj)->i_instvars, nil, nInstVars);
+		    memset4(__InstPtr(newobj)->i_instvars, nil, nInstVars);
 # else
-                    /*
-                     * knowing that nil is 0
-                     */
+		    /*
+		     * knowing that nil is 0
+		     */
 #  ifdef sparc
 #   define FAST_ARRAY_MEMSET_DOUBLES_UNROLLED
 #  endif
 
 #  if defined(FAST_ARRAY_MEMSET_DOUBLES_UNROLLED)
-                    op = __InstPtr(newobj)->i_instvars;
-                    if (nInstVars > 8) {
-                        *op++ = nil;    /* for alignment */
-                        nInstVars--;
-                        while (nInstVars >= 8) {
-                            *(double *)op = 0.0;
-                            ((double *)op)[1] = 0.0;
-                            ((double *)op)[2] = 0.0;
-                            ((double *)op)[3] = 0.0;
-                            op += 8;
-                            nInstVars -= 8;
-                        }
-                    }
-                    while (nInstVars != 0) {
-                        *op++ = 0;
-                        nInstVars--;
-                    }
+		    op = __InstPtr(newobj)->i_instvars;
+		    if (nInstVars > 8) {
+			*op++ = nil;    /* for alignment */
+			nInstVars--;
+			while (nInstVars >= 8) {
+			    *(double *)op = 0.0;
+			    ((double *)op)[1] = 0.0;
+			    ((double *)op)[2] = 0.0;
+			    ((double *)op)[3] = 0.0;
+			    op += 8;
+			    nInstVars -= 8;
+			}
+		    }
+		    while (nInstVars != 0) {
+			*op++ = 0;
+			nInstVars--;
+		    }
 #  else
 #   if defined(FAST_ARRAY_MEMSET_LONGLONG_UNROLLED)
-                    op = __InstPtr(newobj)->i_instvars;
-                    if (nInstVars > 8) {
-                        *op++ = nil;    /* for alignment */
-                        nInstVars--;
-                        while (nInstVars >= 8) {
-                            *(long long *)op = 0;
-                            ((long long *)op)[1] = 0;
-                            ((long long *)op)[2] = 0;
-                            ((long long *)op)[3] = 0;
-                            op += 8;
-                            nInstVars -= 8;
-                        }
-                    }
-                    while (nInstVars != 0) {
-                        *op++ = 0;
-                        nInstVars--;
-                    }
+		    op = __InstPtr(newobj)->i_instvars;
+		    if (nInstVars > 8) {
+			*op++ = nil;    /* for alignment */
+			nInstVars--;
+			while (nInstVars >= 8) {
+			    *(long long *)op = 0;
+			    ((long long *)op)[1] = 0;
+			    ((long long *)op)[2] = 0;
+			    ((long long *)op)[3] = 0;
+			    op += 8;
+			    nInstVars -= 8;
+			}
+		    }
+		    while (nInstVars != 0) {
+			*op++ = 0;
+			nInstVars--;
+		    }
 #   else
 #    if defined(FAST_ARRAY_MEMSET)
-                    memset(__InstPtr(newobj)->i_instvars, 0, instsize - OHDR_SIZE);
+		    memset(__InstPtr(newobj)->i_instvars, 0, instsize - OHDR_SIZE);
 #    else
-                    op = __InstPtr(newobj)->i_instvars;
-                    while (nInstVars >= 8) {
-                        nInstVars -= 8;
-                        op[0] = nil; op[1] = nil;
-                        op[2] = nil; op[3] = nil;
-                        op[4] = nil; op[5] = nil;
-                        op[6] = nil; op[7] = nil;
-                        op += 8;
-                    }
-                    while (nInstVars-- != 0)
-                        *op++ = nil;
+		    op = __InstPtr(newobj)->i_instvars;
+		    while (nInstVars >= 8) {
+			nInstVars -= 8;
+			op[0] = nil; op[1] = nil;
+			op[2] = nil; op[3] = nil;
+			op[4] = nil; op[5] = nil;
+			op[6] = nil; op[7] = nil;
+			op += 8;
+		    }
+		    while (nInstVars-- != 0)
+			*op++ = nil;
 #    endif
 #   endif
 #  endif
 # endif
-                    RETURN ( newobj );
-                    break;
-
-                default:
-                    /*
-                     * new:n for non-variable classes only allowed if
-                     * n == 0
-                     */
-                    if (nindexedinstvars == 0) {
-                        instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
-                        __PROTECT_CONTEXT__
-                        __qAlignedNew(newobj, instsize);        /* OBJECT ALLOCATION */
-                        __UNPROTECT_CONTEXT__
-                        if (newobj == nil) {
-                            break;
-                        }
-                        __InstPtr(newobj)->o_class = self;
-                        __qSTORE(newobj, self);
-
-                        if (nInstVars) {
+		    RETURN ( newobj );
+		    break;
+
+		default:
+		    /*
+		     * new:n for non-variable classes only allowed if
+		     * n == 0
+		     */
+		    if (nindexedinstvars == 0) {
+			instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars);
+			__PROTECT_CONTEXT__
+			__qAlignedNew(newobj, instsize);        /* OBJECT ALLOCATION */
+			__UNPROTECT_CONTEXT__
+			if (newobj == nil) {
+			    break;
+			}
+			__InstPtr(newobj)->o_class = self;
+			__qSTORE(newobj, self);
+
+			if (nInstVars) {
 # if defined(memset4) && defined(FAST_OBJECT_MEMSET4) || defined(FAST_MEMSET4)
-                            memset4(__InstPtr(newobj)->i_instvars, nil, nInstVars);
+			    memset4(__InstPtr(newobj)->i_instvars, nil, nInstVars);
 # else
 #  if defined(FAST_MEMSET)
-                            /*
-                             * knowing that nil is 0
-                             */
-                            memset(__InstPtr(newobj)->i_instvars, 0, instsize - OHDR_SIZE);
+			    /*
+			     * knowing that nil is 0
+			     */
+			    memset(__InstPtr(newobj)->i_instvars, 0, instsize - OHDR_SIZE);
 #  else
-                            op = __InstPtr(newobj)->i_instvars;
-                            do {
-                                *op++ = nil;
-                            } while (--nInstVars != 0);
+			    op = __InstPtr(newobj)->i_instvars;
+			    do {
+				*op++ = nil;
+			    } while (--nInstVars != 0);
 #  endif
 # endif
-                        }
-                        RETURN ( newobj );
-                    }
-                    break;
-            }
-        }
+			}
+			RETURN ( newobj );
+		    }
+		    break;
+	    }
+	}
     }
 #endif /* not SCHTEAM */
 %}.
@@ -2844,26 +2845,26 @@
     "
 
     (anInteger isMemberOf:SmallInteger) ifFalse:[
-        "
-         the argument is either not an integer,
-         or a LargeInteger (which means that its definitely too big)
-        "
-        self error:'argument to new: must be Integer' mayProceed:true.
-        ^ nil
+	"
+	 the argument is either not an integer,
+	 or a LargeInteger (which means that its definitely too big)
+	"
+	self error:'argument to new: must be Integer' mayProceed:true.
+	^ nil
     ].
     (anInteger < 0) ifTrue:[
-        "
-         the argument is negative,
-        "
-        self error:'bad (negative) argument to new:'.
-        ^ nil
+	"
+	 the argument is negative,
+	"
+	self error:'bad (negative) argument to new:'.
+	^ nil
     ].
     self isVariable ifFalse:[
-        "
-         this class does not have any indexed instance variables
-        "
-        self error:'class has no indexed instvars - cannot create with new:'.
-        ^ nil
+	"
+	 this class does not have any indexed instance variables
+	"
+	self error:'class has no indexed instvars - cannot create with new:'.
+	^ nil
     ].
     "
      memory allocation failed.
@@ -2935,13 +2936,13 @@
      This is the reverse operation to 'storeOn:'.
 
      WARNING: storeOn: does not handle circular references and multiple
-              references to the same object.
-              Use #storeBinary:/readBinaryFrom: for this."
+	      references to the same object.
+	      Use #storeBinary:/readBinaryFrom: for this."
 
     ^ self
-        readFrom:aStream
-        onError:[ self conversionErrorSignal
-                    raiseWith:aStream errorString:' for: ' , self name ]
+	readFrom:aStream
+	onError:[ self conversionErrorSignal
+		    raiseWith:aStream errorString:' for: ' , self name ]
 
     "
      |s|
@@ -2962,16 +2963,16 @@
      This is the reverse operation to 'storeOn:'.
 
      WARNING: storeOn: does not handle circular references and multiple
-              references to the same object.
-              Use #storeBinary:/readBinaryFrom: for this."
+	      references to the same object.
+	      Use #storeBinary:/readBinaryFrom: for this."
 
     ^ [
-        |newObject|
-        
-        newObject := self evaluatorClass evaluateFrom:aStream ifFail:exceptionBlock.
-        ((newObject class == self) or:[newObject isKindOf:self]) 
-            ifTrue:[newObject] 
-            ifFalse:[exceptionBlock value].
+	|newObject|
+
+	newObject := self evaluatorClass evaluateFrom:aStream ifFail:exceptionBlock.
+	((newObject class == self) or:[newObject isKindOf:self])
+	    ifTrue:[newObject]
+	    ifFalse:[exceptionBlock value].
     ] on:Error do:exceptionBlock.
 
     "
@@ -2979,7 +2980,7 @@
      s := WriteStream on:String new.
      #(1 2 3 4) storeOn:s.
      Transcript showCR:(
-        Array readFrom:(ReadStream on:s contents) onError:'not an Array'
+	Array readFrom:(ReadStream on:s contents) onError:'not an Array'
      )
     "
     "
@@ -2987,7 +2988,7 @@
      s := WriteStream on:String new.
      #[1 2 3 4] storeOn:s.
      Transcript showCR:(
-         Array readFrom:(ReadStream on:s contents) onError:'not an Array'
+	 Array readFrom:(ReadStream on:s contents) onError:'not an Array'
      )
     "
     "
@@ -3005,10 +3006,10 @@
      Behavior>>readFrom: and Behavior>>readFrom:onError:"
 
     ^ self
-        readFromString:aString
-        onError:[
-            self conversionErrorSignal raiseWith:aString errorString:' - expected: ' , self name
-        ]
+	readFromString:aString
+	onError:[
+	    self conversionErrorSignal raiseWith:aString errorString:' - expected: ' , self name
+	]
 
     "
      Integer readFromString:'12345678901234567890'
@@ -3486,7 +3487,7 @@
      Usually, this means that it only provides shared protocol for its
      subclasses, which should be used.
      Notice: this does not have any semantic effect;
-     it is purely for the browser (shows an 'A'-Indicator) 
+     it is purely for the browser (shows an 'A'-Indicator)
      and for documentation.
      To enforce abstractness, a subclass should redefine new, to raise an exception.
      (which some do, but many are too lazy to do)"
@@ -4612,7 +4613,7 @@
     "return true, if the receiver or one of its superclasses implements aSelector.
      (i.e. true if my instances understand aSelector).
      I think this is a bad name (it sounds more like instance protocol,
-     and something like #instancesRespondTo: would have been better), 
+     and something like #instancesRespondTo: would have been better),
      but well, we are compatible (sigh)."
 
     ^ (self lookupMethodFor:aSelector) notNil
@@ -4797,14 +4798,14 @@
      This is semantically equivalent to implements: (ST/80/Squeak compatibility).
 
      Hint:
-        Don't use this method to check if someone responds to a message -
-        use #canUnderstand: on the class or #respondsTo: on the instance
-        to do this.
+	Don't use this method to check if someone responds to a message -
+	use #canUnderstand: on the class or #respondsTo: on the instance
+	to do this.
 
      Caveat:
-        This simply checks for the selector being present in the classes
-        selector table - therefore, it does not care for ignoredMethods.
-        (but: you should not use this method for protocol-testing, anyway)."
+	This simply checks for the selector being present in the classes
+	selector table - therefore, it does not care for ignoredMethods.
+	(but: you should not use this method for protocol-testing, anyway)."
 
     ^ methodDictionary includesIdenticalKey:aSelector
 
@@ -5165,12 +5166,12 @@
     |setOfSelectors|
 
     self methodDictionary keysAndValuesDo:[:sel :mthd |
-        (mthd referencesLiteral:someLiteralConstant) ifTrue:[
-            setOfSelectors isNil ifTrue:[
-                setOfSelectors := IdentitySet new.
-            ].    
-            setOfSelectors add:sel
-        ].
+	(mthd referencesLiteral:someLiteralConstant) ifTrue:[
+	    setOfSelectors isNil ifTrue:[
+		setOfSelectors := IdentitySet new.
+	    ].
+	    setOfSelectors add:sel
+	].
     ].
     ^ setOfSelectors ? #()
 
@@ -5273,4 +5274,3 @@
 version_CVS
     ^ '$Header$'
 ! !
-