Skip to content

Commit

Permalink
Update EIPS/eip-6206.md
Browse files Browse the repository at this point in the history
Co-authored-by: Andrei Maiboroda <[email protected]>
  • Loading branch information
pdobacz and gumb0 authored Nov 26, 2024
1 parent ab135c3 commit 1e683d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EIPS/eip-6206.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Section type MUST be non-returning if and only if the section contains no `RETF`

### Allowing `JUMPF` to section with less outputs

An alternative rule for `JUMPF` stack validation could require the target section's outputs to be exactly equal to the current section's outputs. Under such rule, a particular target section (a shared "helper" piece of code) would only "match" sections (requiring some shared "helper" code to execute before returning) *of the same outputs*.
An alternative rule for `JUMPF` stack validation could require the target section's outputs to be exactly equal to the current section's outputs. Under such rule, a particular target section (a shared "helper" piece of code) would only "match" sections (requiring some shared "helper" code to execute before returning) *with the same number of outputs*.

Instead, we allow a given `JUMPF` target section to be called from sections with more outputs, as long as these sections provide these extra stack elements (the "delta") themselves. This will reduce duplicated code as it will allow compilers more flexibility during code generation such that certain helpers can be used generically by functions, regardless of their output values.

Expand Down

0 comments on commit 1e683d9

Please sign in to comment.