Array.st
changeset 8919 707a9ff7f9b2
parent 8913 b9498d27a554
child 9359 6f93b3cfc7d4
--- a/Array.st	Fri Jul 08 22:54:45 2005 +0200
+++ b/Array.st	Fri Jul 08 23:13:39 2005 +0200
@@ -469,7 +469,7 @@
             srcP = __arrayVal(self);
             dstP = __arrayVal(nObj);
 
-#ifdef UNROLL_LOOPS
+#ifdef __UNROLL_LOOPS__
             while (nIndex >= 4) {
                 OBJ element;
 
@@ -582,7 +582,7 @@
 			     * as NOT taken by most machines ... which is exactly what we want)
 			     */
 			    REGISTER OBJ el;
-#if defined(UNROLL_LOOPS)
+#ifdef __UNROLL_LOOPS__
 
 			    {
 				int i8;
@@ -623,7 +623,7 @@
 				    index = i8;
 				}
 			    }
-#endif /* UNROLL_LOOPS */
+#endif /* __UNROLL_LOOPS__ */
 
 			    for (; index < nIndex; index++) {
 				el = __InstPtr(self)->i_instvars[index];
@@ -633,7 +633,7 @@
 			    }
 			    RETURN (self);
 
-#if defined(UNROLL_LOOPS)
+#ifdef __UNROLL_LOOPS__
 		interrupt0:
 			    __interruptL(@line);
 			    el = __InstPtr(self)->i_instvars[index];
@@ -666,7 +666,7 @@
 			    __interruptL(@line);
 			    el = __InstPtr(self)->i_instvars[index+7];
 			    goto continue7;
-#endif /* UNROLL_LOOPS */
+#endif /* __UNROLL_LOOPS__ */
 		interruptX:
 			    __interruptL(@line);
 			    el = __InstPtr(self)->i_instvars[index];
@@ -801,7 +801,7 @@
 			{
 			    REGISTER OBJ el;
 
-#if defined(UNROLL_LOOPS)
+#ifdef __UNROLL_LOOPS__
 			    /*
 			     * boy; what an ugly looking piece of code ...
 			     * however, this software pipelined thing has no taken conditional
@@ -847,7 +847,7 @@
 				    n -= 8;
 				    index += 8;
 				}
-# ifdef UNROLL_LOOPS2 /* this makes small loops slower */
+# ifdef __UNROLL_LOOPS2__ /* this makes small loops slower */
 				if (n >= 4) {
 				    el = __InstPtr(self)->i_instvars[index];
 				    if (InterruptPending != nil) goto interrupt0b;
@@ -880,9 +880,9 @@
 				    n -= 2;
 				    index += 2;
 				}
-# endif /* UNROLL_LOOPS2 */
+# endif /* __UNROLL_LOOPS2__ */
 			    }
-#endif /* UNROLL_LOOPS */
+#endif /* __UNROLL_LOOPS__ */
 			    while (n > 0) {
 				el = __InstPtr(self)->i_instvars[index];
 				if (InterruptPending != nil) goto interruptX;
@@ -893,7 +893,7 @@
 			    }
 			    RETURN (self);
 
-#if defined(UNROLL_LOOPS)
+#ifdef __UNROLL_LOOPS__
 		interrupt0:
 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index];
 			    goto continue0;
@@ -919,7 +919,7 @@
 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index+7];
 			    goto continue7;
 
-# ifdef UNROLL_LOOPS2
+# ifdef __UNROLL_LOOPS2__
 		interrupt0b:
 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index];
 			    goto continue0b;
@@ -939,8 +939,8 @@
 		interrupt1c:
 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index+1];
 			    goto continue1c;
-# endif /* UNROLL_LOOPS2 */
-#endif /* UNROLL_LOOPS */
+# endif /* __UNROLL_LOOPS2__ */
+#endif /* __UNROLL_LOOPS__ */
 		interruptX:
 			    __interruptL(@line); el = __InstPtr(self)->i_instvars[index];
 			    goto continueX;
