Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
virgil-serbanuta committed Sep 13, 2024
1 parent 546ec2e commit e163a50
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions mx-semantics/main/calls/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,23 @@ module MX-CALLS-TOOLS
</mx-call-data> #as MxCallData
)
=> pushWorldState
// TODO: clearMxReturnValues is not part of the actual MX semantics,
// but it makes it easier to identify endpoints that do not
// return anything (see setVMOutput-no-retv).
// TODO: clearMxReturnValues is not part of the actual MX semantics.
// The MX semantics gathers all return values and makes them
// available to whoever wants them. Usually, only the topmost one
// (i.e., the return value for the last call) is interesting to
// the caller.
//
// I'm unsure what happens for endpoints that do not return a
// value (do they return an empty result? Does it not return a
// result, and the caller simply does not try to read any
// returned result?
//
// However, this is supposed to be a mx-lite implementation,
// so we're assuming that nobody needs more than one return
// result, so we can clear the returned results before each
// call. At the end of the call, we check whether the results
// list is empty or not to know if the endpoint returned
// something.
~> clearMxReturnValues
~> pushCallState
~> resetCallState
Expand Down

0 comments on commit e163a50

Please sign in to comment.