Skip to content

Keep FID presence guards from rooting entries - #1796

Closed
oxura wants to merge 1 commit into
bendlang:mainfrom
oxura:fix/foreign-fid-preprocessor-20261020
Closed

oxura wants to merge 1 commit into
bendlang:mainfrom
oxura:fix/foreign-fid-preprocessor-20261020

Conversation

@oxura

@oxura oxura commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #1714.

A presence guard used to bring its own FID target into the build, so it was always true. Preprocessor queries no longer root entries. #define bodies still do: a macro-expanded call must keep its target.

The new runtime fixture covers absent/present guards, continued/commented directives, C digraphs, and a macro call across a multiline comment. It failed in clang before the fix and now builds and prints 42.

The JS twins now use FID(imul) to dispatch to the real Math.imul, instead of returning a constant. The C twins still invoke the Bend entry.

Locally, all four affected/boundary fixtures pass checkup, the interpreter, emitted JS, and native C. No private-cluster run claimed.

Repo gate: 54/54; all caps unchanged.

@Lorenzobattistela

Copy link
Copy Markdown
Collaborator

Thanks for following up on the #1714 note. We're going to close this one: nothing in the repo uses FID on a preprocessor line, and the only effect today is that an unused def stays in the build (the guard is always true). That doesn't justify a second regex plus per-line directive tracking in c_ids while comp.ts is at its 66k cap, and since #1439 reshaped c_ids, a rebase would mean rebuilding the loop anyway. If a real effect source ever needs an FID presence guard, we can revisit it then.

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.

2 participants