Skip to content

Commit

Permalink
Fixing more corner cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Robertorosmaninho committed Aug 7, 2024
1 parent 1a9c314 commit 476baf0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pykwasm/src/pykwasm/kdist/wasm-semantics/wasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ A block is the simplest way to create targets for break instructions (ie. jump d
It simply executes the block then records a label with an empty continuation.

```k
syntax Label ::= "label" VecType "{" Instrs "}" ValStack K | ".Label"
syntax Label ::= "label" VecType "{" Instrs "}" ValStack K
// --------------------------------------------------------
rule <instrs> label [ TYPES ] { IS } VALSTACK' KCELL => KCELL </instrs>
<valstack> VALSTACK => #take(lengthValTypes(TYPES), VALSTACK) ++ VALSTACK' </valstack>
Expand Down Expand Up @@ -1207,8 +1207,9 @@ The `#take` function will return the parameter stack in the reversed order, then
</funcDef>
rule <instrs> return ~> (_S:Stmt => .K) ... </instrs>
rule <instrs> return ~> (label [_] {_} _ KCELL) ~> _ => (return ~> KCELL) </instrs>
rule <instrs> (return => .K) ~> _FR:Frame ... </instrs>
rule <instrs> return ~> (label [_] {_} _ KCELL ~> _) => (return ~> KCELL) </instrs>
rule <instrs> return ~> _FR:Frame ~> (label [_] {_} _ KCELL) ~> _ => (return ~> KCELL) </instrs>
rule <instrs> (return => .K) ~> _FR:Frame ... </instrs> [owise]
```

### Function Call
Expand Down

0 comments on commit 476baf0

Please sign in to comment.