forked from TurboWarp/scratch-vm
-
Notifications
You must be signed in to change notification settings - Fork 2
The Next Compiler #23
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New compiler!!!!
…Warp#264) The new compiler broke all the extensions doing compiler patches. We promised not to help them when those break but it seems enough people use those extensions that we sort of got forced into finding some solution, so this makes these changes: - The exports for the new compiler are now in `these_broke_before_and_will_break_again` - `i_will_not_ask_for_help_when_these_break` now returns some stubs that pretend to be the old compiler. It also emits an event so -gui can show a warning. - Focus is on compatibility & safety, not performance. There will be unnecessary casts and scripts marked as yielding. - Extensions that meet these assumptions should work without changes: - Extensions do not try to combine this compatibility layer with any APIs provided by the new compiler. - Extensions treat IR nodes received from descendSubstack and similar as opaque objects because they will be the new intermediate objects instead of { kind: "..." } - Extensions need to implement the JS generators for all AST node kinds they use. Can not rely on the default JS generator because those generators are expecting a different format than { kind: "..." } Lack of tests is intentional since this will be removed at some point when we have a proper API we can tell people to use
Fix motion_turnleft and motion_turnright missing type casts
Temporary fix for an infinite loop, to be properly fixed later
…k-infinite-loop Give up analyzing looped stack after 10000 iterations
…f-fix Fix incorrect type in sensing () of () block
Make types for blocks which return ints more specific
Use more specific type for round, floor, ceiling
Optimize loops with provably-non-fraction iteration counts
Add face sensing to default extension URLs
Use more specific type for string length
Update scratch-translate-extension-languages to 1.0.7
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merge upstream and finally add the next compiler.
Everything else works perfectly, unless people find otherwise.