format: make invoke.target optional for internal calls#242
Open
gnidan wants to merge 1 commit into
Open
Conversation
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.
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 mirrorsreturn.data, which is already optional.targetfromInternalCall.required, expand the description, and add a worked example for the no-target case.targetoptional and relax the guard.patchInvokeInContext.External calls and contract creation still require
target.