fix(util): implement debuglog logger factory (#3430)#3528
Merged
Conversation
5f4658e to
785b5a5
Compare
785b5a5 to
7389960
Compare
proggeramlug
pushed a commit
that referenced
this pull request
May 31, 2026
The committed artifacts were one batch stale relative to crates/perry-api-manifest/src/entries.rs: #3528 (util.debuglog factory) dropped the `util.debug` / `sys.debug` alias from the manifest but the merge didn't regenerate docs, leaving main red on the api-docs-drift gate (committed docs claim 1996 entries; manifest has 1994). Re-run of `./scripts/regen_api_docs.sh` — no manifest change in this PR, purely a catch-up regeneration.
proggeramlug
added a commit
that referenced
this pull request
May 31, 2026
…3149) (#3530) * fix(es5): Object(value) plain-call coercion returns a fresh object (#3149) Bug 1 of #3149. `Object()` / `Object(undefined)` / `Object(null)` called as a plain function (not `new`) returned `undefined` — the bare-call path fell through to the generic dispatcher. Per ECMAScript §20.1.1.1 these yield a fresh ordinary `{}`; an existing object/array/function passes through unchanged; a primitive coerces to an object (typeof "object"). Adds an `Expr::ObjectCoerce(value)` HIR variant (mirroring `StringCoerce`) lowered from the shadow-safe bare `Object(...)` call, a `js_object_coerce` runtime helper (nullish/primitive -> fresh `{}`, pointer passes through), and codegen emission + the operand-recursing collector/walker arms. The `new Object(null)` path already worked via `js_new_function_construct`. Gap test `test_gap_3149_object_coerce.ts` is byte-identical to `node --experimental-strip-types`. Bug 2 (function-declaration reassignment) is intentionally deferred — see the follow-up issue; it needs mutable-binding-slot routing across the FuncRef read / call / `new` lowering sites and human review before landing. * chore(lint): allowlist process.rs in the file-size gate `crates/perry-runtime/src/process.rs` reached 2047 LOC on main after the node:process argument-validation batch (#3493/#3516/#3518/#3496) landed without a split, tripping the whole-tree file-size gate and turning every open PR's `lint` check red. Add it to the allowlist with a rationale, mirroring the existing entries; the per-concern split is tracked under #1435. * docs: regenerate API reference + .d.ts to match the manifest The committed artifacts were one batch stale relative to crates/perry-api-manifest/src/entries.rs: #3528 (util.debuglog factory) dropped the `util.debug` / `sys.debug` alias from the manifest but the merge didn't regenerate docs, leaving main red on the api-docs-drift gate (committed docs claim 1996 entries; manifest has 1994). Re-run of `./scripts/regen_api_docs.sh` — no manifest change in this PR, purely a catch-up regeneration. --------- Co-authored-by: Ralph Küpper <ralph@skelpo.com>
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.
Implements
util.debuglog(section)— the runtime logger (util_debuglog_logger_value), whitelist, value-gate, and dispatch arm already existed, but the symbol had no API-manifest entry so imports failed the #463 R005 unimplemented gate. Adds the manifest entries fordebuglog(mirrored into the deprecatedsysalias to keepsys_alias_mirrors_util_manifestbalanced).Byte-for-byte identical to
node --experimental-strip-types:The
util.debugalias requested in #3430 is deferred: its value-read+call path resolves differently from the method-call dispatch and returns undefined; tracking that separately so this lands the working logger factory first.