Skip to content

[TS] Lower intrinsic Boolean calls through truthiness - #456

Draft
CaelmBleidd wants to merge 2 commits into
caelmbleidd/ts-native-set-constructor-bindingfrom
caelmbleidd/ts-native-boolean-call
Draft

CaelmBleidd wants to merge 2 commits into
caelmbleidd/ts-native-set-constructor-bindingfrom
caelmbleidd/ts-native-boolean-call

Conversation

@CaelmBleidd

@CaelmBleidd CaelmBleidd commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Lower direct calls to the default-library Boolean runtime binding through existing JavaScript truthiness operations. Preserve argument evaluation in order, including ignored extra arguments. No arguments means undefined. At a spread, evaluate the preceding arguments and the spread operand, then stop explicitly at the iterator-expansion boundary.

Local and imported callables named Boolean and property-selected calls keep their ordinary binding paths. Direct writes and deletion, writes through declaration aliases of globalThis, and recognized Object/Reflect mutations of globalThis stop at an explicit boundary. This lowering assumes the standard runtime realm on entry. External changes and aliases formed by arbitrary runtime expressions remain outside this support.

Targets #451 because it reuses the verified library value declaration and direct mutation boundary. Frontend build and all 25 Boolean and Set regressions passed.

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