Array.st
changeset 951 2dd898849a8a
parent 946 35962f2a169b
child 1083 fadaedfa28f8
equal deleted inserted replaced
950:1ead6817a6c8 951:2dd898849a8a
   170 		 * have to protect all context stuff
   170 		 * have to protect all context stuff
   171 		 * (especially for self, but also for backtrace in case of
   171 		 * (especially for self, but also for backtrace in case of
   172 		 *  allocation failure)
   172 		 *  allocation failure)
   173 		 */
   173 		 */
   174 		__PROTECT_CONTEXT__
   174 		__PROTECT_CONTEXT__
   175 		__qAlignedNew(newobj, instsize, SENDER);
   175 		newobj = __new(instsize);
   176 		__UNPROTECT_CONTEXT__
   176 		__UNPROTECT_CONTEXT__
   177 		if (newobj != nil) {
   177 		if (newobj != nil) {
   178 		    goto ok;
   178 		    goto ok;
   179 		}
   179 		}
   180 	    }
   180 	    }
   855      && __bothSmallInteger(index1, index2)) {
   855      && __bothSmallInteger(index1, index2)) {
   856 	index = _intVal(index1) - 1;
   856 	index = _intVal(index1) - 1;
   857 	if (index >= 0) {
   857 	if (index >= 0) {
   858 	    nIndex = __BYTES2OBJS__(__qSize(self) - OHDR_SIZE);
   858 	    nIndex = __BYTES2OBJS__(__qSize(self) - OHDR_SIZE);
   859 	    endIndex = _intVal(index2) - 1;
   859 	    endIndex = _intVal(index2) - 1;
   860 	    if (endIndex < nIndex) {
   860 	    if ((endIndex >= index) && (endIndex < nIndex)) {
   861 		dst = &(_InstPtr(self)->i_instvars[index]);
   861 		dst = &(_InstPtr(self)->i_instvars[index]);
   862 #ifdef memset4
   862 #ifdef memset4
   863 		memset4(dst, anObject, (endIndex-index+1));
   863 		memset4(dst, anObject, (endIndex-index+1));
   864 		__STORE(self, anObject);
   864 		__STORE(self, anObject);
   865 #else
   865 #else
  1359 ! !
  1359 ! !
  1360 
  1360 
  1361 !Array class methodsFor:'documentation'!
  1361 !Array class methodsFor:'documentation'!
  1362 
  1362 
  1363 version
  1363 version
  1364 ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.55 1996-02-08 21:47:08 cg Exp $'! !
  1364 ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.56 1996-02-09 15:36:43 cg Exp $'! !