Add todo about potential bug with nil as a primitive argument

This commit is contained in:
Joshua Suskalo 2022-10-31 11:39:56 -05:00
parent 319bb3a33b
commit 75bbe11971
No known key found for this signature in database
GPG key ID: 9B6BA586EFF1B9F0

View file

@ -247,6 +247,9 @@
[downcall arg-types ret-type] [downcall arg-types ret-type]
(let [;; Complexity of types (let [;; Complexity of types
const-args? (or (vector? arg-types) (nil? arg-types)) const-args? (or (vector? arg-types) (nil? arg-types))
;; FIXME(Joshua): there's a potential bug where `nil` as a pointer
;; argument is not converted to [[MemoryAddress/NULL]] if it's
;; considered primitive.
simple-args? (when const-args? simple-args? (when const-args?
(every? mem/primitive? arg-types)) (every? mem/primitive? arg-types))
const-ret? (s/valid? ::mem/type ret-type) const-ret? (s/valid? ::mem/type ret-type)