Preserve inherited callbacks and field ranges in optimized output - #2
Draft
yeargun wants to merge 1 commit into
Draft
Preserve inherited callbacks and field ranges in optimized output#2yeargun wants to merge 1 commit into
yeargun wants to merge 1 commit into
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
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.
An inherited field was analysed separately under each class name. When a base constructor stored
nulland a subclass installed an animation callback, the optimizer could remove the callback branch and emit the base fallback. Motionlil's native animation interruption exposed this: stopping an animation committed the wrong value.The analysis now shares field facts across the inheritance hierarchy, including defaults, writes and untyped boundaries. Integer ranges use the same storage identity so overflow coercions remain valid. A runtime regression covers callbacks, string fields, integer overflow and three levels of inheritance, with inlining both enabled and disabled.
Validation: all 1,626 library tests pass; the minimal emitted-JavaScript reproduction returns
42for the subclass; 37 Motion browser checks pass against the pinned source-built original, including interruption, easing, controls and RAF scheduling. This targetsfix/public-class-defaults; the current Motion source build is pinned to this branch’s compiler commit.GitHub CI also passes all 1,626 library tests. The broader workflow still fails on formatting already present in the base and the unchanged interpreter-based differential-generator test (14 lines, expected 11).