Andrew Dirksen
ab67889223
less misleading name for nth_from_top_mut_unchecked
2018-11-22 13:47:32 -08:00
Andrew Dirksen
21a8744e94
docs and tests
2018-11-22 13:13:34 -08:00
Andrew Dirksen
47273e15cf
use saturating_mul() instead of checked_mul().unwrap_or()
2018-11-22 12:17:35 -08:00
Andrew Dirksen
9262717089
nicer expect() messages
2018-11-22 12:09:45 -08:00
Andrew Dirksen
f1d64addf9
nicer expect message
2018-11-21 18:26:03 -08:00
Andrew Dirksen
7819950790
fix doctest
2018-11-21 18:24:01 -08:00
Andrew Dirksen
fc677010d1
change pub(crate) to pub where possible
2018-11-21 18:04:04 -08:00
Andrew Dirksen
b1d611d89f
# Errors -> # Panics
2018-11-21 17:42:57 -08:00
Andrew Dirksen
7306f69271
get_relative_to_top -> nth_from_top
2018-11-21 17:25:26 -08:00
Andrew Dirksen
84331a9325
don't make the user reset Interpreter between invocations
2018-11-21 17:12:47 -08:00
Andrew Dirksen
f981e525c8
spelling
2018-11-21 17:05:02 -08:00
Andrew Dirksen
07267813db
move invoke into Interpreter
2018-11-21 16:58:33 -08:00
Andrew Dirksen
0498125070
add doctest for with_stacks
2018-11-21 09:44:35 -08:00
Andrew Dirksen
94a62c2c20
interpreter constructor with default values
2018-11-21 09:03:24 -08:00
Andrew Dirksen
4b5c2d4a47
revert change to benches/.gitignore
2018-11-21 08:31:16 -08:00
Andrew Dirksen
844fd0c5c9
remove unnessesary argument from start_execution
2018-11-20 10:30:56 -08:00
Andrew Dirksen
6f9b0a2b96
optimize push and pop for StackWithLimit
2018-11-19 19:44:13 -08:00
Andrew Dirksen
1913702a03
benchmark interpreter reuse
...
name without-reuse.trace ns/iter with-reuse.trace ns/iter diff ns/iter diff % speedup
bench_regex_redux 3,214,008 3,162,089 -51,919 -1.62% x 1.02
bench_rev_comp 7,356,860 7,168,441 -188,419 -2.56% x 1.03
bench_tiny_keccak 3,943,358 3,910,487 -32,871 -0.83% x 1.01
fac_opt 10,959 2,096 -8,863 -80.87% x 5.23
fac_recursive 13,345 4,277 -9,068 -67.95% x 3.12
recursive_ok 1,190,562 1,141,940 -48,622 -4.08% x 1.04
recursive_trap 125,047 111,962 -13,085 -10.46% x 1.12
2018-11-19 16:00:21 -08:00
Andrew Dirksen
2f7f809fd6
make interpreter reusable
2018-11-19 15:59:23 -08:00
Andrew Dirksen
9dd258c2bb
invoke_resumable does not need to take &args anymore
2018-11-19 14:02:08 -08:00
Andrew Dirksen
df3bce60d3
repair invalid test
2018-11-19 13:39:08 -08:00
Andrew Dirksen
57c48ecada
optimize drop_keep
2018-11-19 13:27:13 -08:00
Andrew Dirksen
76c104ddc0
revert unhelpful #[inline]
2018-11-19 10:15:37 -08:00
Andrew Dirksen
510735f63b
remove println
2018-11-19 10:13:47 -08:00
Andrew Dirksen
34f2140cae
use StackWithLimit in interpreter
2018-11-16 22:01:28 -08:00
Andrew Dirksen
74b32aaebd
Merge branch 'master' of github.com:paritytech/wasmi into common-bounded-stack
2018-11-16 20:24:58 -08:00
Andrew Dirksen
94b10306b2
typesafe api with tests for StackWithLimit
2018-11-16 19:46:57 -08:00
Andrew Dirksen
47dd23f601
make StackWithLimit pre-allocate
2018-11-16 13:17:59 -08: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
Tobias Bucher
167e4845ef
Proofread the library-level docs ( #123 )
...
* Proofread the library-level docs
* Fix extra word, remove mention of linear memory "space"
2018-08-27 11:10:45 +03:00
Guanqun Lu
0409913a26
Typo fixes ( #119 )
...
* typo fixes
* more typo fixes
2018-08-03 16:05:10 +03:00
Guanqun Lu
929ac564a5
we don't need this TODO anymore ( #120 )
2018-08-03 16:04:33 +03:00
Guanqun Lu
8ca6b4b860
Add a section in README to show how to build and test ( #117 )
2018-08-01 12:21:50 +03:00
Sergey Pepyakin
0a34f1d0f6
Bump version to 0.4.0 ( #116 )
2018-07-31 17:05:21 +03:00
Arkadiy Paronyan
118396851a
Allocate memory on demand ( #115 )
...
* Allocate mem on demand
* More control in with_direct_access_mut
2018-07-31 16:25:46 +03:00
Guanqun Lu
5c86c1c753
Bump wabt's version to 0.4 and add two more test cases ( #114 )
...
* bump wabt version to 0.4
It has some interface changes.
* bump up testsuite and add two more test cases
* use the same expect string
2018-07-30 19:43:18 +03:00
Guanqun Lu
43b8d52bca
typo fixes in lib.rs ( #113 )
2018-07-30 15:16:17 +03:00