Commit Graph

44 Commits

Author SHA1 Message Date
Dan Gohman
8b5b22599f Don't test wasmtime-wasi-c on Windows. (#299) 2019-08-26 15:04:36 -07:00
Dan Gohman
1b2c70309f Only test wasmtime-py and wasmtime-rust if nightly is installed. (#293)
* Only test wasmtime-py and wasmtime-rust if nightly is installed.

* Update test-all.sh

Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>
2019-08-26 13:25:07 -07:00
Dan Gohman
44367ba99a Bump version to 0.2.0 2019-08-20 16:07:57 -07:00
Dan Gohman
eb2b51353e Rename the top-level crate from wasmtime-tools to wasmtime.
This is a binary application crate which contains the wasmtime
command-line application.
2019-05-18 20:25:08 -07:00
Dan Gohman
30dcf4aed6 Lightbeam requires nightly, so don't use cargo test --all.
For now, test all non-nightly-only packages individually, rather than
using cargo test --all. Lightbeam's tests are run separately if nightly
is available.
2019-04-05 13:42:54 -07:00
Dan Gohman
dae04be948 Switch from hashmap_core to hashbrown.
As suggested
[here](https://github.com/Amanieu/hashmap_core/pull/10#issuecomment-455866083).

This also allows us to re-enable the basic compile fuzz target.
2019-01-22 13:41:04 -08:00
Dan Gohman
c3dd82b0d5 Enable RUST_BACKTRACE=1 when running "cargo test". 2018-12-05 02:25:34 -05:00
Dan Gohman
4dec8ecfce Check for cargo fmt rather than checking for rustfmt directly. 2018-11-30 10:46:15 -06:00
Dan Gohman
0e19f39831 Temporarily disable the fuzz check in test-all.sh
We can re-enable it once https://github.com/Amanieu/hashmap_core/pull/8
is merged.
2018-11-26 05:04:05 -08:00
Dan Gohman
1f8b7c31a9 Remove obsolete clippy scripts.
Now that clippy is installable via rustup and is generally more stable,
we no longer need special scripts. `rustup component add clippy-preview` is
sufficient to install clippy, and `cargo clippy` is sufficient to run it.

Also, don't run clippy in test-all.sh. We do generally want to fix things
clippy reports, however it's not a requirement that the code be kept
clippy-warning-free at all times.
2018-10-09 14:41:07 -07:00
Dan Gohman
bb2589c63f Remove python code artifacts. 2018-08-03 16:00:41 -07:00
Dan Gohman
b8daa27884 Update test-all.sh. 2018-08-03 15:11:02 -07:00
Dan Gohman
1413a58544 Update the fuzzing harness for API changes. 2018-07-21 06:47:02 -07:00
Dan Gohman
a2f70a3544 Update to cranelift's formatting and testing scripts. 2018-07-20 20:48:34 -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
dfdab56a54 Integrated wasm test suite translation as cretonne test 2017-08-10 16:30:09 -07:00
Dimo
a06964fc0e test-all.sh should print the versions for both python2 and python3 its using 2017-07-24 12:11:01 -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
a29ea664e2 Install rustfmt as a separate Travis install step.
- Add a check-rustfmt.sh script which checks if the right version of
  rustfmt is installed.
- Run check-rustfmt.sh --install as an install step under travis_wait.

This is to work around the issue where cargo takes forever to build
rustfmt, causing Travis to terminate the build because it hasn't
produced any output for 10 minutes.
2017-04-27 13:55:13 -07:00
Jakob Stoklund Olesen
15606fa735 Upgrade to rustfmt 0.8.3. 2017-04-27 12:52:41 -07:00
Jakob Stoklund Olesen
46f0393417 Ensure that the docs examples verify as Cretonne IL.
Any *.cton files in the docs directory are now included when running the
test-all.sh script. This is to ensure that the examples are in fact
correct IL.

Always print NaN and Inf floats with a sign. Print the positive ones as
+NaN and +Inf to make them easier to parse.
2017-04-10 15:28:24 -07:00
Jakob Stoklund Olesen
8353651559 rustfmt 0.8.1 2017-04-05 09:00:11 -07:00
Jakob Stoklund Olesen
39e102b155 Add conditional branch encodings for RISC-V.
Not all br_icmp opcodes are present in the ISA. The missing ones can be
reached by commuting operands.

Don't attempt to encode EBB offsets yet. For now just emit an EBB
relocation for the branch instruction.
2017-04-03 15:16:25 -07:00
Jakob Stoklund Olesen
6532cbab6c Skip the Python checks if the Python files haven't changed. 2017-03-31 15:45:21 -07:00
Jakob Stoklund Olesen
32709a56ca Upgrade to rustfmt 0.8.0.
Lots of changes this time.

Worked around what looks like a rustfmt bug in parse_inst_operands where
a large match was nested inside Ok().
2017-03-14 10:48:05 -07:00
Jakob Stoklund Olesen
6e33173fce Install rustfmt when running under Travis CI.
The built rustfmt should be cached.
2017-01-25 15:42:16 -08:00
Jakob Stoklund Olesen
c132b8c328 Upgrade to rustfmt 0.7.1 2017-01-25 15:17:27 -08:00
Jakob Stoklund Olesen
42a0c27b24 Install mypy and flake8 in Travis environment. 2017-01-25 14:20:22 -08:00
Jakob Stoklund Olesen
2932d41f18 Run Python checks from test-all.sh
The Python style enforcements are easy to miss otherwise.
2017-01-25 14:12:36 -08:00
Jakob Stoklund Olesen
893a630ca0 Upgrade to rustfmt 0.6.3 2016-12-21 10:06:49 -08: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
02eae6afd0 Upgrade to rustfmt 0.6.2 2016-10-12 13:56:26 -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
Jakob Stoklund Olesen
78a2e47d95 Implement the 'test print-cfg' sub-test.
Move the CFG tests into the filetests directory.

Remove the tests directory, there are no more shell-driven tests left.
2016-09-15 17:21:56 -07:00
Jakob Stoklund Olesen
0b7f87b14c Convert parser tests to filetests.
Create a new directory hierarchy under 'filetests' for all the tests
that are run by 'cton-util test'.

Convert the parser tests under 'tests/parser' to use 'test cat' and
filecheck directives.
2016-09-15 15:50:47 -07:00
Jakob Stoklund Olesen
c95c23dbbe Add a cton-util filecheck sub-command. 2016-09-09 10:54:57 -07:00
Jakob Stoklund Olesen
ba26ce2e98 Upgrade to rustfmt 0.6.0. 2016-08-30 07:56:12 -07:00
Jakob Stoklund Olesen
ae8eb268ab Require a specific rustfmt version in test-all script.
Rustfmt is still so immature that developers can't have different versions
installed, or there will be minute differences in formatting causing the tests
to fail.

Only run rustfmt as part of the test-all script if the expected version is
available.
2016-08-30 07:48:02 -07:00
Jakob Stoklund Olesen
d0db391897 Verify Rust source code formatting as part of the unit tests.
Only do this is rustfmt is installed, which likely means don't run on Travis
CI.
2016-08-24 16:36:52 -07:00
Jakob Stoklund Olesen
84a154a8ca Move integration tests into src/tools/tests.
The integration tests use both libcretonne and libreader, so moving them avoids
the circular dev-dependency.

Also go back to building everything under src/tools/target to avoid rebuilding
the libraries when cargo is invoked in different subdirectories. This speeds up
test-all.sh quite a bit.

Finally, skip the pure debug build. We build "cargo test" and "cargo build
--release" which should cover everything we need.
2016-08-12 10:43:10 -07:00
Jakob Stoklund Olesen
14027660c5 Use sub-shells instead of pushd / popd.
The push and pop commands print the directory stack to stdout, while subshells
and cd is quiet.
2016-07-29 12:35:56 -07:00
Morgan Phillips
71bf589af3 Fix the test-all script so that it works with directories 2016-07-25 19:19:46 -07:00
Morgan Phillips
5bcce51bd9 Add print-cfg tests 2016-07-14 13:43:11 -07:00
Jakob Stoklund Olesen
a8c7ca6c75 Include parser tests in the test-all.sh script.
Move test-all.sh to the top level directory, and also run the parser tests from
this script.

Use a release build of cton-util to run the parser tests. As we accumulate many
tests in the tests directory tree, this will mean they can still be run quickly.

Point Travis config to the new test script.
2016-07-07 17:25:01 -07:00