Array.st
changeset 18288 1232fc152674
parent 18267 3bc0c58cb8e9
child 18289 9d906f0b71eb
--- a/Array.st	Sun Apr 26 13:22:42 2015 +0200
+++ b/Array.st	Sun Apr 26 13:23:27 2015 +0200
@@ -313,7 +313,11 @@
      This method is the same as basicAt:."
 
 %{  /* NOCONTEXT */
-
+#ifdef __SCHTEAM__
+    if (index.isSmallInteger()) {
+	return context._RETURN( self.basicAt(index.intValue() ));
+    }
+#else
     REGISTER INT indx;
     REGISTER OBJ slf;
     REGISTER unsigned INT nIndex;
@@ -333,6 +337,7 @@
 	}
     }
 badIndex: ;
+#endif /* not SCHTEAM */
 %}.
 "/    ^ super at:index
     ^ super basicAt:index   "/ knowing that super-#at: does #basicAt:
@@ -347,6 +352,12 @@
      This method is the same as basicAt:put:."
 
 %{  /* NOCONTEXT */
+#ifdef __SCHTEAM__
+    if (index.isSmallInteger()) {
+	self.basicAt_put(index.intValue(), anObject);
+	return context._RETURN( anObject );
+    }
+#else
 
     REGISTER INT indx;
     REGISTER OBJ slf;
@@ -381,6 +392,11 @@
      - added here for speed"
 
 %{  /* NOCONTEXT */
+#ifdef __SCHTEAM__
+    if (index.isSmallInteger()) {
+	return context._RETURN( self.basicAt(index.intValue() ));
+    }
+#else
 
     REGISTER INT indx;
     REGISTER OBJ slf;
@@ -401,6 +417,7 @@
 	}
     }
 badIndex: ;
+#endif /* not SCHTEAM */
 %}.
     ^ super basicAt:index
 !
@@ -411,7 +428,12 @@
      - added here for speed"
 
 %{  /* NOCONTEXT */
-
+#ifdef __SCHTEAM__
+    if (index.isSmallInteger()) {
+	self.basicAt_put(index.intValue(), anObject);
+	return context._RETURN( anObject );
+    }
+#else
     REGISTER INT indx;
     REGISTER OBJ slf;
     REGISTER unsigned INT nIndex;
@@ -433,6 +455,7 @@
 	}
     }
 badIndex: ;
+#endif /* not SCHTEAM */
 %}.
     ^ super basicAt:index put:anObject
 
@@ -2642,10 +2665,10 @@
 !Array class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.167 2015-04-22 17:27:19 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.168 2015-04-26 11:23:27 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.167 2015-04-22 17:27:19 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.168 2015-04-26 11:23:27 cg Exp $'
 ! !