@@ -1402,7 +1402,7 @@
 		} else 
 # endif
 		{
-# if defined(UNROLL_LOOPS)
+# ifdef __UNROLL_LOOPS__
 		    {
 			int i8;
 
@@ -1483,7 +1483,7 @@
 				/* must do a reverse copy */
 				src += count;
 				dst += count;
-#if defined(UNROLL_LOOPS)
+#ifdef __UNROLL_LOOPS__
 				while (count > 8) {
 				    dst[-1] = src[-1];
 				    dst[-2] = src[-2];
@@ -1532,7 +1532,7 @@
 #  ifdef FAST_MEMCPY
 			    bcopy(src, dst, __OBJS2BYTES__(count));
 #  else
-#   if defined(UNROLL_LOOPS)
+#   ifdef __UNROLL_LOOPS__
 			    while (count >= 8) {
 				dst[0] = src[0];
 				dst[1] = src[1];
@@ -1556,7 +1556,7 @@
 			    REGISTER int spc;
 
 			    spc = __qSpace(self);
-#if defined(UNROLL_LOOPS)
+#ifdef __UNROLL_LOOPS__
 			    while (count >= 8) {
 				t = src[0]; dst[0] = t; __STORE_SPC(self, t, spc);
 				t = src[1]; dst[1] = t; __STORE_SPC(self, t, spc);
@@ -1861,7 +1861,7 @@
 	    }
 #else
 
-# if defined(UNROLL_LOOPS)
+# ifdef __UNROLL_LOOPS__
 	    {
 		/*
 		 * dont argue about those gotos below - they speed up that thing by 30%;
@@ -1915,7 +1915,7 @@
 			RETURN ( __mkSmallInteger(index + 8 - nInsts) );
 		}
 	    }
-# endif /* UNROLLED_LOOPS */
+# endif /* __UNROLLED_LOOPS__ */
 
 	    while (index++ < nIndex) {
 		if (*op++ == el) goto found0;
@@ -1972,7 +1972,7 @@
 	    }
 #else
 
-# if defined(UNROLL_LOOPS)
+# ifdef __UNROLL_LOOPS__
 	    {
 		unsigned int i8;
 
@@ -2008,7 +2008,7 @@
 		    RETURN ( __mkSmallInteger(index + 8 - nInsts) );
 		}
 	    }
-# endif /* UNROLL_LOOPS */
+# endif /* __UNROLL_LOOPS__ */
 
 	    while (index++ < lastIndex) {
 		if (*op++ == el) goto found0;
@@ -2123,7 +2123,7 @@
 		/* 
 		 * search for nil - do an identity-search
 		 */
-#if defined(UNROLL_LOOPS)
+#ifdef __UNROLL_LOOPS__
 		{
 		    unsigned int i8;
 
@@ -2255,7 +2255,7 @@
 		/* 
 		 * search for nil - do an identity-search
 		 */
-#if defined(UNROLL_LOOPS)
+#ifdef __UNROLL_LOOPS__
 		{
 		    unsigned int i8;
 
@@ -2350,7 +2350,7 @@
      * also, all branches are forward, which are usually predicted
      * as not taken.
      */
-#  if defined(UNROLL_LOOPS)
+#  ifdef __UNROLL_LOOPS__
     {
 	unsigned int i8;
 	REGISTER OBJ slf = self;
@@ -2367,7 +2367,7 @@
 	    index = i8;
 	}
     }
-#  endif /* UNROLL_LOOPS */
+#  endif /* __UNROLL_LOOPS__ */
 
     while (index < nIndex) {
 	if (__InstPtr(self)->i_instvars[index++] == o) goto found;
@@ -2500,5 +2500,5 @@
 !Array class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.138 2005-07-08 17:15:00 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.139 2005-07-08 21:13:38 cg Exp $'
 ! !