1
0
mirror of https://github.com/janet-lang/janet synced 2025-09-12 07:46:09 +00:00

Fix asm roundtrip issue.

This commit is contained in:
Calvin Rose
2024-03-10 09:06:32 -05:00
parent 6032a6d658
commit 9e6abbf4d4
3 changed files with 19 additions and 3 deletions

View File

@@ -364,7 +364,7 @@
"sort 5")
(assert (<= ;(sort (map (fn [x] (math/random)) (range 1000)))) "sort 6")
# #1283
# #1283
(assert (deep=
(partition 2 (generate [ i :in [:a :b :c :d :e]] i))
'@[(:a :b) (:c :d) (:e)]))
@@ -955,6 +955,10 @@
(defn case-4 [&]
(def x (break (break (break)))))
(bytecode-roundtrip case-4)
(defn case-5 []
(def foo (fn [one two] one))
(foo 100 200))
(bytecode-roundtrip case-5)
# Debug bytecode of these functions
# (pp (disasm case-1))