[compiler][ez] Add more Array.prototype methods#30075
Merged
mofeiZ merged 2 commits intogh/mofeiZ/4/basefrom Jun 25, 2024
Merged
[compiler][ez] Add more Array.prototype methods#30075mofeiZ merged 2 commits intogh/mofeiZ/4/basefrom
mofeiZ merged 2 commits intogh/mofeiZ/4/basefrom
Conversation
[ghstack-poisoned]
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This was referenced Jun 24, 2024
mofeiZ
commented
Jun 24, 2024
| positionalParams: [], | ||
| restParam: null, | ||
| returnType: { kind: "Poly" }, | ||
| calleeEffect: Effect.Store, |
Contributor
Author
There was a problem hiding this comment.
Similar to push, we know that pop does not perform interior mutability. Effect.Store here models pop similar to const arr = []; /*...*/; arr[2] = undefined; (writing exclusively to the container, not to any internal elements)
mofeiZ
commented
Jun 24, 2024
| noAlias: true, | ||
| }), | ||
| ], | ||
| [ |
Contributor
Author
There was a problem hiding this comment.
pasted these to BuiltInMixedReadonlyId, which is our read-only JSON-like object kind.
Happy to remove these and refactor later if we prefer to not have duplicates
|
Comparing: 133ada7...56d29f2 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
josephsavona
approved these changes
Jun 24, 2024
| positionalParams: [], | ||
| restParam: null, | ||
| returnType: { kind: "Poly" }, | ||
| calleeEffect: Effect.Store, |
| noAlias: true, | ||
| }), | ||
| ], | ||
| [ |
Adds Array.prototype methods that return primitives or other arrays -- naive type inference can be really helpful in reducing mutable ranges -> achieving higher quality memoization. Also copies Array.prototype methods to our mixed read-only JSON-like object shape. (Inspired after going through some suboptimal internal compilation outputs.) [ghstack-poisoned]
mofeiZ
added a commit
that referenced
this pull request
Jun 25, 2024
Adds Array.prototype methods that return primitives or other arrays -- naive type inference can be really helpful in reducing mutable ranges -> achieving higher quality memoization. Also copies Array.prototype methods to our mixed read-only JSON-like object shape. (Inspired after going through some suboptimal internal compilation outputs.) ghstack-source-id: 0bfad11 Pull Request resolved: #30075
This was referenced Jul 25, 2024
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.
Stack from ghstack (oldest at bottom):
Adds Array.prototype methods that return primitives or other arrays -- naive type inference can be really helpful in reducing mutable ranges -> achieving higher quality memoization.
Also copies Array.prototype methods to our mixed read-only JSON-like object shape.
(Inspired after going through some suboptimal internal compilation outputs.)