Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disasm/asm doesn't round-trip for function with unused argument #1424

Closed
thegeez opened this issue Mar 8, 2024 · 1 comment
Closed

Disasm/asm doesn't round-trip for function with unused argument #1424

thegeez opened this issue Mar 8, 2024 · 1 comment
Labels
bug This is not expected behavior, and needs fixing

Comments

@thegeez
Copy link

thegeez commented Mar 8, 2024

This doesn't round trip:

(asm (disasm 
    (fn [] 
       (def foo (fn [one two] one)) 
       (foo 100 200))))

This trips up this line in the bytecode verifier about slotcounts:

if (maxslot > sc) return 2;

This example does work when foo returns two instead of one:

(asm (disasm 
    (fn [] 
       (def foo (fn [one two] two)) 
       (foo 100 200))))
@bakpakin bakpakin added the bug This is not expected behavior, and needs fixing label Mar 8, 2024
@bakpakin
Copy link
Member

Fixed in 9e6abbf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is not expected behavior, and needs fixing
Projects
None yet
Development

No branches or pull requests

2 participants