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

Hitting the "expected switch instructions to have been rewritten before stackification" panic in BlockEmitter::emit_instwhen compiling rust enum #281

Open
greenhat opened this issue Aug 27, 2024 · 1 comment
Assignees
Labels
bug Something isn't working codegen
Milestone

Comments

@greenhat
Copy link
Contributor

greenhat commented Aug 27, 2024

Hitting panic in the BlockEmitter::emit_inst

Instruction::Switch(_) => {
panic!("expected switch instructions to have been rewritten before stackification")
}

How to reproduce:

// test.expect_masm(expect_file!["../../expected/types/enum.masm"]);

@greenhat greenhat added this to the Beta 1 milestone Aug 27, 2024
@greenhat greenhat changed the title Hitting the "expected switch instructions to have been rewritten before stackification" panic when compiling rust enum Hitting the "expected switch instructions to have been rewritten before stackification" panic in BlockEmitter::emit_instwhen compiling rust enum Aug 27, 2024
@greenhat greenhat changed the title Hitting the "expected switch instructions to have been rewritten before stackification" panic in BlockEmitter::emit_instwhen compiling rust enum Hitting the "expected switch instructions to have been rewritten before stackification" panic in BlockEmitter::emit_instwhen compiling rust enum Aug 27, 2024
@bitwalker
Copy link
Contributor

Hmm, looks like we never actually lower these to a chain of if/then/else in our pipeline. I'll add this to my TODO for the IR refactoring

@bitwalker bitwalker self-assigned this Sep 4, 2024
@bitwalker bitwalker added bug Something isn't working codegen labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working codegen
Projects
None yet
Development

No branches or pull requests

2 participants