Commit 5590b8d
authored
CLJS-3324: hash-map behavior differs from Clojure (#102)
* CLJS-3324: hash-map behavior differs from Clojure
Add runtime check to hash-map w/o changing perf.
Add runtime check to PersistentHashMap.fromArrays w/o significant perf change.
hash-map is also an inlining macro which invokes PersistentHashMap.fromArrays.
naive use of partition leads to garbage in / out. Pad to fill in the missing value,
then remove - then when computing the values drop when we hit a non-pair. This way
we get non-matching array lengths and can defer to the runtime check.
Add tests.1 parent 29363bb commit 5590b8d
File tree
3 files changed
+19
-4
lines changed- src
- main
- cljs/cljs
- clojure/cljs
- test/cljs/cljs
3 files changed
+19
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8052 | 8052 | | |
8053 | 8053 | | |
8054 | 8054 | | |
8055 | | - | |
| 8055 | + | |
| 8056 | + | |
| 8057 | + | |
8056 | 8058 | | |
8057 | 8059 | | |
8058 | 8060 | | |
| |||
8926 | 8928 | | |
8927 | 8929 | | |
8928 | 8930 | | |
8929 | | - | |
| 8931 | + | |
| 8932 | + | |
| 8933 | + | |
| 8934 | + | |
8930 | 8935 | | |
8931 | 8936 | | |
8932 | 8937 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2623 | 2623 | | |
2624 | 2624 | | |
2625 | 2625 | | |
2626 | | - | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
2627 | 2630 | | |
2628 | | - | |
| 2631 | + | |
2629 | 2632 | | |
2630 | 2633 | | |
2631 | 2634 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1084 | 1084 | | |
1085 | 1085 | | |
1086 | 1086 | | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
1087 | 1094 | | |
1088 | 1095 | | |
1089 | 1096 | | |
| |||
0 commit comments