Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Editorial: simplify ArraySetLength truncation #1702
This change iterates over the existing keys of an array when truncating it instead of every possible key between
The behaviour of this change has been verified in engine262.
bakkot left a comment
Working with the underlying collection of properties instead of working via the MOP is always a little scary, but I think it's appropriate here, since this is in a method which is exclusively for use by a MOP operation on array exotic objects.
This looks like a solid improvement in clarity with no observable change in behavior. LGTM.