Skip to content

[TS] Add an isolated Function.bind experiment - #693

Draft
CaelmBleidd wants to merge 1 commit into
caelmbleidd/calls-returned-callable-replayfrom
caelmbleidd/ts-function-bind-experiment
Draft

CaelmBleidd wants to merge 1 commit into
caelmbleidd/calls-returned-callable-replayfrom
caelmbleidd/ts-function-bind-experiment

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

Adds a standalone bind experiment based on the public head of #648. The runner creates a fresh checkout and applies the prototype patch there. The four files are outside the normal build source sets.

The focused checks compare actual USVM and Node returns for bound arguments and receiver, rebinding, a lexical arrow, distinct bound functions, and a project-defined method named bind. The expected values are 30, 123, 34, true, and 201. With the model disabled, the ordinary bind call reaches the configured fallback. The project method still returns 201.

An earlier trace on unchanged RedBlackTree recorded 52 residual bind calls and zero model applications. The experiment covers direct calls of known bound functions. Bound constructor calls, .call, .apply, and reflective properties remain outside that checked contract.

python3 usvm-ts/experiments/function-bind/run.py

Both focused Gradle tests passed on public base 7e74b8061fd86d69b7bc22d8a5e2b535e6e2c6ad with JDK 21, Node.js 26.5.0, and JacoDB 4251d2023d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant