Commit f165420
dnolen
CLJS-1284: IndexedSeq -seq implementation incorrect for i >= alength of internal array
for performance reasons we sometimes inline calls to the IndexedSeq constructor,
however this bypasses the validation offered by prim-seq and array-seq.
Fix IndexedSeq -seq so that it checks current index to length of array.
Fix IndexedSeq -count so that negative values are never returned.
Add tests.1 parent 46af737 commit f165420
2 files changed
+21
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1256 | 1256 | | |
1257 | 1257 | | |
1258 | 1258 | | |
1259 | | - | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
1260 | 1262 | | |
1261 | 1263 | | |
1262 | 1264 | | |
| |||
1271 | 1273 | | |
1272 | 1274 | | |
1273 | 1275 | | |
1274 | | - | |
| 1276 | + | |
| 1277 | + | |
1275 | 1278 | | |
1276 | 1279 | | |
1277 | 1280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2833 | 2833 | | |
2834 | 2834 | | |
2835 | 2835 | | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
2836 | 2852 | | |
2837 | 2853 | | |
2838 | 2854 | | |
| |||
0 commit comments