refactor(exo): shorten exo-call fastpath #2247
Merged
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.
closes: #XXXX
refs: #XXXX
Description
Should be a pure refactor without any[1] observable differences. Shorten the exo-call fastpath for the normal thisful case
By "thisful", I mean the exo objects defined with the normal exo-making, exo-class-making, and exo-class-kit-making APIs, whether directly or via zones. The non-thisful case is only the deprecated virtual and durable kinds, which are not yet gone and so must still be supported. But have only the non-thisful case pay for the arg shifting, rather than making all calls pay for that.
The previous debug experience involved two layers of wrapping function to get from the external call to a method of an exo into the exo's own behavior method. This PR reduces that to one level of wrapper. The effectively step into from the call into the actual behavior method before and after this PR
There is also one less exo infrastructure frame on the call stack. In the debugger, the remaining stack frame is labeled
vs
Also less noise in verbose error stacks.
Security Considerations
none. The safety checks should be exactly the same.
Scaling Considerations
Probably has a performance advantage for the normal thisful case. But we won't know until we measure. We're putting this into review before measuring though, since the main motivation is the better debugging experience.
Documentation Considerations
none
Testing Considerations
[1] The refactoring did result in an error message changing, requiring a corresponding change in a golden error message test.
The tests in endo only test the normal thisful case. We depend on integration testing with agoric-sdk to test the non-thisful case.
Compatibility Considerations
none, given that the integration test with agoric-sdk confirms we did not break the non-thisful case.
Upgrade Considerations
none.
[ ] Includes*BREAKING*:
in the commit message with migration instructions for any breaking change.[ ] UpdatesNEWS.md
for user-facing changes.