Skip to content

Add options for optimization phases, and improve constant folding significantly#41

Merged
Dinnerbone merged 13 commits into
mainfrom
constant_folding
May 9, 2026
Merged

Add options for optimization phases, and improve constant folding significantly#41
Dinnerbone merged 13 commits into
mainfrom
constant_folding

Conversation

@Dinnerbone
Copy link
Copy Markdown
Owner

This is far from everything, but it's a great step towards correctness.

Fun fact! The constant folding is different to runtime evaluation. That means if you did something like trace(!"foo") it's totally different value to var foo = "foo"; trace(!foo)

Double fun fact! It looks like Ruffle got hit with that and we didn't realize. I think gnash tests might have too. Some of the tests we have just got compiled away, and give wrong values than what it should actually be. Hurray!

@Dinnerbone Dinnerbone merged commit 9a1b23b into main May 9, 2026
4 checks passed
@Dinnerbone Dinnerbone deleted the constant_folding branch May 9, 2026 22:47
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

Successfully merging this pull request may close these issues.

1 participant