Major API-incompatible changes include:
- Introduce TrapCode::UnreachableCodeReached, used for unreachable in wasm.
- cranelift-wasm's `declare_signature` now takes its signature by value
- cranelift-wasm's `declare_table_elements` `elems` parameter now takes a boxed slice
- Remove cranelift-wasm's `ModuleEnvironment`'s `get_signature`,
`get_num_func_imports`, `get_func_type`, and `get_global`.
We are facing peculiar Windows-only regressions in build times in
https://bugzilla.mozilla.org/show_bug.cgi?id=1506511 and while the build
times might just be Windows being slow, putting directories in
`rerun-if-changed` might also be causing problems. The build only
depends on the files, anyway, so let's just say that.
With Rust 2018 Edition, the `mod std` trick to alias `core` names to
`std` no longer works, so switch to just having the code use `core`
explicitly.
So instead, switch to just using `core::*` for things that in core.
This is more consistent with other Rust no_std code. And it allows
us to enable `no_std` mode unconditionally in the crates that support
it, which makes testing a little easier.
There actually three cases:
- For things in std and also in core, like `cmp`: Just use them via
`core::*`.
- For things in std and also in alloc, like `Vec`: Import alloc as std, as
use them from std. This allows them to work on both stable (which
doesn't provide alloc, but we don't support no_std mode anyway) and
nightly.
- For HashMap and similar which are not in core or alloc, import them in
the top-level lib.rs files from either std or the third-party hashmap_core
crate, and then have the code use super::hashmap_core.
Also, no_std support continues to be "best effort" at this time and not
something most people need to be testing.
These default to doing nothing, but implementations can override them to
preallocate buffers.
Also, reorder the functions in `ModuleEnvironment` to more closely
reflect the sequence from the WebAssembly module layout.
Remove some unneeded functions, and remove the `GlobalInit` special case
for data and elem initializer offsets; implementations that want that
information can provide it for themselves.
* initial cargo fix run
* Upgrade cranelift-entity crate
* Upgrade bforest crate
* Upgrade the codegen crate
* Upgrade the faerie crate
* Upgrade the filetests crate
* Upgrade the codegen-meta crate
* Upgrade the frontend crate
* Upgrade the cranelift-module crate
* Upgrade the cranelift-native crate
* Upgrade the cranelift-preopt crate
* Upgrade the cranelift-reader crate
* Upgrade the cranelift-serde crate
* Upgrade the cranelift-simplejit crate
* Upgrade the cranelift or cranelift-umbrella crate
* Upgrade the cranelift-wasm crate
* Upgrade cranelift-tools crate
* Use new import style on remaining files
* run format-all.sh
* run test-all.sh, update Readme and travis ci configuration
fixed an AssertionError also
* Remove deprecated functions
Because it's hot and the number of entries can reach the 1000s, so
linear insertion and search is bad.
This reduces runtime for `sqlite` and `UE4Game-HTML5-Shipping` by 3-4%,
and a couple of other benchmarks (`sqlite`, `godot`, `clang`) by smaller
amounts.
It also increases runtime for `mono` and `tanks` by about 1%; this seems
to be due to incidental changes in which functions are inlined more than
algorithmic changes.