Skip to content

Commit c0bc575

Browse files
committed
Fix local(-1) sentinel comment to reflect actual semantics
1 parent 9821acb commit c0bc575

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • kmir/src/kmir/kdist/mir-semantics

kmir/src/kmir/kdist/mir-semantics/kmir.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,9 @@ NB that a stack height of `0` cannot occur here, because the compiler prevents l
219219
If the local `_0` does not have a value (i.e., it remained uninitialised), the function returns unit and writing the value is skipped.
220220

221221
```k
222-
// `place(local(-1), .ProjectionElems)` is the sentinel destination for calls whose
223-
// return should not be written back. Without this rule, the return path would fall
222+
// `place(local(-1), .ProjectionElems)` is the sentinel destination indicating the
223+
// callee is not expected to return a value (e.g. `main`, top-level framework calls,
224+
// or `drop_in_place` functions). Without this rule, the return path would fall
224225
// through to `#setLocalValue`, which only accepts real local indices and would get
225226
// stuck on `local(-1)`.
226227
rule [termReturnIgnored]: <k> #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _

0 commit comments

Comments
 (0)