new StackEntry(): StackEntry<StackEntry><boolean><string><boolean><string><StackEntry><string>stack: new Set([...])
.
Propagated through the chain so deeper
doResolve
calls still see
them during recursion checks.
undefined
in the common case so
there is no extra work on the hot path.<string><string><number>has
has(query): boolean<StackEntry><boolean>Walk the linked list looking for an entry with the same request shape.
Set-compatible: callers that used stack.has(entry) keep working.
NOTE: kept monomorphic on purpose. An earlier draft accepted a string
query too (so pre-5.21 plugins keeping their own Set<string> of
seen entries could probe the live stack with the formatted form),
but adding the second shape regressed doResolve's heap profile by
~1 MiB / 200 resolves on stack-churn — V8 keeps a polymorphic
call-site state for parent.has(stackEntry) once has has two
argument shapes. Plugins that need string membership can reach for
[...stack].find(e => e.includes(formattedString)) via the
String-method proxies on StackEntry instead.
toString(): string<string>Human-readable form used in recursion error messages, logs, and the
iterator above. Not memoized: caching would require an extra slot on
every StackEntry, which costs heap even on resolves that never look
at the formatted form.