Commit Graph

435 Commits

Author SHA1 Message Date
Dan Gohman
b3d831015c Add basic logging support to the wasmtime binary. 2018-11-29 15:38:12 -08:00
Frank Rehberger
4ac41213ad Add test_environ_translate 2018-11-28 04:33:14 -08:00
Dan Gohman
95fba6a9de Update to Cranelift 0.25. 2018-11-26 22:50:07 -08:00
Dan Gohman
74ccddcd64 Update to Cranelift 0.24. 2018-11-25 05:08:29 -08:00
Dan Gohman
0a0108f959 Update to Cranelift 0.22. 2018-11-25 05:08:29 -08:00
Dan Gohman
8e114a2703 Update authors in Cargo.toml. 2018-10-30 13:08:42 -07:00
Nathan Froyd
5f11f44482 add a --target option to wasm2obj 2018-10-10 08:10:09 -07:00
Dan Gohman
ecae909b9e Add the "wasm" category in Cargo.toml files. 2018-08-28 21:03:07 -07:00
Dan Gohman
fb7153ccf4 Update to cranelift 0.20.0.
The biggest change is the split from FunctionIndex to
DefinedFuncIndex to FuncIndex. Take better advantage of this by
converting several Vecs to PrimaryMaps.

Also, table_addr can now handle indices of the table index type,
so we don't need to explicitly uextend them anymore.
2018-08-28 20:56:58 -07:00
Dan Gohman
40791787c7 Update repository URLs. 2018-08-03 15:37:30 -07:00
Dan Gohman
548c45c604 Rename wasmtime-runtime to wasmtime-environ.
This mirrors changes in cranelift.
2018-08-03 15:20:19 -07:00
Dan Gohman
ef5254c0da More code reorganization and cleanups. 2018-08-03 15:06:59 -07:00
Dan Gohman
753d650f1a Update to cranelift 0.18.1. 2018-08-02 20:50:28 -07:00
Dan Gohman
f3a6cab472 Make package names consistent with cranelift's. 2018-07-21 06:46:37 -07:00
Dan Gohman
2608dd0c47 Update to cranelift 0.16.1, target-lexicon 0.0.3, faerie 0.4.4. 2018-07-21 06:46:19 -07:00
Dan Gohman
7a26b76521 Change the license to "Apache-2.0 WITH LLVM-exception". 2018-07-21 06:46:02 -07:00
Dan Gohman
c612d48b33 Rename to wasmtime. It's wasmtime!
Also, update to Cretonne 0.13.0.
2018-07-02 16:20:22 -07:00
Dan Gohman
73639e4557 Update to cretonne 0.9.0 and faerie 0.4.1. 2018-06-07 14:37:36 -07:00
Dan Gohman
b5e794a584 Update to Cretonne 0.8.0. 2018-05-14 12:58:28 -10:00
Dan Gohman
ed734f8ecb Update to Cretonne 0.4.0. 2018-03-16 16:34:20 -07:00
Dan Gohman
5a5f4e4a2f Switch to published packages rather than straight git paths.
We can do this now that all our dependencies are available in published
form, and this should reduce accidental breakage which APIs change.
2018-02-28 12:33:37 -08:00
Dan Gohman
f276a021cb Update wasmstandalone for API changes.
This updates to the latest faerie and cretonne API changes.
2018-02-22 09:44:02 -08:00
Dan Gohman
ca1b461375 Begin internal reorganization.
This begins reorganizing how translation and compilation occur, and
setting up infrastructure for imports/exports and relocations. It
splits parts out of StandaloneRuntime, forming Module, Compilation,
and Instance structs, which can be used more independently.

