Commit Graph

8 Commits

Author SHA1 Message Date
Sergey Pepyakin c96735d6d6 Wasm function can only trap (#29)
* Introduce Trap struct.

* get_local can't fail.

* Add MemoryOutOfBounds trap.

* from_little_endian use slice instead of vec.

* MemoryAccessOutOfBounds for mem get and set.

* from_little_endian conversion can't fail.

* call_indirect traps.

* DivisionByZero and InvalidConversionToInt

* Use traps in value to convey an error

* select: int condition on stack top

* if: int condition on stack top

* Assert pops.

* Another protions of assert pops

* Introduce ValueStack

Also, hide FunctionContext and remove some stale code

* Traps in execution

* Make it compile.

* Check args before invoke.

* Document RuntimeArgs.

* Update host.rs

* Add rustdoc for Trap.
2018-02-01 14:59:21 +03:00
Sergey Pepyakin 551c992730
4th iteration on documentation (#22)
* Rename LoadedModule to Module

* Hide TryInto

* Fix rustdoc tests.

* Rename from_parity_wasm_module and doc it.

* Document `Module::from_buffer`

* Tidy Module docs

* Some rustdoc headers.

* Document FuncInstance::{alloc_host, signature}

* Document descriptors.

* Doc NotStartedModuleRef

* Fix cargo-deadlinks
2018-01-26 19:24:40 +03:00
Sergey Pepyakin bc89a20b96 Third iteration on documenation. 2018-01-25 18:17:25 +03:00
NikVolf d340b99016 fix build and address comments 2018-01-23 14:42:20 +03:00
Sergey Pepyakin bf2b2acbc5 Reintroduce FuncInstance; Hide internals 2018-01-22 20:07:30 +03:00
Sergey Pepyakin 44f61251c1 Hide FuncInstance 2018-01-22 19:38:57 +03:00
Sergey Pepyakin af92d8ced8 Rename parity-wasm-interp to wasmi. 2018-01-22 17:58:14 +03:00
Sergey Pepyakin 2fd85c1d73 Add spec tests. 2018-01-22 17:55:43 +03:00