Dan Gohman
17859a87ff
Fix a typo in a comment.
2018-10-03 13:09:37 -07:00
Tyler McMullen
79cea5e18b
Implement jump tables ( #453 )
...
* Add 'jump_table_entry' and 'indirect_jump' instructions.
* Update CodeSink to keep track of code size. Pretty up clif-util's disassembly output.
* Only disassemble the machine portion of output. Pretty print the read-only data after it.
* Update switch frontend code to use new br_table instruction w/ default.
2018-10-03 10:04:21 -07:00
Benjamin Bouvier
de1d82b4ba
Make SettingsError easier to diagnose;
2018-10-03 06:36:03 -07:00
Benjamin Bouvier
8b296e4874
Fixes #504 : Implement Display/Fail for SetError and LookupError;
2018-10-03 06:36:03 -07:00
Benjamin Bouvier
0b3d3ac880
Remove logging levels restrictions ( #538 )
...
* Fixes #537 : Remove release mode logging levels restrictions;
* Add information about log's logging levels in the README;
2018-10-02 10:45:23 -07:00
Dan Gohman
e8fc612dc2
Update to wasmparser 0.19.0.
2018-09-28 16:56:04 -07:00
Dan Gohman
b94cf6c65b
Rename test modules to "tests" for consistency.
...
The majority of the test modules were already named "tests", and that's
what the example in the Rust book uses, so switch to that for all test
modules, for consistency.
2018-09-28 14:50:01 -07:00
Dan Gohman
52aa1d292a
Update no_std support in cranelift-frontend.
2018-09-28 14:46:26 -07:00
Dan Gohman
75e4ff62a0
Update to filecheck 0.4.0.
2018-09-27 17:30:16 -07:00
Dan Gohman
aa5ba71c97
Clarify the meaning of the symbol_value instruction.
2018-09-27 11:43:41 -07:00
Muhammad Mominul Huque
d266b1a42d
Rename EntityMap to SecondaryMap ( #528 )
...
* Rename `EntityMap` to `SecondaryMap`
2018-09-26 12:03:44 -07:00
Dan Gohman
95e904da75
Merge branch 'master' into master
2018-09-25 16:12:26 -07:00
bjorn3
2eec1469a8
Legalize some more i8/i16 intructions ( #524 )
...
* Legalize some more i8/i16 intructions
2018-09-25 16:10:23 -07:00
bjorn3
2c53e2102c
Add a sparse Switch usable instead of JumpTable to cranelift-frontend ( #517 )
...
* Add a sparse Switch usable instead of JumpTable to cranelift-frontend (fixes #438 )
2018-09-25 07:34:32 -07:00
Bruce Mitchener
81d6731e76
clippy: Remove explicit return statements.
2018-09-24 09:40:32 -07:00
Bruce Mitchener
e07e159bda
filetests: run_passes can take &str, not &String.
2018-09-24 09:40:32 -07:00
Sergey Pepyakin
2a7cc7e644
Bump wabt version to 0.6.
2018-09-23 16:35:33 -07:00
Aaron Power
09f2b78b14
Added FunctionBuilder::{call_memcpy, call_memset, call_memmove}
2018-09-23 11:25:39 +01:00
Dan Gohman
3e996c198f
Remove the scroll 0.9.0 dependency.
...
Scroll 0.9.2 is now published which fixes the issue in 0.9.1, so
we can drop our fixed dependency on 0.9.0.
2018-09-22 22:24:29 -07:00
Aaron Power
c187e7a345
Replaced LibCall's fmt::Display implementation
2018-09-22 21:43:31 -07:00
Dan Gohman
15a237520e
Depend on scroll 0.9.0 to fix Rust 1.25 compatibility.
2018-09-22 20:59:54 -07:00
Dan Gohman
ab99720959
Bump version to 0.22.0
2018-09-21 21:39:41 -07:00
Dan Gohman
cb6b1a76db
Add a use std::vec::Vec; to fix the no_std build.
2018-09-21 21:14:06 -07:00
Dan Gohman
8d6a8e9069
Remove Module's finalize_function and finalize_data. ( #519 )
...
* Remove `Module`'s `finalize_function` and `finalize_data`.
Remove the ability to finalize individiual functions and data objects,
and instead just provide a way to finalize everything that's been
defined but not yet finalized. This allows SimpleJIT to share an
allocation between multiple functions without having to worry about
individual functions being finalized and needing to be published
without the other functions in the same allocation.
Users of the return values of `Module`'s `finalize_function` and
`finalize_data` should now use `get_finalized_function` and
`get_finalized_data` to obtain these values.
2018-09-21 20:13:33 -07:00
Dan Gohman
c840fb2f08
Move tests/moduletests.rs into lib/simplejit/tests.
...
These tests depend on cranelift-simplejit, which is higher-level than the
other crates they depend on, so lib/simplejit is a good place for them.
2018-09-19 20:19:57 -07:00
Dan Gohman
6e9c33a1ef
Mark JIT memory as readable in addition to executable.
...
While we don't currently need this, we will for jump tables and constant
pools.
2018-09-19 20:11:37 -07:00
Dan Gohman
d514cec065
Avoid unneeded '&'s in let patterns.
2018-09-19 20:11:37 -07:00
Dan Gohman
3228d73f33
Add more content to cranelift-entity's README.md. ( #515 )
...
* Add more content to cranelift-entity's README.md.
Summarize what cranelift-entity provides, and how it differs from
similar systems such as slotmap, which was recently highlighted in the
RustConf 2018 Closing Keynote.
2018-09-19 13:49:59 -07:00
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