Dan Gohman
53a0c6c67f
Update to the rustfmt in rust 1.29, which is now stable.
2018-09-13 12:59:25 -07:00
Dan Gohman
f23ea04242
Fix a panic when splitting a critical edge on a jump_table with nulls.
...
This fixes #505 .
2018-09-12 16:59:03 -07:00
Dan Gohman
f6519c87a4
Improve the assertion failure message for sealing a block twice.
2018-09-12 16:58:36 -07:00
Dan Gohman
f2177deec1
Improve assertion messages in Module finalization.
...
When an object being finalized references an object declared as needing
a definition, the definition needs to be available. Add asserts to catch
this specific case.
2018-09-12 16:07:43 -07:00
Dan Gohman
9e65b694bd
Minor code simplification; avoid an unneeded match.
2018-09-12 16:07:14 -07:00
Dan Gohman
d0f703a6ff
Fix the type of table bounds in DummyEnvironment.
...
Also, fix the wasm testsuite harness to run the verifier with a
TargetIsa so that it catches problems like this.
2018-09-12 14:40:20 -07:00
Maddy
52e6b07058
Update the reload pass to replace copies with fill/spill instructions.
2018-09-12 14:15:45 -07:00
Dan Gohman
40bcd613cd
Merge branch 'master' into simplejit-example-improvements
2018-09-11 09:45:43 -07:00
Dan Gohman
b4c7451ae5
Bump version to 0.21.1
2018-09-10 10:00:45 -07:00
Joshua Warner
f012bd8500
Demonstrate arguments, returns, and adds in example
2018-09-06 22:29:44 -07:00
Joshua Warner
e051e9f4c8
Fix std feature propagation
2018-09-06 22:29:43 -07:00
Nick Fitzgerald
90756a8a01
clif-util: Default to reading input files from stdin
...
Fixes #495
2018-09-06 17:35:26 -07:00
Dan Gohman
f3c46ad2a2
Add more documentation about Module and Backend.
2018-09-05 15:19:37 -07:00
Dan Gohman
608e74d8cb
Document that b8 etc. are intended for use as SIMD elements.
2018-09-05 14:23:03 -07:00
Dan Gohman
e8878ba504
Bump version to 0.21.0
2018-09-04 22:04:22 -07:00
Dan Gohman
112e4a6083
Add a use std::vec::Vec; to fix the no_std build.
2018-09-04 21:57:32 -07:00
Dan Gohman
d4b8622393
Rename the VOID type to INVALID and clean up obsolete comments.
...
The VOID type isn't used for anything resembling what "void" means in C,
so rename it to INVALID to avoid confusion.
2018-09-04 21:46:22 -07:00
Dan Gohman
18900df4d5
Clean up obsolete comments.
2018-09-04 21:22:50 -07:00
Dan Gohman
ca9da7702e
Reorganize the global value kinds. ( #490 )
...
* Reorganize the global value kinds.
This:
- renames "deref" global values to "load" and gives it a offset that works
like the "load" instructions' does
- adds an explicit "iadd_imm" global value kind, which replaces the
builtin iadd in "vmctx" and "deref" global values.
- also renames "globalsym" to "symbol"
2018-09-04 21:09:04 -07:00
Caroline Cullen
59b83912ba
Adds pass command to clif-util. ( #487 )
...
* Adds pass command to clif-util.
2018-09-04 16:31:24 -07:00
Aaron Power
17bb62c16c
Added bitrev instruction for 32 and 64 bit integers ( #486 )
2018-09-04 16:23:50 -07:00
Kaz Wesley
7e571f4a49
Print value aliases at referrent definition ( #492 )
...
* Print value aliases at referrent definition
Closes #488 .
2018-09-04 15:02:46 -07:00
Benjamin Bouvier
300a76469f
wasm: Clear tables too in TranslationState::clear(); ( #491 )
2018-08-30 09:01:07 -07:00
Dan Gohman
67b7a8594a
Implementing Deref in PrimaryMap turns out to be error-prone, so remove it.
...
One of the big advantages of PrimaryMap is that it protects against
using the wrong indices via a distinct index type. A Deref trait that
returns a plain slice would accept other indices. Add a comment
explaining this.
2018-08-28 20:55:06 -07:00
Dan Gohman
c836a96e30
Bump cranelift-entity version to 0.20.1.
2018-08-28 20:19:09 -07:00
Dan Gohman
1affd5eae7
Add Deref and DerefMut implementations for PrimaryMap.
2018-08-28 20:19:01 -07:00
Dan Gohman
f834afb5f6
Bump cranelift-wasm version to 0.20.1.
2018-08-28 17:18:36 -07:00
Dan Gohman
fcd859a45e
Make FuncIndex and DefinedFuncIndex implement the Debug trait.
2018-08-28 17:05:49 -07:00
Dan Gohman
7fa0a38793
Bump version to 0.20.0
2018-08-28 16:37:52 -07:00
Dan Gohman
0842825c38
Minor code simplification.
2018-08-28 16:30:51 -07:00
Dan Gohman
c23bfdaa91
Minor code simplification.
2018-08-28 16:24:10 -07:00
Dan Gohman
d2943ec32d
Add a minimal SimpleJIT example program.
...
This minimally demonstrates usage of the API, and serves as a very small
testcase to test that the basic JIT mechanisms are working.
2018-08-28 16:13:23 -07:00
Dan Gohman
bdd1949b34
Don't pass Copy objects by reference.
2018-08-28 15:33:18 -07:00
Dan Gohman
9ada394d11
[SimpleJIT] When finalizing multiple functions, make them all executable at the end. ( #474 )
...
Add `publish()` function to cranelift-module's `Backend` trait, which
allows `finalize_all()` to defer making memory executable until it
has finished all of the patching it needs to do.
2018-08-28 15:27:52 -07:00
Dan Gohman
8e2d01a675
Add an index_type field to Table.
...
This parallels the `index_type` field in `Heap`.
2018-08-28 14:28:43 -07:00
Dan Gohman
eb439c9a68
Fix legalization of heap_addrs with 32-bit indices. ( #480 )
...
This makes several changes:
- It adds an index_type to heap declarations, allowing heaps to specify the
type for indexing. This also anticipates 64-bit heap support.
- It adds a memory_type to deref global values, allowing deref globals to
have types other than pointers. This is used to allow the bound variable
in dynamic heaps to have type i32, to match the index type in heaps
with i32 index type.
- And, it fixes heap legalization to do the bounds check in the heap's
index type.
2018-08-28 13:37:33 -07:00
Dan Gohman
00ddf3a7a6
Update to serde_derive 1.0.75.
2018-08-28 13:23:55 -07:00
Dan Gohman
ba8dd836ff
Update to wabt 0.5.0.
2018-08-28 13:23:37 -07:00
Dan Gohman
6af407144c
Remove Signature's argument_bytes field.
...
It's not currently used. If we do need such information, it would be
better to compute it on demand.
2018-08-28 13:19:59 -07:00
Dan Gohman
e60477092a
Add a make_signature function for making callable signatures.
...
The `Module` can create signatures with the appropriate calling
convention.
2018-08-28 13:19:59 -07:00
Grégoire Geis
0e67255f52
Fix error not reported if at least one other error expected. ( #485 )
...
* fix error not reported if at least one other error expected.
* Fixed unused extern crate error if wasm feature is not enabled.
* No longer reporting deref cycles multiple times.
* Fix filetest type_check.clif.
* Switched comparison order for perf.
* Fixed isa/riscv/verify-encoding.clif filetest.
2018-08-28 10:33:46 -07:00
Grégoire Geis
8e74a4f8fc
Pretty printing preamble errors. ( #472 )
...
* Pretty printing preamble errors.
2018-08-27 09:38:44 -07:00
Dan Gohman
2c9b7fd73a
Add "no-std" category to crates supporting no-std.
...
And add "wasm" category to cranelift-wasm.
2018-08-22 12:51:54 -07:00
Dan Gohman
18f781e2ab
Update to faerie 0.5.0.
2018-08-22 12:51:54 -07:00
Dan Gohman
77eb38c41f
[Module] Remove DataDescription's writable field.
...
It was redundant, as data object declarations also have a writable
field, so just use that, avoiding the need for users to declare the
same thing twice.
Fixes #456 .
2018-08-20 16:17:46 -07:00
ms2300
30d09cf6b0
Fixing a couple clippy warnings : #392
2018-08-20 13:35:02 -07:00
Dan Gohman
37272f5ceb
Removed "Variable" parametricity for SSABuilder and related code too.
2018-08-17 12:13:34 -07:00
Dan Gohman
ad170c7412
Update to log 0.4.4.
2018-08-17 12:04:01 -07:00
Dan Gohman
ae1a17f6b3
[SimpleJIT] Fix allocation of readonly memory.
...
Fixes #457 .
2018-08-16 18:15:22 -07:00
Dan Gohman
3d89a8645b
Fix rustfmt errors.
2018-08-16 15:26:53 -07:00