Commit Graph

12 Commits

Author SHA1 Message Date
Jef 899cc32e45 rustfmt (#151) 2018-12-11 12:54:06 +01:00
Julius Rakow 20154c5e24 Add no_std support (#122)
* add default-enabled std feature

* use parity-wasm/std feature only if std is enabled

* drop dependency on std::io

* use hashmap_core instead of std::collections::HashMap

* disable std::error in no_std

* core and alloc all the things

* mention no_std in readme

* add no_std feature and use hashmap_core only on no_std

* rename the no_std feature to core

* drop dependency on byteorder/std

* simplify float impl macro

* remove some trailing whitespace

* use libm for float math in no_std

* add note about no_std panics of libm to readme

* Embed nan-preserving-float crate.

* Add no_std check to the Travis CI config

* add missing dev-dependency
2018-10-29 11:16:55 +01:00
Sergey Pepyakin f6657bace4
Flat Stack (#98)
* Define Instruction Set.

* WIP

* WIP 2

* Tests

* Working

* Bunch of other tests.

* WIP

* WIP

* Use Vec instead of VecDeque.

* Calibrate the limits.

* Clean

* Clean

* Another round of cleaning.

* Ignore traces.

* Optimize value stack

* Optimize a bit more.

* Cache memory index.

* Inline always instruction dispatch function.

* Comments.

* Clean

* Clean

* Use vector to keep unresolved references.

* Estimate resulting size.

* do refactoring

* Validate the locals count in the begging

* Introduce Keep and DropKeep structs in isa

* Rename/Split Validator into Reader

* Document stack layout

* Remove println!

* Fix typo.

* Use .last / .last_mut in stack

* Update docs for BrTable.

* Review fixes.

* Merge.

* Add an assert that stack is empty after the exec
2018-07-04 10:08:45 +03:00
Wei Tang f91dc92119 Update parity-wasm dependency to 0.31 (#105)
* Update parity-wasm dependency to 0.31
* Fix tests
2018-06-29 14:10:04 +03:00
Sergey Pepyakin 730c918a80
Don't expand locals. (#86) 2018-04-20 17:55:07 +03:00
Jef 22b260a3b9 Optionally deny floating point operations (#83)
* Optionally deny floating point operations

* Deny floating-point parameters and fix docs/indentation

* Test denial of floating-point parameters
2018-04-18 15:09:09 +03:00
Sergey Pepyakin 86bbd96a33
Require func_type (not func) for func import. (#79) 2018-03-22 17:49:30 +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 b323d004fe Hide GlobalType 2018-01-22 16:23:07 +03:00
Sergey Pepyakin aae9a3c129 Hide validation stuff. 2018-01-22 16:11:20 +03:00
Sergey Pepyakin 49347a63ee Initial commit 2018-01-17 19:54:06 +03:00