Benjamin Bouvier
c78a9a4a7c
Bump log and file-per-thread-logger;
2019-01-03 12:14:39 -08:00
Benjamin Bouvier
813810008b
Replace deprecated trim_left_matches by trim_start_matches;
2019-01-03 12:14:39 -08:00
Benjamin Bouvier
7e42966c68
Use snake case for magic numbers computation;
2019-01-03 12:13:25 -08:00
bjorn3
e9cb50313d
Fix emit_small_mem{cpy,set} when size == 0 or access_size > 8
2019-01-02 12:18:49 -08:00
Dan Gohman
c8e47177fc
Add an assert to append_ebb_params_for_function_params.
2019-01-02 12:05:32 -08:00
Dan Gohman
831d033471
Add a shrink_to_fit function to PrimaryMap.
2019-01-02 12:01:36 -08:00
Dan Gohman
cd4f96c066
Use Vec::with_capacity when we know the eventual size of the Vec.
2019-01-02 11:59:57 -08:00
Dan Gohman
29edc3fe50
Make ListPool's alloc fill new memory with reserved values.
...
This makes it harder to misuse, as 0 could be confused for a valid value.
2019-01-02 11:59:22 -08:00
Dan Gohman
8a11bd6af7
Remove BoxedSlice's next_key() function, which is unneeded.
...
`BoxedSlice` does not support appending elements, so it isn't useful to
look up the next key.
2019-01-02 11:58:44 -08:00
bjorn3
ab72eeadf9
Bump faerie to 0.7.0
2019-01-02 11:12:48 +01:00
Muhammad Mominul Huque
effe6c04e4
Update to Rust 2018 edition ( #632 )
...
* 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
2018-12-26 09:49:05 -08:00
bjorn3
e3db942b0c
Put default implementations of FuncWriter methods in a seperate method
...
This is useful when you want to write extra information
2018-12-26 09:21:32 -08:00
Bruce Mitchener
4f8753fa11
Fix typos.
2018-12-24 10:03:22 -08:00
Bruce Mitchener
4224a95f0d
Update wasmparser to 0.23.
2018-12-24 09:49:06 -08:00
Dan Gohman
887451a2eb
Fix formatting.
2018-12-24 09:32:50 -08:00
Dan Gohman
998a7d2b6d
Mention Wasmtime as a complete implementation of the Environment traits.
2018-12-24 09:32:20 -08:00
bjorn3
95118e7244
Nicer panic when trying to insert instruction before calling switch_to_block
2018-12-24 09:31:51 -08:00
Nicholas Nethercote
46d9a3cd1a
Use an FxHashMap in RegDiversions.
...
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.
2018-12-17 21:36:06 -08:00
Dan Gohman
bee4ee4b6e
Clarify that cranelift-wasm is just one component.
...
For a complete WebAssembly implementation, see Wasmtime.
2018-12-13 06:03:28 -08:00
Dan Gohman
8bd35e154b
Tidy up some match bindings to be more consistent with the rest of the codebase.
2018-12-11 13:22:28 -08:00
Dan Gohman
c8e457e834
Bump version to 0.26.0
2018-12-11 12:54:23 -08:00
Dan Gohman
bc18085ad1
Use EntityRef::from_u32 to reduce casting.
2018-12-11 15:40:24 -05:00
Dan Gohman
a55c933f19
Factor out a MemFlags constructor for trusted notrap/aligned accesses.
2018-12-11 15:40:24 -05:00
Dan Gohman
68a13646f9
Add a from_u32 function to EntityRef.
...
This eliminates the need for casting in common cases.
2018-12-11 15:40:24 -05:00
Dan Gohman
b841652539
Add a Slice to supplement PrimaryMap.
2018-12-11 15:40:24 -05:00
Dan Gohman
5b03581442
Tidy up use declaration syntax.
2018-12-11 15:40:24 -05:00
Dan Gohman
7b51195f49
Add an offset to cranelift-wasm's GlobalVariable.
2018-12-11 15:40:24 -05:00
Dan Gohman
605f34257b
Fix a missing #[test].
2018-12-11 15:40:24 -05:00
Dan Gohman
30a0890319
Rename GlobalInit::GlobalRef to GlobalInit::GetGlobal.
...
"Ref" is an increasingly overloaded term.
2018-12-11 15:40:24 -05:00
Dan Gohman
566c160c37
Add a function to return the pointer type for a given triple.
...
Also use a slightly tidier naming convention for such functions.
2018-12-11 15:40:24 -05:00
Dan Gohman
38d1d58e06
Change GlobalInit::Import() to GlobalInit::Import.
2018-12-11 15:40:24 -05:00
Dan Gohman
76583192a8
Change ZeroOneOrMore::Zero() to TableElementType::Zero.
2018-12-11 15:40:24 -05:00
Dan Gohman
42e35c4c57
Implement PrimaryMap::with_capacity.
2018-12-11 15:40:24 -05:00
Dan Gohman
6e17bebf44
Publish TableElementType for library users.
2018-12-11 15:40:24 -05:00
Dan Gohman
f0dbba0ec8
Change TableElementType::Func() to TableElementType::Func.
2018-12-11 15:40:24 -05:00
Dan Gohman
c287231720
Implement FromIterator for PrimaryMap.
2018-12-11 15:40:24 -05:00
Dan Gohman
e623da51c6
Suppress dead-code warnings on functions expanded from entity_impl!.
2018-12-11 15:40:24 -05:00
Dan Gohman
91477d21c8
Add an as_u32() member to entity_impl types.
...
This allows us to avoid a lot of casting indices back to u32.
2018-12-11 15:40:24 -05:00
Dan Gohman
954573440d
Remove ModuleEnvironment::get_func_name, which is unused.
2018-12-11 15:40:24 -05:00
Dan Gohman
a20c852148
Support heaps with no offset-guard pages.
...
Also, say "guard-offset pages" rather than just "guard pages" to describe the
region of a heap which is never accessible and which exists to support
optimizations for heap accesses with offsets.
And, introduce a `Uimm64` immediate type, and make all heap fields use
`Uimm64` instead of `Imm64` since they really are unsigned.
2018-12-11 15:40:24 -05:00
Benjamin Bouvier
93696a80bb
Fixes #614 : Implement a debug trap;
2018-12-10 14:14:04 -05:00
Dan Gohman
5d7ece3d15
Fix clippy warning namespaces.
2018-12-06 20:50:38 -05:00
Dan Gohman
5adab629f2
Update to the rustfmt in rust 1.31, which is now stable.
2018-12-06 16:15:48 -05:00
Benjamin Bouvier
d94e027c2a
[build] Move settings generation from Python to Rust code;
2018-11-30 11:05:21 -06:00
Benjamin Bouvier
4c8f1e7a5a
[meta] Ignore empty lines to compute indent when parsing multiple lines;
2018-11-30 11:05:21 -06:00
Benjamin Bouvier
12df943409
[meta] Add support to generate Match expressions in Rust;
2018-11-30 11:05:21 -06:00
Benjamin Bouvier
d15e56a9fa
Add build warning only if CRANELIFT_VERBOSE is set to anything;
2018-11-30 11:05:21 -06:00
Dan Gohman
9947c315b7
Fix Python check script to work outside of Travis.
2018-11-30 06:07:18 -08:00
Dan Gohman
416f8c094d
Name Table and Memory's initial field minimum and make it u32.
...
The spec has switched to calling the "initial" field the "minimum" field
because when linear memory is imported, it may initially be greater than
the "initial" value.
Making it u32 instead of usize will help avoid accidental host-specific
behavior.
2018-11-29 15:03:49 +01:00
Dan Gohman
ba48fd2223
Add TODO comments noting temporary bug workarounds.
2018-11-28 17:18:12 -08:00