1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-25 01:37:19 +00:00

added future test for upvalues and symbolslots

This commit is contained in:
Jona Ekenberg 2023-02-01 21:26:29 +01:00
parent c0c8ab25e6
commit fa277c3797

View File

@ -26,6 +26,17 @@
"symbolslots survive disasm/asm") "symbolslots survive disasm/asm")
(setdyn *debug* false) (setdyn *debug* false)
# need to fix upvalues
(comment
(setdyn *debug* true)
(setdyn :pretty-format "%.40M")
(def f (fn [x] (fn [y] (+ x y))))
(assert (deep= (map last (in (disasm (f 10)) :symbolslots))
@["x" "y"])
"symbolslots upvalues")
(setdyn *debug* false)
)
(setdyn *debug* true) (setdyn *debug* true)
(assert (deep= (in (disasm (defn a [arg] (assert (deep= (in (disasm (defn a [arg]
(def x 10) (def x 10)