This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Conversation
This file contains 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
ljharb
reviewed
Feb 16, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toSpliced changes in my polyfill pass tests, with my suggestion
Co-authored-by: Jordan Harband <ljharb@gmail.com>
ljharb
approved these changes
Feb 16, 2022
chicoxyzzy
approved these changes
Feb 21, 2022
1. Perform ! CreateDataPropertyOrThrow(_A_, _Pk_, _kValue_). | ||
1. Set _k_ to _k_ + 1. | ||
1. Let _i_ be 0. | ||
1. Let _r_ be _actualStart_ + _actualDeleteCount_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, what does _r_
stand for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was taken from #74 (comment)
The idea is that _i_
is index for insertions and _r_
is the index for reads. I was thinking of giving the variables more descriptive names to make this clearer but kept changing my mind back and forth.
jridgewell
approved these changes
Feb 22, 2022
Thanks all! |
ljharb
added a commit
to es-shims/Array.prototype.toSpliced
that referenced
this pull request
Mar 30, 2022
ljharb
added a commit
to es-shims/Array.prototype.toSpliced
that referenced
this pull request
Mar 31, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds most of the recommendations from @jridgewell 's very helpful stage 2 review comments.
Not included:
Note added in previous PR #76
Issue opened #75
Will address as part of #51