equal
deleted
inserted
replaced
19 |
19 |
20 ByteArray comment:' |
20 ByteArray comment:' |
21 COPYRIGHT (c) 1989 by Claus Gittinger |
21 COPYRIGHT (c) 1989 by Claus Gittinger |
22 All Rights Reserved |
22 All Rights Reserved |
23 |
23 |
24 $Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.32 1995-08-16 12:48:06 claus Exp $ |
24 $Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.33 1995-09-07 11:57:52 claus Exp $ |
25 '! |
25 '! |
26 |
26 |
27 !ByteArray class methodsFor:'documentation'! |
27 !ByteArray class methodsFor:'documentation'! |
28 |
28 |
29 copyright |
29 copyright |
40 " |
40 " |
41 ! |
41 ! |
42 |
42 |
43 version |
43 version |
44 " |
44 " |
45 $Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.32 1995-08-16 12:48:06 claus Exp $ |
45 $Header: /cvs/stx/stx/libbasic/ByteArray.st,v 1.33 1995-09-07 11:57:52 claus Exp $ |
46 " |
46 " |
47 ! |
47 ! |
48 |
48 |
49 documentation |
49 documentation |
50 " |
50 " |
1506 dstp += nInst; |
1506 dstp += nInst; |
1507 len -= nInst; |
1507 len -= nInst; |
1508 } |
1508 } |
1509 |
1509 |
1510 value = _intVal(aNumber); |
1510 value = _intVal(aNumber); |
1511 if ((value >= 0) && (value <= 255) |
1511 if (((value & ~0xFF) == 0) /* i.e. (value >= 0) && (value <= 255) */ |
1512 && (index1 <= index2) |
1512 && (index1 <= index2) |
1513 && (index1 > 0)) { |
1513 && (index1 > 0)) { |
1514 if (index2 <= len) { |
1514 if (index2 <= len) { |
1515 count = index2 - index1 + 1; |
1515 count = index2 - index1 + 1; |
1516 #ifdef FAST_MEMSET |
1516 #ifdef FAST_MEMSET |
1517 memset(dstp, count, value); |
1517 memset(dstp, count, value); |
1518 #else |
1518 #else |
|
1519 # ifdef UNROLL_LOOPS |
|
1520 while (count >= 8) { |
|
1521 dstp[0] = dstp[1] = dstp[2] = dstp[3] = |
|
1522 dstp[4] = dstp[5] = dstp[6] = dstp[7] = value; |
|
1523 dstp += 8; |
|
1524 count -= 8; |
|
1525 } |
|
1526 # endif |
1519 while (count--) { |
1527 while (count--) { |
1520 *dstp++ = value; |
1528 *dstp++ = value; |
1521 } |
1529 } |
1522 #endif |
1530 #endif |
1523 RETURN (self); |
1531 RETURN (self); |