It also simplifies the command-line interface, in a step towards
making simple tools that just expose the functionality of the
libraries.
2017-10-13 14:47:01 -07:00
Dan Gohman
23bafd1218 Split the runtime and execution code into separate crates. 2017-10-03 14:57:52 -07:00
Dan Gohman
cad7e50106 Update to wasmparser 0.11.2. 2017-10-03 12:18:18 -07:00
Dan Gohman
e64eb79aaf Fix dependency paths. wasmstandalone no longer depends on out-of-tree patches. 2017-09-23 15:38:38 -07:00
Dan Gohman
0c78a2f298 Import the wasm2obj experiment and minimally update it. 2017-09-23 15:38:38 -07:00
Dan Gohman
cdffc1b50a Roughly update for the recent Cretonne API changes.
Everything builds and simple modules run, though there's still lots more
to do.
2017-09-22 15:56:18 -07:00
Dan Gohman
b3a952ed67 Change the license to MIT/Apache-2.0. 2017-09-15 09:58:09 -07:00
Dan Gohman
d0fe50a2a8 Check in the wasmstandalone code.
This is based on the code in https://github.com/denismerigoux/cretonne/commits/wasm2cretonne
before wasmstandalone was removed, with minor updates for the new library structure.
It is not yet updated for the latest cretonne API changes.
2017-09-05 17:06:51 -07:00
Denis Merigoux
234e72a5b3 Dumped code from the wasm2cretonne repo 2017-08-10 16:05:04 -07:00
Denis Merigoux
de5501bc47 Cretonne IL frontend: ILBuilder (#97)
* API and data structures proposal for the SSA construction module

* Polished API and implemented trivial functions

* API more explicit, Variable now struct parameter

* Sample test written to see how the API could be used

* Implemented local value numbering for SSABuilder

* Implemented SSA within a single Ebb

* Unfinished unoptimized implementation for recursive use and seal

* Working global value numbering
The SSABuilder now create ebb args and modifies jump instructions accordingly

* Updated doc and improved branch argument modifying.
Removed instructions::branch_arguments and instructions::branch_argument_mut

* SSA building: bugfix, asserts and new test case
Missing a key optimization to remove cycles of Phi

* SSA Building: small changes after code review
Created helper function for seal_block (which now contains sanity checks)

* Optimization: removed useless phis (ebb arguments)
Using pessimistic assumption that when using a non-def variable in an unsealed block we create an ebb argument which is removed when sealing if we detect it as useless
Using aliases to avoid rewriting variables

* Changed the semantics of remove_ebb_arg and turned it into a proper API method

* Adapted ssa branch to changes in the DFG API

* Abandonned SparseMaps for EntityMaps, added named structure for headr block data.

* Created skeletton for a Cretonne IL builder frontend

* Frontend IL builder: first draft of implementation with example of instruction methods

* Working basic implementation of the frontend
Missing handling of function arguments and return values

* Interaction with function signature, sample test, more checks

* Test with function verifier, seal and fill sanity check

* Implemented python script to generate ILBuilder methods

* Added support for jump tables and stack slot

* Major API overhaul
* No longer generating rust through Python but implements InstBuilder
* No longer parametrized by user's blocks but use regular `Ebb`
* Reuse of allocated memory via distinction between ILBuilder and FunctionBuilder

* Integrate changes from StackSlot

* Improved error message

* Added support for jump arguments supplied by the user

* Added an ebb_args proxy method needed

* Adapted to Entity_ref splitted into a new module

* Better error messages and fixed tests

* Added method to change jump destination

* We whould be able to add unreachable code

* Added inst_result proxy to frontend

* Import support

* Added optimization for SSA construction:
If multiple predecessors but agree on value don't create EBB argument

* Move unsafe and not write-only funcs apart, improved doc

* Added proxy function for append_ebb_arg

* Support for unreachable code and better layout of the Ebbs

* Fixed a bug yielding an infinite loop in SSA construction

* SSA predecessors lookup code refactoring

* Fixed bug in unreachable definition

* New sanity check and display debug function

* Fixed bug in verifier and added is_pristine ;ethod for frontend

* Extended set of characters printable in function names
To be able to print names of functions in test suite

* Fixes and improvements of SSA construction after code review

* Bugfixes for frontend code simplification

* On-the-fly critical edge splitting in case of br_table with jump arguments

* No more dangling undefined values, now attached as EBB args

* Bugfix: only split corresponding edges on demand, not all br_table edges

* Added signature retrieval method

* Bugfix for critical edge splitting not sealing the ebbs it created

* Proper handling of SSA side effects by the frontend

* Code refactoring: moving frontend and SSA to new crate

* Frontend: small changes and bugfixes after code review
2017-07-11 15:08:57 -07:00
Jakob Stoklund Olesen
e7c6efa31e Update docopt dependency to 0.8.0.
This breaks our depending on two different versions of the regex
library.

This updated docopt uses serde instead of rustc_serialize.
2017-06-14 10:38:06 -07:00
Jakob Stoklund Olesen
a8a79df620 Promote the src/tools crate to the top-level workspace.
The 'src' and 'tests' top-level directories now contain tools sources
and integration tests for any of the library crates.
2016-10-17 15:04:29 -07:00
Jakob Stoklund Olesen
67abb2d2f6 Create a phantom workspace manifest for all crates.
Share a single Cargo.lock and target directory at the repo top-level.
2016-10-10 10:52:48 -07:00