Commit Graph

6 Commits

Author SHA1 Message Date
Jef 899cc32e45 rustfmt (#151) 2018-12-11 12:54:06 +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
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 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 49347a63ee Initial commit 2018-01-17 19:54:06 +03:00