diff --git a/README.md b/README.md index 3f85ccc624..2abc21e5bc 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This repository holds the official specifications and reference implementations for WebAssembly. At this time, the contents of this repository are under development and known -to be incomplet and inkorrect. +to be incomplete and incorrect. Participation is welcome. Discussions about new features, significant semantic changes, or any specification change likely to generate substantial discussion diff --git a/ml-proto/test/ackermann.wasm b/ml-proto/test/ackermann.wasm new file mode 100644 index 0000000000..4fcff51483 --- /dev/null +++ b/ml-proto/test/ackermann.wasm @@ -0,0 +1,29 @@ +;; (c) 2015 Valentin Ilie + +(module + (func (param i64 i64) (result i64) + (if + (eq.i64 (getlocal 0) (const.i64 0)) + (return + (add.i64 (getlocal 1) (const.i64 1)) + ) + ) + (if + (eq.i64 (getlocal 1) (const.i64 0)) + (return + (call 0 + (sub.i64 (getlocal 0) (const.i64 1)) (const.i64 1) + ) + ) + ) + (return + (call 0 + (sub.i64 (getlocal 0) (const.i64 1)) + (call 0 (getlocal 0) (sub.i64 (getlocal 1) (const.i64 1))) + ) + ) + ) + (export 0) +) + +(invoke 0 (const.i64 3) (const.i64 5))