Commit Graph

181 Commits

Author SHA1 Message Date
Sergey Pepyakin 0474402aca Explicitly use the core crate
This way it shouldn't matter if anybody e.g. imports other `Option` or redefines `Result`.
2019-01-26 12:57:50 +01:00
Sergey Pepyakin c9c83e44c7 Add tests 2019-01-25 17:27:47 +01:00
Sergey Pepyakin ed9488629d Return compile errors 2019-01-25 16:46:42 +01:00
Sergey Pepyakin 2b149f5bdf Fix Cargo.toml 2019-01-25 16:46:18 +01:00
Sergey Pepyakin 05027e617e Merge remote-tracking branch 'origin/master' into derive
# Conflicts:
#	Cargo.toml
#	wasmi/tests/spec/testsuite
2019-01-25 13:07:37 +01:00
Sergey Pepyakin 0f6b3e15f4 Clean 2019-01-25 13:06:04 +01:00
Sergey Pepyakin 27c5501ab0 Clean up 2019-01-25 13:02:11 +01:00
Sergey Pepyakin e9a414d504 Move examples and adapt. 2019-01-25 13:00:24 +01:00
Sergey Pepyakin 3bd8f8a250 Fix benches 2019-01-25 11:59:16 +01:00
Sergey Pepyakin 649818482d Fix fuzz 2019-01-25 11:56:47 +01:00
Sergey Pepyakin d49b9fe252 Test 2019-01-25 11:55:28 +01:00
Sergey Pepyakin 244648f40d fmt 2019-01-25 11:55:25 +01:00
Sergey Pepyakin 9410d17cb6 Rejig the repo structure 2019-01-25 11:52:12 +01:00
Sergey Pepyakin 1b8cf2705e Add docs. 2019-01-25 11:39:59 +01:00
Sergey Pepyakin cd9bcc073a Documentation. 2019-01-25 11:33:03 +01:00
Sergey Pepyakin da384ed27a Add derive feature 2019-01-25 11:32:54 +01:00
Sergey Pepyakin 0502619259 Cleanup 2019-01-25 11:03:47 +01:00
Sergey Pepyakin 0d5a87f64f Comments and renames 2019-01-25 11:02:03 +01:00
Sergey Pepyakin f578675ba6 Generate impl inside unused associated const 2019-01-25 10:52:05 +01:00
Sergey Pepyakin 6221f50545 Clean parser. 2019-01-25 10:51:42 +01:00
Sergey Pepyakin b83e6178b8 Start refactoring. 2019-01-25 10:45:39 +01:00
Sergey Pepyakin af19c66589 fmt 2019-01-25 10:43:03 +01:00
Elichai Turkel 23b054c0e5 Replaced hashmap_core with hashbrown (#161) 2019-01-20 17:59:26 +01:00
Sergey Pepyakin 4c51136e7c Renamings 2019-01-19 21:59:32 +01:00
Sergey Pepyakin 5f49943cfb Make it work. 2019-01-19 21:29:29 +01:00
Sergey Pepyakin 23b10d386c WIP 2019-01-19 01:31:47 +01:00
Leonardo Yvens ad14d82bce Expose globals to host (#158)
* Make `global_by_index` pub, add `globals` getter

* simplify access to globals
2019-01-18 00:27:56 +01:00
Arkadiy Paronyan 073e4e7f1f Fixed documentation for used_size (#156) 2019-01-08 16:16:49 +01:00
Sergey Pepyakin 7740f6b690 Bump wasmi to 0.4.3 2019-01-03 12:40:20 +01:00
Sergei Pepyakin c3b21b337d
Update editorconfig (#155) 2019-01-03 12:38:23 +01:00
Sergei Pepyakin d52ba8849a
Run rustfmt check on CI (#154)
* Run rustfmt check on CI

* Reformat.
2019-01-02 23:50:38 +01:00
Arkadiy Paronyan e047f508fa Track memory usage (#153)
* Track memory usage

* Track lowest_used in copy, etc.

* Extra comment for used_size
2019-01-02 22:13:21 +01:00
Jef 617be0198d Check type when resuming function (#152)
* Check type when resuming function

* Remove pub(crate)

* Update lib.rs
2019-01-02 12:18:24 +01:00
Jef 899cc32e45 rustfmt (#151) 2018-12-11 12:54:06 +01:00
Ivan Enderlin da558c7ce7 doc(host) Fix the `Externals` example (#149)
* doc(host) Fix the `Externals` example

The example is missing two things:

  * `index` is computed but not used,
  * `check_signature` is never used.

This patch tries to fix that.

* doc(host) Fix `check_signature` example
2018-11-28 14:03:03 +01:00
Jef c7f9196df6 Export LittleEndianConvert (#148) 2018-11-28 14:01:51 +01:00
Sergey Pepyakin 7191998216
Bump version to 0.4.2 (#144) 2018-11-15 13:19:53 +01:00
Sergey Pepyakin 15e9461bae
Allow failures on nightly (#143) 2018-11-15 13:11:10 +01:00
Jef e11ba15373 Remove `Box<[Target]>` from `Instruction` (#141)
This also allows `Instruction` to be `Copy`, which massively speeds
up `<Instructions as Clone>::clone` since it can now just `memcpy`
the bytes using SIMD instead of having to switch on every single
element. I haven't looked at the disassembly of `InstructionIter::next`
yet, it could be that there are even more improvements yet to be gained
from either:

* Only doing work on `BrTable` (this might already be the case depending
  on the whims of the optimiser)
* Using `unsafe` to make it a noop (we really don't want to do this,
  obviously, since it means that `Instructions` has to be immovable)
2018-11-15 12:18:47 +01:00
Eric Findlay 7b4c648acb Minor edits to documentation. (#140) 2018-11-09 15:39:40 +01:00
Jef c877d64508 Remove tag from RuntimeValue (#133)
* Remove tag from runtime value

* Add explanation of `RuntimeValueInternal`, move it so I don't need to do `pub(crate)`
2018-10-31 16:01:20 +01:00
Wei Tang 1c04be64f8 Remove redundent check_function_args (#135)
* Remove redundent check_function_args

* Remove unused format convertion in check_function_args

* Remove unnecessary alloc
2018-10-29 18:29:46 +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 2f7505d120
Travis maintenance (#132)
*  Use gcc-8 for builds

* Don't run cargo-deadlinks

* Update wabt to 0.6.
2018-10-26 15:03:01 +02:00
Jef 3854ecdad6 Remove some unsafety (#131)
* Remove unsafety

* Remove transmutes and pointer casts
2018-10-25 14:17:25 +02:00
Sergey Pepyakin ad4236263a
Don't update PC on every instruction (#130) 2018-10-19 16:55:07 +02:00
Will Glynn 7509477a61 Hide instruction storage details (#129)
* Hide Instructions implementation behind an iterator

* Hide instruction encoding behind isa::Instructions::push()

* Consistently use u32 for program counter storage

* Refer to instructions by position rather than index
2018-10-10 19:02:27 +02:00
Sergey Pepyakin 9170303aad Bump wasmi to 0.4.1 2018-10-02 11:36:23 +01:00
Sergey Pepyakin 36582c32b6
Transfer function (#128) 2018-10-02 11:01:18 +01:00
Sergey Pepyakin 438eab9ada
Don't run cargo deadlinks for nightly (#121) 2018-08-27 11:11:21 +03:00