fix array handling code
This commit is contained in:
parent
43acc60784
commit
8844eef320
1 changed files with 13 additions and 14 deletions
|
|
@ -1650,20 +1650,19 @@
|
||||||
(let [outer-code `(let [arr# (~(coffitype->array-fn (second _type)) ~(second (rest _type)))] arr# )
|
(let [outer-code `(let [arr# (~(coffitype->array-fn (second _type)) ~(second (rest _type)))] arr# )
|
||||||
gen-arr (nth outer-code 2)]
|
gen-arr (nth outer-code 2)]
|
||||||
[(concat (butlast outer-code)
|
[(concat (butlast outer-code)
|
||||||
(list
|
|
||||||
(concat [`aset gen-arr]
|
|
||||||
(reduce
|
|
||||||
concat
|
|
||||||
(map
|
(map
|
||||||
(fn [index]
|
(fn [index]
|
||||||
(let [deserialize-instructions
|
(let [deserialize-instructions
|
||||||
(generate-deserialize
|
(generate-deserialize
|
||||||
(second _type)
|
(second _type)
|
||||||
(+ offset (* (size-of (second _type)) index)))]
|
(+ offset (* (size-of (second _type)) index)))]
|
||||||
(if (vector? deserialize-instructions)
|
(list `aset gen-arr index (first deserialize-instructions))
|
||||||
|
#_(if true #_(vector? deserialize-instructions)
|
||||||
(list index (first deserialize-instructions))
|
(list index (first deserialize-instructions))
|
||||||
(list index deserialize-instructions))))
|
(list index deserialize-instructions))
|
||||||
(range (second (rest _type)))))))
|
|
||||||
|
))
|
||||||
|
(range (second (rest _type))))
|
||||||
[gen-arr])]))
|
[gen-arr])]))
|
||||||
|
|
||||||
(defn typelist [typename fields]
|
(defn typelist [typename fields]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue