loop sweep >600: closes #656 + #653 + refs #650 + refs #645 followup (v0.5.790) - #659
Merged
Conversation
…(v0.5.790) Three issues from the >600 sweep land together (squashed from the loop/issues-gt-600 branch and rebased onto main, since main shipped concurrent v0.5.787-789 fixes that collided with the per-fix bumps). - closes #656 — Array.prototype.unshift returns the new length, not the array (HIR Expr::ArrayUnshift + lower_array_method "unshift" arm both consult js_array_length on the new handle). - closes #653 — AOT spread of non-empty array no longer passes denormal placeholders to rest-param callees. Three coordinated fixes: register __perry_wrap_<name> wrappers with js_register_closure_rest; fix CallSpread FuncRef arm to pass the spread source array directly when the callee has rest at index 0; route js_closure_call_array through dispatch_rest_bundled to fix the 7+-arg dispatch gap. - refs #650 — URL.canParse(s) and URL.parse(s) static methods (Node 18 / 22). Adds Expr::UrlCanParse / Expr::UrlParse HIR variants; mirrors the Date.now/parse/UTC arm in HIR detection; shared is_valid_absolute_url() validator for both. Closes 2 of 7 sub-issues in #650. - refs #645 followup — fill loop in lower_expr_call now stops at the rest-param slot. Pre-fix `function f(name, ...args)` called as `f('a')` got `args = [undefined]` instead of `[]`. Surfaced as a regression in #653's repro. Extends func_defaults to a 4-tuple including Option<rest_idx>. Sanity: 7 representative tests + the v0.5.789 test_issue_645 regression test all byte-identical to Node.
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.
Summary
Three issues from the >600 sweep land together (consolidated into a single v0.5.790 bump because main shipped concurrent v0.5.787-789 fixes).
Array.prototype.unshiftreturns the array instead of the new length #656 —Array.prototype.unshiftreturns the new length, not the arrayURLclass instance properties + setters broken #650 —URL.canParse(s)andURL.parse(s)static methods (Node 18 / 22) — closes 2 of 7 sub-issues; the remaining 5 (toString, toJSON, setters, URLSearchParams.size, iterable URLSearchParams ctor) need invasive HIR-level type-aware lowering and are deferredfunction f(name, ...args)called asf('a')givesargs = []not[undefined](regression surfaced by AOT: spread of non-empty typed array passes denormal placeholders to callee #653's repro)Triaged closed (no code changes)
Remaining open (deferred)
Test plan
test-files/test_issue_656_unshift_returns_length.tstest-files/test_issue_653_spread_typed.tstest-files/test_issue_650_url_static.tstest_simple_class / test_inheritance / test_break_continue / test_array_methods / test_async / test_rest_params / test_issue_645_default_fill_positional