commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
166c11af11af5741322f3f12790c7494d224143d | bjorn3 | 2019-02-23T10:13:24 | Fix global value colocated printing
It used to print `gv0 = colocated symbol u1:1` while cranelift-reader
expects `gv0 = symbol colocated u1:1`. | diff --git a/cranelift/codegen/src/ir/globalvalue.rs b/cranelift/codegen/src/ir/globalvalue.rs
index 5dc779286..b67c26e1a 100644
--- a/cranelift/codegen/src/ir/globalvalue.rs
+++ b/cranelift/codegen/src/ir/globalvalue.rs
@@ -114,10 +114,12 @@ impl fmt::Display for GlobalValueData {
offset,
... | 1 | 6 | 4 |
c91ca1b10c9da7d2b536c861450860f456043ea8 | Dan Gohman | 2019-01-23T08:19:06 | Reorganize ModuleEnvironment's contents to more closely reflect cranelift-wasm. | diff --git a/lib/environ/src/module_environ.rs b/lib/environ/src/module_environ.rs
index e9d4776a2..763258e56 100644
--- a/lib/environ/src/module_environ.rs
+++ b/lib/environ/src/module_environ.rs
@@ -80,6 +80,13 @@ impl<'data> cranelift_wasm::ModuleEnvironment<'data> for ModuleEnvironment<'data
self.result.ta... | 1 | 108 | 55 |
78f89f67a376bb7b40f299640ae474bef3dd9902 | Dan Gohman | 2019-01-23T08:08:45 | Update to Cranelift 0.28.0.
Also region 2.0.0 and bindgen 0.47.1. | diff --git a/lib/environ/src/module.rs b/lib/environ/src/module.rs
index 11e68ef3d..0a51fba9b 100644
--- a/lib/environ/src/module.rs
+++ b/lib/environ/src/module.rs
@@ -8,6 +8,7 @@ use cranelift_wasm::{
GlobalIndex, Memory, MemoryIndex, SignatureIndex, Table, TableIndex,
};
use indexmap::IndexMap;
+use std::boxe... | 5 | 7 | 6 |
2ac0ceda14322425352c6d324ec914ab1c288cf0 | Dan Gohman | 2019-02-22T04:28:15 | Update to faerie 0.7.1. | diff --git a/Cargo.toml b/Cargo.toml
index 4803654a8..49b2a23df 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -35,7 +35,7 @@ wasmtime-wast = { path = "lib/wast" }
docopt = "1.0.1"
serde = "1.0.75"
serde_derive = "1.0.75"
-faerie = "0.6.0"
+faerie = "0.7.1"
target-lexicon = { version = "0.2.0", default-features = fals... | 2 | 2 | 2 |
603d80615f2e52c4a62c597418c67b879a52cfcf | Benjamin Bouvier | 2019-02-13T16:27:33 | [meta] Introduce the fmtln! macro to ease writing formatted strings; | diff --git a/cranelift/codegen/meta/src/gen_registers.rs b/cranelift/codegen/meta/src/gen_registers.rs
index 11d80ff21..3a75c7147 100644
--- a/cranelift/codegen/meta/src/gen_registers.rs
+++ b/cranelift/codegen/meta/src/gen_registers.rs
@@ -10,25 +10,26 @@ fn gen_regbank(fmt: &mut Formatter, reg_bank: &RegBank) {
... | 5 | 211 | 173 |
c8e09cb37f97ec19ad210f4bd293c2b9a9a4e2e9 | Benjamin Bouvier | 2019-02-08T17:28:58 | [meta] Use AsRef<str> to allow passing String or &str to Formatter functions; | diff --git a/cranelift/codegen/meta/src/gen_registers.rs b/cranelift/codegen/meta/src/gen_registers.rs
index 8488dab22..11d80ff21 100644
--- a/cranelift/codegen/meta/src/gen_registers.rs
+++ b/cranelift/codegen/meta/src/gen_registers.rs
@@ -12,14 +12,14 @@ fn gen_regbank(fmt: &mut Formatter, reg_bank: &RegBank) {
... | 4 | 86 | 94 |
90028a6d0dbfa844b69eafbb37c15044ae553429 | YISH | 2019-02-19T19:44:39 | impl Ieee64::from(f64) and Ieee32::from(f32) | diff --git a/cranelift/codegen/src/ir/immediates.rs b/cranelift/codegen/src/ir/immediates.rs
index 21d8376e3..36cc470ae 100644
--- a/cranelift/codegen/src/ir/immediates.rs
+++ b/cranelift/codegen/src/ir/immediates.rs
@@ -665,6 +665,12 @@ impl FromStr for Ieee32 {
}
}
+impl From<f32> for Ieee32 {
+ fn from(x:... | 1 | 12 | 0 |
830644e7d0b688d8f940d93675437c94151c7c3c | Jef | 2019-02-19T14:44:04 | Remove printlns, make `push`ing stack arguments work properly | diff --git a/src/backend.rs b/src/backend.rs
index 417f0210c..cd31708e7 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -1372,19 +1372,31 @@ impl<M: ModuleContext> Context<'_, M> {
store!(i64_store, Rq, QWORD, "i64.store");
fn push_physical(&mut self, value: ValueLocation) -> ValueLocation {
+ se... | 2 | 18 | 10 |
615499bae88c89b7b108bad0afc4b85b0ce0afb4 | bjorn3 | 2019-01-18T16:26:28 | Remove define_function_peek_compiled | diff --git a/cranelift/module/src/module.rs b/cranelift/module/src/module.rs
index b043ee475..3b0f4673e 100644
--- a/cranelift/module/src/module.rs
+++ b/cranelift/module/src/module.rs
@@ -505,49 +505,44 @@ where
}
/// Define a function, producing the function body from the given `Context`.
- pub fn defi... | 1 | 36 | 36 |
a45b814de880137453ca78f1e55b103c99d9a149 | Benjamin Bouvier | 2019-02-11T14:01:10 | Fixes #13: Enable conditional compilation of ISAs through features; | diff --git a/cranelift/codegen/Cargo.toml b/cranelift/codegen/Cargo.toml
index 0448d8072..8ffee131f 100644
--- a/cranelift/codegen/Cargo.toml
+++ b/cranelift/codegen/Cargo.toml
@@ -29,16 +29,24 @@ log = { version = "0.4.6", default-features = false }
cranelift-codegen-meta = { path = "meta", version = "0.28.0" }
[f... | 12 | 129 | 90 |
049f0671686110fb39f6d745b45a59a0a4868b96 | Benjamin Bouvier | 2019-02-11T11:34:44 | [meta] Build registers with their own builder and immutably construct the TargetIsa; | diff --git a/cranelift/codegen/meta/src/cdsl/isa.rs b/cranelift/codegen/meta/src/cdsl/isa.rs
index 65edbbbb8..86b40a12c 100644
--- a/cranelift/codegen/meta/src/cdsl/isa.rs
+++ b/cranelift/codegen/meta/src/cdsl/isa.rs
@@ -1,192 +1,18 @@
-use cranelift_entity::PrimaryMap;
-
-use super::regs::{
- RegBank, RegBankBuilde... | 7 | 256 | 237 |
f78a61b9986581fff2cbc13322889ab1c1d001de | Benjamin Bouvier | 2019-02-11T10:24:53 | [meta] Rename base/ to shared/ in the Rust meta crate; | diff --git a/cranelift/codegen/meta/src/base/mod.rs b/cranelift/codegen/meta/src/base/mod.rs
deleted file mode 100644
index 1d596a130..000000000
--- a/cranelift/codegen/meta/src/base/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-//! Definitions for the base Cranelift language.
-
-pub mod settings;
-pub mod types;
diff --git a/... | 7 | 47 | 47 |
25fdda6134787bf53b69e6913c6ed2d4796b2f03 | Benjamin Bouvier | 2019-02-08T18:34:55 | [meta] Move source generation responsibility into the meta crate itself; | diff --git a/cranelift/codegen/build.rs b/cranelift/codegen/build.rs
index c4b1a12de..6aeaff683 100644
--- a/cranelift/codegen/build.rs
+++ b/cranelift/codegen/build.rs
@@ -20,7 +20,6 @@
use cranelift_codegen_meta as meta;
-use crate::meta::isa::Isa;
use std::env;
use std::process;
use std::time::Instant;
@@ -3... | 3 | 102 | 89 |
680a8ed585da1572639e6cdd6cc36e9c33dde697 | Jef | 2019-02-08T12:24:59 | Add select | diff --git a/src/backend.rs b/src/backend.rs
index 18cf1f146..e6c59c769 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -1965,6 +1965,55 @@ impl<M: ModuleContext> Context<'_, M> {
}
}
+ pub fn select(&mut self) {
+ let cond = self.pop();
+ let else_ = self.pop();
+ let then =... | 3 | 102 | 119 |
084722a1187bf6cbd03246b60172f6c97a6cc4bd | Rett Berg | 2019-02-07T00:20:42 | fix typos in cranelift-frontend/src/lib.rs | diff --git a/cranelift/frontend/src/lib.rs b/cranelift/frontend/src/lib.rs
index 737950376..4cfb49939 100644
--- a/cranelift/frontend/src/lib.rs
+++ b/cranelift/frontend/src/lib.rs
@@ -20,8 +20,8 @@
//!
//! This API has been designed to help you translate your mutable variables into
//! [`SSA`](https://en.wikipedia.... | 1 | 3 | 3 |
a94d3587e698b61c8e2d9d5b7d6c991739f136d0 | Dan Gohman | 2019-02-06T14:12:53 | Add `vmctx` parameters to the spectest implementation functions.
This fixes a mismatch with the change to pass the VMContext parameter
as the first argument. | diff --git a/lib/wast/src/spectest.rs b/lib/wast/src/spectest.rs
index b407b060a..066c7558e 100644
--- a/lib/wast/src/spectest.rs
+++ b/lib/wast/src/spectest.rs
@@ -8,38 +8,38 @@ use std::rc::Rc;
use target_lexicon::HOST;
use wasmtime_environ::{translate_signature, Export, MemoryPlan, Module, TablePlan};
use wasmtim... | 1 | 7 | 7 |
602e81a895b251d49c60f0c6ffed9cb71d0509c5 | Dan Gohman | 2019-01-31T23:07:39 | Minor code reorganization. | diff --git a/src/wast.rs b/src/wast.rs
index 119367044..86da3215f 100644
--- a/src/wast.rs
+++ b/src/wast.rs
@@ -71,6 +71,13 @@ fn main() {
.deserialize()
})
.unwrap_or_else(|e| e.exit());
+
+ if args.flag_debug {
+ pretty_env_logger::init();
+ } else {
+ file_per_... | 1 | 7 | 6 |
ddb8453b0de11e4b84056086d22e67c7f3e2b928 | Dan Gohman | 2019-01-31T22:58:56 | Move wasmtime's instantiation test into a separate file. | diff --git a/src/wasmtime.rs b/src/wasmtime.rs
index 7be9f362a..2698db84c 100644
--- a/src/wasmtime.rs
+++ b/src/wasmtime.rs
@@ -174,42 +174,3 @@ fn handle_module(context: &mut Context, args: &Args, path: &Path) -> Result<(),
Ok(())
}
-
-#[cfg(test)]
-mod tests {
- use cranelift_codegen::settings;
- use c... | 2 | 47 | 39 |
72ee87498687981ea03d15044adbc8343c78bec5 | Dan Gohman | 2019-01-31T22:58:29 | Factor out a function for reading a wasm file. | diff --git a/src/wasmtime.rs b/src/wasmtime.rs
index c1ce9a2d6..7be9f362a 100644
--- a/src/wasmtime.rs
+++ b/src/wasmtime.rs
@@ -86,6 +86,18 @@ fn read_to_end(path: PathBuf) -> Result<Vec<u8>, io::Error> {
Ok(buf)
}
+fn read_wasm(path: PathBuf) -> Result<Vec<u8>, String> {
+ let data = read_to_end(path).map_... | 1 | 14 | 7 |
8b140cc7484542eb34b5017c16c410ac6749e5f9 | Dan Gohman | 2019-01-31T22:43:32 | Create a `Context` class to group together various state objects. | diff --git a/lib/jit/Cargo.toml b/lib/jit/Cargo.toml
index 97b179baf..27573e45f 100644
--- a/lib/jit/Cargo.toml
+++ b/lib/jit/Cargo.toml
@@ -23,6 +23,7 @@ failure = { version = "0.1.3", default-features = false }
failure_derive = { version = "0.1.3", default-features = false }
target-lexicon = { version = "0.2.0", de... | 8 | 235 | 127 |
4675948c2aff1fffbbbccc4ffd6ff0e74d5e300f | Dan Gohman | 2019-02-01T00:38:57 | Switch to passing the vmctx hidden argument at the beginning.
This switches to passing the vmctx hidden argument at the beginning of
the argument list, rather than the end. | diff --git a/lib/environ/src/func_environ.rs b/lib/environ/src/func_environ.rs
index 588546def..fefe07550 100644
--- a/lib/environ/src/func_environ.rs
+++ b/lib/environ/src/func_environ.rs
@@ -108,9 +108,9 @@ impl<'module_environment> FuncEnvironment<'module_environment> {
fn get_memory_grow_sig(&self, func: &mut ... | 7 | 42 | 26 |
2fad984a0d4b4c77946dd3b7fa91b42ea42d9bb0 | Jef | 2019-01-30T10:06:32 | Shift and rotate | diff --git a/src/backend.rs b/src/backend.rs
index bb6a6181b..37c86d97b 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -577,6 +577,127 @@ macro_rules! unop {
}
}
+// TODO: Support immediate `count` parameters
+macro_rules! shift {
+ ($name:ident, $reg_ty:ident, $instr:ident, $const_fallback:expr) => {
+... | 3 | 171 | 12 |
e66f01b923165e44befa86dce5104134ad9a922c | Yury Delendik | 2019-01-30T00:27:44 | Update cranelift libraries to 0.28.0 | diff --git a/Cargo.toml b/Cargo.toml
index 1fb28435e..4803654a8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,10 +23,10 @@ name = "wasm2obj"
path = "src/wasm2obj.rs"
[dependencies]
-cranelift-codegen = "0.26.0"
-cranelift-native = "0.26.0"
-cranelift-entity = "0.26.0"
-cranelift-wasm = "0.26.0"
+cranelift-codegen... | 8 | 28 | 44 |
1bbd2ebb77b69e6fe2c7b2b62ac999b59a20cf3e | Dan Gohman | 2019-01-23T04:03:28 | Update to region 2.0.0. | diff --git a/lib/simplejit/Cargo.toml b/lib/simplejit/Cargo.toml
index 9fb1d3abd..dd448e999 100644
--- a/lib/simplejit/Cargo.toml
+++ b/lib/simplejit/Cargo.toml
@@ -13,7 +13,7 @@ edition = "2018"
cranelift-codegen = { path = "../codegen", version = "0.26.0" }
cranelift-module = { path = "../module", version = "0.26.0... | 1 | 1 | 1 |
00a4e93bcde9b34377a699b139f98a2e58551032 | Dan Gohman | 2019-01-22T22:50:38 | Add a concept of "global exports".
This adds a feature which allows one to look up an export by name
without knowing what module it's in -- `lookup_global_export` on an
`InstanceContents`.
The main expected use for this is to support APIs where module A
imports a function from module B, and module B needs to access m... | diff --git a/fuzz/fuzz_targets/compile.rs b/fuzz/fuzz_targets/compile.rs
index e94e65983..59d4ca7ef 100644
--- a/fuzz/fuzz_targets/compile.rs
+++ b/fuzz/fuzz_targets/compile.rs
@@ -9,6 +9,9 @@ extern crate wasmtime_environ;
extern crate wasmtime_jit;
use cranelift_codegen::settings;
+use std::cell::RefCell;
+use st... | 16 | 407 | 184 |
1fdf1c92d95f085d5363cc7e715bcbe54abd90ad | Dan Gohman | 2019-01-22T21:27:03 | Update to the rustfmt in rust 1.32, which is now stable. | diff --git a/lib/codegen/src/isa/x86/abi.rs b/lib/codegen/src/isa/x86/abi.rs
index 39852fce9..0321e36e8 100644
--- a/lib/codegen/src/isa/x86/abi.rs
+++ b/lib/codegen/src/isa/x86/abi.rs
@@ -99,7 +99,7 @@ impl ArgAssigner for Args {
} else {
RU::rsi
} as ... | 7 | 13 | 13 |
8769febdbd2185d92b5d4d83c7385bfb0f9f2313 | Dan Gohman | 2019-01-22T12:17:52 | Formest with latest stable rustfmt. | diff --git a/lib/jit/src/action.rs b/lib/jit/src/action.rs
index 84a358a69..eace16844 100644
--- a/lib/jit/src/action.rs
+++ b/lib/jit/src/action.rs
@@ -142,13 +142,13 @@ pub fn invoke(
return Err(ActionError::Kind(format!(
"exported item \"{}\" is not a function",
functio... | 2 | 11 | 11 |
26cb8de30381e99287137c20b3e5eddd8a03ee39 | Jef | 2019-01-18T15:59:29 | Only generate a single `trap` to reduce code size and complexity in `call_indirect` | diff --git a/src/backend.rs b/src/backend.rs
index 6a43fa0c7..bb6a6181b 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -239,6 +239,7 @@ impl CodeGenSession {
asm: &mut self.assembler,
func_starts: &self.func_starts,
has_memory: self.has_memory,
+ trap_label: None,
... | 2 | 49 | 43 |
2c8efa32b8179371d5bc28a804dbb32d8b793a8b | Jef | 2019-01-18T13:03:23 | Unnecessarily optimise asm_println | diff --git a/src/backend.rs b/src/backend.rs
index 035c6d58b..6a43fa0c7 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -76,9 +76,7 @@ macro_rules! asm_println {
; mov rdi, QWORD len as i64
; mov rsi, QWORD ptr as i64
- ; mov r11, rsp
- ; and r11, 0b1111
- ... | 1 | 1 | 3 |
c7956dbdb251da43f275c233c98266f31db3d047 | Jef | 2019-01-18T13:01:12 | Fail if we try to call past the end of the table | diff --git a/src/backend.rs b/src/backend.rs
index 285f924ac..035c6d58b 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -2161,6 +2161,8 @@ impl Context<'_> {
let temp1 = self.block_state.regs.take_scratch_gpr();
dynasm!(self.asm
+ ; cmp Rq(callee), [Rq(vmctx_reg) + VmCtx::offset_of_fu... | 2 | 8 | 1 |
b6e29a899ef5aa90860fb36e89361f4f397587ac | Jef | 2019-01-18T12:07:41 | Add todo comments | diff --git a/src/backend.rs b/src/backend.rs
index 0a168204e..285f924ac 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -51,6 +51,7 @@ extern "sysv64" fn println(len: u64, args: *const u8) {
});
}
+#[allow(unused_macros)]
macro_rules! asm_println {
($asm:expr, $($args:tt)*) => {{
use std::mem... | 2 | 5 | 0 |
b23e00893c5752e0984c1c96a37c4501ba0c275b | Jef | 2019-01-18T12:04:53 | Fix saving volatile registers now that we use unused args as scratch | diff --git a/src/backend.rs b/src/backend.rs
index 25b76ba36..0a168204e 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -2036,13 +2036,13 @@ impl Context<'_> {
fn save_volatile(&mut self) -> ArrayVec<[GPR; SCRATCH_REGS.len()]> {
let mut out = ArrayVec::new();
- for ® in SCRATCH_REGS.iter()... | 1 | 7 | 7 |
e57cec3b3f18581243aec8d594a0cec5adc96c99 | Jef | 2019-01-18T12:01:42 | Do `call_indirect` properly, by accessing the table section | diff --git a/src/backend.rs b/src/backend.rs
index 325502d1d..25b76ba36 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -9,7 +9,7 @@ use dynasmrt::{AssemblyOffset, DynamicLabel, DynasmApi, DynasmLabelApi, Executab
use error::Error;
use std::{iter, mem};
-use module::VmCtx;
+use module::{RuntimeFunc, VmCtx};
... | 5 | 198 | 90 |
d06be92a4e7cb5502833c3ef4ad42d830b6459dd | Jef | 2019-01-17T13:34:34 | Don't allocate context if it's unused | diff --git a/src/backend.rs b/src/backend.rs
index 2da6ce455..325502d1d 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -1036,14 +1036,55 @@ impl Context<'_> {
cmp_i64!(i64_gt_s, setg, setnge, |a, b| a > b);
cmp_i64!(i64_ge_s, setge, setng, |a, b| a >= b);
+ // TODO: Should we do this logic in `eq` a... | 3 | 81 | 21 |
e0f032a0e5f952eb911cfcb4660ead2ac2edc426 | Jef | 2019-01-17T12:51:18 | clz/ctz/popcnt | diff --git a/src/backend.rs b/src/backend.rs
index dba915f2f..2da6ce455 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -453,9 +453,9 @@ type Stack = Vec<StackValue>;
pub enum MemoryAccessMode {
/// This is slower than using `Unchecked` mode, but works in
- /// any scenario, running on a system that can'... | 4 | 141 | 22 |
74d168ec4b3fec6fd9d969e5b92e5f7d9141d3ed | Jef | 2019-01-17T10:07:51 | Merge `end`s, store locals in registers where possible | diff --git a/Cargo.toml b/Cargo.toml
index 08c685fcd..61149c7b7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,6 +13,8 @@ arrayvec = "0.4"
dynasm = "0.2.3"
dynasmrt = "0.2.3"
wasmparser = { path = "./wasmparser.rs" }
+memoffset = "0.2"
+itertools = "0.8"
capstone = "0.5.0"
failure = "0.1.3"
failure_derive = "0.1... | 6 | 153 | 48 |
a7fa7da7d4371ba726c32b8dc71736679662192f | Jef | 2019-01-16T15:34:24 | Support a proper vmctx that contains more than just memory offset | diff --git a/Cargo.toml b/Cargo.toml
index 2881b1308..08c685fcd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,7 +12,7 @@ publish = false
arrayvec = "0.4"
dynasm = "0.2.3"
dynasmrt = "0.2.3"
-wasmparser = "0.21.6"
+wasmparser = { path = "./wasmparser.rs" }
capstone = "0.5.0"
failure = "0.1.3"
failure_derive = "0... | 7 | 356 | 82 |
eb032fd0f4c689496c5d58bccb719b81a9677af7 | bjorn3 | 2019-01-15T16:30:40 | Simplify | diff --git a/lib/module/src/module.rs b/lib/module/src/module.rs
index 85d12f0f4..b043ee475 100644
--- a/lib/module/src/module.rs
+++ b/lib/module/src/module.rs
@@ -517,8 +517,9 @@ where
ctx: &mut Context,
peek_compiled: impl FnOnce(u32, &Context, &isa::TargetIsa) -> T,
) -> ModuleResult<T> {
- ... | 1 | 13 | 17 |
80031cb2b4122b230972092021ae65aa12cf5c18 | bjorn3 | 2019-01-11T12:39:13 | Add TargetIsa | diff --git a/lib/module/src/module.rs b/lib/module/src/module.rs
index 1c495927f..85d12f0f4 100644
--- a/lib/module/src/module.rs
+++ b/lib/module/src/module.rs
@@ -506,7 +506,7 @@ where
/// Define a function, producing the function body from the given `Context`.
pub fn define_function(&mut self, func: Func... | 1 | 3 | 3 |
eedc7cabf17eecef2d4f3d3cb0da65b55ed9065d | bjorn3 | 2019-01-09T13:48:01 | Allow peeking at the compiled function | diff --git a/lib/module/src/module.rs b/lib/module/src/module.rs
index 0fec7d39c..1c495927f 100644
--- a/lib/module/src/module.rs
+++ b/lib/module/src/module.rs
@@ -506,7 +506,18 @@ where
/// Define a function, producing the function body from the given `Context`.
pub fn define_function(&mut self, func: Fun... | 1 | 28 | 11 |
d7434fe5d2cabb6dc2fbf62a7bda031cb9bd3017 | Jef | 2019-01-16T08:33:46 | Have `vmctx` be the first argument so we (almost) never have to shuffle it around | diff --git a/src/backend.rs b/src/backend.rs
index c4a223904..cf872573e 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -428,7 +428,7 @@ impl Locals {
}
fn vmctx_index(&self) -> u32 {
- self.num_args() - 1
+ 0
}
}
@@ -1226,7 +1226,11 @@ impl Context<'_> {
self.block_state.... | 4 | 34 | 21 |
b86d11e4adec72a8675c42c8d7e899c447a98c83 | Jef | 2019-01-15T16:24:30 | Avoid unnecessary work when passing arguments on | diff --git a/src/backend.rs b/src/backend.rs
index f1b395ccf..c4a223904 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -144,7 +144,7 @@ const ARGS_IN_GPRS: &[GPR] = &[RDI, RSI, RDX, RCX, R8, R9];
const SCRATCH_REGS: &[GPR] = &[RAX, R10, R11];
#[must_use]
-pub struct Function {
+pub struct FunctionEnd {
sh... | 1 | 126 | 26 |
62fe065e85e87b04e5d702ae8d132c47d8f60115 | Jef | 2019-01-15T13:00:43 | Fix miscompilation for maliciously-crafted use of locals | diff --git a/src/backend.rs b/src/backend.rs
index a64723e0a..f1b395ccf 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -263,15 +263,32 @@ impl Value {
}
}
+/// A value on the logical stack. The logical stack is the value stack as it
+/// is visible to the WebAssembly, whereas the physical stack is the stac... | 2 | 104 | 57 |
1b6952bb99144a33c67e6b6a6cbfee077b6a1b79 | Jef | 2019-01-15T11:27:55 | Implement vmctx as a hidden argument for cranelift compat | diff --git a/src/backend.rs b/src/backend.rs
index fe006265b..a64723e0a 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -7,7 +7,7 @@ use arrayvec::ArrayVec;
use dynasmrt::x64::Assembler;
use dynasmrt::{AssemblyOffset, DynamicLabel, DynasmApi, DynasmLabelApi, ExecutableBuffer};
use error::Error;
-use std::iter;
+... | 5 | 330 | 319 |
50a045363c9890051524b1ba23b2c757baf16f67 | Dan Gohman | 2019-01-06T21:00:08 | Add an explicit trap code for wasm `unreachable`. | diff --git a/lib/codegen/src/ir/trapcode.rs b/lib/codegen/src/ir/trapcode.rs
index fc16dddb9..e0d7ddfe5 100644
--- a/lib/codegen/src/ir/trapcode.rs
+++ b/lib/codegen/src/ir/trapcode.rs
@@ -42,6 +42,9 @@ pub enum TrapCode {
/// Failed float-to-int conversion.
BadConversionToInteger,
+ /// Code that was su... | 2 | 9 | 4 |
2f0e0dd995762dda2d8d8ab8ac1ca229c275e7a7 | bjorn3 | 2019-01-11T12:45:10 | Really fix emit_small_memcpy this time! | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index 8867f9ad6..06fbbecec 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -612,7 +612,7 @@ impl<'a> FunctionBuilder<'a> {
"`size` is smaller than `dest` and `src`'s alignment value."
);
- ... | 1 | 2 | 2 |
3809e7252d10e9a10d6d75d904d3cf5673a7b9e5 | bjorn3 | 2018-12-29T11:16:13 | Remove outdated comment
cranelift-frontend now inserts libcalls for mem{cpy,set,move} | diff --git a/lib/faerie/src/backend.rs b/lib/faerie/src/backend.rs
index 699311441..92cf1e4ba 100644
--- a/lib/faerie/src/backend.rs
+++ b/lib/faerie/src/backend.rs
@@ -67,8 +67,7 @@ impl FaerieBuilder {
}
/// Default names for `ir::LibCall`s. A function by this name is imported into the object as
- /// ... | 1 | 1 | 2 |
8312730377ee2c334b4ffae104c249aeabc15218 | Jef | 2019-01-14T17:45:14 | Make calling functions safe | diff --git a/examples/test.rs b/examples/test.rs
index 163dda014..3fcbf7c57 100644
--- a/examples/test.rs
+++ b/examples/test.rs
@@ -22,7 +22,7 @@ fn read_to_end<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
fn maybe_main() -> Result<(), String> {
let data = read_to_end("test.wasm").map_err(|e| e.to_string())... | 5 | 201 | 95 |
9fe08c93413a4f2e6100e12729937101d7a86d91 | Dan Gohman | 2019-01-08T18:31:58 | Tidy up pointer casting to avoid casts that change mutability. | diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs
index 38a10f6fe..0094db97c 100644
--- a/lib/runtime/src/instance.rs
+++ b/lib/runtime/src/instance.rs
@@ -190,7 +190,7 @@ impl InstanceContents {
/// Return the indexed `VMTableDefinition`.
fn table_mut(&mut self, index: DefinedTableIndex)... | 1 | 13 | 13 |
ddb4c0fd19db81bd2e1220348f27bddb97fb8713 | Jef | 2019-01-08T10:10:59 | x64 sign-extends imm32 arguments, so don't truncate them in an unsigned way | diff --git a/src/backend.rs b/src/backend.rs
index 8b86bb3c5..589709fd0 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -744,9 +744,9 @@ macro_rules! commutative_binop_i64 {
);
}
ValueLocation::Immediate(i) => {
- if (i as u64) <= u32::max_va... | 2 | 163 | 122 |
010f2d85695ca3be61693b7c4a01dbe8b5a757dd | Jef | 2019-01-08T08:45:39 | Fix comparisons, add more tests for binops | diff --git a/src/backend.rs b/src/backend.rs
index 6b7f47a8f..8b86bb3c5 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -749,7 +749,14 @@ macro_rules! commutative_binop_i64 {
; $instr Rq(op1), i as i32
);
} else {
- un... | 3 | 186 | 77 |
a5bd3924e3c4e6e1f35824fa6aa421d5b76a4fb8 | Dan Gohman | 2019-01-07T19:51:47 | Add crate version identifiers. | diff --git a/lib/codegen/src/lib.rs b/lib/codegen/src/lib.rs
index eb61f62f0..f73167d7f 100644
--- a/lib/codegen/src/lib.rs
+++ b/lib/codegen/src/lib.rs
@@ -55,9 +55,6 @@ pub use crate::legalizer::legalize_function;
pub use crate::verifier::verify_function;
pub use crate::write::write_function;
-/// Version number ... | 8 | 24 | 3 |
a7aee246e9389fc16765c35fc899387023c06972 | Dan Gohman | 2019-01-07T20:34:21 | Pass `declare_signature`'s argument by value.
`parse_type_section` doesn't need the value after passing it, and this
allows callees to avoid cloning if they need their own copy. | diff --git a/lib/wasm/src/environ/dummy.rs b/lib/wasm/src/environ/dummy.rs
index 5bf196168..081244ca4 100644
--- a/lib/wasm/src/environ/dummy.rs
+++ b/lib/wasm/src/environ/dummy.rs
@@ -350,8 +350,8 @@ impl<'data> ModuleEnvironment<'data> for DummyEnvironment {
self.info.config
}
- fn declare_signatur... | 3 | 4 | 4 |
13138b65f7161c7572aa2c3064be47b1ff4b2cfc | Dan Gohman | 2019-01-03T19:43:15 | Call the new ModuleEnvironment reserve functions. | diff --git a/lib/wasm/src/sections_translator.rs b/lib/wasm/src/sections_translator.rs
index 6192ec7b0..e3f36b754 100644
--- a/lib/wasm/src/sections_translator.rs
+++ b/lib/wasm/src/sections_translator.rs
@@ -28,6 +28,8 @@ pub fn parse_type_section(
types: TypeSectionReader,
environ: &mut ModuleEnvironment,
... | 1 | 27 | 0 |
6ec0b3c6bfb2d3c9231d00181bdd69f9fc4f9f88 | Dan Gohman | 2019-01-03T19:43:02 | Add a comment. | diff --git a/lib/wasm/src/environ/spec.rs b/lib/wasm/src/environ/spec.rs
index 92c7fa9e2..93a82cca8 100644
--- a/lib/wasm/src/environ/spec.rs
+++ b/lib/wasm/src/environ/spec.rs
@@ -340,6 +340,9 @@ pub trait ModuleEnvironment<'data> {
);
/// Provides the contents of a function body.
+ ///
+ /// Note th... | 1 | 3 | 0 |
712063336310c5a107ef06a34f0419e46f4b036b | Dan Gohman | 2018-12-18T22:13:46 | Change the `elems` parameter of `declare_table_elements` to a boxed slice.
Implementations that want a full `Vec` can use `into_vec` to convert it
back. | diff --git a/lib/wasm/src/environ/dummy.rs b/lib/wasm/src/environ/dummy.rs
index 290aa38c0..5bf196168 100644
--- a/lib/wasm/src/environ/dummy.rs
+++ b/lib/wasm/src/environ/dummy.rs
@@ -402,7 +402,7 @@ impl<'data> ModuleEnvironment<'data> for DummyEnvironment {
_table_index: TableIndex,
_base: Option<G... | 3 | 9 | 4 |
054e6fcf07f486769c539ae63ffa1271b6affc09 | Dan Gohman | 2018-12-18T20:55:11 | Add functions to `ModuleEnvironment` to support reserving buffers up front.
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. | diff --git a/lib/wasm/src/environ/spec.rs b/lib/wasm/src/environ/spec.rs
index 9ad951890..37d741a4f 100644
--- a/lib/wasm/src/environ/spec.rs
+++ b/lib/wasm/src/environ/spec.rs
@@ -245,9 +245,17 @@ pub trait ModuleEnvironment<'data> {
/// Get the information needed to produce Cranelift IR for the current target.
... | 1 | 70 | 25 |
7f250e340c4781529d3e66c1ae8bb72c2b893109 | Dan Gohman | 2018-12-18T20:11:32 | Simplify `ModuleEnvironment`.
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. | diff --git a/cranelift/src/wasm.rs b/cranelift/src/wasm.rs
index 9ffea3adc..00574f625 100644
--- a/cranelift/src/wasm.rs
+++ b/cranelift/src/wasm.rs
@@ -7,18 +7,16 @@
allow(too_many_arguments, cyclomatic_complexity)
)]
+use crate::utils::{parse_sets_and_triple, read_to_end};
use cranelift_codegen::print_errors... | 4 | 14 | 48 |
fcd18746a7014850564a418c0d15163ce036f684 | Jef | 2019-01-07T18:17:29 | Add 64-bit operations | diff --git a/src/backend.rs b/src/backend.rs
index 09d714064..6b7f47a8f 100644
--- a/src/backend.rs
+++ b/src/backend.rs
@@ -46,7 +46,7 @@ const NUM_GPRS: u8 = 16;
impl GPRs {
fn take(&mut self) -> GPR {
let lz = self.bits.trailing_zeros();
- assert!(lz < 16, "ran out of free GPRs");
+ debu... | 3 | 448 | 119 |
0a2b0ee9b0b20cf5da161e70d0ccdaf4861e69c8 | Dan Gohman | 2019-01-07T18:08:40 | Mmap API tidying.
Establish more clear expectations for who is expected to page-align what
and when. | diff --git a/lib/jit/src/code_memory.rs b/lib/jit/src/code_memory.rs
index 5b24f4c76..b83ffe151 100644
--- a/lib/jit/src/code_memory.rs
+++ b/lib/jit/src/code_memory.rs
@@ -35,7 +35,7 @@ impl CodeMemory {
if self.current.len() - self.position < size {
self.mmaps.push(mem::replace(
... | 3 | 40 | 62 |
0826e32c9a3910632940099089980db4b902d003 | Dan Gohman | 2019-01-06T00:18:20 | Tidy up unnecessary return statements. | diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs
index bdeb21320..ade06b5f6 100644
--- a/lib/runtime/src/instance.rs
+++ b/lib/runtime/src/instance.rs
@@ -412,7 +412,7 @@ impl InstanceContents {
/// Return a reference to the custom state attached to this instance.
pub fn host_state(&mu... | 1 | 2 | 2 |
3143e2256666433f9a76faddfb1d48dda816decf | Dan Gohman | 2019-01-06T00:19:50 | Move the creation of linear-memory guard pages into the mmap module.
Create linear-memory pages as PROT_NONE and then make them accessible on
demand. | diff --git a/lib/runtime/src/memory.rs b/lib/runtime/src/memory.rs
index 50ac0d14a..09bd3a646 100644
--- a/lib/runtime/src/memory.rs
+++ b/lib/runtime/src/memory.rs
@@ -4,7 +4,6 @@
use crate::mmap::Mmap;
use crate::vmcontext::VMMemoryDefinition;
-use region;
use std::string::String;
use wasmtime_environ::{MemoryP... | 2 | 181 | 69 |
3ac4269dc55909b97166c1fb2bc99846f24698fb | Dan Gohman | 2019-01-05T01:24:14 | Add `host_state()` accessors to `InstanceContents` and `VMContext` too. | diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs
index c08544d60..bdeb21320 100644
--- a/lib/runtime/src/instance.rs
+++ b/lib/runtime/src/instance.rs
@@ -409,6 +409,11 @@ impl InstanceContents {
foreign_instance_contents.memory_size(foreign_index)
}
+
+ /// Return a reference t... | 2 | 18 | 1 |
73b2c45313cf22c33e7bbf73b9287d32d4ff3306 | Dan Gohman | 2019-01-05T01:15:22 | Add a `host_state` field to `Instance`.
This allows hosts to embed arbitrary state along with instances. | diff --git a/lib/jit/src/instantiate.rs b/lib/jit/src/instantiate.rs
index 2c5bf8c2b..43ffdf9e1 100644
--- a/lib/jit/src/instantiate.rs
+++ b/lib/jit/src/instantiate.rs
@@ -174,6 +174,7 @@ impl CompiledModule {
self.imports.clone(),
&data_initializers,
self.signatures.clone(),
+ ... | 3 | 23 | 6 |
3aef7630464a032261cc9b22ef909550a4ea28d6 | Dan Gohman | 2019-01-03T23:50:04 | Delete an unneeded comment. | diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs
index 67f288356..a55399a93 100644
--- a/lib/runtime/src/instance.rs
+++ b/lib/runtime/src/instance.rs
@@ -558,10 +558,6 @@ impl Instance {
initialize_memories(&*module, contents, data_initializers)?;
initialize_globals(&*module, co... | 1 | 0 | 4 |
6661228c86081b19b2e0b8411c3e28dc6266d9e2 | Dan Gohman | 2019-01-03T22:44:30 | Tidy up whitespace. | diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs
index 8fb8a36f9..67f288356 100644
--- a/lib/runtime/src/instance.rs
+++ b/lib/runtime/src/instance.rs
@@ -370,7 +370,7 @@ impl InstanceContents {
/// Returns `None` if memory can't be grown by the specified amount
/// of pages.
///
- ... | 1 | 1 | 1 |
e876f0fb1d1e78168d96815575523822baab6293 | Dan Gohman | 2019-01-03T22:21:24 | Add some Cargo.toml keywords. | diff --git a/lib/environ/Cargo.toml b/lib/environ/Cargo.toml
index 5cd2d730f..d1a074cbc 100644
--- a/lib/environ/Cargo.toml
+++ b/lib/environ/Cargo.toml
@@ -6,6 +6,7 @@ description = "Standalone environment support for WebAsssembly code in Cranelift
repository = "https://github.com/CraneStation/wasmtime"
documentatio... | 5 | 5 | 0 |
35d7f78a1101124f71633a7356e3cea6f12747b9 | Dan Gohman | 2019-01-03T22:16:28 | Handle errors cleanly in the wast runner. | diff --git a/lib/wast/src/wast.rs b/lib/wast/src/wast.rs
index 94d7d0dec..b18997737 100644
--- a/lib/wast/src/wast.rs
+++ b/lib/wast/src/wast.rs
@@ -47,6 +47,10 @@ pub enum WastError {
Trap(String),
/// There was a type error in inputs or outputs of an action.
Type(String),
+ /// The was a syntax erro... | 2 | 22 | 2 |
40acc1f340dd392950e09f6928389478fc378d46 | Dan Gohman | 2019-01-03T22:14:47 | Add crate version identifiers. | diff --git a/lib/environ/src/lib.rs b/lib/environ/src/lib.rs
index 5b758ab3e..9642a73c5 100644
--- a/lib/environ/src/lib.rs
+++ b/lib/environ/src/lib.rs
@@ -69,3 +69,6 @@ pub const WASM_PAGE_SIZE: u32 = 0x10000;
/// The number of pages we can have before we run out of byte index space.
pub const WASM_MAX_PAGES: u32... | 5 | 15 | 0 |
585bdac91ea9c3829f7e03114e2da3ec260af872 | Dan Gohman | 2019-01-03T22:08:31 | Use `vec![0; size]` instead of creating an empty `Vec` and resizing. | diff --git a/lib/jit/src/action.rs b/lib/jit/src/action.rs
index abbedde5e..84a358a69 100644
--- a/lib/jit/src/action.rs
+++ b/lib/jit/src/action.rs
@@ -158,9 +158,8 @@ pub fn invoke(
// TODO: Support values larger than u64. And pack the values into memory
// instead of just using fixed-sized slots.
- le... | 2 | 5 | 14 |
a41bc1fe1e939577f22e503fa5d305fb0e66130f | Dan Gohman | 2019-01-03T22:04:53 | Fix `unused use` warnings. | diff --git a/lib/environ/src/lib.rs b/lib/environ/src/lib.rs
index de119446c..5b758ab3e 100644
--- a/lib/environ/src/lib.rs
+++ b/lib/environ/src/lib.rs
@@ -39,9 +39,6 @@ use hashmap_core::HashMap;
#[cfg(feature = "std")]
use std::collections::HashMap;
-use cast;
-use cranelift_wasm;
-use failure;
#[macro_use]
ex... | 4 | 0 | 14 |
ca2fdc5ccbde52d808cb4adb33b26d3f1b86aa83 | Dan Gohman | 2019-01-03T22:00:03 | Update `no_std` support.
This `no_std` support isn't complete though, as some dependencies
don't support it. | diff --git a/lib/environ/Cargo.toml b/lib/environ/Cargo.toml
index be3cd4375..5cd2d730f 100644
--- a/lib/environ/Cargo.toml
+++ b/lib/environ/Cargo.toml
@@ -17,11 +17,12 @@ cranelift-wasm = "0.26.0"
cast = { version = "0.2.2", default-features = false }
failure = { version = "0.1.3", default-features = false }
failu... | 21 | 80 | 69 |
f6c2fe7d2d54663ff64303286f893de6f6aa7493 | Dan Gohman | 2019-01-03T20:58:11 | Update to Rust 2018 Edition. | diff --git a/Cargo.toml b/Cargo.toml
index f52308cc2..1fb28435e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,6 +7,7 @@ license = "Apache-2.0 WITH LLVM-exception"
documentation = "https://cranelift.readthedocs.io/"
categories = ["wasm"]
repository = "https://github.com/CraneStation/wasmtime"
+edition = "2018"
publ... | 37 | 134 | 162 |
00a84672f77b37a2ede20f6905a6beede73e03a3 | Dan Gohman | 2019-01-03T20:37:14 | Use `Vec::with_capacity`. | diff --git a/lib/runtime/src/table.rs b/lib/runtime/src/table.rs
index cb4aae11a..053269325 100644
--- a/lib/runtime/src/table.rs
+++ b/lib/runtime/src/table.rs
@@ -25,7 +25,7 @@ impl Table {
match plan.style {
TableStyle::CallerChecksSignature => {
- let mut vec = Vec::new();
+ ... | 1 | 1 | 1 |
03c22ed67a2d48378952a352851866db82e74688 | Benjamin Bouvier | 2019-01-03T17:09:38 | Remove warnings in tests; | diff --git a/lib/entity/src/list.rs b/lib/entity/src/list.rs
index 617ea2db3..4dc3ce575 100644
--- a/lib/entity/src/list.rs
+++ b/lib/entity/src/list.rs
@@ -484,7 +484,6 @@ impl<T: EntityRef + ReservedValue> EntityList<T> {
mod tests {
use super::*;
use super::{sclass_for_length, sclass_size};
- use crate... | 4 | 5 | 7 |
c78a9a4a7c47176bbfd7011a7b58a3bc6d828812 | Benjamin Bouvier | 2019-01-03T14:55:33 | Bump log and file-per-thread-logger; | diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml
index bbe81eaae..04c216857 100644
--- a/cranelift/Cargo.toml
+++ b/cranelift/Cargo.toml
@@ -36,7 +36,7 @@ capstone = { version = "0.5.0", optional = true }
wabt = { version = "0.7.0", optional = true }
target-lexicon = "0.2.0"
pretty_env_logger = "0.3.0"
-file... | 6 | 7 | 7 |
813810008b4c57d1f134bff7ae7e3fae3d4dc48c | Benjamin Bouvier | 2019-01-03T14:10:25 | Replace deprecated trim_left_matches by trim_start_matches; | diff --git a/lib/filetests/src/match_directive.rs b/lib/filetests/src/match_directive.rs
index 29c9fa6ba..a3f951f3b 100644
--- a/lib/filetests/src/match_directive.rs
+++ b/lib/filetests/src/match_directive.rs
@@ -9,7 +9,7 @@ pub fn match_directive<'a>(comment: &'a str, directive: &str) -> Option<&'a str>
direc... | 1 | 1 | 1 |
7e42966c68dba1cfdfcef116b3613a6cfeb48318 | Benjamin Bouvier | 2018-11-15T11:44:14 | Use snake case for magic numbers computation; | diff --git a/lib/codegen/src/divconst_magic_numbers.rs b/lib/codegen/src/divconst_magic_numbers.rs
index 32a342703..89c686498 100644
--- a/lib/codegen/src/divconst_magic_numbers.rs
+++ b/lib/codegen/src/divconst_magic_numbers.rs
@@ -8,39 +8,37 @@
//! so as to emphasise the similarity of the U32 and U64 cases and the S... | 2 | 232 | 234 |
fdc66e130fd0db87603a18ab7175334a4d491cd6 | Dan Gohman | 2019-01-03T20:05:32 | Eliminate unneeded casts. | diff --git a/lib/runtime/src/vmcontext.rs b/lib/runtime/src/vmcontext.rs
index 06392cf9d..4d9f1cc53 100644
--- a/lib/runtime/src/vmcontext.rs
+++ b/lib/runtime/src/vmcontext.rs
@@ -288,97 +288,97 @@ impl VMGlobalDefinition {
/// Return a reference to the value as an i32.
#[allow(clippy::cast_ptr_alignment)]
... | 1 | 16 | 16 |
39770ec72c2dc1661138956b55ea236aaa9499d4 | Dan Gohman | 2019-01-03T20:05:26 | Minor code tidying. | diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs
index afc10459d..cbfcf3bbb 100644
--- a/lib/runtime/src/instance.rs
+++ b/lib/runtime/src/instance.rs
@@ -717,7 +717,7 @@ fn get_memory_init_start(
} else {
contents.imported_global(base).from
};
- start += cast... | 1 | 2 | 2 |
701b1998e9a0d993005460e29433e6ab4cfa30d3 | Dan Gohman | 2019-01-03T20:04:19 | Avoid creating slices with null pointers. | diff --git a/lib/environ/src/module.rs b/lib/environ/src/module.rs
index d60006afb..4397ab266 100644
--- a/lib/environ/src/module.rs
+++ b/lib/environ/src/module.rs
@@ -56,6 +56,7 @@ impl MemoryStyle {
if maximum <= tunables.static_memory_bound {
// A heap with a declared maximum can be im... | 4 | 8 | 5 |
57e183f5f8aa7f5b1af774885c5ce58e239f5d95 | Dan Gohman | 2019-01-03T20:01:28 | Use TablePlan::for_table and MemoryPlan::for_memory instead of manual code. | diff --git a/lib/wast/src/spectest.rs b/lib/wast/src/spectest.rs
index 759ba4be7..d31d8dc9d 100644
--- a/lib/wast/src/spectest.rs
+++ b/lib/wast/src/spectest.rs
@@ -3,9 +3,7 @@ use cranelift_codegen::{ir, isa};
use cranelift_entity::PrimaryMap;
use cranelift_wasm::{DefinedFuncIndex, Global, GlobalInit, Memory, Table,... | 1 | 10 | 15 |
8a5429ce7449bfc10d8b27fca41dc9a86886ba23 | Dan Gohman | 2019-01-03T19:57:09 | Factor out functions for working with table and memory initializers. | diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs
index 89088c573..afc10459d 100644
--- a/lib/runtime/src/instance.rs
+++ b/lib/runtime/src/instance.rs
@@ -23,7 +23,7 @@ use vmcontext::{
VMGlobalImport, VMMemoryDefinition, VMMemoryImport, VMSharedSignatureIndex, VMTableDefinition,
VMTable... | 1 | 115 | 94 |
747dbb23e7ea91281d0c883239e488348cf4fd3b | Dan Gohman | 2019-01-03T19:48:05 | Add fuzz targets for module instantiation. | diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml
index 6531b88a5..8fa46cbe0 100644
--- a/fuzz/Cargo.toml
+++ b/fuzz/Cargo.toml
@@ -14,7 +14,8 @@ cranelift-codegen = "0.26.0"
cranelift-wasm = "0.26.0"
cranelift-native = "0.26.0"
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer-sys.git" }
-wasmparser = { ... | 4 | 63 | 2 |
df7724ce2b76d426221b113f157fbebef92e5453 | Dan Gohman | 2019-01-03T19:38:41 | Update Cargo.toml authors fields. | diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml
index 55e92463f..6531b88a5 100644
--- a/fuzz/Cargo.toml
+++ b/fuzz/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "wasmtime-fuzz"
version = "0.0.0"
-authors = ["The Cranelift Project Developers"]
+authors = ["The Wasmtime Project Developers"]
publish = false
[package.m... | 6 | 6 | 6 |
2f04b78ecf43da633ba77ecd1530bbdf068d61cf | Dan Gohman | 2019-01-03T19:32:39 | Use `cast::usize` rather than `as usize` to avoid silent overflow. | diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs
index 2c4c796e0..89088c573 100644
--- a/lib/runtime/src/instance.rs
+++ b/lib/runtime/src/instance.rs
@@ -33,7 +33,7 @@ fn signature_id(
#[allow(clippy::cast_ptr_alignment)]
unsafe {
let ptr = (vmctx as *const VMContext as *const ... | 1 | 26 | 25 |
529de7ca60c8e8cf46233e0ed84979e55992727a | Dan Gohman | 2019-01-03T19:31:36 | Tidy up unneeded '&'s. | diff --git a/lib/jit/src/compiler.rs b/lib/jit/src/compiler.rs
index b78127126..62d73a40f 100644
--- a/lib/jit/src/compiler.rs
+++ b/lib/jit/src/compiler.rs
@@ -74,7 +74,7 @@ impl Compiler {
SetupError,
> {
let (compilation, relocations) =
- cranelift::compile_module(&module, function_... | 6 | 9 | 9 |
3ce2127bfa864ab7addcaaa000adbfddaa23bb06 | Dan Gohman | 2019-01-03T19:19:38 | Eliminate the intermediate "base" global variables. | diff --git a/lib/environ/src/func_environ.rs b/lib/environ/src/func_environ.rs
index aa852b2de..cfab4b9e2 100644
--- a/lib/environ/src/func_environ.rs
+++ b/lib/environ/src/func_environ.rs
@@ -2,7 +2,7 @@ use cast;
use cranelift_codegen::cursor::FuncCursor;
use cranelift_codegen::ir;
use cranelift_codegen::ir::condc... | 3 | 289 | 459 |
3431122440c9b994066540d8500e3c721aeba327 | Dan Gohman | 2019-01-03T19:19:17 | Update to bindgen 0.46. | diff --git a/lib/runtime/Cargo.toml b/lib/runtime/Cargo.toml
index a60e546ee..6c954ab8d 100644
--- a/lib/runtime/Cargo.toml
+++ b/lib/runtime/Cargo.toml
@@ -28,7 +28,7 @@ winapi = { version = "0.3.6", features = ["winbase", "memoryapi"] }
[build-dependencies]
cmake = "0.1.35"
-bindgen = "0.45.0"
+bindgen = "0.46.0"... | 1 | 1 | 1 |
1ae5c13b8c692a772cdc0bf3b49eded7f3e27619 | Dan Gohman | 2019-01-03T19:14:13 | Signature ID loads are readonly. | diff --git a/lib/environ/src/func_environ.rs b/lib/environ/src/func_environ.rs
index 42e1e10d5..aa852b2de 100644
--- a/lib/environ/src/func_environ.rs
+++ b/lib/environ/src/func_environ.rs
@@ -546,7 +546,8 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m
let sig_ids =... | 1 | 2 | 1 |
ff6776fe100ba05c30b5a2fc9cc8f6dd36863464 | Dan Gohman | 2019-01-03T17:46:35 | Refactor instance accessor routines.
This helps localize the unsafe code needed to access these fields. | diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs
index 23c0b921b..1b08923f7 100644
--- a/lib/runtime/src/instance.rs
+++ b/lib/runtime/src/instance.rs
@@ -4,8 +4,8 @@
use cranelift_entity::EntityRef;
use cranelift_entity::{BoxedSlice, PrimaryMap};
use cranelift_wasm::{
- DefinedFuncIndex, De... | 1 | 167 | 91 |
482a054c7580c294d7dfcb57e75d8372c266eb0b | Dan Gohman | 2019-01-03T17:44:21 | Move the signature_ids field first. | diff --git a/lib/environ/src/func_environ.rs b/lib/environ/src/func_environ.rs
index 515d1ee3a..7d76e8499 100644
--- a/lib/environ/src/func_environ.rs
+++ b/lib/environ/src/func_environ.rs
@@ -59,6 +59,9 @@ pub struct FuncEnvironment<'module_environment> {
/// The Cranelift global holding the vmctx address.
v... | 3 | 40 | 24 |
e8e8f453a452810691ab3508d933ed1559c47e45 | Dan Gohman | 2019-01-03T17:35:16 | Refactor out the code for creating the signature_ids base global value. | diff --git a/lib/environ/src/func_environ.rs b/lib/environ/src/func_environ.rs
index 7b1613892..515d1ee3a 100644
--- a/lib/environ/src/func_environ.rs
+++ b/lib/environ/src/func_environ.rs
@@ -242,6 +242,21 @@ impl<'module_environment> FuncEnvironment<'module_environment> {
})
}
+ fn get_signature_id... | 1 | 16 | 12 |
087b5b4dff1ad670df2dd1c902e4df7a9896fa40 | Dan Gohman | 2019-01-03T16:31:03 | Implement cross-instance indirect calls. | diff --git a/lib/jit/src/compiler.rs b/lib/jit/src/compiler.rs
index 3ec3642c1..b78127126 100644
--- a/lib/jit/src/compiler.rs
+++ b/lib/jit/src/compiler.rs
@@ -16,7 +16,7 @@ use std::vec::Vec;
use target_tunables::target_tunables;
use wasmtime_environ::cranelift;
use wasmtime_environ::{Compilation, CompileError, Mo... | 7 | 51 | 46 |
b646f9b4e08175f7623f817cdcb4fe08a6413491 | Dan Gohman | 2019-01-03T16:25:02 | Clarify a comment. | diff --git a/lib/jit/src/namespace.rs b/lib/jit/src/namespace.rs
index bd357c59a..93e4dce61 100644
--- a/lib/jit/src/namespace.rs
+++ b/lib/jit/src/namespace.rs
@@ -12,7 +12,7 @@ use std::collections::HashMap;
use std::string::String;
use wasmtime_runtime::{Export, Instance};
-/// An opaque reference to an `Instanc... | 1 | 1 | 1 |
9d73123e3ecdfbbb8a4ab6d1c999490ba58e3d9e | Dan Gohman | 2019-01-03T16:16:47 | Reformat a comment to fit within 100 columns. | diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs
index 3158a027c..564c41ac1 100644
--- a/lib/runtime/src/instance.rs
+++ b/lib/runtime/src/instance.rs
@@ -136,9 +136,9 @@ impl Instance {
initialize_globals(&mut *result);
// Rather than writing inline assembly to jump to the cod... | 1 | 3 | 3 |
bec724b5018b9e6abac0f866b5551bc015272aef | Dan Gohman | 2019-01-03T16:13:37 | Whitespace tidying. | diff --git a/lib/runtime/src/signalhandlers.rs b/lib/runtime/src/signalhandlers.rs
index cfbdb7714..c98ef66c0 100644
--- a/lib/runtime/src/signalhandlers.rs
+++ b/lib/runtime/src/signalhandlers.rs
@@ -58,7 +58,8 @@ pub extern "C" fn wasmtime_init_eager() {
}
thread_local! {
- static TRAP_CONTEXT: RefCell<TrapCon... | 1 | 2 | 1 |
b704f5ad30a2f523c563c48749b7175f5f44972f | Dan Gohman | 2019-01-03T15:04:53 | Update to wasmparser 0.23.0. | diff --git a/lib/wast/Cargo.toml b/lib/wast/Cargo.toml
index 14c117f8c..a91b6c8bd 100644
--- a/lib/wast/Cargo.toml
+++ b/lib/wast/Cargo.toml
@@ -21,7 +21,7 @@ wabt = "0.7"
target-lexicon = "0.2.0"
failure = { version = "0.1.3", default-features = false }
failure_derive = { version = "0.1.3", default-features = false... | 1 | 1 | 1 |
63c9143e870d6764cd5ce48df817b6dacd828fb4 | Dan Gohman | 2019-01-03T15:03:07 | Update to bindgen 0.45. | diff --git a/lib/runtime/Cargo.toml b/lib/runtime/Cargo.toml
index ea75df08a..a60e546ee 100644
--- a/lib/runtime/Cargo.toml
+++ b/lib/runtime/Cargo.toml
@@ -28,7 +28,7 @@ winapi = { version = "0.3.6", features = ["winbase", "memoryapi"] }
[build-dependencies]
cmake = "0.1.35"
-bindgen = "0.44.0"
+bindgen = "0.45.0"... | 1 | 1 | 1 |
450a279e180f40a13750c1191df69a2b81e6f827 | Dan Gohman | 2019-01-03T14:45:20 | Rename wasmtime's logfile names. | diff --git a/src/wasmtime.rs b/src/wasmtime.rs
index d9ded1256..2dbae33cb 100644
--- a/src/wasmtime.rs
+++ b/src/wasmtime.rs
@@ -55,7 +55,7 @@ use std::process::exit;
use wasmtime_execute::{ActionOutcome, InstancePlus, JITCode, Namespace};
use wasmtime_wast::instantiate_spectest;
-static LOG_FILENAME_PREFIX: &str =... | 1 | 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.