--- a/Array.st Fri Feb 03 14:42:53 1995 +0100
+++ b/Array.st Sun Feb 05 22:27:38 1995 +0100
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Array.st,v 1.15 1995-02-03 13:42:53 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Array.st,v 1.16 1995-02-05 21:27:38 claus Exp $
'!
!Array class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Array.st,v 1.15 1995-02-03 13:42:53 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Array.st,v 1.16 1995-02-05 21:27:38 claus Exp $
"
!
@@ -157,7 +157,11 @@
!Array methodsFor:'copying'!
copyWith:something
- "reimplemented for speed if receiver is an Array"
+ "return a new collection containing the receivers elements
+ and the single new element, newElement.
+ This is different from concatentation, which expects another collection
+ as argument, but equivalent to copy-and-addLast.
+ Reimplemented for speed if receiver is an Array"
%{
OBJ nObj, element;
unsigned int sz;
@@ -577,7 +581,7 @@
for (; index < nIndex; index++) {
if (InterruptPending != nil) interruptL(__LINE__ COMMA_CON);
- (*codeVal)(aBlock, CON_COMMA _MKSMALLINT(index),
+ (*codeVal)(aBlock, CON_COMMA _MKSMALLINT(index+1),
_InstPtr(self)->i_instvars[index]);
}
#else
@@ -590,14 +594,14 @@
for (; index < nIndex; index++) {
if (InterruptPending != nil) interruptL(__LINE__ COMMA_CON);
- (*codeVal)(rHome, CON_COMMA _MKSMALLINT(index),
+ (*codeVal)(rHome, CON_COMMA _MKSMALLINT(index+1),
_InstPtr(self)->i_instvars[index]);
}
} else {
for (; index < nIndex; index++) {
if (InterruptPending != nil) interruptL(__LINE__ COMMA_CON);
- (*codeVal)(home, CON_COMMA _MKSMALLINT(index),
+ (*codeVal)(home, CON_COMMA _MKSMALLINT(index+1),
_InstPtr(self)->i_instvars[index]);
}
}
@@ -609,7 +613,7 @@
(*val.ilc_func)(aBlock,
@symbol(value:value:),
CON_COMMA nil, &val2,
- _MKSMALLINT(index),
+ _MKSMALLINT(index+1),
_InstPtr(self)->i_instvars[index]);
}
}