# HG changeset patch
# User Jan Vrany <jan.vrany@fit.cvut.cz>
# Date 1523608628 -3600
# Fri Apr 13 09:37:08 2018 +0100
# Branch jv
# Node ID 574962856f042b0a8dce930e144727927ecf1976
# Parent cd0581d5639bd0608c7e6aae7aa486ce6bd82dd4
Issue #200: fixed `#basicAt:` / `#basicAt:put:` to work with objects bigger than 2GB
Some methods or their part used only 32bit `int` as an index to an object. If object
was larger than 2GB, 32bit index suddenly become negative, causing `#basicAt:put:`
writing outside the object itself.
To fix that we have to use `INT` (`intptr_t`). However, there can be other cases
like this both n the smalltalk code and in the VM. We may use GCC's
`-Wconversion` to catch this, see issue #204.
https://swing.fit.cvut.cz/projects/stx-jv/ticket/200
diff -r cd0581d5639b -r 574962856f04 Behavior.st
a
|
b
|
|
4535 | 4535 | %{ |
4536 | 4536 | INT nBytes = __intVal(nInstvars) * sizeof(OBJ) + OHDR_SIZE; |
4537 | 4537 | if (__isSmallInteger(n)) { |
4538 | | int nIndex; |
| 4538 | unsigned INT nIndex; |
4539 | 4539 | |
4540 | 4540 | nIndex = __intVal(n); |
4541 | 4541 | switch (__intVal(__INST(flags)) & ARRAYMASK) { |
diff -r cd0581d5639b -r 574962856f04 ByteArray.st
a
|
b
|
|
232 | 232 | |
233 | 233 | %{ /* NOCONTEXT */ |
234 | 234 | |
235 | | REGISTER int indx; |
| 235 | REGISTER INT indx; |
236 | 236 | REGISTER OBJ slf; |
237 | 237 | REGISTER OBJ cls; |
238 | | REGISTER int nIndex; |
| 238 | REGISTER INT nIndex; |
239 | 239 | |
240 | 240 | if (__isSmallInteger(index)) { |
241 | 241 | indx = __intVal(index) - 1; |
… |
… |
|
249 | 249 | indx += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars)); |
250 | 250 | } |
251 | 251 | nIndex = __byteArraySize(slf); |
252 | | if ((unsigned)indx < (unsigned)nIndex) { |
| 252 | if ((unsigned INT)indx < (unsigned INT)nIndex) { |
253 | 253 | RETURN ( __mkSmallInteger((__ByteArrayInstPtr(slf)->ba_element[indx])) ); |
254 | 254 | } |
255 | 255 | } |
… |
… |
|
266 | 266 | |
267 | 267 | %{ /* NOCONTEXT */ |
268 | 268 | |
269 | | REGISTER int indx; |
270 | | int nIndex; |
| 269 | REGISTER INT indx; |
| 270 | unsigned INT nIndex; |
271 | 271 | int val; |
272 | 272 | REGISTER OBJ slf; |
273 | 273 | REGISTER OBJ cls; |
… |
… |
|
286 | 286 | indx += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars)); |
287 | 287 | } |
288 | 288 | nIndex = __byteArraySize(slf); |
289 | | if ((unsigned)indx < (unsigned)nIndex) { |
| 289 | if ((unsigned INT)indx < (unsigned INT)nIndex) { |
290 | 290 | __ByteArrayInstPtr(slf)->ba_element[indx] = val; |
291 | 291 | RETURN ( value ); |
292 | 292 | } |
… |
… |
|
306 | 306 | |
307 | 307 | %{ /* NOCONTEXT */ |
308 | 308 | |
309 | | REGISTER int indx; |
| 309 | REGISTER INT indx; |
310 | 310 | REGISTER int byte; |
311 | | int nIndex; |
| 311 | unsigned INT nIndex; |
312 | 312 | REGISTER OBJ slf; |
313 | 313 | REGISTER OBJ cls; |
314 | 314 | |
… |
… |
|
324 | 324 | byte += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars)); |
325 | 325 | } |
326 | 326 | nIndex = __byteArraySize(slf); |
327 | | if ((unsigned)byte < (unsigned)nIndex) { |
| 327 | if ((unsigned)byte < (unsigned INT)nIndex) { |
328 | 328 | RETURN ( __mkSmallInteger(((__ByteArrayInstPtr(slf)->ba_element[byte] & (1 << indx)) != 0)) ); |
329 | 329 | } |
330 | 330 | } |
… |
… |
|
349 | 349 | |
350 | 350 | %{ /* NOCONTEXT */ |
351 | 351 | |
352 | | REGISTER int indx; |
| 352 | REGISTER INT indx; |
353 | 353 | REGISTER int byte; |
354 | | int nIndex; |
| 354 | unsigned INT nIndex; |
355 | 355 | REGISTER OBJ slf; |
356 | 356 | REGISTER OBJ cls; |
357 | 357 | |
… |
… |
|
367 | 367 | byte += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars)); |
368 | 368 | } |
369 | 369 | nIndex = __byteArraySize(slf); |
370 | | if ((unsigned)byte < (unsigned)nIndex) { |
| 370 | if ((unsigned)byte < (unsigned INT)nIndex) { |
371 | 371 | __ByteArrayInstPtr(slf)->ba_element[byte] &= ~(1 << indx); |
372 | 372 | RETURN (slf); |
373 | 373 | } |
… |
… |
|
414 | 414 | if (indx >= 0) { |
415 | 415 | int byteIndex; |
416 | 416 | int bitIndex; |
417 | | int nIndex; |
| 417 | unsigned INT nIndex; |
418 | 418 | |
419 | 419 | byteIndex = indx / 8; |
420 | 420 | bitIndex = indx % 8; |
421 | 421 | |
422 | 422 | nIndex = __byteArraySize(self); |
423 | | if ((unsigned)byteIndex < (unsigned)nIndex) { |
| 423 | if ((unsigned)byteIndex < (unsigned INT)nIndex) { |
424 | 424 | __ByteArrayInstPtr(self)->ba_element[byteIndex] |= (1 << bitIndex); |
425 | 425 | RETURN (self); |
426 | 426 | } |
… |
… |
|
462 | 462 | |
463 | 463 | %{ /* NOCONTEXT */ |
464 | 464 | |
465 | | REGISTER int indx; |
466 | | int nIndex; |
| 465 | REGISTER INT indx; |
| 466 | unsigned INT nIndex; |
467 | 467 | REGISTER OBJ slf; |
468 | 468 | REGISTER OBJ cls; |
469 | 469 | |
… |
… |
|
475 | 475 | indx += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars)); |
476 | 476 | } |
477 | 477 | nIndex = __byteArraySize(slf); |
478 | | if ((unsigned)indx < (unsigned)nIndex) { |
| 478 | if ((unsigned INT)indx < (unsigned INT)nIndex) { |
479 | 479 | RETURN ( __mkSmallInteger((__ByteArrayInstPtr(slf)->ba_element[indx])) ); |
480 | 480 | } |
481 | 481 | } |
… |
… |
|
490 | 490 | |
491 | 491 | %{ /* NOCONTEXT */ |
492 | 492 | |
493 | | REGISTER int indx; |
494 | | int nIndex; |
| 493 | REGISTER INT indx; |
| 494 | unsigned INT nIndex; |
495 | 495 | int val; |
496 | 496 | REGISTER OBJ slf; |
497 | 497 | REGISTER OBJ cls; |
… |
… |
|
507 | 507 | indx += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars)); |
508 | 508 | } |
509 | 509 | nIndex = __byteArraySize(slf); |
510 | | if ((unsigned)indx < (unsigned)nIndex) { |
| 510 | if ((unsigned INT)indx < (unsigned INT)nIndex) { |
511 | 511 | __ByteArrayInstPtr(slf)->ba_element[indx] = val; |
512 | 512 | RETURN ( value ); |
513 | 513 | } |
… |
… |
|
532 | 532 | %{ /* NOCONTEXT */ |
533 | 533 | |
534 | 534 | REGISTER INT indx; |
535 | | int nIndex; |
| 535 | unsigned INT nIndex; |
536 | 536 | union { |
537 | 537 | unsigned char u_char[4]; |
538 | 538 | unsigned int u_uint; |
… |
… |
|
596 | 596 | %{ /* NOCONTEXT */ |
597 | 597 | |
598 | 598 | REGISTER INT indx; |
599 | | int nIndex; |
| 599 | unsigned INT nIndex; |
600 | 600 | int val; |
601 | 601 | OBJ cls; |
602 | 602 | unsigned char *byteP; |
… |
… |
|
688 | 688 | %{ /* NOCONTEXT */ |
689 | 689 | |
690 | 690 | REGISTER INT indx; |
691 | | int nIndex; |
| 691 | unsigned INT nIndex; |
692 | 692 | union { |
693 | 693 | unsigned char u_char[2]; |
694 | 694 | unsigned short u_ushort; |
… |
… |
|
728 | 728 | |
729 | 729 | %{ /* NOCONTEXT */ |
730 | 730 | REGISTER INT indx; |
731 | | int nIndex; |
| 731 | unsigned INT nIndex; |
732 | 732 | int val; |
733 | 733 | unsigned char *byteP; |
734 | 734 | |
… |
… |
|
805 | 805 | %{ /* NOCONTEXT */ |
806 | 806 | |
807 | 807 | REGISTER INT indx; |
808 | | int nIndex; |
| 808 | unsigned INT nIndex; |
809 | 809 | int v; |
810 | 810 | union { |
811 | 811 | unsigned char u_char[2]; |
… |
… |
|
874 | 874 | %{ /* NOCONTEXT */ |
875 | 875 | |
876 | 876 | REGISTER INT indx; |
877 | | int nIndex; |
| 877 | unsigned INT nIndex; |
878 | 878 | int val; |
879 | 879 | OBJ cls; |
880 | 880 | unsigned char *byteP; |
diff -r cd0581d5639b -r 574962856f04 ExternalBytes.st
a
|
b
|
|
799 | 799 | %{ /* NOCONTEXT */ |
800 | 800 | |
801 | 801 | unsigned char *cp = (unsigned char *)(__INST(address_)); |
802 | | int idx; |
| 802 | INT indx; |
803 | 803 | OBJ sz; |
804 | 804 | |
805 | 805 | if (cp && __isSmallInteger(index)) { |
806 | | idx = __intVal(index); |
807 | | if (idx > 0) { |
| 806 | indx = __intVal(index); |
| 807 | if (indx > 0) { |
808 | 808 | if (((sz = __INST(size)) == nil) |
809 | | || (__intVal(sz) >= idx)) { |
810 | | cp = cp + idx - 1; |
| 809 | || (__intVal(sz) >= indx)) { |
| 810 | cp = cp + indx - 1; |
811 | 811 | RETURN ( __mkSmallInteger((*cp)) ); |
812 | 812 | } |
813 | 813 | } |
… |
… |
|
832 | 832 | |
833 | 833 | unsigned char *cp = (unsigned char *)(__INST(address_)); |
834 | 834 | int val; |
835 | | int idx; |
| 835 | INT indx; |
836 | 836 | OBJ sz; |
837 | 837 | |
838 | 838 | if (__isSmallInteger(value)) { |
… |
… |
|
843 | 843 | goto badArg; |
844 | 844 | |
845 | 845 | if (cp && __isSmallInteger(index)) { |
846 | | idx = __intVal(index); |
847 | | if (idx > 0) { |
| 846 | indx = __intVal(index); |
| 847 | if (indx > 0) { |
848 | 848 | if (((sz = __INST(size)) == nil) |
849 | | || (__intVal(sz) >= idx)) { |
| 849 | || (__intVal(sz) >= indx)) { |
850 | 850 | if ((val & ~0xFF) == 0) /* i.e. (val >= 0) && (val <= 255) */ { |
851 | | cp[idx-1] = val; |
| 851 | cp[indx-1] = val; |
852 | 852 | RETURN ( value ); |
853 | 853 | } |
854 | 854 | } |
… |
… |
|
967 | 967 | |
968 | 968 | %{ /* NOCONTEXT */ |
969 | 969 | |
970 | | int nIndex, repNIndex; |
| 970 | unsigned INT nIndex, repNIndex; |
971 | 971 | int startIndex, stopIndex; |
972 | 972 | REGISTER unsigned char *src; |
973 | 973 | REGISTER int repStartIndex; |
diff -r cd0581d5639b -r 574962856f04 Float.st
a
|
b
|
|
2173 | 2173 | |
2174 | 2174 | %{ /* NOCONTEXT */ |
2175 | 2175 | |
2176 | | register int indx; |
| 2176 | REGISTER INT indx; |
2177 | 2177 | unsigned char *cp; |
2178 | 2178 | |
2179 | 2179 | /* |
… |
… |
|
2183 | 2183 | */ |
2184 | 2184 | if (__isSmallInteger(index)) { |
2185 | 2185 | indx = __intVal(index) - 1; |
2186 | | if (((unsigned)(indx)) < sizeof(double)) { |
| 2186 | if (((unsigned INT)(indx)) < sizeof(double)) { |
2187 | 2187 | cp = (unsigned char *)(& (__FloatInstPtr(self)->f_floatvalue)); |
2188 | 2188 | RETURN ( __mkSmallInteger(cp[indx] & 0xFF) ); |
2189 | 2189 | } |
… |
… |
|
2206 | 2206 | values as if this filler wasnt present." |
2207 | 2207 | |
2208 | 2208 | %{ /* NOCONTEXT */ |
2209 | | register int indx, val; |
| 2209 | REGISTER INT indx, val; |
2210 | 2210 | unsigned char *cp; |
2211 | 2211 | |
2212 | 2212 | /* |
… |
… |
|
2218 | 2218 | val = __intVal(value); |
2219 | 2219 | if ((val & ~0xFF) == 0 /* i.e. (val >= 0) && (val <= 255) */) { |
2220 | 2220 | indx = __intVal(index) - 1; |
2221 | | if (((unsigned)(indx)) < sizeof(double)) { |
| 2221 | if (((unsigned INT)(indx)) < sizeof(double)) { |
2222 | 2222 | cp = (unsigned char *)(& (__FloatInstPtr(self)->f_floatvalue)); |
2223 | 2223 | cp[indx] = val; |
2224 | 2224 | RETURN ( value ); |
diff -r cd0581d5639b -r 574962856f04 LongFloat.st
a
|
b
|
|
1789 | 1789 | |
1790 | 1790 | %{ /* NOCONTEXT */ |
1791 | 1791 | |
1792 | | register int indx; |
| 1792 | REGISTER INT indx; |
1793 | 1793 | unsigned char *cp; |
1794 | 1794 | |
1795 | 1795 | /* |
… |
… |
|
1799 | 1799 | */ |
1800 | 1800 | if (__isSmallInteger(index)) { |
1801 | 1801 | indx = __intVal(index) - 1; |
1802 | | if (((unsigned)(indx)) < sizeof(LONGFLOAT)) { |
| 1802 | if (((unsigned INT)(indx)) < sizeof(LONGFLOAT)) { |
1803 | 1803 | cp = (unsigned char *)(& (__LongFloatInstPtr(self)->f_longfloatvalue)); |
1804 | 1804 | RETURN ( __mkSmallInteger(cp[indx] & 0xFF) ); |
1805 | 1805 | } |
… |
… |
|
1822 | 1822 | values as if this filler wasnt present." |
1823 | 1823 | |
1824 | 1824 | %{ /* NOCONTEXT */ |
1825 | | register int indx, val; |
| 1825 | REGISTER INT indx, val; |
1826 | 1826 | unsigned char *cp; |
1827 | 1827 | |
1828 | 1828 | /* |
… |
… |
|
1834 | 1834 | val = __intVal(value); |
1835 | 1835 | if ((val & ~0xFF) == 0 /* i.e. (val >= 0) && (val <= 255) */) { |
1836 | 1836 | indx = __intVal(index) - 1; |
1837 | | if (((unsigned)(indx)) < sizeof(LONGFLOAT)) { |
| 1837 | if (((unsigned INT)(indx)) < sizeof(LONGFLOAT)) { |
1838 | 1838 | cp = (unsigned char *)(& (__LongFloatInstPtr(self)->f_longfloatvalue)); |
1839 | 1839 | cp[indx] = val; |
1840 | 1840 | RETURN ( value ); |
diff -r cd0581d5639b -r 574962856f04 Object.st
a
|
b
|
|
749 | 749 | } |
750 | 750 | /* NOTREACHED */ |
751 | 751 | #else |
752 | | REGISTER int nbytes, indx; |
| 752 | REGISTER INT indx; |
| 753 | REGISTER INT nBytes; |
753 | 754 | OBJ myClass; |
754 | 755 | REGISTER char *pFirst; |
755 | 756 | REGISTER int n; |
… |
… |
|
764 | 765 | indx = __intVal(index) - 1; |
765 | 766 | n /* nInstVars */ = __intVal(__ClassInstPtr(myClass)->c_ninstvars); |
766 | 767 | n /* nInstBytes */ = OHDR_SIZE + __OBJS2BYTES__(n /* nInstVars */); |
767 | | nbytes = __qSize(self) - n /* nInstBytes */; |
| 768 | nBytes = __qSize(self) - n /* nInstBytes */; |
768 | 769 | pFirst = (char *)(__InstPtr(self)) + n /* nInstBytes */; |
769 | 770 | |
770 | 771 | switch ((INT)(__ClassInstPtr(myClass)->c_flags) & __MASKSMALLINT(ARRAYMASK)) { |
… |
… |
|
772 | 773 | /* |
773 | 774 | * pointers |
774 | 775 | */ |
775 | | if ((unsigned)indx < (__BYTES2OBJS__(nbytes))) { |
| 776 | if ((unsigned INT)indx < (unsigned INT)(__BYTES2OBJS__(nBytes))) { |
776 | 777 | OBJ *op; |
777 | 778 | |
778 | 779 | op = (OBJ *)pFirst + indx; |
… |
… |
|
781 | 782 | break; |
782 | 783 | |
783 | 784 | case __MASKSMALLINT(WKPOINTERARRAY): |
784 | | if ((unsigned)indx < (__BYTES2OBJS__(nbytes))) { |
| 785 | if ((unsigned INT)indx < (unsigned INT)(__BYTES2OBJS__(nBytes))) { |
785 | 786 | OBJ *op; |
786 | 787 | OBJ el; |
787 | 788 | |
… |
… |
|
796 | 797 | /* |
797 | 798 | * (unsigned) bytes |
798 | 799 | */ |
799 | | if ((unsigned)indx < nbytes) { |
| 800 | if ((unsigned INT)indx < (unsigned INT)nBytes) { |
800 | 801 | unsigned char *cp; |
801 | 802 | |
802 | 803 | cp = (unsigned char *)pFirst + indx; |
… |
… |
|
813 | 814 | int delta = __FLOATARRAY_ALIGN - ((INT)pFirst & (__FLOATARRAY_ALIGN-1)); |
814 | 815 | |
815 | 816 | pFirst += delta; |
816 | | nbytes -= delta; |
| 817 | nBytes -= delta; |
817 | 818 | } |
818 | 819 | # endif |
819 | | if ((unsigned)indx < (nbytes / sizeof(float))) { |
| 820 | if ((unsigned INT)indx < (unsigned INT)(nBytes / sizeof(float))) { |
820 | 821 | float *fp; |
821 | 822 | float f; |
822 | 823 | OBJ v; |
… |
… |
|
841 | 842 | int delta = __DOUBLE_ALIGN - ((INT)pFirst & (__DOUBLE_ALIGN-1)); |
842 | 843 | |
843 | 844 | pFirst += delta; |
844 | | nbytes -= delta; |
| 845 | nBytes -= delta; |
845 | 846 | } |
846 | 847 | # endif |
847 | | if ((unsigned)indx < (nbytes / sizeof(double))) { |
| 848 | if ((unsigned INT)indx < (unsigned INT)(nBytes / sizeof(double))) { |
848 | 849 | double *dp; |
849 | 850 | double d; |
850 | 851 | OBJ v; |
… |
… |
|
867 | 868 | /* Notice: the hard coded shifts are by purpose; |
868 | 869 | * it makes us independent of the short-size of the machine |
869 | 870 | */ |
870 | | if ((unsigned)indx < (nbytes>>1)) { |
| 871 | if ((unsigned INT)indx < (unsigned INT)(nBytes>>1)) { |
871 | 872 | unsigned short *sp; |
872 | 873 | |
873 | 874 | sp = (unsigned short *)(pFirst + (indx<<1)); |
… |
… |
|
882 | 883 | /* Notice: the hard coded shifts are by purpose; |
883 | 884 | * it makes us independent of the short-size of the machine |
884 | 885 | */ |
885 | | if ((unsigned)indx < (nbytes>>1)) { |
| 886 | if ((unsigned INT)indx < (unsigned INT)(nBytes>>1)) { |
886 | 887 | short *ssp; |
887 | 888 | |
888 | 889 | ssp = (short *)(pFirst + (indx<<1)); |
… |
… |
|
897 | 898 | /* Notice: the hard coded shifts are by purpose; |
898 | 899 | * it makes us independent of the int-size of the machine |
899 | 900 | */ |
900 | | if ((unsigned)indx < (nbytes>>2)) { |
| 901 | if ((unsigned INT)indx < (unsigned INT)(nBytes>>2)) { |
901 | 902 | unsigned int32 ul; |
902 | 903 | unsigned int32 *lp; |
903 | 904 | |
… |
… |
|
924 | 925 | /* Notice: the hard coded shifts are by purpose; |
925 | 926 | * it makes us independent of the int-size of the machine |
926 | 927 | */ |
927 | | if ((unsigned)indx < (nbytes>>2)) { |
| 928 | if ((unsigned INT)indx < (unsigned INT)(nBytes>>2)) { |
928 | 929 | int32 *slp; |
929 | 930 | int32 l; |
930 | 931 | |
… |
… |
|
953 | 954 | int delta = __LONGLONG_ALIGN - ((INT)pFirst & (__LONGLONG_ALIGN-1)); |
954 | 955 | |
955 | 956 | pFirst += delta; |
956 | | nbytes -= delta; |
| 957 | nBytes -= delta; |
957 | 958 | } |
958 | 959 | # endif |
959 | 960 | /* Notice: the hard coded shifts are by purpose; |
960 | 961 | * it makes us independent of the long/longlong-size of the machine |
961 | 962 | */ |
962 | | if ((unsigned)indx < (nbytes>>3)) { |
| 963 | if ((unsigned INT)indx < (unsigned INT)(nBytes>>3)) { |
963 | 964 | # if __POINTER_SIZE__ == 8 |
964 | 965 | INT *slp, ll; |
965 | 966 | |
… |
… |
|
987 | 988 | int delta = __LONGLONG_ALIGN - ((INT)pFirst & (__LONGLONG_ALIGN-1)); |
988 | 989 | |
989 | 990 | pFirst += delta; |
990 | | nbytes -= delta; |
| 991 | nBytes -= delta; |
991 | 992 | } |
992 | 993 | # endif |
993 | 994 | /* Notice: the hard coded shifts are by purpose; |
994 | 995 | * it makes us independent of the long/longlong-size of the machine |
995 | 996 | */ |
996 | | if ((unsigned)indx < (nbytes>>3)) { |
| 997 | if ((unsigned INT)indx < (unsigned INT)(nBytes>>3)) { |
997 | 998 | # if __POINTER_SIZE__ == 8 |
998 | 999 | unsigned INT *ulp, ul; |
999 | 1000 | |
… |
… |
|
1035 | 1036 | } |
1036 | 1037 | /* NOTREACHED */ |
1037 | 1038 | #else |
1038 | | register int nbytes, indx; |
| 1039 | REGISTER INT indx; |
| 1040 | REGISTER INT nBytes; |
1039 | 1041 | OBJ myClass; |
1040 | | register char *pFirst; |
| 1042 | REGISTER char *pFirst; |
1041 | 1043 | /* int nInstBytes, ninstvars, flags; */ |
1042 | 1044 | REGISTER int n; |
1043 | 1045 | unsigned int u; |
… |
… |
|
1052 | 1054 | myClass = __qClass(self); |
1053 | 1055 | n /* ninstvars */ = __intVal(__ClassInstPtr(myClass)->c_ninstvars); |
1054 | 1056 | n /* nInstBytes */ = OHDR_SIZE + __OBJS2BYTES__(n /* ninstvars */); |
1055 | | nbytes = __qSize(self) - n /* nInstBytes */; |
| 1057 | nBytes = __qSize(self) - n /* nInstBytes */; |
1056 | 1058 | pFirst = (char *)(__InstPtr(self)) + n /* nInstBytes */; |
1057 | 1059 | |
1058 | 1060 | switch ((INT)(__ClassInstPtr(myClass)->c_flags) & __MASKSMALLINT(ARRAYMASK)) { |
1059 | 1061 | case __MASKSMALLINT(POINTERARRAY): |
1060 | | if ((unsigned)indx < (__BYTES2OBJS__(nbytes))) { |
| 1062 | if ((unsigned INT)indx < (unsigned INT)(__BYTES2OBJS__(nBytes))) { |
1061 | 1063 | OBJ *op; |
1062 | 1064 | |
1063 | 1065 | op = (OBJ *)pFirst + indx; |
… |
… |
|
1068 | 1070 | break; |
1069 | 1071 | |
1070 | 1072 | case __MASKSMALLINT(WKPOINTERARRAY): |
1071 | | if ((unsigned)indx < (__BYTES2OBJS__(nbytes))) { |
| 1073 | if ((unsigned INT)indx < (unsigned INT)(__BYTES2OBJS__(nBytes))) { |
1072 | 1074 | OBJ *op; |
1073 | 1075 | |
1074 | 1076 | op = (OBJ *)pFirst + indx; |
… |
… |
|
1083 | 1085 | if (__isSmallInteger(anObject)) { |
1084 | 1086 | val = __intVal(anObject); |
1085 | 1087 | if ((val & ~0xFF) == 0 /* i.e. (val >= 0) && (val <= 255) */) { |
1086 | | if ((unsigned)indx < nbytes) { |
| 1088 | if ((unsigned INT)indx < (unsigned INT)nBytes) { |
1087 | 1089 | char *cp; |
1088 | 1090 | |
1089 | 1091 | cp = pFirst + indx; |
… |
… |
|
1100 | 1102 | int delta = __FLOATARRAY_ALIGN - ((INT)pFirst & (__FLOATARRAY_ALIGN-1)); |
1101 | 1103 | |
1102 | 1104 | pFirst += delta; |
1103 | | nbytes -= delta; |
| 1105 | nBytes -= delta; |
1104 | 1106 | } |
1105 | 1107 | # endif |
1106 | | if ((unsigned)indx < (nbytes / sizeof(float))) { |
| 1108 | if ((unsigned INT)indx < (unsigned INT)(nBytes / sizeof(float))) { |
1107 | 1109 | float *fp; |
1108 | 1110 | |
1109 | 1111 | fp = (float *)pFirst + indx; |
… |
… |
|
1131 | 1133 | int delta = __DOUBLE_ALIGN - ((INT)pFirst & (__DOUBLE_ALIGN-1)); |
1132 | 1134 | |
1133 | 1135 | pFirst += delta; |
1134 | | nbytes -= delta; |
| 1136 | nBytes -= delta; |
1135 | 1137 | } |
1136 | 1138 | # endif |
1137 | | if ((unsigned)indx < (nbytes / sizeof(double))) { |
| 1139 | if ((unsigned INT)indx < (unsigned INT)(nBytes / sizeof(double))) { |
1138 | 1140 | double *dp; |
1139 | 1141 | |
1140 | 1142 | dp = (double *)pFirst + indx; |
… |
… |
|
1160 | 1162 | if (__isSmallInteger(anObject)) { |
1161 | 1163 | val = __intVal(anObject); |
1162 | 1164 | if ((unsigned)val <= 0xFFFF) { |
1163 | | if ((unsigned)indx < (nbytes>>1)) { |
| 1165 | if ((unsigned INT)indx < (unsigned INT)(nBytes>>1)) { |
1164 | 1166 | unsigned short *sp; |
1165 | 1167 | |
1166 | 1168 | sp = (unsigned short *)(pFirst + (indx<<1)); |
… |
… |
|
1175 | 1177 | if (__isSmallInteger(anObject)) { |
1176 | 1178 | val = __intVal(anObject); |
1177 | 1179 | if ((val >= -32768) && (val < 32768)) { |
1178 | | if ((unsigned)indx < (nbytes>>1)) { |
| 1180 | if ((unsigned INT)indx < (unsigned INT)(nBytes>>1)) { |
1179 | 1181 | short *ssp; |
1180 | 1182 | |
1181 | 1183 | ssp = (short *)(pFirst + (indx<<1)); |
… |
… |
|
1187 | 1189 | break; |
1188 | 1190 | |
1189 | 1191 | case __MASKSMALLINT(SLONGARRAY): |
1190 | | if ((unsigned)indx < (nbytes>>2)) { |
| 1192 | if ((unsigned INT)indx < (unsigned INT)(nBytes>>2)) { |
1191 | 1193 | int32 *slp; |
1192 | 1194 | |
1193 | 1195 | slp = (int32 *)(pFirst + (indx<<2)); |
… |
… |
|
1213 | 1215 | break; |
1214 | 1216 | |
1215 | 1217 | case __MASKSMALLINT(LONGARRAY): |
1216 | | if ((unsigned)indx < (nbytes>>2)) { |
| 1218 | if ((unsigned INT)indx < (unsigned INT)(nBytes>>2)) { |
1217 | 1219 | unsigned int32 *lp; |
1218 | 1220 | |
1219 | 1221 | lp = (unsigned int32 *)(pFirst + (indx<<2)); |
… |
… |
|
1244 | 1246 | int delta = __LONGLONG_ALIGN - ((INT)pFirst & (__LONGLONG_ALIGN-1)); |
1245 | 1247 | |
1246 | 1248 | pFirst += delta; |
1247 | | nbytes -= delta; |
| 1249 | nBytes -= delta; |
1248 | 1250 | } |
1249 | 1251 | # endif |
1250 | | if ((unsigned)indx < (nbytes>>3)) { |
| 1252 | if ((unsigned INT)indx < (unsigned INT)(nBytes>>3)) { |
1251 | 1253 | __int64__ ll; |
1252 | 1254 | __int64__ *sllp; |
1253 | 1255 | |
… |
… |
|
1283 | 1285 | int delta = __LONGLONG_ALIGN - ((INT)pFirst & (__LONGLONG_ALIGN-1)); |
1284 | 1286 | |
1285 | 1287 | pFirst += delta; |
1286 | | nbytes -= delta; |
| 1288 | nBytes -= delta; |
1287 | 1289 | } |
1288 | 1290 | # endif |
1289 | | if ((unsigned)indx < (nbytes>>3)) { |
| 1291 | if ((unsigned INT)indx < (unsigned INT)(nBytes>>3)) { |
1290 | 1292 | __uint64__ ll; |
1291 | 1293 | __uint64__ *llp; |
1292 | 1294 | |
… |
… |
|
1412 | 1414 | case __MASKSMALLINT(SWORDARRAY): |
1413 | 1415 | case __MASKSMALLINT(SLONGARRAY): |
1414 | 1416 | common: |
1415 | | if ((unsigned)indx < (unsigned)nIndex) { |
| 1417 | if ((unsigned INT)indx < (unsigned INT)nIndex) { |
1416 | 1418 | RETURN ( __mkSmallInteger( (INT)(pFirst[indx])) ); |
1417 | 1419 | } |
1418 | 1420 | break; |
… |
… |
|
1446 | 1448 | |
1447 | 1449 | %{ /* NOCONTEXT */ |
1448 | 1450 | |
1449 | | REGISTER int indx; |
| 1451 | REGISTER INT indx; |
1450 | 1452 | int val, nIndex; |
1451 | 1453 | REGISTER OBJ slf; |
1452 | 1454 | REGISTER OBJ cls; |
… |
… |
|
1488 | 1490 | common: |
1489 | 1491 | indx += nInstBytes; |
1490 | 1492 | nIndex = __byteArraySize(slf); |
1491 | | if ((unsigned)indx < (unsigned)nIndex) { |
| 1493 | if ((unsigned INT)indx < (unsigned INT)nIndex) { |
1492 | 1494 | __ByteArrayInstPtr(slf)->ba_element[indx] = val; |
1493 | 1495 | RETURN ( byteValue ); |
1494 | 1496 | } |
… |
… |
|
7942 | 7944 | #ifdef __SCHTEAM__ |
7943 | 7945 | return context._RETURN( STInteger._new( self.basicSize() ) ); |
7944 | 7946 | #else |
7945 | | REGISTER INT nbytes; |
| 7947 | REGISTER INT nBytes; |
7946 | 7948 | REGISTER OBJ myClass; |
7947 | 7949 | int nInstBytes; |
7948 | 7950 | |
… |
… |
|
7952 | 7954 | * and SmallInteger |
7953 | 7955 | */ |
7954 | 7956 | myClass = __qClass(self); |
7955 | | nbytes = __qSize(self); |
| 7957 | nBytes = __qSize(self); |
7956 | 7958 | nInstBytes = OHDR_SIZE + __OBJS2BYTES__( __intVal(__ClassInstPtr(myClass)->c_ninstvars) ); |
7957 | 7959 | |
7958 | 7960 | switch ((INT)(__ClassInstPtr(myClass)->c_flags) & __MASKSMALLINT(ARRAYMASK)) { |
7959 | 7961 | case __MASKSMALLINT(POINTERARRAY): |
7960 | 7962 | case __MASKSMALLINT(WKPOINTERARRAY): |
7961 | | nbytes -= nInstBytes; |
7962 | | RETURN ( __mkSmallInteger(__BYTES2OBJS__(nbytes)) ); |
| 7963 | nBytes -= nInstBytes; |
| 7964 | RETURN ( __mkSmallInteger(__BYTES2OBJS__(nBytes)) ); |
7963 | 7965 | |
7964 | 7966 | case __MASKSMALLINT(BYTEARRAY): |
7965 | | nbytes -= nInstBytes; |
7966 | | RETURN ( __mkSmallInteger(nbytes / sizeof(char)) ); |
| 7967 | nBytes -= nInstBytes; |
| 7968 | RETURN ( __mkSmallInteger(nBytes / sizeof(char)) ); |
7967 | 7969 | |
7968 | 7970 | case __MASKSMALLINT(FLOATARRAY): |
7969 | 7971 | # ifdef __NEED_FLOATARRAY_ALIGN |
7970 | 7972 | nInstBytes = (nInstBytes-1+__FLOATARRAY_ALIGN) &~ (__FLOATARRAY_ALIGN-1); |
7971 | 7973 | # endif |
7972 | | nbytes -= nInstBytes; |
7973 | | RETURN ( __mkSmallInteger(nbytes / sizeof(float)) ); |
| 7974 | nBytes -= nInstBytes; |
| 7975 | RETURN ( __mkSmallInteger(nBytes / sizeof(float)) ); |
7974 | 7976 | |
7975 | 7977 | case __MASKSMALLINT(DOUBLEARRAY): |
7976 | 7978 | # ifdef __NEED_DOUBLE_ALIGN |
7977 | 7979 | nInstBytes = (nInstBytes-1+__DOUBLE_ALIGN) &~ (__DOUBLE_ALIGN-1); |
7978 | 7980 | # endif |
7979 | | nbytes -= nInstBytes; |
7980 | | RETURN ( __mkSmallInteger(nbytes / sizeof(double)) ); |
| 7981 | nBytes -= nInstBytes; |
| 7982 | RETURN ( __mkSmallInteger(nBytes / sizeof(double)) ); |
7981 | 7983 | |
7982 | 7984 | case __MASKSMALLINT(WORDARRAY): |
7983 | 7985 | case __MASKSMALLINT(SWORDARRAY): |
7984 | | nbytes -= nInstBytes; |
7985 | | RETURN ( __mkSmallInteger(nbytes>>1) ); /* notice the hardcoded 2 here - not sizeof(short) */ |
| 7986 | nBytes -= nInstBytes; |
| 7987 | RETURN ( __mkSmallInteger(nBytes>>1) ); /* notice the hardcoded 2 here - not sizeof(short) */ |
7986 | 7988 | |
7987 | 7989 | case __MASKSMALLINT(LONGARRAY): |
7988 | 7990 | case __MASKSMALLINT(SLONGARRAY): |
7989 | | nbytes -= nInstBytes; |
7990 | | RETURN ( __mkSmallInteger(nbytes>>2) ); /* notice the hardcoded 4 here - not sizeof(int) */ |
| 7991 | nBytes -= nInstBytes; |
| 7992 | RETURN ( __mkSmallInteger(nBytes>>2) ); /* notice the hardcoded 4 here - not sizeof(int) */ |
7991 | 7993 | |
7992 | 7994 | case __MASKSMALLINT(LONGLONGARRAY): |
7993 | 7995 | case __MASKSMALLINT(SLONGLONGARRAY): |
7994 | 7996 | # ifdef __NEED_LONGLONG_ALIGN |
7995 | 7997 | nInstBytes = (nInstBytes-1+__LONGLONG_ALIGN) &~ (__LONGLONG_ALIGN-1); |
7996 | 7998 | # endif |
7997 | | nbytes -= nInstBytes; |
7998 | | RETURN ( __mkSmallInteger(nbytes>>3) ); /* notice the hardcoded 8 here - not sizeof(long long) */ |
| 7999 | nBytes -= nInstBytes; |
| 8000 | RETURN ( __mkSmallInteger(nBytes>>3) ); /* notice the hardcoded 8 here - not sizeof(long long) */ |
7999 | 8001 | } |
8000 | 8002 | #endif /* not __SCHTEAM__ */ |
8001 | 8003 | %}. |
diff -r cd0581d5639b -r 574962856f04 ShortFloat.st
a
|
b
|
|
1486 | 1486 | |
1487 | 1487 | %{ /* NOCONTEXT */ |
1488 | 1488 | |
1489 | | register int indx; |
| 1489 | REGISTER INT indx; |
1490 | 1490 | unsigned char *cp; |
1491 | 1491 | |
1492 | 1492 | /* |
… |
… |
|
1496 | 1496 | */ |
1497 | 1497 | if (__isSmallInteger(index)) { |
1498 | 1498 | indx = __intVal(index) - 1; |
1499 | | if (((unsigned)(indx)) < sizeof(float)) { |
| 1499 | if (((unsigned INT)(indx)) < sizeof(float)) { |
1500 | 1500 | cp = (unsigned char *)(& (__ShortFloatInstPtr(self)->f_floatvalue)); |
1501 | 1501 | RETURN ( __mkSmallInteger(cp[indx] & 0xFF) ); |
1502 | 1502 | } |
… |
… |
|
1519 | 1519 | values as if this filler wasnt present." |
1520 | 1520 | |
1521 | 1521 | %{ /* NOCONTEXT */ |
1522 | | register int indx, val; |
| 1522 | REGISTER INT indx, val; |
1523 | 1523 | unsigned char *cp; |
1524 | 1524 | |
1525 | 1525 | /* |
… |
… |
|
1531 | 1531 | val = __intVal(value); |
1532 | 1532 | if ((val & ~0xFF) == 0 /* i.e. (val >= 0) && (val <= 255) */) { |
1533 | 1533 | indx = __intVal(index) - 1; |
1534 | | if (((unsigned)(indx)) < sizeof(float)) { |
| 1534 | if (((unsigned INT)(indx)) < sizeof(float)) { |
1535 | 1535 | cp = (unsigned char *)(& (__ShortFloatInstPtr(self)->f_floatvalue)); |
1536 | 1536 | cp[indx] = val; |
1537 | 1537 | RETURN ( value ); |
diff -r cd0581d5639b -r 574962856f04 SignedByteArray.st
a
|
b
|
|
73 | 73 | |
74 | 74 | %{ /* NOCONTEXT */ |
75 | 75 | |
76 | | REGISTER int indx; |
| 76 | REGISTER INT indx; |
77 | 77 | REGISTER OBJ slf; |
78 | 78 | REGISTER OBJ cls; |
79 | | REGISTER int nIndex; |
| 79 | REGISTER INT nIndex; |
80 | 80 | |
81 | 81 | if (__isSmallInteger(index)) { |
82 | 82 | indx = __intVal(index) - 1; |
… |
… |
|
90 | 90 | indx += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars)); |
91 | 91 | } |
92 | 92 | nIndex = __byteArraySize(slf); |
93 | | if ((unsigned)indx < (unsigned)nIndex) { |
| 93 | if ((unsigned INT)indx < (unsigned INT)nIndex) { |
94 | 94 | int byte = ((signed char *)__ByteArrayInstPtr(slf)->ba_element)[indx]; |
95 | 95 | RETURN ( __mkSmallInteger(byte)); |
96 | 96 | } |
… |
… |
|
111 | 111 | |
112 | 112 | %{ /* NOCONTEXT */ |
113 | 113 | |
114 | | REGISTER int indx; |
115 | | int nIndex; |
| 114 | REGISTER INT indx; |
| 115 | unsigned INT nIndex; |
116 | 116 | int val; |
117 | 117 | REGISTER OBJ slf; |
118 | 118 | REGISTER OBJ cls; |
… |
… |
|
131 | 131 | indx += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars)); |
132 | 132 | } |
133 | 133 | nIndex = __byteArraySize(slf); |
134 | | if ((unsigned)indx < (unsigned)nIndex) { |
| 134 | if ((unsigned INT)indx < (unsigned INT)nIndex) { |
135 | 135 | __ByteArrayInstPtr(slf)->ba_element[indx] = val; |
136 | 136 | RETURN ( value ); |
137 | 137 | } |
diff -r cd0581d5639b -r 574962856f04 String.st
a
|
b
|
|
555 | 555 | return context._RETURN( self.basicAt( idx1Based )); |
556 | 556 | } |
557 | 557 | #else |
558 | | REGISTER int indx; |
| 558 | REGISTER INT indx; |
559 | 559 | REGISTER OBJ slf, cls; |
560 | 560 | |
561 | 561 | if (__isSmallInteger(index)) { |
… |
… |
|
564 | 564 | indx = __intVal(index) - 1; |
565 | 565 | if (cls == String) { |
566 | 566 | fetch: |
567 | | if ((unsigned)indx < (unsigned)(__stringSize(slf))) { |
| 567 | if ((unsigned INT)indx < (unsigned)(__stringSize(slf))) { |
568 | 568 | RETURN ( __MKCHARACTER(__stringVal(slf)[indx] & 0xFF) ); |
569 | 569 | } |
570 | 570 | goto badIndex; |
… |
… |
|
606 | 606 | if (((unsigned)value <= 0xFF) |
607 | 607 | && __isSmallInteger(index)) { |
608 | 608 | indx = __intVal(index) - 1; |
609 | | if ((unsigned)indx < (unsigned)(__stringSize(slf))) { |
| 609 | if ((unsigned INT)indx < (unsigned)(__stringSize(slf))) { |
610 | 610 | __stringVal(slf)[indx] = value; |
611 | 611 | RETURN ( aCharacter ); |
612 | 612 | } |
… |
… |
|
629 | 629 | return context._RETURN( self.basicAt( idx1Based )); |
630 | 630 | } |
631 | 631 | #else |
632 | | REGISTER int indx; |
| 632 | REGISTER INT indx; |
633 | 633 | REGISTER OBJ slf, cls; |
634 | 634 | |
635 | 635 | if (__isSmallInteger(index)) { |
… |
… |
|
640 | 640 | if (indx < 0) goto badIndex; |
641 | 641 | indx += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars)); |
642 | 642 | } |
643 | | if ((unsigned)indx < (unsigned)(__stringSize(slf))) { |
| 643 | if ((unsigned INT)indx < (unsigned)(__stringSize(slf))) { |
644 | 644 | RETURN ( __MKCHARACTER(__stringVal(slf)[indx] & 0xFF) ); |
645 | 645 | } |
646 | 646 | } |
… |
… |
|
686 | 686 | if (indx < 0) goto badIndex; |
687 | 687 | indx += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars)); |
688 | 688 | } |
689 | | if ((unsigned)indx < (unsigned)(__stringSize(slf))) { |
| 689 | if ((unsigned INT)indx < (unsigned)(__stringSize(slf))) { |
690 | 690 | __stringVal(slf)[indx] = value; |
691 | 691 | RETURN ( aCharacter ); |
692 | 692 | } |
… |
… |
|
726 | 726 | |
727 | 727 | %{ /* NOCONTEXT */ |
728 | 728 | |
729 | | REGISTER int indx; |
| 729 | REGISTER INT indx; |
730 | 730 | REGISTER OBJ slf, cls; |
731 | 731 | |
732 | 732 | slf = self; |
… |
… |
|
736 | 736 | if (indx < 0) goto badIndex; |
737 | 737 | indx += __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars)); |
738 | 738 | } |
739 | | if ((unsigned)indx < (unsigned)(__stringSize(slf))) { |
| 739 | if ((unsigned INT)indx < (unsigned)(__stringSize(slf))) { |
740 | 740 | RETURN ( __MKCHARACTER(__stringVal(slf)[indx] & 0xFF) ); |
741 | 741 | } |
742 | 742 | badIndex: ; |
… |
… |
|
2803 | 2803 | */ |
2804 | 2804 | if (__qIsStringLike(self)) { |
2805 | 2805 | char *cp1 = (char *) __stringVal(self); |
2806 | | int l1 = __stringSize(self); |
2807 | | int l2; |
| 2806 | INT l1 = __stringSize(self); |
| 2807 | INT l2; |
2808 | 2808 | char *cp2 = 0; |
2809 | | int sz; |
| 2809 | INT sz; |
2810 | 2810 | OBJ newString; |
2811 | 2811 | char character; |
2812 | 2812 | |
… |
… |
|
2822 | 2822 | } else |
2823 | 2823 | goto out; |
2824 | 2824 | |
| 2825 | /* |
| 2826 | * FIXME: check for overflow!!! |
| 2827 | */ |
2825 | 2828 | sz = OHDR_SIZE + l1 + l2 + 1; |
2826 | 2829 | __qNew(newString, sz); /* OBJECT ALLOCATION */ |
2827 | 2830 | |
… |
… |
|
2844 | 2847 | * by 10% on a P5/200. |
2845 | 2848 | */ |
2846 | 2849 | { |
2847 | | int nw = l1 >> 2; |
| 2850 | INT nw = l1 >> 2; |
2848 | 2851 | |
2849 | 2852 | if (l1 & 3) nw++; |
2850 | 2853 | bcopy4(cp1, dstp, nw); |
… |
… |
|
2864 | 2867 | |
2865 | 2868 | # ifdef bcopy4 |
2866 | 2869 | if (((INT)dstp & 3) == 0) { |
2867 | | int nw = l2 >> 2; |
| 2870 | INT nw = l2 >> 2; |
2868 | 2871 | |
2869 | 2872 | if (l2 & 3) nw++; |
2870 | 2873 | bcopy4(cp2, dstp, nw); |
diff -r cd0581d5639b -r 574962856f04 UninterpretedBytes.st
a
|
b
|
|
4321 | 4321 | |
4322 | 4322 | %{ /* NOCONTEXT */ |
4323 | 4323 | |
4324 | | int nIndex, repNIndex; |
| 4324 | unsigned INT nIndex, repNIndex; |
4325 | 4325 | int startIndex, stopIndex; |
4326 | 4326 | REGISTER unsigned char *src; |
4327 | 4327 | REGISTER int repStartIndex; |
diff -r cd0581d5639b -r 574962856f04 WeakArray.st
a
|
b
|
|
296 | 296 | |
297 | 297 | %{ /* NOCONTEXT */ |
298 | 298 | |
299 | | REGISTER int indx; |
300 | | REGISTER unsigned int nIndex; |
| 299 | REGISTER INT indx; |
| 300 | REGISTER unsigned INT nIndex; |
301 | 301 | OBJ el; |
302 | 302 | |
303 | 303 | if (__isSmallInteger(index)) { |
… |
… |
|
329 | 329 | "store someObject in the weakArray at some index." |
330 | 330 | |
331 | 331 | %{ /* NOCONTEXT */ |
332 | | REGISTER int indx; |
333 | | REGISTER unsigned int nIndex; |
| 332 | REGISTER INT indx; |
| 333 | REGISTER unsigned INT nIndex; |
334 | 334 | |
335 | 335 | if (__isSmallInteger(index)) { |
336 | 336 | indx = __intVal(index) - 1; |
… |
… |
|
516 | 516 | |
517 | 517 | %{ |
518 | 518 | REGISTER int index; |
519 | | unsigned int nIndex; |
| 519 | unsigned INT nIndex; |
520 | 520 | static struct inlineCache val = _ILC1; |
521 | 521 | |
522 | 522 | index = __intVal(__ClassInstPtr(__qClass(self))->c_ninstvars); |
… |
… |
|
700 | 700 | |element| |
701 | 701 | %{ |
702 | 702 | REGISTER int index; |
703 | | int nIndex; |
| 703 | unsigned INT nIndex; |
704 | 704 | static struct inlineCache val = _ILC1; |
705 | 705 | |
706 | 706 | index = __intVal(__ClassInstPtr(__qClass(self))->c_ninstvars); |
… |
… |
|
857 | 857 | |element| |
858 | 858 | %{ |
859 | 859 | REGISTER int index; |
860 | | int nIndex; |
| 860 | unsigned INT nIndex; |
861 | 861 | static struct inlineCache val = _ILC1; |
862 | 862 | |
863 | 863 | index = __intVal(__ClassInstPtr(__qClass(self))->c_ninstvars); |