Skip to content

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

Merged
gnidan merged 1 commit into
mainfrom
architect-invoke-target-optional
Jul 9, 2026
Merged

format: make invoke.target optional for internal calls#242
gnidan merged 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
Preview removed because the pull request was closed.
2026-07-09 23:18 UTC

@gnidan gnidan merged commit 06fc7ff into main Jul 9, 2026
5 checks passed
@gnidan gnidan deleted the architect-invoke-target-optional branch July 9, 2026 23:13
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