Skip to content

format: make invoke.target optional for internal calls#242

Open
gnidan wants to merge 1 commit into
mainfrom
architect-invoke-target-optional
Open

format: make invoke.target optional for internal calls#242
gnidan wants to merge 1 commit into
mainfrom
architect-invoke-target-optional

Conversation

@gnidan

@gnidan gnidan commented Jul 3, 2026

Copy link
Copy Markdown
Member

Internal calls via JUMP normally carry a code pointer to the callee's entry point, but there isn't always a meaningful target to record — most notably at the first instruction of an inlined body, where the JUMP has been elided. The callee identity (identifier/declaration/type) stays meaningful; the target does not. This mirrors return.data, which is already optional.

  • Schema: drop target from InternalCall.required, expand the description, and add a worked example for the no-target case.
  • TS types: mark target optional and relax the guard.
  • bugc: guard target access in patchInvokeInContext.

External calls and contract creation still require target.

Internal calls via JUMP normally carry a code pointer to the callee's
entry point, but there isn't always a meaningful target to record — e.g.
at the first instruction of an inlined body, where the JUMP has been
elided. The callee identity (identifier, declaration, type) stays
meaningful; the target does not. Same pattern as return.data being
optional.

- Schema: drop `target` from InternalCall.required; expand the
  description; add a worked example for the no-target case.
- TS types: mark `target` optional; relax the guard.
- bugc: guard target access in patchInvokeInContext (+ tests assert
  target is defined before dereferencing).

Wave 1 of the transform-context → main split (#31): transform-schema-
independent. Forward-references to `transform:["inline"]` in the prose/
example are deferred to the wave that lands the transform schema.
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://ethdebug.github.io/format/pr-preview/pr-242/

Built to branch gh-pages at 2026-07-03 21:36 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

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