Commit Graph

111 Commits

Author SHA1 Message Date
Nick Fitzgerald
5ad82de3c5 Bump Wasmtime to 0.22.0; Cranelift to 0.69.0 2021-01-07 14:51:12 -08:00
bjorn3
411ec3a857 Rename SimpleJIT to JIT as it isn't simple anymore 2020-12-04 13:21:13 -08:00
bjorn3
86d3dc9510 Add prepare_for_function_redefine 2020-11-12 19:39:44 +01:00
bjorn3
1dc27c93a4 Introduce DataDescription::all_relocs to dedup some code 2020-11-11 12:36:17 +01:00
bjorn3
844a52e96a Don't unnecessarily take &self for some ModuleDeclarations methods 2020-11-11 11:43:09 +01:00
bjorn3
856f799ade Make some things more consistent between define_function and define_function_bytes 2020-11-11 11:38:28 +01:00
bjorn3
5df5bbbdca Fix usage of default_libcall_names (#2378)
* Fix usage of default_libcall_names

* Add basic cranelift-object test

It is based on a test with the same name in cranelift-simplejit
2020-11-09 10:33:56 -06:00
Andrew Brown
c9e8889d47 Update clippy annotation to use latest version (#2375) 2020-11-09 09:24:59 -06:00
Alex Crichton
8af2dbfbac Allow offloading compilation in cranelift-object (#2371)
This commit is a slight refactoring of the `Module` trait and backend in
`cranelift-object`. The goal is to enable parallelization of compilation
when using `cranelift-object`. Currently this is difficult because
`ObjectModule::define_function` requires `&mut self`. This instead
soups up the `define_function_bytes` interface to handle relocations so
compilation can happen externally before defining it in a `Module`. This
also means that `define_function` is now a convenience wrapper around
`define_function_bytes`.
2020-11-06 09:56:44 -06:00
Alex Crichton
ab1958434a Bump to 0.21.0 (#2359) 2020-11-05 09:39:53 -06:00
Pat Hickey
7b43bf76ed Merge pull request #2287 from bjorn3/simplejit_improvements
Some SimpleJIT improvements
2020-10-29 12:09:37 -07:00
Qinxuan Chen
3cd9d52d32 Update the hashbrown to use the same version (#2338)
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
2020-10-29 09:59:56 -05:00
bjorn3
7a2a4bc903 Add some debug derives 2020-10-12 11:45:01 +02:00
Pat Hickey
13c6bdd9ba cranelift-module: add iterator methods to ModuleDeclarations
The predecessor interface made it possible to iterate across all
function and data declarations. This is still useful and easy enough to
provide.
2020-10-07 20:06:58 -07:00
bjorn3
b061694491 Rustfmt and update docs 2020-10-01 09:53:23 +02:00
bjorn3
d84ca235d2 Remove Backend trait and turn Module into a trait 2020-09-30 19:52:57 +02:00
bjorn3
84c6ec3214 Move alignment config from declare_data to define_data 2020-09-30 19:23:23 +02:00
bjorn3
b44c5bb2be Move ModuleDeclarations to backends 2020-09-30 18:33:29 +02:00
bjorn3
7a6e909efe Move a bit more logic out of Module 2020-09-30 17:31:08 +02:00
bjorn3
c2ffcdc6d0 Move logic out of more Module methods 2020-09-30 17:12:33 +02:00
bjorn3
80f4ecf9b5 Move almost all logic out of Module 2020-09-30 16:50:24 +02:00
bjorn3
588a4be0b3 Store Compiled* in the backend instead of Module 2020-09-30 16:18:57 +02:00
bjorn3
405b9e2875 Remove finalize_* from the Backend trait
Instead let the `finish` method perform finalization
2020-09-30 14:20:39 +02:00
bjorn3
59f95083b1 Remove write_data_funcaddr and write_data_dataaddr
They are unimplemented by all backends
2020-09-30 13:59:26 +02:00
bjorn3
7608749647 Merge finalize_definitions into finish 2020-09-30 13:58:13 +02:00
bjorn3
4483c3740a Remove get_finalized_* 2020-09-30 13:53:01 +02:00
bjorn3
7dcfb1b47b Move some error checking out of the define_* functions 2020-09-30 12:40:26 +02:00
bjorn3
b1187b5507 Merge ModuleNamespace and ModuleContents 2020-09-30 12:29:22 +02:00
Alex Crichton
5e08eb3b83 Bump wasmtime to 0.20.0 (#2222)
At the same time bump cranelift crates to 0.67.0
2020-09-23 13:54:02 -05:00
Pat Hickey
35c100fdca delete cranelift-faerie
see https://github.com/bytecodealliance/wasmtime/pull/1816

DEPRECATION NOTICE: the Cranelift developer team intends to stop maintaining
the `cranelift-faerie` crate and remove it from the `wasmtime` git repository
on or after August 3, 2020. We recommend users use its successor, the
`cranelift-object` crate.
2020-08-18 11:02:14 -07:00
Alex Crichton
63d5b91930 Wasmtime 0.19.0 and Cranelift 0.66.0 (#2027)
This commit updates Wasmtime's version to 0.19.0, Cranelift's version to
0.66.0, and updates the release notes as well.
2020-07-16 12:46:21 -05:00
Pat Hickey
4f72a7483b Merge pull request #1836 from carlokok/feature/object_file_section
Cranelift: Module data apis should allow specifying the object file section
2020-06-17 10:49:09 -07:00
Carlo Kok
b2549d1fde Rust fmt fixes 2020-06-17 06:46:58 +02:00
Carlo Kok
0b613caad1 Address concerns in pullrequests. 2020-06-15 20:46:04 +02:00
Dan Gohman
caa87048ab Wasmtime 0.18.0 and Cranelift 0.65.0. 2020-06-11 17:49:56 -07:00
Carlo Kok
38531b8f42 Rust fmt fixes 2020-06-08 19:56:21 +02:00
Carlo Kok
6b47079884 Cranelift: Module data apis should allow specifying the object file section #1640 2020-06-06 16:08:21 +02:00
whitequark
bc555468a7 cranelift: add i64.{ishl,ushr,ashr} libcalls.
These libcalls are useful for 32-bit platforms.

On x86_32 in particular, commit 4ec16fa0 added support for legalizing
64-bit shifts through SIMD operations. However, that legalization
requires SIMD to be enabled and SSE 4.1 to be supported, which is not
acceptable as a hard requirement.
2020-06-05 12:13:49 -07:00
Dan Gohman
a76639c6fb Wasmtime 0.17.0 and Cranelift 0.64.0. (#1805) 2020-06-02 18:51:59 -07:00
whitequark
b2e8ed4dc9 cranelift: add i64.[us]{div,rem} libcalls.
These libcalls are useful for 32-bit platforms.
2020-05-22 11:41:56 +00:00
Dan Gohman
864cf98c8d Update release notes, wasmtime 0.16, cranelift 0.63. 2020-04-29 17:30:25 -07:00
Dan Gohman
fde5ddf159 Fixes for 0.15 (#1449)
* Wasmtime 0.15.0 and Cranelift 0.62.0. (#1398)

* Bump more ad-hoc versions.

* Add build.rs to wasi-common's Cargo.toml.

* Update the env var name in more places.

* Remove a redundant echo.
2020-04-03 13:13:37 -07:00
Dan Gohman
6fa9be7767 Wasmtime 0.13.0 and Cranelift 0.61.0. (#1398)
This also updates the publishing scripts to work with newly added
and reorganized crates.
2020-03-26 13:19:02 -07:00
Nathan Froyd
dcabb55776 change Module::define_function to take TrapSink instances
Experience with the `define_function` API has shown that returning
borrowed slices of `TrapSite` is not ideal: the returned slice
represents a borrow on the entire `Module`, which makes calling back
into methods taking `&mut self` a bit tricky.

To eliminate the problem, let's require the callers of `define_function`
to provide `TrapSink` instances.  This style of API enables them to
control when and how traps are collected, and makes the `object` and
`faerie` backends simpler/more efficient by not having to worry about
trap collection.
2020-03-24 13:36:01 -04:00
Nathan Froyd
af709ded94 bump cranelift version to 0.60.0 (#1328) 2020-03-17 15:29:20 -04:00
Pat Hickey
8bbf07c758 Merge pull request #1327 from bjorn3/linkage_hidden
Add support for hidden visibility
2020-03-17 11:34:41 -07:00
bjorn3
b4562c62e3 Add support for hidden visibility 2020-03-17 17:51:12 +01:00
Pat Hickey
fdfda89d59 cranelift-module: make backend error an anyhow::Error
This allows us to retain richer information from backend errors.
We already have `anyhow` as a dep in several places in the wasmtime
tree, and in cranelift-faerie. faerie is the only user of this
variant.

Existing code that puts a String into the Backend error can trivially
adapt their code to emit an anyhow::Error.
2020-03-17 09:44:33 -07:00
Till Schneidereit
8f824a9fc1 Update outdated references to the Cranelift repository
This patch updates or removes all references to the Cranelift repository. It affects links in README documents, issues that were transferred to the Wasmtime repository, CI badges, and a small bunch of sundry items.
2020-03-09 14:06:24 +01:00
Pat Hickey
e47de6f605 Merge pull request #1214 from froydnj/trap-exposure
cranelift-module: expose trap information when defining functions
2020-03-05 14:17:19 -08:00