ByteArray.st
changeset 2894 344aec8ba014
parent 2890 fa0418a0f896
child 2898 ec12723d8582
--- a/ByteArray.st	Tue Sep 02 19:40:57 1997 +0200
+++ b/ByteArray.st	Tue Sep 02 22:56:14 1997 +0200
@@ -167,7 +167,7 @@
 		 * the most common case
 		 */
 		instsize = OHDR_SIZE + nindexedinstvars;
-		if (__CanDoQuickNew(instsize)) {
+		if (__CanDoQuickNew(instsize)) {	/* OBJECT ALLOCATION */
 		    __qCheckedNew(newobj, instsize);
 		    __InstPtr(newobj)->o_class = self;
 		    RETURN (newobj );
@@ -176,7 +176,7 @@
 	    nInstVars = __intVal(__ClassInstPtr(self)->c_ninstvars);
 	    instsize = OHDR_SIZE + __OBJS2BYTES__(nInstVars) + nindexedinstvars;
 	    __PROTECT_CONTEXT__
-	    __qNew(newobj, instsize);
+	    __qNew(newobj, instsize);	/* OBJECT ALLOCATION */
 	    __UNPROTECT_CONTEXT__
 	    if (newobj != nil) {
 		__InstPtr(newobj)->o_class = self;
@@ -1307,7 +1307,7 @@
 		count = index2 - index1 + 1;
 		__PROTECT_CONTEXT__
 		sz = OHDR_SIZE + count;
-		__qNew(newByteArray, sz);
+		__qNew(newByteArray, sz);	/* OBJECT ALLOCATION */
 		__UNPROTECT_CONTEXT__
 		if (newByteArray != nil) {
 		    __InstPtr(newByteArray)->o_class = ByteArray;
@@ -1449,6 +1449,8 @@
     REGISTER unsigned char *dst;
     OBJ cls;
 
+#define NO_PRIM_BYTEARR
+#ifndef NO_PRIM_BYTEARR
     if (__isBytes(aCollection)
      && __isBytes(self)
      && __bothSmallInteger(start, stop)
@@ -1542,6 +1544,7 @@
             }
         }
     }
+#endif
 %}.
     "
      fall back in case of non-ByteArray argument,
@@ -2349,5 +2352,5 @@
 !ByteArray class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.84 1997-08-22 17:56:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.85 1997-09-02 20:52:22 cg Exp $'
 ! !