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

Switch Case Problem #441

Open
TobiasWienand opened this issue Aug 13, 2024 · 0 comments
Open

Switch Case Problem #441

TobiasWienand opened this issue Aug 13, 2024 · 0 comments

Comments

@TobiasWienand
Copy link
Contributor

Problem:

At the moment we precompute the tests for each switch case and then use the precomputated Variables in each switch case. It would be better to compute the test immediately before making a switch case, however this is not possible because in a Switch block but outside of a switch case there is no javascript context.

Solution Approach:

We could add a SwitchCaseHeader to FuzzIL that opens a javascript context. However this would necessitate changing many files and the payoff for that would only be the ability to correctly compile some very rare and specific cases like the one above. The code above can be used to test if a fix works.

Testbench

A nice illustration for how this problem can manifest can be found here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant