Closed ianthehenry closed 7 months ago
Confirmed in Janet 1.32.1-56f33f51 linux/x64/gcc
and Janet 1.32.1-9593c930 linux/x64/gcc
.
Fails in:
Works ok in:
May be it's https://github.com/janet-lang/janet/commit/fcca9bbab3d64ed51259745dec2dfaffcc20c3d1, as the commit before it, dbb21874, seems to be ok.
Pushed a fix in a9176a77e6a93a5e10b5c069e9b1c88d4b25e40e - the issue seems to be that certain bytecode instructions were being aggressively optimized out despite have side effects (clearing the call stack), making the next function call get extra arguments.
All of the reported examples work fine here now :+1:
Interesting bug where it seems like a
splice
is persisting after the expression it occurs in. This program:Raises with
error: <function pp> called with 4 arguments, expected 1
. Commenting out the line with the splice causes it to work as expected.Tested on
Janet 1.32.1-cc5beda0 macos/aarch64/clang
.The following variations do not have the bug:
Though this one also fails: