--- a/Array.st Tue May 26 06:34:49 2015 +0200
+++ b/Array.st Wed May 27 06:37:28 2015 +0200
@@ -1543,7 +1543,14 @@
"reimplemented for speed if receiver is an Array"
%{ /* NOCONTEXT */
-
+#ifdef __SCHTEAM__
+ if (bothSmallInteger(index1, index2)) {
+ int _start = index1.intValue();
+ int _stop = index2.intValue();
+ self.from_to_put(_start, _stop, anObject);
+ return context._RETURN(self);
+ }
+#else
REGISTER INT index;
unsigned INT nIndex;
unsigned INT endIndex;
@@ -1558,20 +1565,20 @@
if ((endIndex >= index) && (endIndex < nIndex)) {
dst = &(__InstPtr(self)->i_instvars[index]);
-#ifdef memset4
+# ifdef memset4
{
int n4 = endIndex-index+1;
memset4(dst, anObject, n4);
}
-#else
-# ifdef FAST_MEMSET
+# else
+# ifdef FAST_MEMSET
if ((INT)anObject == 0) {
memset(dst, 0, __OBJS2BYTES__(endIndex-index+1));
} else
-# endif
+# endif
{
-# ifdef __UNROLL_LOOPS__
+# ifdef __UNROLL_LOOPS__
{
INT i8;
@@ -1582,17 +1589,18 @@
index = i8;
}
}
-# endif
+# endif
for (; index <= endIndex; index++) {
*dst++ = anObject;
}
}
-#endif
+# endif
__STORE(self, anObject);
RETURN ( self );
}
}
}
+#endif
%}.
^ super from:index1 to:index2 put:anObject
!
@@ -1889,10 +1897,10 @@
receiver refers to aLiteral (i.e. a deep search)"
self do:[:el |
- el == aLiteral ifTrue:[^true].
- (el class == Array or:[el class == ImmutableArray]) ifTrue:[
- (el refersToLiteral: aLiteral) ifTrue: [^true]
- ]
+ el == aLiteral ifTrue:[^true].
+ (el class == Array or:[el class == ImmutableArray]) ifTrue:[
+ (el refersToLiteral: aLiteral) ifTrue: [^true]
+ ]
].
^ false
@@ -1910,10 +1918,10 @@
receiver is symbolic and matches aMatchPattern (i.e. a deep search)"
self do:[ :el |
- (el isSymbol and:[ aMatchPattern match: el]) ifTrue:[^true].
- (el class == Array or:[el class == ImmutableArray]) ifTrue:[
- (el refersToLiteralMatching: aMatchPattern) ifTrue: [^true]
- ]
+ (el isSymbol and:[ aMatchPattern match: el]) ifTrue:[^true].
+ (el class == Array or:[el class == ImmutableArray]) ifTrue:[
+ (el refersToLiteralMatching: aMatchPattern) ifTrue: [^true]
+ ]
].
^ false
@@ -2686,10 +2694,9 @@
!Array class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.171 2015-05-08 10:29:19 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.172 2015-05-26 18:55:30 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.171 2015-05-08 10:29:19 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.172 2015-05-26 18:55:30 cg Exp $'
! !
-