Skip to content

Commit

Permalink
Merge pull request WebAssembly#16 from chicoxyzzy/patch-1
Browse files Browse the repository at this point in the history
Add syntax highlighting
  • Loading branch information
rossberg authored Apr 28, 2019
2 parents 5f120e8 + 9835e34 commit 37f3ee3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions proposals/multi-value/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
### Functions with multiple return Values

A simple swap function.
```
```wasm
(func $swap (param i32 i32) (result i32 i32)
(get_local 1) (get_local 0)
)
```

An addition function returning an additional carry bit.
```
```wasm
(func $add64_u_with_carry (param $i i64) (param $j i64) (param $c i32) (result i64 i32)
(local $k i64)
(set_local $k
Expand All @@ -69,7 +69,7 @@ An addition function returning an additional carry bit.
### Blocks with inputs

Conditionally manipulating a stack operand without using a local.
```
```wasm
(func $add64_u_saturated (param i64 i64) (result i64)
($i64.add_u_carry (get_local 0) (get_local 1) (i32.const 0))
(if (param i64) (result i64)
Expand All @@ -79,7 +79,7 @@ Conditionally manipulating a stack operand without using a local.
```

An iterative factorial funciton whose loop doesn't use locals, but uses arguments like phis.
```
```wasm
(func $fac (param i64) (result i64)
(i64.const 1) (get_local 0)
(loop $l (param i64 i64) (result i64)
Expand Down

0 comments on commit 37f3ee3

Please sign in to comment.