Array.st
changeset 325 46bca6125b93
parent 302 1f76060d58a4
child 328 7b542c0bf1dd
equal deleted inserted replaced
324:290cfb34ec93 325:46bca6125b93
    19 
    19 
    20 Array comment:'
    20 Array comment:'
    21 COPYRIGHT (c) 1989 by Claus Gittinger
    21 COPYRIGHT (c) 1989 by Claus Gittinger
    22 	      All Rights Reserved
    22 	      All Rights Reserved
    23 
    23 
    24 $Header: /cvs/stx/stx/libbasic/Array.st,v 1.22 1995-03-08 23:36:43 claus Exp $
    24 $Header: /cvs/stx/stx/libbasic/Array.st,v 1.23 1995-04-02 11:05:39 claus Exp $
    25 '!
    25 '!
    26 
    26 
    27 !Array class methodsFor:'documentation'!
    27 !Array class methodsFor:'documentation'!
    28 
    28 
    29 copyright
    29 copyright
    40 "
    40 "
    41 !
    41 !
    42 
    42 
    43 version
    43 version
    44 "
    44 "
    45 $Header: /cvs/stx/stx/libbasic/Array.st,v 1.22 1995-03-08 23:36:43 claus Exp $
    45 $Header: /cvs/stx/stx/libbasic/Array.st,v 1.23 1995-04-02 11:05:39 claus Exp $
    46 "
    46 "
    47 !
    47 !
    48 
    48 
    49 documentation
    49 documentation
    50 "
    50 "
   312 
   312 
   313 	    nIndex = __BYTES2OBJS__(sz - OHDR_SIZE - sizeof(OBJ));
   313 	    nIndex = __BYTES2OBJS__(sz - OHDR_SIZE - sizeof(OBJ));
   314 	    /* sorry: must take care of stores ... */
   314 	    /* sorry: must take care of stores ... */
   315 	    srcP = _ArrayInstPtr(self)->a_element;
   315 	    srcP = _ArrayInstPtr(self)->a_element;
   316 	    dstP = _ArrayInstPtr(nObj)->a_element;
   316 	    dstP = _ArrayInstPtr(nObj)->a_element;
   317 	    spc = _qSpace(nObj);
   317 	    spc = __qSpace(nObj);
   318 	    while (nIndex--) {
   318 	    while (nIndex--) {
   319 		element = *srcP++;
   319 		element = *srcP++;
   320 		*dstP++ = element;
   320 		*dstP++ = element;
   321 		__STORE_SPC(nObj, element, spc);
   321 		__STORE_SPC(nObj, element, spc);
   322 	    }
   322 	    }
   432 # endif
   432 # endif
   433 #endif
   433 #endif
   434 			} else {
   434 			} else {
   435 			    REGISTER int spc;
   435 			    REGISTER int spc;
   436 
   436 
   437 			    spc = _qSpace(self);
   437 			    spc = __qSpace(self);
   438 			    while (count-- > 0) {
   438 			    while (count-- > 0) {
   439 				t = *src++;
   439 				t = *src++;
   440 				*dst++ = t;
   440 				*dst++ = t;
   441 				__STORE_SPC(self, t, spc);
   441 				__STORE_SPC(self, t, spc);
   442 			    }
   442 			    }
   668 	    (*codeVal)(aBlock, CON_COMMA  _InstPtr(self)->i_instvars[index]);
   668 	    (*codeVal)(aBlock, CON_COMMA  _InstPtr(self)->i_instvars[index]);
   669 	} 
   669 	} 
   670 #else
   670 #else
   671 	home = _BlockInstPtr(aBlock)->b_home;
   671 	home = _BlockInstPtr(aBlock)->b_home;
   672 	rHome = home;
   672 	rHome = home;
   673 	if ((rHome == nil) || (_qSpace(rHome) >= STACKSPACE)) {
   673 	if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE)) {
   674 	    /*
   674 	    /*
   675 	     * home will not move - keep in a fast register
   675 	     * home will not move - keep in a fast register
   676 	     */
   676 	     */
   677 	    for (; index < nIndex; index++) {
   677 	    for (; index < nIndex; index++) {
   678 		if (InterruptPending != nil) interruptL(__LINE__ COMMA_CON);
   678 		if (InterruptPending != nil) interruptL(__LINE__ COMMA_CON);
   729 					  _InstPtr(self)->i_instvars[index]);
   729 					  _InstPtr(self)->i_instvars[index]);
   730 	} 
   730 	} 
   731 #else
   731 #else
   732 	home = _BlockInstPtr(aBlock)->b_home;
   732 	home = _BlockInstPtr(aBlock)->b_home;
   733 	rHome = home;
   733 	rHome = home;
   734 	if ((rHome == nil) || (_qSpace(rHome) >= STACKSPACE)) {
   734 	if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE)) {
   735 	    /*
   735 	    /*
   736 	     * home will not move - keep in a fast register
   736 	     * home will not move - keep in a fast register
   737 	     */
   737 	     */
   738 	    for (; index < nIndex; index++) {
   738 	    for (; index < nIndex; index++) {
   739 		if (InterruptPending != nil) interruptL(__LINE__ COMMA_CON);
   739 		if (InterruptPending != nil) interruptL(__LINE__ COMMA_CON);
   847 			(*codeVal)(aBlock, CON_COMMA  _InstPtr(self)->i_instvars[index]);
   847 			(*codeVal)(aBlock, CON_COMMA  _InstPtr(self)->i_instvars[index]);
   848 		    } 
   848 		    } 
   849 #else
   849 #else
   850 		    home = _BlockInstPtr(aBlock)->b_home;
   850 		    home = _BlockInstPtr(aBlock)->b_home;
   851 		    rHome = home;
   851 		    rHome = home;
   852 		    if ((rHome == nil) || (_qSpace(rHome) >= STACKSPACE)) {
   852 		    if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE)) {
   853 			for (index=indexLow; index <= indexHigh; index++) {
   853 			for (index=indexLow; index <= indexHigh; index++) {
   854 			    if (InterruptPending != nil) interruptL(__LINE__ COMMA_CON);
   854 			    if (InterruptPending != nil) interruptL(__LINE__ COMMA_CON);
   855 			    (*codeVal)(rHome, CON_COMMA  _InstPtr(self)->i_instvars[index]);
   855 			    (*codeVal)(rHome, CON_COMMA  _InstPtr(self)->i_instvars[index]);
   856 			} 
   856 			} 
   857 		    } else {
   857 		    } else {
   916 			(*codeVal)(aBlock, CON_COMMA  _InstPtr(self)->i_instvars[index]);
   916 			(*codeVal)(aBlock, CON_COMMA  _InstPtr(self)->i_instvars[index]);
   917 		    } 
   917 		    } 
   918 #else
   918 #else
   919 		    home = _BlockInstPtr(aBlock)->b_home;
   919 		    home = _BlockInstPtr(aBlock)->b_home;
   920 		    rHome = home;
   920 		    rHome = home;
   921 		    if ((rHome == nil) || (_qSpace(rHome) >= STACKSPACE)) {
   921 		    if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE)) {
   922 			for (index=indexHigh; index >= indexLow; index--) {
   922 			for (index=indexHigh; index >= indexLow; index--) {
   923 			    if (InterruptPending != nil) interruptL(__LINE__ COMMA_CON);
   923 			    if (InterruptPending != nil) interruptL(__LINE__ COMMA_CON);
   924 			    (*codeVal)(rHome, CON_COMMA  _InstPtr(self)->i_instvars[index]);
   924 			    (*codeVal)(rHome, CON_COMMA  _InstPtr(self)->i_instvars[index]);
   925 			} 
   925 			} 
   926 		    } else {
   926 		    } else {
   975 		(*codeVal)(aBlock, CON_COMMA  element);
   975 		(*codeVal)(aBlock, CON_COMMA  element);
   976 	} 
   976 	} 
   977 #else
   977 #else
   978 	home = _BlockInstPtr(aBlock)->b_home;
   978 	home = _BlockInstPtr(aBlock)->b_home;
   979         rHome = home;
   979         rHome = home;
   980         if ((rHome == nil) || (_qSpace(rHome) >= STACKSPACE)) {
   980         if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE)) {
   981             /*
   981             /*
   982              * home will not move - keep in in a register
   982              * home will not move - keep in in a register
   983              */
   983              */
   984 	    for (; index < nIndex; index++) {
   984 	    for (; index < nIndex; index++) {
   985 	        if (InterruptPending != nil) interrupt(CONARG);
   985 	        if (InterruptPending != nil) interrupt(CONARG);