Commit Graph

11 Commits

Author SHA1 Message Date
Sergey Pepyakin c99ee1d986
Use wabt spec module (#48)
Use wabt-rs script parser to parse official testsuite.
2018-02-14 13:40:31 +03:00
Sergey Pepyakin 483736b1bd
Memory units (#42)
* Initial implementation

* Not use grow as it is makes debug builds very slow

* Use Pages::BYTE_SIZE for LINEAR_MEMORY_PAGE_SIZE

* Tidy docs.

* Use memory_units from git.
2018-02-09 16:45:21 +03:00
Sergey Pepyakin c0ed715b37
Update testsuite (#39)
* ok_or_else in stack + top_mut.

* Model polymorphic stack explicitly

* Upgrade wasm testsuite.

* Update fixtures.

* Validate duplicate exports.

* Fix and clean spec runner.

* with_capcity for HashSet
2018-02-08 17:52:16 +03:00
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