Array.st
changeset 4305 e71100d13b67
parent 4130 662554f2a37c
child 4309 7d8976a3abe3
equal deleted inserted replaced
4304:968d8b70d805 4305:e71100d13b67
    55     However, subclassing is allowed of course 
    55     However, subclassing is allowed of course 
    56     - even with added named instance variables.
    56     - even with added named instance variables.
    57 
    57 
    58     Literal arrays (i.e. array-constants) are entered in source as:
    58     Literal arrays (i.e. array-constants) are entered in source as:
    59 
    59 
    60         #( element1 element2 ... element-n)
    60 	#( element1 element2 ... element-n)
    61 
    61 
    62     where each element must be itself a literal constant.
    62     where each element must be itself a literal constant.
    63     Array, symbol and byteArray constants within an array can be written
    63     Array, symbol and byteArray constants within an array can be written
    64     without the initial #-character.
    64     without the initial #-character.
    65     In addition, true, false and nil are also allowed as array-literal.
    65     In addition, true, false and nil are also allowed as array-literal.
    71       #('foo' (1 2) foo)      -> same as above
    71       #('foo' (1 2) foo)      -> same as above
    72       #(nil true #true)       -> 3 elements: nil, true and a symbol (watch out)
    72       #(nil true #true)       -> 3 elements: nil, true and a symbol (watch out)
    73       #(two [3 3 3] (4 4 4))  -> 3 elements: a symbol, a byteArray and another array
    73       #(two [3 3 3] (4 4 4))  -> 3 elements: a symbol, a byteArray and another array
    74 
    74 
    75     [memory requirements:]
    75     [memory requirements:]
    76         OBJ-HEADER + (size * ptr-size)
    76 	OBJ-HEADER + (size * ptr-size)
    77 
    77 
    78     [warning:]
    78     [warning:]
    79         read the warning about 'growing fixed size collection'
    79 	read the warning about 'growing fixed size collection'
    80         in ArrayedCollection's documentation
    80 	in ArrayedCollection's documentation
    81 
    81 
    82     [author:]
    82     [author:]
    83         Claus Gittinger
    83 	Claus Gittinger
    84 
    84 
    85     [see also:]
    85     [see also:]
    86         OrderedCollection
    86 	OrderedCollection
    87         ByteArray FloatArray DoubleArray
    87 	ByteArray FloatArray DoubleArray
    88         String
    88 	String
    89 "
    89 "
    90 ! !
    90 ! !
    91 
    91 
    92 !Array class methodsFor:'instance creation'!
    92 !Array class methodsFor:'instance creation'!
    93 
    93 
   292     REGISTER OBJ slf;
   292     REGISTER OBJ slf;
   293     REGISTER unsigned int nIndex;
   293     REGISTER unsigned int nIndex;
   294     REGISTER OBJ cls;
   294     REGISTER OBJ cls;
   295 
   295 
   296     if (__isSmallInteger(index)) {
   296     if (__isSmallInteger(index)) {
   297         indx = __intVal(index) - 1;
   297 	indx = __intVal(index) - 1;
   298         slf = self;
   298 	slf = self;
   299 
   299 
   300         nIndex = __BYTES2OBJS__(__qSize(slf) - OHDR_SIZE);
   300 	nIndex = __BYTES2OBJS__(__qSize(slf) - OHDR_SIZE);
   301         if ((cls = __qClass(slf)) != Array)
   301 	if ((cls = __qClass(slf)) != Array)
   302             indx += __intVal(__ClassInstPtr(cls)->c_ninstvars);
   302 	    indx += __intVal(__ClassInstPtr(cls)->c_ninstvars);
   303         if ((unsigned)indx < (unsigned)nIndex) {
   303 	if ((unsigned)indx < (unsigned)nIndex) {
   304             RETURN ( __InstPtr(slf)->i_instvars[indx] );
   304 	    RETURN ( __InstPtr(slf)->i_instvars[indx] );
   305         }
   305 	}
   306     }
   306     }
   307 %}.
   307 %}.
   308     ^ super at:index
   308     ^ super at:index
   309 !
   309 !
   310 
   310 
   322     REGISTER OBJ slf;
   322     REGISTER OBJ slf;
   323     REGISTER unsigned int nIndex;
   323     REGISTER unsigned int nIndex;
   324     REGISTER OBJ cls;
   324     REGISTER OBJ cls;
   325 
   325 
   326     if (__isSmallInteger(index)) {
   326     if (__isSmallInteger(index)) {
   327         indx = __intVal(index) - 1;
   327 	indx = __intVal(index) - 1;
   328         slf = self;
   328 	slf = self;
   329 
   329 
   330         nIndex = __BYTES2OBJS__(__qSize(slf) - OHDR_SIZE);
   330 	nIndex = __BYTES2OBJS__(__qSize(slf) - OHDR_SIZE);
   331         if ((cls = __qClass(slf)) != Array)
   331 	if ((cls = __qClass(slf)) != Array)
   332             indx += __intVal(__ClassInstPtr(cls)->c_ninstvars);
   332 	    indx += __intVal(__ClassInstPtr(cls)->c_ninstvars);
   333         if ((unsigned)indx < (unsigned)nIndex) {
   333 	if ((unsigned)indx < (unsigned)nIndex) {
   334             __InstPtr(slf)->i_instvars[indx] = anObject;
   334 	    __InstPtr(slf)->i_instvars[indx] = anObject;
   335             __STORE(slf, anObject);
   335 	    __STORE(slf, anObject);
   336             RETURN ( anObject );
   336 	    RETURN ( anObject );
   337         }
   337 	}
   338     }
   338     }
   339 %}.
   339 %}.
   340     ^ super at:index put:anObject
   340     ^ super at:index put:anObject
   341 
   341 
   342     "Modified: 19.4.1996 / 11:16:42 / cg"
   342     "Modified: 19.4.1996 / 11:16:42 / cg"
   352     REGISTER OBJ slf;
   352     REGISTER OBJ slf;
   353     REGISTER unsigned int nIndex;
   353     REGISTER unsigned int nIndex;
   354     REGISTER OBJ cls;
   354     REGISTER OBJ cls;
   355 
   355 
   356     if (__isSmallInteger(index)) {
   356     if (__isSmallInteger(index)) {
   357         indx = __intVal(index) - 1;
   357 	indx = __intVal(index) - 1;
   358         slf = self;
   358 	slf = self;
   359 
   359 
   360         nIndex = __BYTES2OBJS__(__qSize(slf) - OHDR_SIZE);
   360 	nIndex = __BYTES2OBJS__(__qSize(slf) - OHDR_SIZE);
   361         if ((cls = __qClass(slf)) != Array)
   361 	if ((cls = __qClass(slf)) != Array)
   362             indx += __intVal(__ClassInstPtr(cls)->c_ninstvars);
   362 	    indx += __intVal(__ClassInstPtr(cls)->c_ninstvars);
   363         if ((unsigned)indx < (unsigned)nIndex) {
   363 	if ((unsigned)indx < (unsigned)nIndex) {
   364             RETURN ( __InstPtr(slf)->i_instvars[indx] );
   364 	    RETURN ( __InstPtr(slf)->i_instvars[indx] );
   365         }
   365 	}
   366     }
   366     }
   367 %}.
   367 %}.
   368     ^ super basicAt:index
   368     ^ super basicAt:index
   369 !
   369 !
   370 
   370 
   379     REGISTER OBJ slf;
   379     REGISTER OBJ slf;
   380     REGISTER unsigned int nIndex;
   380     REGISTER unsigned int nIndex;
   381     REGISTER OBJ cls;
   381     REGISTER OBJ cls;
   382 
   382 
   383     if (__isSmallInteger(index)) {
   383     if (__isSmallInteger(index)) {
   384         indx = __intVal(index) - 1;
   384 	indx = __intVal(index) - 1;
   385         slf = self;
   385 	slf = self;
   386 
   386 
   387         nIndex = __BYTES2OBJS__(__qSize(slf) - OHDR_SIZE);
   387 	nIndex = __BYTES2OBJS__(__qSize(slf) - OHDR_SIZE);
   388         if ((cls = __qClass(slf)) != Array)
   388 	if ((cls = __qClass(slf)) != Array)
   389             indx += __intVal(__ClassInstPtr(cls)->c_ninstvars);
   389 	    indx += __intVal(__ClassInstPtr(cls)->c_ninstvars);
   390         if ((unsigned)indx < (unsigned)nIndex) {
   390 	if ((unsigned)indx < (unsigned)nIndex) {
   391             __InstPtr(slf)->i_instvars[indx] = anObject;
   391 	    __InstPtr(slf)->i_instvars[indx] = anObject;
   392             __STORE(slf, anObject);
   392 	    __STORE(slf, anObject);
   393             RETURN ( anObject );
   393 	    RETURN ( anObject );
   394         }
   394 	}
   395     }
   395     }
   396 %}.
   396 %}.
   397     ^ super basicAt:index put:anObject
   397     ^ super basicAt:index put:anObject
   398 
   398 
   399     "Modified: 19.4.1996 / 11:14:26 / cg"
   399     "Modified: 19.4.1996 / 11:14:26 / cg"
   477 	    srcP = __ArrayInstPtr(self)->a_element;
   477 	    srcP = __ArrayInstPtr(self)->a_element;
   478 	    dstP = __ArrayInstPtr(nObj)->a_element;
   478 	    dstP = __ArrayInstPtr(nObj)->a_element;
   479 
   479 
   480 #ifdef UNROLL_LOOPS
   480 #ifdef UNROLL_LOOPS
   481 	    while (nIndex >= 4) {
   481 	    while (nIndex >= 4) {
   482     		OBJ element;
   482 		OBJ element;
   483 
   483 
   484 		element = srcP[0];
   484 		element = srcP[0];
   485 		dstP[0] = element;
   485 		dstP[0] = element;
   486 		__STORE_SPC(nObj, element, spc);
   486 		__STORE_SPC(nObj, element, spc);
   487 		element = srcP[1];
   487 		element = srcP[1];
   497 		dstP += 4;
   497 		dstP += 4;
   498 		nIndex -= 4;
   498 		nIndex -= 4;
   499 	    }
   499 	    }
   500 #endif
   500 #endif
   501 	    while (nIndex--) {
   501 	    while (nIndex--) {
   502     		OBJ element;
   502 		OBJ element;
   503 
   503 
   504 		element = *srcP++;
   504 		element = *srcP++;
   505 		*dstP++ = element;
   505 		*dstP++ = element;
   506 		__STORE_SPC(nObj, element, spc);
   506 		__STORE_SPC(nObj, element, spc);
   507 	    }
   507 	    }
   781 	}
   781 	}
   782 	if (indexHigh <= nIndex) {
   782 	if (indexHigh <= nIndex) {
   783 	    OBJ __aBlock = aBlock;
   783 	    OBJ __aBlock = aBlock;
   784 	    int n;
   784 	    int n;
   785 
   785 
   786 	    index--;				/* 0-based */
   786 	    index--;                            /* 0-based */
   787 	    n = indexHigh - index;
   787 	    n = indexHigh - index;
   788 
   788 
   789 	    if (__isBlockLike(__aBlock)
   789 	    if (__isBlockLike(__aBlock)
   790 	     && (__BlockInstPtr(__aBlock)->b_nargs == __MKSMALLINT(1))) {
   790 	     && (__BlockInstPtr(__aBlock)->b_nargs == __MKSMALLINT(1))) {
   791 		{
   791 		{
   928 		interrupt7:
   928 		interrupt7:
   929 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index+7];
   929 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index+7];
   930 			    goto continue7;
   930 			    goto continue7;
   931 
   931 
   932 # ifdef UNROLL_LOOPS2
   932 # ifdef UNROLL_LOOPS2
   933                 interrupt0b:
   933 		interrupt0b:
   934                             __interruptL(@line); el = __InstPtr(self)->i_instvars[index];
   934 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index];
   935                             goto continue0b;
   935 			    goto continue0b;
   936                 interrupt1b:
   936 		interrupt1b:
   937                             __interruptL(@line); el = __InstPtr(self)->i_instvars[index+1];
   937 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index+1];
   938                             goto continue1b;
   938 			    goto continue1b;
   939                 interrupt2b:
   939 		interrupt2b:
   940                             __interruptL(@line); el = __InstPtr(self)->i_instvars[index+2];
   940 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index+2];
   941                             goto continue2b;
   941 			    goto continue2b;
   942                 interrupt3b:
   942 		interrupt3b:
   943                             __interruptL(@line); el = __InstPtr(self)->i_instvars[index+3];
   943 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index+3];
   944                             goto continue3b;
   944 			    goto continue3b;
   945 
   945 
   946                 interrupt0c:
   946 		interrupt0c:
   947                             __interruptL(@line); el = __InstPtr(self)->i_instvars[index];
   947 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index];
   948                             goto continue0c;
   948 			    goto continue0c;
   949                 interrupt1c:
   949 		interrupt1c:
   950                             __interruptL(@line); el = __InstPtr(self)->i_instvars[index+1];
   950 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index+1];
   951                             goto continue1c;
   951 			    goto continue1c;
   952 # endif /* UNROLL_LOOPS2 */
   952 # endif /* UNROLL_LOOPS2 */
   953 #endif /* UNROLL_LOOPS */
   953 #endif /* UNROLL_LOOPS */
   954 		interruptX:
   954 		interruptX:
   955 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index];
   955 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index];
   956 			    goto continueX;
   956 			    goto continueX;
  1455     REGISTER OBJ t;
  1455     REGISTER OBJ t;
  1456     REGISTER int count;
  1456     REGISTER int count;
  1457     OBJ myClass;
  1457     OBJ myClass;
  1458     
  1458     
  1459     if (
  1459     if (
  1460         (__ClassInstPtr((myClass = __qClass(self)))->c_ninstvars == __MKSMALLINT(0))
  1460 	(__ClassInstPtr((myClass = __qClass(self)))->c_ninstvars == __MKSMALLINT(0))
  1461      && __isNonNilObject(aCollection)
  1461      && __isNonNilObject(aCollection)
  1462      && (((t = __qClass(aCollection)) == Array) || (t == myClass))
  1462      && (((t = __qClass(aCollection)) == Array) || (t == myClass))
  1463      && __bothSmallInteger(start, stop)
  1463      && __bothSmallInteger(start, stop)
  1464      && __isSmallInteger(repStart)
  1464      && __isSmallInteger(repStart)
  1465     ) {
  1465     ) {
  1466         startIndex = __intVal(start) - 1;
  1466 	startIndex = __intVal(start) - 1;
  1467         if (startIndex >= 0) {
  1467 	if (startIndex >= 0) {
  1468             nIndex = __BYTES2OBJS__(__qSize(self) - OHDR_SIZE);
  1468 	    nIndex = __BYTES2OBJS__(__qSize(self) - OHDR_SIZE);
  1469             stopIndex = __intVal(stop) - 1;
  1469 	    stopIndex = __intVal(stop) - 1;
  1470             count = stopIndex - startIndex + 1;
  1470 	    count = stopIndex - startIndex + 1;
  1471 
  1471 
  1472             if ((count > 0) && (stopIndex < nIndex)) {
  1472 	    if ((count > 0) && (stopIndex < nIndex)) {
  1473                 repStartIndex = __intVal(repStart) - 1;
  1473 		repStartIndex = __intVal(repStart) - 1;
  1474                 if (repStartIndex >= 0) {
  1474 		if (repStartIndex >= 0) {
  1475                     repNIndex = __BYTES2OBJS__(__qSize(aCollection)-OHDR_SIZE);
  1475 		    repNIndex = __BYTES2OBJS__(__qSize(aCollection)-OHDR_SIZE);
  1476                     repStopIndex = repStartIndex + (stopIndex - startIndex);
  1476 		    repStopIndex = repStartIndex + (stopIndex - startIndex);
  1477                     if (repStopIndex < repNIndex) {
  1477 		    if (repStopIndex < repNIndex) {
  1478                         src = &(__InstPtr(aCollection)->i_instvars[repStartIndex]);
  1478 			src = &(__InstPtr(aCollection)->i_instvars[repStartIndex]);
  1479                         dst = &(__InstPtr(self)->i_instvars[startIndex]);
  1479 			dst = &(__InstPtr(self)->i_instvars[startIndex]);
  1480                         if (aCollection == self) {
  1480 			if (aCollection == self) {
  1481                             /* 
  1481 			    /* 
  1482                              * no need to check stores if copying
  1482 			     * no need to check stores if copying
  1483                              * from myself
  1483 			     * from myself
  1484                              */
  1484 			     */
  1485 
  1485 
  1486                             /* 
  1486 			    /* 
  1487                              * take care of overlapping copy
  1487 			     * take care of overlapping copy
  1488                              * do not depend on memset being smart enough
  1488 			     * do not depend on memset being smart enough
  1489                              * (some are not ;-)
  1489 			     * (some are not ;-)
  1490                              */
  1490 			     */
  1491                             if (src < dst) {
  1491 			    if (src < dst) {
  1492                                 /* must do a reverse copy */
  1492 				/* must do a reverse copy */
  1493                                 src += count;
  1493 				src += count;
  1494                                 dst += count;
  1494 				dst += count;
  1495 #if defined(UNROLL_LOOPS)
  1495 #if defined(UNROLL_LOOPS)
  1496                                 while (count > 8) {
  1496 				while (count > 8) {
  1497                                     dst[-1] = src[-1];
  1497 				    dst[-1] = src[-1];
  1498                                     dst[-2] = src[-2];
  1498 				    dst[-2] = src[-2];
  1499                                     dst[-3] = src[-3];
  1499 				    dst[-3] = src[-3];
  1500                                     dst[-4] = src[-4];
  1500 				    dst[-4] = src[-4];
  1501                                     dst[-5] = src[-5];
  1501 				    dst[-5] = src[-5];
  1502                                     dst[-6] = src[-6];
  1502 				    dst[-6] = src[-6];
  1503                                     dst[-7] = src[-7];
  1503 				    dst[-7] = src[-7];
  1504                                     dst[-8] = src[-8];
  1504 				    dst[-8] = src[-8];
  1505                                     dst -= 8; src -= 8;
  1505 				    dst -= 8; src -= 8;
  1506                                     count -= 8;
  1506 				    count -= 8;
  1507                                 }
  1507 				}
  1508 #endif
  1508 #endif
  1509                                 while (count-- > 0) {
  1509 				while (count-- > 0) {
  1510                                     *--dst = *--src;
  1510 				    *--dst = *--src;
  1511                                 }
  1511 				}
  1512                                 RETURN ( self );
  1512 				RETURN ( self );
  1513                             }
  1513 			    }
  1514 #ifdef SOFTWARE_PIPELINE
  1514 #ifdef SOFTWARE_PIPELINE
  1515                             {
  1515 			    {
  1516                                 OBJ t1;
  1516 				OBJ t1;
  1517 
  1517 
  1518                                 /* 
  1518 				/* 
  1519                                  * the loop below fetches one longWord behind
  1519 				 * the loop below fetches one longWord behind
  1520                                  * this should not be a problem
  1520 				 * this should not be a problem
  1521                                  */
  1521 				 */
  1522                                 t1 = src[0];
  1522 				t1 = src[0];
  1523                                 count--;
  1523 				count--;
  1524                                 if (count) {
  1524 				if (count) {
  1525                                     dst++; src++;
  1525 				    dst++; src++;
  1526                                     do {
  1526 				    do {
  1527                                         dst[-1] = t1;
  1527 					dst[-1] = t1;
  1528                                         t1 = src[0];
  1528 					t1 = src[0];
  1529                                         src++;
  1529 					src++;
  1530                                         dst++;
  1530 					dst++;
  1531                                     } while (count--);
  1531 				    } while (count--);
  1532                                 } else {
  1532 				} else {
  1533                                     dst[0] = t1;
  1533 				    dst[0] = t1;
  1534                                 }
  1534 				}
  1535                             }
  1535 			    }
  1536 #else
  1536 #else
  1537 
  1537 
  1538 # ifdef bcopy4
  1538 # ifdef bcopy4
  1539                             bcopy4(src, dst, count);
  1539 			    bcopy4(src, dst, count);
  1540 # else
  1540 # else
  1541 #  ifdef FAST_MEMCPY
  1541 #  ifdef FAST_MEMCPY
  1542                             bcopy(src, dst, __OBJS2BYTES__(count));
  1542 			    bcopy(src, dst, __OBJS2BYTES__(count));
  1543 #  else
  1543 #  else
  1544 #   if defined(UNROLL_LOOPS)
  1544 #   if defined(UNROLL_LOOPS)
  1545                             while (count >= 8) {
  1545 			    while (count >= 8) {
  1546                                 dst[0] = src[0];
  1546 				dst[0] = src[0];
  1547                                 dst[1] = src[1];
  1547 				dst[1] = src[1];
  1548                                 dst[2] = src[2];
  1548 				dst[2] = src[2];
  1549                                 dst[3] = src[3];
  1549 				dst[3] = src[3];
  1550                                 dst[4] = src[4];
  1550 				dst[4] = src[4];
  1551                                 dst[5] = src[5];
  1551 				dst[5] = src[5];
  1552                                 dst[6] = src[6];
  1552 				dst[6] = src[6];
  1553                                 dst[7] = src[7];
  1553 				dst[7] = src[7];
  1554                                 dst += 8; src += 8;
  1554 				dst += 8; src += 8;
  1555                                 count -= 8;
  1555 				count -= 8;
  1556                             }
  1556 			    }
  1557 #   endif
  1557 #   endif
  1558                             while (count--) {
  1558 			    while (count--) {
  1559                                 *dst++ = *src++;
  1559 				*dst++ = *src++;
  1560                             }
  1560 			    }
  1561 #  endif
  1561 #  endif
  1562 # endif
  1562 # endif
  1563 #endif
  1563 #endif
  1564                         } else {
  1564 			} else {
  1565                             REGISTER int spc;
  1565 			    REGISTER int spc;
  1566 
  1566 
  1567                             spc = __qSpace(self);
  1567 			    spc = __qSpace(self);
  1568 #if defined(UNROLL_LOOPS)
  1568 #if defined(UNROLL_LOOPS)
  1569                             while (count >= 8) {
  1569 			    while (count >= 8) {
  1570                                 t = src[0]; dst[0] = t; __STORE_SPC(self, t, spc);
  1570 				t = src[0]; dst[0] = t; __STORE_SPC(self, t, spc);
  1571                                 t = src[1]; dst[1] = t; __STORE_SPC(self, t, spc);
  1571 				t = src[1]; dst[1] = t; __STORE_SPC(self, t, spc);
  1572                                 t = src[2]; dst[2] = t; __STORE_SPC(self, t, spc);
  1572 				t = src[2]; dst[2] = t; __STORE_SPC(self, t, spc);
  1573                                 t = src[3]; dst[3] = t; __STORE_SPC(self, t, spc);
  1573 				t = src[3]; dst[3] = t; __STORE_SPC(self, t, spc);
  1574                                 t = src[4]; dst[4] = t; __STORE_SPC(self, t, spc);
  1574 				t = src[4]; dst[4] = t; __STORE_SPC(self, t, spc);
  1575                                 t = src[5]; dst[5] = t; __STORE_SPC(self, t, spc);
  1575 				t = src[5]; dst[5] = t; __STORE_SPC(self, t, spc);
  1576                                 t = src[6]; dst[6] = t; __STORE_SPC(self, t, spc);
  1576 				t = src[6]; dst[6] = t; __STORE_SPC(self, t, spc);
  1577                                 t = src[7]; dst[7] = t; __STORE_SPC(self, t, spc);
  1577 				t = src[7]; dst[7] = t; __STORE_SPC(self, t, spc);
  1578                                 count -= 8; src += 8; dst += 8;
  1578 				count -= 8; src += 8; dst += 8;
  1579                             }
  1579 			    }
  1580 #endif
  1580 #endif
  1581                             while (count-- > 0) {
  1581 			    while (count-- > 0) {
  1582                                 t = *src++;
  1582 				t = *src++;
  1583                                 *dst++ = t;
  1583 				*dst++ = t;
  1584                                 __STORE_SPC(self, t, spc);
  1584 				__STORE_SPC(self, t, spc);
  1585                             }
  1585 			    }
  1586                         }
  1586 			}
  1587                         RETURN ( self );
  1587 			RETURN ( self );
  1588                     }
  1588 		    }
  1589                 }
  1589 		}
  1590             }
  1590 	    }
  1591 
  1591 
  1592             if (count == 0) {
  1592 	    if (count == 0) {
  1593                 RETURN ( self );
  1593 		RETURN ( self );
  1594             }
  1594 	    }
  1595         }
  1595 	}
  1596     }
  1596     }
  1597 %}.
  1597 %}.
  1598     ^ super replaceFrom:start to:stop with:aCollection startingAt:repStart
  1598     ^ super replaceFrom:start to:stop with:aCollection startingAt:repStart
  1599 
  1599 
  1600     "Modified: 13.4.1996 / 12:17:13 / cg"
  1600     "Modified: 13.4.1996 / 12:17:13 / cg"
  1671 
  1671 
  1672 %{  /* NOCONTEXT */
  1672 %{  /* NOCONTEXT */
  1673     REGISTER OBJ slf = self;
  1673     REGISTER OBJ slf = self;
  1674 
  1674 
  1675     if (__qClass(slf) == Array) {
  1675     if (__qClass(slf) == Array) {
  1676         RETURN ( (__arraySize(slf) == 0) ? true : false);
  1676 	RETURN ( (__arraySize(slf) == 0) ? true : false);
  1677     }
  1677     }
  1678 %}.
  1678 %}.
  1679     ^ self size == 0
  1679     ^ self size == 0
  1680 !
  1680 !
  1681 
  1681 
  1707 
  1707 
  1708 %{  /* NOCONTEXT */
  1708 %{  /* NOCONTEXT */
  1709     REGISTER OBJ slf = self;
  1709     REGISTER OBJ slf = self;
  1710 
  1710 
  1711     if (__qClass(slf) == Array) {
  1711     if (__qClass(slf) == Array) {
  1712         RETURN ( (__arraySize(slf) != 0) ? true : false);
  1712 	RETURN ( (__arraySize(slf) != 0) ? true : false);
  1713     }
  1713     }
  1714 %}.
  1714 %}.
  1715     ^ self size ~~ 0
  1715     ^ self size ~~ 0
  1716 !
  1716 !
  1717 
  1717 
  1827 		 * its better to exit the loops below with a goto,
  1827 		 * its better to exit the loops below with a goto,
  1828 		 * since the generated code will then be:
  1828 		 * since the generated code will then be:
  1829 		 *   compare
  1829 		 *   compare
  1830 		 *   branch-on-equal found
  1830 		 *   branch-on-equal found
  1831 		 *
  1831 		 *
  1832 		 * otherwise (with return as if-statement), we get:
  1832 		 * otherwise (with ret as if-statement), we get:
  1833 		 *   compare
  1833 		 *   compare
  1834 		 *   branch-on-not-equal skipLabel
  1834 		 *   branch-on-not-equal skipLabel
  1835 		 *   move-to-return-register true
  1835 		 *   move-to-ret-register true
  1836 		 *   goto return-label
  1836 		 *   goto ret-label
  1837 		 * skipLabel
  1837 		 * skipLabel
  1838 		 *
  1838 		 *
  1839 		 * therefore, WITH the so-much-blamed goto, we only branch
  1839 		 * therefore, WITH the so-much-blamed goto, we only branch
  1840 		 * when found; without the goto, we branch always.
  1840 		 * when found; without the goto, we branch always.
  1841 		 * Pipelined CPUs do usually not like taken branches.
  1841 		 * Pipelined CPUs do usually not like taken branches.
  1997     static struct inlineCache eq = _ILC1;
  1997     static struct inlineCache eq = _ILC1;
  1998     OBJ myClass, e;
  1998     OBJ myClass, e;
  1999 
  1999 
  2000     myClass = __qClass(self);
  2000     myClass = __qClass(self);
  2001     if ( __isSmallInteger(start) ) {
  2001     if ( __isSmallInteger(start) ) {
  2002         index = __intVal(start) - 1;
  2002 	index = __intVal(start) - 1;
  2003         if (index >= 0) {
  2003 	if (index >= 0) {
  2004             nInsts = __intVal(__ClassInstPtr(myClass)->c_ninstvars);
  2004 	    nInsts = __intVal(__ClassInstPtr(myClass)->c_ninstvars);
  2005             index += nInsts;
  2005 	    index += nInsts;
  2006             nIndex = __BYTES2OBJS__(__qSize(self) - OHDR_SIZE);
  2006 	    nIndex = __BYTES2OBJS__(__qSize(self) - OHDR_SIZE);
  2007 
  2007 
  2008             e = anElement;
  2008 	    e = anElement;
  2009             if (e != nil) {
  2009 	    if (e != nil) {
  2010                 /*
  2010 		/*
  2011                  * special kludge to search for a string;
  2011 		 * special kludge to search for a string;
  2012                  * this is so common, that its worth a special case
  2012 		 * this is so common, that its worth a special case
  2013                  */
  2013 		 */
  2014 #define SPECIAL_STRING_OPT
  2014 #define SPECIAL_STRING_OPT
  2015 #ifdef SPECIAL_STRING_OPT
  2015 #ifdef SPECIAL_STRING_OPT
  2016                 if (__isString(e)) {
  2016 		if (__isString(e)) {
  2017                     while (index < nIndex) {
  2017 		    while (index < nIndex) {
  2018                         element = __InstPtr(self)->i_instvars[index++];
  2018 			element = __InstPtr(self)->i_instvars[index++];
  2019                         if (__isNonNilObject(element)) {
  2019 			if (__isNonNilObject(element)) {
  2020                             if (element == e) {
  2020 			    if (element == e) {
  2021                                 RETURN ( __MKSMALLINT(index - nInsts) );
  2021 				RETURN ( __MKSMALLINT(index - nInsts) );
  2022                             }
  2022 			    }
  2023                             if (__qClass(element) == @global(String)) {
  2023 			    if (__qClass(element) == @global(String)) {
  2024                                 if (strcmp(__stringVal(e), __stringVal(element)) == 0) {
  2024 				if (strcmp(__stringVal(e), __stringVal(element)) == 0) {
  2025                                     RETURN ( __MKSMALLINT(index - nInsts) );
  2025 				    RETURN ( __MKSMALLINT(index - nInsts) );
  2026                                 }
  2026 				}
  2027                             } else {
  2027 			    } else {
  2028                                 if ((*eq.ilc_func)(e, @symbol(=), nil,&eq, element) == true) {
  2028 				if ((*eq.ilc_func)(e, @symbol(=), nil,&eq, element) == true) {
  2029                                     RETURN ( __MKSMALLINT(index - nInsts) );
  2029 				    RETURN ( __MKSMALLINT(index - nInsts) );
  2030                                 }
  2030 				}
  2031                                 /*
  2031 				/*
  2032                                  * send of #= could have lead to a GC - refetch e
  2032 				 * send of #= could have lead to a GC - refetch e
  2033                                  */
  2033 				 */
  2034                                 e = anElement;
  2034 				e = anElement;
  2035                             }
  2035 			    }
  2036                         }
  2036 			}
  2037                     }
  2037 		    }
  2038                     RETURN (__MKSMALLINT(0));
  2038 		    RETURN (__MKSMALLINT(0));
  2039                 }
  2039 		}
  2040 #endif
  2040 #endif
  2041                 if (__isSmallInteger(e)) {
  2041 		if (__isSmallInteger(e)) {
  2042                     /* search for a small number */
  2042 		    /* search for a small number */
  2043                     while (index < nIndex) {
  2043 		    while (index < nIndex) {
  2044                         element = __InstPtr(self)->i_instvars[index++];
  2044 			element = __InstPtr(self)->i_instvars[index++];
  2045                         if (element == e) {
  2045 			if (element == e) {
  2046                             RETURN ( __MKSMALLINT(index - nInsts) );
  2046 			    RETURN ( __MKSMALLINT(index - nInsts) );
  2047                         }
  2047 			}
  2048                         if (!__isSmallInteger(element)) {
  2048 			if (!__isSmallInteger(element)) {
  2049                             if ((*eq.ilc_func)(e,
  2049 			    if ((*eq.ilc_func)(e,
  2050                                                 @symbol(=), 
  2050 						@symbol(=), 
  2051                                                 nil,&eq,
  2051 						nil,&eq,
  2052                                                 element) == true) {
  2052 						element) == true) {
  2053                                 RETURN ( __MKSMALLINT(index - nInsts) );
  2053 				RETURN ( __MKSMALLINT(index - nInsts) );
  2054                             }
  2054 			    }
  2055                             /*
  2055 			    /*
  2056                              * send of #= could have lead to a GC - refetch e
  2056 			     * send of #= could have lead to a GC - refetch e
  2057                              */
  2057 			     */
  2058                             e = anElement;
  2058 			    e = anElement;
  2059                         }
  2059 			}
  2060                     }
  2060 		    }
  2061                     RETURN (__MKSMALLINT(0));
  2061 		    RETURN (__MKSMALLINT(0));
  2062                 }
  2062 		}
  2063 
  2063 
  2064                 while (index < nIndex) {
  2064 		while (index < nIndex) {
  2065                     element = __InstPtr(self)->i_instvars[index++];
  2065 		    element = __InstPtr(self)->i_instvars[index++];
  2066                     if (element != nil) {
  2066 		    if (element != nil) {
  2067                         e = anElement;
  2067 			e = anElement;
  2068 
  2068 
  2069                         if ((element == e) 
  2069 			if ((element == e) 
  2070                          || ((*eq.ilc_func)(e,
  2070 			 || ((*eq.ilc_func)(e,
  2071                                             @symbol(=), 
  2071 					    @symbol(=), 
  2072                                             nil,&eq,
  2072 					    nil,&eq,
  2073                                             element) == true)) {
  2073 					    element) == true)) {
  2074                             RETURN ( __MKSMALLINT(index - nInsts) );
  2074 			    RETURN ( __MKSMALLINT(index - nInsts) );
  2075                         }
  2075 			}
  2076                     }
  2076 		    }
  2077                 }
  2077 		}
  2078             } else {
  2078 	    } else {
  2079                 OBJ slf = self;
  2079 		OBJ slf = self;
  2080 
  2080 
  2081                 /* 
  2081 		/* 
  2082                  * search for nil - do an identity-search
  2082 		 * search for nil - do an identity-search
  2083                  */
  2083 		 */
  2084 #if defined(UNROLL_LOOPS)
  2084 #if defined(UNROLL_LOOPS)
  2085                 {
  2085 		{
  2086                     unsigned int i8;
  2086 		    unsigned int i8;
  2087 
  2087 
  2088                     while ((i8 = index + 8) < nIndex) {
  2088 		    while ((i8 = index + 8) < nIndex) {
  2089                         if (__InstPtr(slf)->i_instvars[index] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 1) ); }
  2089 			if (__InstPtr(slf)->i_instvars[index] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 1) ); }
  2090                         if (__InstPtr(slf)->i_instvars[index+1] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 2) ); }
  2090 			if (__InstPtr(slf)->i_instvars[index+1] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 2) ); }
  2091                         if (__InstPtr(slf)->i_instvars[index+2] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 3) ); }
  2091 			if (__InstPtr(slf)->i_instvars[index+2] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 3) ); }
  2092                         if (__InstPtr(slf)->i_instvars[index+3] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 4) ); }
  2092 			if (__InstPtr(slf)->i_instvars[index+3] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 4) ); }
  2093                         if (__InstPtr(slf)->i_instvars[index+4] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 5) ); }
  2093 			if (__InstPtr(slf)->i_instvars[index+4] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 5) ); }
  2094                         if (__InstPtr(slf)->i_instvars[index+5] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 6) ); }
  2094 			if (__InstPtr(slf)->i_instvars[index+5] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 6) ); }
  2095                         if (__InstPtr(slf)->i_instvars[index+6] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 7) ); }
  2095 			if (__InstPtr(slf)->i_instvars[index+6] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 7) ); }
  2096                         if (__InstPtr(slf)->i_instvars[index+7] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 8) ); }
  2096 			if (__InstPtr(slf)->i_instvars[index+7] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 8) ); }
  2097                         index = i8;
  2097 			index = i8;
  2098                     }
  2098 		    }
  2099                 }
  2099 		}
  2100 #endif
  2100 #endif
  2101 
  2101 
  2102                 while (index < nIndex) {
  2102 		while (index < nIndex) {
  2103                     if (__InstPtr(slf)->i_instvars[index++] == nil) {
  2103 		    if (__InstPtr(slf)->i_instvars[index++] == nil) {
  2104                         RETURN ( __MKSMALLINT(index - nInsts) );
  2104 			RETURN ( __MKSMALLINT(index - nInsts) );
  2105                     }
  2105 		    }
  2106                 }
  2106 		}
  2107             }
  2107 	    }
  2108         }
  2108 	}
  2109         RETURN (__MKSMALLINT(0));
  2109 	RETURN (__MKSMALLINT(0));
  2110     }
  2110     }
  2111 %}.
  2111 %}.
  2112     ^ super indexOf:anElement startingAt:start
  2112     ^ super indexOf:anElement startingAt:start
  2113 !
  2113 !
  2114 
  2114 
  2124     static struct inlineCache eq = _ILC1;
  2124     static struct inlineCache eq = _ILC1;
  2125     OBJ myClass, e;
  2125     OBJ myClass, e;
  2126 
  2126 
  2127     myClass = __qClass(self);
  2127     myClass = __qClass(self);
  2128     if ( __bothSmallInteger(start, stop) ) {
  2128     if ( __bothSmallInteger(start, stop) ) {
  2129         index = __intVal(start) - 1;
  2129 	index = __intVal(start) - 1;
  2130         if (index >= 0) {
  2130 	if (index >= 0) {
  2131             nInsts = __intVal(__ClassInstPtr(myClass)->c_ninstvars);
  2131 	    nInsts = __intVal(__ClassInstPtr(myClass)->c_ninstvars);
  2132             index += nInsts;
  2132 	    index += nInsts;
  2133             lastIndex = nInsts + __intVal(stop);
  2133 	    lastIndex = nInsts + __intVal(stop);
  2134             nIndex = __BYTES2OBJS__(__qSize(self) - OHDR_SIZE);
  2134 	    nIndex = __BYTES2OBJS__(__qSize(self) - OHDR_SIZE);
  2135             if (nIndex < lastIndex) {
  2135 	    if (nIndex < lastIndex) {
  2136                 lastIndex = nIndex;
  2136 		lastIndex = nIndex;
  2137             }
  2137 	    }
  2138 
  2138 
  2139             e = anElement;
  2139 	    e = anElement;
  2140 
  2140 
  2141             if (e != nil) {
  2141 	    if (e != nil) {
  2142                 /*
  2142 		/*
  2143                  * special kludge to search for a string;
  2143 		 * special kludge to search for a string;
  2144                  * this is so common, that its worth a special case
  2144 		 * this is so common, that its worth a special case
  2145                  */
  2145 		 */
  2146 #define SPECIAL_STRING_OPT
  2146 #define SPECIAL_STRING_OPT
  2147 #ifdef SPECIAL_STRING_OPT
  2147 #ifdef SPECIAL_STRING_OPT
  2148                 if (__isString(e)) {
  2148 		if (__isString(e)) {
  2149                     while (index < lastIndex) {
  2149 		    while (index < lastIndex) {
  2150                         element = __InstPtr(self)->i_instvars[index++];
  2150 			element = __InstPtr(self)->i_instvars[index++];
  2151                         if (__isNonNilObject(e)) {
  2151 			if (__isNonNilObject(e)) {
  2152                             if (element == e) {
  2152 			    if (element == e) {
  2153                                 RETURN ( __MKSMALLINT(index - nInsts) );
  2153 				RETURN ( __MKSMALLINT(index - nInsts) );
  2154                             }
  2154 			    }
  2155                             if (__qClass(element) == @global(String)) {
  2155 			    if (__qClass(element) == @global(String)) {
  2156                                 if (strcmp(__stringVal(e), __stringVal(element)) == 0) {
  2156 				if (strcmp(__stringVal(e), __stringVal(element)) == 0) {
  2157                                     RETURN ( __MKSMALLINT(index - nInsts) );
  2157 				    RETURN ( __MKSMALLINT(index - nInsts) );
  2158                                 }
  2158 				}
  2159                             } else {
  2159 			    } else {
  2160                                 if ((*eq.ilc_func)(e, @symbol(=), nil,&eq, element) == true) {
  2160 				if ((*eq.ilc_func)(e, @symbol(=), nil,&eq, element) == true) {
  2161                                     RETURN ( __MKSMALLINT(index - nInsts) );
  2161 				    RETURN ( __MKSMALLINT(index - nInsts) );
  2162                                 }
  2162 				}
  2163                                 /*
  2163 				/*
  2164                                  * send of #= could have lead to a GC - refetch e
  2164 				 * send of #= could have lead to a GC - refetch e
  2165                                  */
  2165 				 */
  2166                                 e = anElement;
  2166 				e = anElement;
  2167                             }
  2167 			    }
  2168                         }
  2168 			}
  2169                     }
  2169 		    }
  2170                     RETURN (__MKSMALLINT(0));
  2170 		    RETURN (__MKSMALLINT(0));
  2171                 }
  2171 		}
  2172 #endif
  2172 #endif
  2173                 if (__isSmallInteger(e)) {
  2173 		if (__isSmallInteger(e)) {
  2174                     /* search for a small number */
  2174 		    /* search for a small number */
  2175                     while (index < lastIndex) {
  2175 		    while (index < lastIndex) {
  2176                         element = __InstPtr(self)->i_instvars[index++];
  2176 			element = __InstPtr(self)->i_instvars[index++];
  2177                         if (element == e) {
  2177 			if (element == e) {
  2178                             RETURN ( __MKSMALLINT(index - nInsts) );
  2178 			    RETURN ( __MKSMALLINT(index - nInsts) );
  2179                         }
  2179 			}
  2180                         if (!__isSmallInteger(element)) {
  2180 			if (!__isSmallInteger(element)) {
  2181                             if ((*eq.ilc_func)(e,
  2181 			    if ((*eq.ilc_func)(e,
  2182                                                 @symbol(=), 
  2182 						@symbol(=), 
  2183                                                 nil,&eq,
  2183 						nil,&eq,
  2184                                                 element) == true) {
  2184 						element) == true) {
  2185                                 RETURN ( __MKSMALLINT(index - nInsts) );
  2185 				RETURN ( __MKSMALLINT(index - nInsts) );
  2186                             }
  2186 			    }
  2187                             /*
  2187 			    /*
  2188                              * send of #= could have lead to a GC - refetch e
  2188 			     * send of #= could have lead to a GC - refetch e
  2189                              */
  2189 			     */
  2190                             e = anElement;
  2190 			    e = anElement;
  2191                         }
  2191 			}
  2192                     }
  2192 		    }
  2193                     RETURN (__MKSMALLINT(0));
  2193 		    RETURN (__MKSMALLINT(0));
  2194                 }
  2194 		}
  2195 
  2195 
  2196                 while (index < lastIndex) {
  2196 		while (index < lastIndex) {
  2197                     element = __InstPtr(self)->i_instvars[index++];
  2197 		    element = __InstPtr(self)->i_instvars[index++];
  2198                     if (element != nil) {
  2198 		    if (element != nil) {
  2199                         e = anElement;
  2199 			e = anElement;
  2200                         if ((element == e) 
  2200 			if ((element == e) 
  2201                          || ((*eq.ilc_func)(e,
  2201 			 || ((*eq.ilc_func)(e,
  2202                                             @symbol(=), 
  2202 					    @symbol(=), 
  2203                                             nil,&eq,
  2203 					    nil,&eq,
  2204                                             element) == true)) {
  2204 					    element) == true)) {
  2205                             RETURN ( __MKSMALLINT(index - nInsts) );
  2205 			    RETURN ( __MKSMALLINT(index - nInsts) );
  2206                         }
  2206 			}
  2207                     }
  2207 		    }
  2208                 }
  2208 		}
  2209             } else {
  2209 	    } else {
  2210                 OBJ slf = self;
  2210 		OBJ slf = self;
  2211 
  2211 
  2212                 /* 
  2212 		/* 
  2213                  * search for nil - do an identity-search
  2213 		 * search for nil - do an identity-search
  2214                  */
  2214 		 */
  2215 #if defined(UNROLL_LOOPS)
  2215 #if defined(UNROLL_LOOPS)
  2216                 {
  2216 		{
  2217                     unsigned int i8;
  2217 		    unsigned int i8;
  2218 
  2218 
  2219                     while ((i8 = index + 8) < lastIndex) {
  2219 		    while ((i8 = index + 8) < lastIndex) {
  2220                         if (__InstPtr(slf)->i_instvars[index] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 1) ); }
  2220 			if (__InstPtr(slf)->i_instvars[index] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 1) ); }
  2221                         if (__InstPtr(slf)->i_instvars[index+1] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 2) ); }
  2221 			if (__InstPtr(slf)->i_instvars[index+1] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 2) ); }
  2222                         if (__InstPtr(slf)->i_instvars[index+2] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 3) ); }
  2222 			if (__InstPtr(slf)->i_instvars[index+2] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 3) ); }
  2223                         if (__InstPtr(slf)->i_instvars[index+3] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 4) ); }
  2223 			if (__InstPtr(slf)->i_instvars[index+3] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 4) ); }
  2224                         if (__InstPtr(slf)->i_instvars[index+4] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 5) ); }
  2224 			if (__InstPtr(slf)->i_instvars[index+4] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 5) ); }
  2225                         if (__InstPtr(slf)->i_instvars[index+5] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 6) ); }
  2225 			if (__InstPtr(slf)->i_instvars[index+5] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 6) ); }
  2226                         if (__InstPtr(slf)->i_instvars[index+6] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 7) ); }
  2226 			if (__InstPtr(slf)->i_instvars[index+6] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 7) ); }
  2227                         if (__InstPtr(slf)->i_instvars[index+7] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 8) ); }
  2227 			if (__InstPtr(slf)->i_instvars[index+7] == nil) { RETURN ( __MKSMALLINT(index - nInsts + 8) ); }
  2228                         index = i8;
  2228 			index = i8;
  2229                     }
  2229 		    }
  2230                 }
  2230 		}
  2231 #endif
  2231 #endif
  2232                 while (index < lastIndex) {
  2232 		while (index < lastIndex) {
  2233                     if (__InstPtr(slf)->i_instvars[index++] == nil) {
  2233 		    if (__InstPtr(slf)->i_instvars[index++] == nil) {
  2234                         RETURN ( __MKSMALLINT(index - nInsts) );
  2234 			RETURN ( __MKSMALLINT(index - nInsts) );
  2235                     }
  2235 		    }
  2236                 }
  2236 		}
  2237             }
  2237 	    }
  2238         }
  2238 	}
  2239         RETURN (__MKSMALLINT(0));
  2239 	RETURN (__MKSMALLINT(0));
  2240     }
  2240     }
  2241 %}.
  2241 %}.
  2242     ^ super indexOf:anElement startingAt:start endingAt:stop
  2242     ^ super indexOf:anElement startingAt:start endingAt:stop
  2243 ! !
  2243 ! !
  2244 
  2244 
  2368 ! !
  2368 ! !
  2369 
  2369 
  2370 !Array class methodsFor:'documentation'!
  2370 !Array class methodsFor:'documentation'!
  2371 
  2371 
  2372 version
  2372 version
  2373     ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.114 1999-04-29 22:38:23 cg Exp $'
  2373     ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.115 1999-06-23 12:41:21 cg Exp $'
  2374 ! !
  2374 ! !