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

Optimize conditional jumps #26

Closed
antonmedv opened this issue Jun 7, 2019 · 1 comment
Closed

Optimize conditional jumps #26

antonmedv opened this issue Jun 7, 2019 · 1 comment
Labels

Comments

@antonmedv
Copy link
Member

Given bytecode:

0	OpTrue
1	OpJumpIfTrue	2	(6)
4	OpPop
5	OpTrue
6	OpJumpIfTrue	2	(11)
9	OpPop
10	OpTrue
11	OpJumpIfTrue	2	(16)
14	OpPop
15	OpTrue

Can be optimized to

0	OpTrue
1	OpJumpIfTrue	2	(16)
4	OpPop
5	OpTrue
6	OpJumpIfTrue	2	(16)
9	OpPop
10	OpTrue
11	OpJumpIfTrue	2	(16)
14	OpPop
15	OpTrue
@antonmedv
Copy link
Member Author

Done! 🎉

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

No branches or pull requests

1 participant