fix(javascript): preserve callable receivers through generic invocations

Follow actual callable receivers for Function.prototype.call and apply,
including bound and rebinding forms. Treat call/apply projections as generic
function values instead of stripping arguments by property-chain depth.
Keep opaque arguments conservative and preserve fresh local target identity.
Cover uncurry, nested chains and the public CLI/MCP boundary.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
This commit is contained in:
N0zoM1z0
2026-10-11 16:50:52 +00:00
co-authored by factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Kaoru0822
parent b60248c462
commit 0285701033
4 changed files with 115 additions and 37 deletions
+3 -1
View File
@@ -346,7 +346,9 @@ Known Object/Reflect mutators remain recognizable through literal destructuring
of intrinsic objects and stable bound-function aliases. Calls retain bound
argument prefixes through `call`, `apply`, and `Reflect.apply`; unexamined
targets remain unresolved. Creating an unused binding does not itself mutate
an intrinsic. Variable redeclarations retain a single unconditional initializer
an intrinsic. Generic `Function.prototype.call` and `apply` follow the callable
receiver, including a bound receiver; rebinding does not replace an earlier
bound receiver. Variable redeclarations retain a single unconditional initializer
when they introduce no assignment or second initializer.
Stable identifier chains to fresh object, array, function,
undecorated class or RegExp syntax keep those targets separate from intrinsic