Commit Graph

4 Commits

Author SHA1 Message Date
Sergey Pepyakin e273b9e40a Just bump framestack limits. (#50)
These limits seems to be picked arbitrary, and I just made it arbitrary larger.

We need to reconsider these limits, ideally providing to user a way to customize the limits.

FWIW, When the last time I've tried to run gcc's torture testsuite with wasmi it also bumped into this limit.

Fixes #41.
2018-02-13 09:29:04 +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 49347a63ee Initial commit 2018-01-17 19:54:06 +03:00