mirror of
https://github.com/janet-lang/janet
synced 2025-09-06 12:58:04 +00:00
Prevent bytecode optimization from remove mk* instructions.
These instructions read from the stack, and therefor have side effects. Removing them without clearing the stack results in broken bytecode.
This commit is contained in:
@@ -961,4 +961,11 @@
|
||||
# (pp (disasm case-2))
|
||||
# (pp (disasm case-3))
|
||||
|
||||
# Regression #1330
|
||||
(defn regress-1330 [&]
|
||||
(def a [1 2 3])
|
||||
(def b [;a])
|
||||
(identity a))
|
||||
(assert (= [1 2 3] (regress-1330)) "regression 1330")
|
||||
|
||||
(end-suite)
|
||||
|
Reference in New Issue
Block a user