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
e9cb50313dc3a8cf5ad87a64116857f4d338255d
bjorn3
2018-12-24T14:31:31
Fix emit_small_mem{cpy,set} when size == 0 or access_size > 8
diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs index d769b678f..1d454661c 100644 --- a/lib/frontend/src/frontend.rs +++ b/lib/frontend/src/frontend.rs @@ -598,6 +598,10 @@ impl<'a> FunctionBuilder<'a> { // Currently the result of guess work, not actual profiling. const THRESH...
1
22
2
c8e47177fccb1af0c0f082a2836f53c86d3a652d
Dan Gohman
2019-01-02T20:05:32
Add an assert to `append_ebb_params_for_function_params`.
diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs index 2ed09fbd0..d769b678f 100644 --- a/lib/frontend/src/frontend.rs +++ b/lib/frontend/src/frontend.rs @@ -405,6 +405,11 @@ impl<'a> FunctionBuilder<'a> { /// parameters. This can be used to set up the ebb parameters for the /// entry b...
1
5
0
831d0334710b98abbc10d0c230059f98201d8164
Dan Gohman
2019-01-02T20:01:36
Add a `shrink_to_fit` function to `PrimaryMap`.
diff --git a/lib/entity/src/primary.rs b/lib/entity/src/primary.rs index 7a45fa958..8f1daed7e 100644 --- a/lib/entity/src/primary.rs +++ b/lib/entity/src/primary.rs @@ -135,6 +135,11 @@ where self.elems.reserve_exact(additional) } + /// Shrinks the capacity of the `PrimaryMap` as much as possible. + ...
1
5
0
cd4f96c066117d00c241135d9939fd527809ae8a
Dan Gohman
2019-01-02T19:59:57
Use `Vec::with_capacity` when we know the eventual size of the `Vec`.
diff --git a/lib/wasm/src/sections_translator.rs b/lib/wasm/src/sections_translator.rs index c1bdda146..2ee60c19a 100644 --- a/lib/wasm/src/sections_translator.rs +++ b/lib/wasm/src/sections_translator.rs @@ -255,7 +255,7 @@ pub fn parse_element_section<'data>( ref s => panic!("unsupported init expr in ele...
1
1
1
29edc3fe5012fa1a6eb23deffd5ffb17ebebec7a
Dan Gohman
2019-01-02T19:59:22
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.
diff --git a/lib/entity/src/list.rs b/lib/entity/src/list.rs index 37ac92ad0..617ea2db3 100644 --- a/lib/entity/src/list.rs +++ b/lib/entity/src/list.rs @@ -1,4 +1,5 @@ //! Small lists of entity references. +use crate::packed_option::ReservedValue; use crate::EntityRef; use std::marker::PhantomData; use std::mem; @...
1
12
10
8a11bd6af79dc921fe55b353bc85e1f097cb99b4
Dan Gohman
2019-01-02T19:58:44
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.
diff --git a/lib/entity/src/boxed_slice.rs b/lib/entity/src/boxed_slice.rs index c97522467..e61923838 100644 --- a/lib/entity/src/boxed_slice.rs +++ b/lib/entity/src/boxed_slice.rs @@ -83,11 +83,6 @@ where IterMut::new(self.elems.iter_mut()) } - /// Get the key that will be assigned to the next pushe...
1
0
5
ab72eeadf969e73aac9983213248ab048d4d165a
bjorn3
2019-01-01T13:00:18
Bump faerie to 0.7.0
diff --git a/lib/faerie/Cargo.toml b/lib/faerie/Cargo.toml index 0edc0c723..4ef81063e 100644 --- a/lib/faerie/Cargo.toml +++ b/lib/faerie/Cargo.toml @@ -12,7 +12,7 @@ edition = "2018" [dependencies] cranelift-codegen = { path = "../codegen", version = "0.26.0" } cranelift-module = { path = "../module", version = "0....
2
2
2
e3db942b0cec38e4cf5af7d6ca6ce33d7f79d666
bjorn3
2018-12-26T10:35:55
Put default implementations of FuncWriter methods in a seperate method This is useful when you want to write extra information
diff --git a/lib/codegen/src/write.rs b/lib/codegen/src/write.rs index 4a70574ca..6629f0f3b 100644 --- a/lib/codegen/src/write.rs +++ b/lib/codegen/src/write.rs @@ -41,6 +41,16 @@ pub trait FuncWriter { w: &mut Write, func: &Function, regs: Option<&RegInfo>, + ) -> Result<bool, fmt::Error>...
1
22
1
f997cde2db0a910aa5e658659835871b34dea8f5
Dan Gohman
2018-12-25T05:57:43
Don't create Static memories larger than the Tunables' static bound size.
diff --git a/lib/environ/src/module.rs b/lib/environ/src/module.rs index 4e6ac74d9..b4f205009 100644 --- a/lib/environ/src/module.rs +++ b/lib/environ/src/module.rs @@ -54,22 +54,23 @@ impl MemoryStyle { /// Decide on an implementation style for the given `Memory`. pub fn for_memory(memory: Memory, tunables: ...
1
16
15
a5a23d8c4a6e33b85ff9f3adffeaf7ed44a52914
Dan Gohman
2018-12-25T05:40:26
Factor WasmNamespace out of lib/wast and into lib/execute as Namespace. This makes it usable for things other than just wast tests.
diff --git a/lib/execute/src/lib.rs b/lib/execute/src/lib.rs index a2e7edc3d..39b061c2d 100644 --- a/lib/execute/src/lib.rs +++ b/lib/execute/src/lib.rs @@ -25,6 +25,7 @@ #![cfg_attr(not(feature = "std"), feature(alloc))] extern crate cranelift_codegen; +#[macro_use] extern crate cranelift_entity; extern crate cr...
5
236
127
71c0142cd442fede32f15fb2c2bb652e863ba039
Dan Gohman
2018-12-25T02:20:15
Rename the `address` field of Table/Memory/Global exports to `definition`. For functions, `address` makes sense because it's the address of the function. Bt for Table/Memory/Global, it points to a `VM*Definition` field.
diff --git a/lib/execute/src/instance_plus.rs b/lib/execute/src/instance_plus.rs index e22d58fe7..6e5925d92 100644 --- a/lib/execute/src/instance_plus.rs +++ b/lib/execute/src/instance_plus.rs @@ -213,12 +213,12 @@ impl InstancePlus { start: usize, len: usize, ) -> Result<&[u8], ActionError> { - ...
4
31
27
8f74c7f3d51b465046d7eacc13951960d2b4a2dd
Dan Gohman
2018-12-25T02:14:00
Add derive(Debug) to Export.
diff --git a/lib/runtime/src/export.rs b/lib/runtime/src/export.rs index 56e256bf4..588523e12 100644 --- a/lib/runtime/src/export.rs +++ b/lib/runtime/src/export.rs @@ -6,6 +6,7 @@ use vmcontext::{ use wasmtime_environ::{MemoryPlan, TablePlan}; /// The value of an export passed from one instance to another. +#[deri...
1
1
0
4224a95f0dfee4679123d2dab5e919de5062f3ef
Bruce Mitchener
2018-12-24T15:41:08
Update wasmparser to 0.23.
diff --git a/lib/wasm/Cargo.toml b/lib/wasm/Cargo.toml index cf14471a4..64a471698 100644 --- a/lib/wasm/Cargo.toml +++ b/lib/wasm/Cargo.toml @@ -10,7 +10,7 @@ readme = "README.md" keywords = ["webassembly", "wasm"] [dependencies] -wasmparser = { version = "0.22.0", default-features = false } +wasmparser = { version...
1
1
1
887451a2eb87d3f6aada3670964bbd074c3d0b1a
Dan Gohman
2018-12-24T17:32:50
Fix formatting.
diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs index ad1e87217..74a3e5990 100644 --- a/lib/frontend/src/frontend.rs +++ b/lib/frontend/src/frontend.rs @@ -367,7 +367,9 @@ impl<'a> FunctionBuilder<'a> { /// Returns an object with the [`InstBuilder`](../codegen/ir/builder/trait.InstBuilder....
1
3
1
95118e7244cd3ae6bdbbfd33af41c77f48d1e36b
bjorn3
2018-12-24T14:02:38
Nicer panic when trying to insert instruction before calling switch_to_block
diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs index 2e29db56c..ad1e87217 100644 --- a/lib/frontend/src/frontend.rs +++ b/lib/frontend/src/frontend.rs @@ -367,7 +367,8 @@ impl<'a> FunctionBuilder<'a> { /// Returns an object with the [`InstBuilder`](../codegen/ir/builder/trait.InstBuilder....
1
2
1
5eee15ab023b16d0b24ca9453572f0565d98469a
Jef
2018-12-19T20:27:16
Remove outdated comment
diff --git a/src/backend.rs b/src/backend.rs index fec9c5a33..09d714064 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -499,11 +499,6 @@ pub fn end_block(ctx: &mut Context, parent_block_state: BlockState) { } } -// TODO: We should be able to have arbitrary return registers. For blocks with multiple -// ...
1
0
5
522818e7d89e0794774a064737034dfe030a58e7
Jef
2018-12-19T17:52:26
Fix compiler bomb
diff --git a/src/backend.rs b/src/backend.rs index 212659758..fec9c5a33 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -448,8 +448,18 @@ pub fn return_from_block(ctx: &mut Context, arity: u32, is_function_end: bool) { } pub fn start_block(ctx: &mut Context) -> BlockState { - // free_return_register(ctx, ari...
1
12
2
9decdca525a972276720c5f09a2ebb2f8b287730
Jef
2018-12-19T16:39:20
Add `Return`
diff --git a/src/backend.rs b/src/backend.rs index 6b263c5c1..212659758 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -597,7 +597,8 @@ pub fn drop(ctx: &mut Context) { ); } StackValue::Temp(gpr) => free_value(ctx, Value::Temp(gpr)), - _ => {} + StackValue::Local(loc) =...
2
14
1
c52cf1493a054af1d18c211385a4fce52fffa761
Jef
2018-12-19T13:46:32
Reformat a comment
diff --git a/src/function_body.rs b/src/function_body.rs index ddebd836d..b414da026 100644 --- a/src/function_body.rs +++ b/src/function_body.rs @@ -258,8 +258,9 @@ pub fn translate( // TODO: Merge `End`s so that we can // A) Move values directly into RAX when returning from deep...
1
3
2
f91b9072de57d5903f1954954d959749bd003b57
Jef
2018-12-19T13:42:00
Fix some issues with the use of stack depth
diff --git a/src/backend.rs b/src/backend.rs index 1b329dd22..6b263c5c1 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -468,11 +468,15 @@ pub fn reset_block(ctx: &mut Context, parent_block_state: BlockState) { } pub fn end_block(ctx: &mut Context, parent_block_state: BlockState) { - // TODO: This is current...
2
14
5
3b5c11a92a132aee8a7acb99e125ae69bc63a0ff
Jef
2018-12-19T11:58:08
Test comparison operators
diff --git a/src/backend.rs b/src/backend.rs index f9b558b72..1b329dd22 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -949,7 +949,7 @@ macro_rules! cmp { cmp!(i32_eq, sete, |a, b| a == b); cmp!(i32_neq, setne, |a, b| a != b); // TODO: `dynasm-rs` inexplicably doesn't support setb -// cmp!(i32_lt_u, setb, |a, b...
3
10
3
2173f4bcca39d74cd0a89ca7c1246d3c31a466da
Jef
2018-12-19T11:42:35
Add other comparison operators, fix materialising locals, add more TODO comments (v. important)
diff --git a/src/backend.rs b/src/backend.rs index 4e3d7abf6..f9b558b72 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -117,6 +117,8 @@ impl Registers { } } +// TODO: Allow pushing condition codes to stack? We'd have to immediately +// materialise them into a register if anything is pushed above them...
3
50
52
cbf34a455b52edb035b58af95717fba61b921d0c
Jef
2018-12-19T09:40:31
Add factorial tests from spec (after fixing them slightly)
diff --git a/src/backend.rs b/src/backend.rs index e6e3d6a14..4e3d7abf6 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -256,6 +256,9 @@ impl StackValue { #[derive(Debug, Default, Clone)] struct Locals { + // TODO: Store all places that the value can be read, so we can optimise + // passing (registe...
3
194
81
72855e48c7449a92ffcb109ef08d0148a4913db5
Jef
2018-12-18T18:15:29
Improve behaviour when adding literal to non-literal, materialise local if its value will be changed Currently the implementation of materializing locals causes compilation to be non-linear in degenerate cases
diff --git a/src/backend.rs b/src/backend.rs index 7db84e857..e6e3d6a14 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -679,7 +679,11 @@ macro_rules! commutative_binop { let (op1, op0) = match op1 { Value::Temp(reg) => (reg, op0), - _ => (into_temp_reg(ctx, op0), op1)...
2
79
4
5418241dc69fe39d5620cdebe320b313613cc6bd
Jef
2018-12-18T16:16:38
Allow blocks to return values in any register
diff --git a/src/backend.rs b/src/backend.rs index 0b25b5eb6..7db84e857 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -211,7 +211,6 @@ impl TranslatedCodeSection { } } -// TODO: Immediates? We could implement on-the-fly const folding #[derive(Debug, Copy, Clone, PartialEq)] enum Value { Local(u32),...
3
104
39
74ffb8560ca2db6cb66cfb1f120f52e83a2e7741
Jef
2018-12-18T11:12:17
Fix use of locals
diff --git a/src/backend.rs b/src/backend.rs index f01eeecdf..0b25b5eb6 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -14,7 +14,7 @@ const WORD_SIZE: u32 = 8; type GPR = u8; -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] struct GPRs { bits: u16, } @@ -70,7 +70,7 @@ impl GPRs { } } -#[d...
3
488
111
0d1c4f32903192282da7c418f50b8076964a41fb
Jef
2018-12-12T10:52:48
Allow calling functions with any signature
diff --git a/examples/test.rs b/examples/test.rs index 3295df8ae..163dda014 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())...
3
74
14
46d9a3cd1a88bf4308d5155e066410466e0cc732
Nicholas Nethercote
2018-12-13T22:34:23
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 run...
diff --git a/lib/codegen/src/regalloc/coloring.rs b/lib/codegen/src/regalloc/coloring.rs index 8ce42737d..d04014098 100644 --- a/lib/codegen/src/regalloc/coloring.rs +++ b/lib/codegen/src/regalloc/coloring.rs @@ -654,10 +654,10 @@ impl<'a> Context<'a> { where Pred: FnMut(&LiveRange, LiveRangeContext<Layou...
4
40
36
53841cdb07994ad07277a2603f4bacd539706c34
Jef
2018-12-17T11:50:29
Add loops
diff --git a/src/function_body.rs b/src/function_body.rs index 7a835fe4e..7d92c9589 100644 --- a/src/function_body.rs +++ b/src/function_body.rs @@ -13,8 +13,7 @@ enum ControlFrameKind { /// Can be used for an implicit function block. Block { end_label: Label }, /// Loop frame (branching to the beginning...
1
49
38
23b5a56a7d202c4dcb6484cc3688d2da01e22300
Jef
2018-12-17T11:16:40
Fix locals not being restored properly (which may cause us to read garbage values from the stack)
diff --git a/Cargo.toml b/Cargo.toml index a6e3028e0..2881b1308 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ keywords = ["webassembly", "wasm", "compile", "compiler", "jit"] publish = false [dependencies] +arrayvec = "0.4" dynasm = "0.2.3" dynasmrt = "0.2.3" wasmparser = "0.21.6" diff --git a/src/bac...
5
106
84
bd2ee53c8983043ac3fb0a3746964ab02706f058
Jef
2018-12-15T15:39:38
Optimize `pop_i32_into`, check more fib values
diff --git a/src/backend.rs b/src/backend.rs index 8c15536ff..1c1dc144e 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -397,10 +397,33 @@ fn pop_i32(ctx: &mut Context) -> Value { } fn pop_i32_into(ctx: &mut Context, dst: ValueLocation) { - let val = pop_i32(ctx); - let val_loc = val.location(&ctx.locals)...
2
40
11
5511f920886c58f15b04155e41100bd9efecc563
Sergey Pepyakin
2018-12-13T15:31:08
Add call alignment requirement.
diff --git a/src/function_body.rs b/src/function_body.rs index 0983973f9..bdd000d7c 100644 --- a/src/function_body.rs +++ b/src/function_body.rs @@ -224,6 +224,7 @@ pub fn translate( let callee_ty = translation_ctx.func_type(function_index); // TODO: this implementation assumes that ...
1
1
0
23476e82ff548b45f2173235f6b343d62885ba35
Sergey Pepyakin
2018-12-13T15:21:30
Fix typo.
diff --git a/src/backend.rs b/src/backend.rs index 31b15d129..0c996f90c 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -151,7 +151,7 @@ impl CodeGenSession { { let func_start = &mut self.func_defs[func_idx as usize]; - // At this point we now the exact start address of this funct...
1
1
1
aab191b46035606bbef187e2e70d503a8cb1d1ab
Sergey Pepyakin
2018-12-13T15:20:03
Comment FuncDef.
diff --git a/src/backend.rs b/src/backend.rs index 7829b7bf1..31b15d129 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -107,37 +107,59 @@ fn abi_loc_for_arg(pos: u32) -> ArgLocation { } } +/// Records data about the function. +struct FuncDef { + /// Offset to the start of the function. None, until the e...
1
37
15
94e2f0c2a536708ad72bf4bd05689c38ebe716ce
Sergey Pepyakin
2018-12-11T19:13:27
Add the fib test.
diff --git a/src/tests.rs b/src/tests.rs index 348c0e772..add6ee96b 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -142,5 +142,61 @@ fn literals() { assert_eq!(execute_wat(code, 0, 0), 228); } +#[test] +fn fib() { + let code = r#" +(module + (func $fib (param $n i32) (param $_unused i32) (result i32) + ...
1
56
0
d6b300c87fa422a5b19d4360d94df6cb9bf802fa
Sergey Pepyakin
2018-12-11T19:13:20
Implement returns.
diff --git a/src/backend.rs b/src/backend.rs index 3e90722c0..7829b7bf1 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -361,11 +361,20 @@ pub fn pass_outgoing_args(ctx: &mut Context, arity: u32) { } } -pub fn call_direct(ctx: &mut Context, index: u32) { +pub fn call_direct(ctx: &mut Context, index: u32, re...
2
12
5
38590cbcb9f8a83adc6312de257725a30379ed0f
Sergey Pepyakin
2018-12-11T19:12:55
Add i32 literals support.
diff --git a/src/backend.rs b/src/backend.rs index dfcd301c3..3e90722c0 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -261,7 +261,7 @@ pub fn get_local_i32(ctx: &mut Context, local_idx: u32) { push_i32(ctx, gpr); } -pub fn store_i32(ctx: &mut Context, local_idx: u32) { +pub fn set_local_i32(ctx: &mut Cont...
3
26
1
a3719e08e532763d044848b6871ef3c960b7d3e3
Sergey Pepyakin
2018-12-11T18:45:33
Pass arguments.
diff --git a/src/backend.rs b/src/backend.rs index b3cf12a91..dfcd301c3 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -81,6 +81,7 @@ impl Registers { } /// Describes location of a argument. +#[derive(Debug)] enum ArgLocation { /// Argument is passed via some register. Reg(GPR), @@ -336,6 +337,22 @@...
3
33
12
eb60c2587adc7ec747fd22202476f3c7f0efef4d
Sergey Pepyakin
2018-12-07T18:16:32
Basic form of a function call
diff --git a/src/backend.rs b/src/backend.rs index e504df7d1..b3cf12a91 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -1,8 +1,9 @@ #![allow(dead_code)] // for now -use error::Error; use dynasmrt::x64::Assembler; -use dynasmrt::{DynasmApi, DynasmLabelApi, AssemblyOffset, ExecutableBuffer, DynamicLabel}; +use d...
5
89
60
635ccc6916947ceb516cac26e2d3487d6f7afe81
Sergey Pepyakin
2018-11-29T21:28:10
Introduce TranslationContext
diff --git a/src/function_body.rs b/src/function_body.rs index 213da6ee5..d0f83fab4 100644 --- a/src/function_body.rs +++ b/src/function_body.rs @@ -1,4 +1,5 @@ use backend::*; +use module::TranslationContext; use error::Error; use wasmparser::{FuncType, FunctionBody, Operator, Type}; @@ -88,6 +89,7 @@ impl Contro...
3
26
12
f22b9903b6673d2703d39e8dd923a3c9c61a77f2
Sergey Pepyakin
2018-11-29T17:55:49
Pass function sig in function_body::translate
diff --git a/src/function_body.rs b/src/function_body.rs index c49699f1b..213da6ee5 100644 --- a/src/function_body.rs +++ b/src/function_body.rs @@ -1,6 +1,6 @@ use backend::*; use error::Error; -use wasmparser::{FunctionBody, Operator, Type}; +use wasmparser::{FuncType, FunctionBody, Operator, Type}; // TODO: Use...
4
74
27
66120cdede59d5ec1a5431f0ff8b4c5c0cf02c4b
Dan Gohman
2018-12-14T16:09:01
Prune unnecessary dependencies.
diff --git a/lib/execute/Cargo.toml b/lib/execute/Cargo.toml index 2f22e7e4d..350ff13e5 100644 --- a/lib/execute/Cargo.toml +++ b/lib/execute/Cargo.toml @@ -20,11 +20,6 @@ region = "1.0.0" failure = { version = "0.1.3", default-features = false } failure_derive = { version = "0.1.3", default-features = false } -[bu...
1
0
5
1e04dc90b661b26528a19884bd27943017e244e3
Jef
2018-12-14T15:35:48
Make more tests quickcheck-compatible, remove unused code
diff --git a/src/backend.rs b/src/backend.rs index e1f4a6ca0..8c15536ff 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -322,9 +322,7 @@ pub fn current_block_state(ctx: &Context) -> BlockState { ctx.block_state.clone() } -pub fn return_from_block(ctx: &mut Context, new_depth: StackDepth) { - let diff = (...
3
28
39
b832832c76f38cb1aca4ae3a7fe1b36467cbbce1
Jef
2018-12-14T15:20:28
Add const folding, fix returning values from blocks
diff --git a/src/backend.rs b/src/backend.rs index bbf1abe66..e1f4a6ca0 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -118,6 +118,8 @@ enum ValueLocation { /// first local, and so will have to be adjusted with `adjusted_offset` /// before reading (as RSP may have been changed by `push`/`pop`). Stac...
3
197
123
17ecd049a1804dde8832a5cc8bee7e077123ea38
Jef
2018-12-13T15:05:24
Register allocation V2 This lays the groundwork for other on-the-fly optimisations, like passing literals through in order to do const folding in linear time, while compiling.
diff --git a/src/backend.rs b/src/backend.rs index e74c85af9..bbf1abe66 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -10,6 +10,7 @@ const WORD_SIZE: u32 = 8; type GPR = u8; +#[derive(Copy, Clone)] struct GPRs { bits: u16, } @@ -36,13 +37,19 @@ const R12: u8 = 12; const R13: u8 = 13; const R14: u8 =...
4
588
227
0c0ccc5d0999b5059fe9fd21e33e7beb023bed2a
Dan Gohman
2018-12-13T23:50:58
Add unsigned access methods to VMGlobalDefinition.
diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs index 64c90b662..5d89e95aa 100644 --- a/lib/runtime/src/instance.rs +++ b/lib/runtime/src/instance.rs @@ -329,7 +329,7 @@ fn check_table_init_bounds(instance: &mut Instance) -> Result<(), InstantiationE } else { unsafe ...
2
26
2
26eb8131daf951e70dad3230115e38c853a20c47
Dan Gohman
2018-12-12T22:20:36
Avoid unnecessary clone() calls.
diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs index 4322cddbe..64c90b662 100644 --- a/lib/runtime/src/instance.rs +++ b/lib/runtime/src/instance.rs @@ -216,11 +216,10 @@ impl Instance { if let Some(start_index) = self.module.start_func { let (callee_address, callee_vmctx) ...
1
3
4
4994e3671c6c7e86d5b69cf6b2deafa2a3f877f7
Jef
2018-12-13T10:08:34
Remove unused argument from fibonacci example
diff --git a/src/backend.rs b/src/backend.rs index 9759a6b49..e74c85af9 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -481,12 +481,9 @@ pub fn prologue(ctx: &mut Context, stack_slots: u32) { } pub fn epilogue(ctx: &mut Context) { - // TODO: This doesn't work with stack alignment. - // assert_eq!( - /...
2
6
11
912fa83fff1b04962fa26cf81ce0075ac56d4a5a
Jef
2018-12-12T15:47:06
Add benchmarks
diff --git a/src/lib.rs b/src/lib.rs index 0d5f13063..71fecec42 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,8 @@ -#![feature(plugin)] +#![feature(plugin, test)] #![plugin(dynasm)] +extern crate test; + extern crate capstone; extern crate failure; extern crate wasmparser; diff --git a/src/tests.rs b/src/te...
2
28
6
5bb7430976f044c4f333e032308a9afae70a645b
Jef
2018-12-12T13:02:11
Add quickcheck, implement simple binary operations
diff --git a/Cargo.toml b/Cargo.toml index b7801bd8d..a6e3028e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,8 @@ capstone = "0.5.0" failure = "0.1.3" failure_derive = "0.1.3" wabt = "0.7" +lazy_static = "1.2" +quickcheck = "0.7" [badges] maintenance = { status = "experimental" } diff --git a/src/backen...
6
107
29
5b448ce3c780c934fe211bf07e8e89a77e25ccdf
Jef
2018-12-13T09:25:17
Stop leaking stack space on function call
diff --git a/src/backend.rs b/src/backend.rs index 994d0c5e9..f9bc16125 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -346,8 +346,9 @@ pub fn copy_incoming_arg(ctx: &mut Context, frame_size: u32, arg_pos: u32) { ); } -pub fn pass_outgoing_args(ctx: &mut Context, arity: u32) { - let mut stack_args = vec...
2
29
7
5c2395ee3218c165d9f4d9f63389cf0f043177ed
Dan Gohman
2018-12-12T22:16:46
Elaborate on a TODO comment.
diff --git a/lib/execute/src/instance_plus.rs b/lib/execute/src/instance_plus.rs index f1b3d7c7c..8fc268608 100644 --- a/lib/execute/src/instance_plus.rs +++ b/lib/execute/src/instance_plus.rs @@ -147,7 +147,8 @@ impl InstancePlus { assert_eq!(value.value_type(), signature.params[index].value_type); ...
1
2
1
eba0f9925a012bc08a8c6a51c8ae2b413e069d82
Dan Gohman
2018-12-12T21:00:53
no_std fixes.
diff --git a/lib/execute/src/instance_plus.rs b/lib/execute/src/instance_plus.rs index 1f731aef1..f1b3d7c7c 100644 --- a/lib/execute/src/instance_plus.rs +++ b/lib/execute/src/instance_plus.rs @@ -5,6 +5,7 @@ use cranelift_wasm::DefinedFuncIndex; use jit_code::JITCode; use link::link_module; use resolver::Resolver; ...
3
3
1
bc4333d857aa97166d4a0e4a38984236b5e284cb
Dan Gohman
2018-12-12T20:28:51
Implement assert_malformed and assert_invalid.
diff --git a/lib/execute/src/action.rs b/lib/execute/src/action.rs index 0194bf495..5afbd0892 100644 --- a/lib/execute/src/action.rs +++ b/lib/execute/src/action.rs @@ -119,6 +119,10 @@ pub enum ActionError { #[fail(display = "Type error: {}", _0)] Type(String), + /// The module did not pass validation. ...
4
49
16
189996accd3b83e42bb12df408c687e86df50a3b
Jef
2018-12-12T12:23:43
Fix receiving more than 6 arguments, allow calling functions with more than 6 arguments
diff --git a/src/backend.rs b/src/backend.rs index 7829b7bf1..994d0c5e9 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -89,13 +89,13 @@ enum ArgLocation { Stack(i32), } +// TODO: This assumes only system-v calling convention. +// In system-v calling convention the first 6 arguments are passed via registers...
4
107
10
8bd35e154b9497be6d1194c299d463ce706322bb
Dan Gohman
2018-12-11T21:22:28
Tidy up some match bindings to be more consistent with the rest of the codebase.
diff --git a/lib/codegen/meta/src/cdsl/settings.rs b/lib/codegen/meta/src/cdsl/settings.rs index 253f7680d..805dfd2a7 100644 --- a/lib/codegen/meta/src/cdsl/settings.rs +++ b/lib/codegen/meta/src/cdsl/settings.rs @@ -101,7 +101,8 @@ impl Preset { let mask = setting.byte_mask(); let val = setti...
3
11
10
6dd39dee6a3d91433951a8eb2499f4c3e8e83628
Dan Gohman
2018-12-11T21:21:03
Update to Cranelift 0.26.0.
diff --git a/Cargo.toml b/Cargo.toml index ab271724b..cf3098cbe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,10 +22,10 @@ name = "wasm2obj" path = "src/wasm2obj.rs" [dependencies] -cranelift-codegen = { git = "https://github.com/sunfishcode/cranelift.git", branch = "guard-offset" } -cranelift-native = { git = "h...
7
23
23
bc18085ad19805c8a14df80a45510f7c3d8231f8
Dan Gohman
2018-12-11T20:25:06
Use EntityRef::from_u32 to reduce casting.
diff --git a/lib/codegen/src/ir/progpoint.rs b/lib/codegen/src/ir/progpoint.rs index b505af05a..19d14892b 100644 --- a/lib/codegen/src/ir/progpoint.rs +++ b/lib/codegen/src/ir/progpoint.rs @@ -85,9 +85,9 @@ impl From<ValueDef> for ExpandedProgramPoint { impl From<ProgramPoint> for ExpandedProgramPoint { fn from(p...
6
27
34
a55c933f192e4b29f7e250156da3abd1c9f64cd2
Dan Gohman
2018-12-11T13:44:26
Factor out a `MemFlags` constructor for trusted notrap/aligned accesses.
diff --git a/lib/codegen/src/ir/memflags.rs b/lib/codegen/src/ir/memflags.rs index f459abdb3..6acbe167a 100644 --- a/lib/codegen/src/ir/memflags.rs +++ b/lib/codegen/src/ir/memflags.rs @@ -26,6 +26,15 @@ impl MemFlags { Self { bits: 0 } } + /// Create a set of flags representing an access from a "tru...
5
14
15
68a13646f9e5b46e402f2a8a77d720317d0d3399
Dan Gohman
2018-12-10T15:17:39
Add a from_u32 function to EntityRef. This eliminates the need for casting in common cases.
diff --git a/lib/entity/src/lib.rs b/lib/entity/src/lib.rs index e445c0d8a..e86ea0d8f 100644 --- a/lib/entity/src/lib.rs +++ b/lib/entity/src/lib.rs @@ -100,6 +100,13 @@ macro_rules! entity_impl { } impl $entity { + /// Return the underlying index value as a `u32`. + #[allow(de...
1
7
0
b8416525391033caba82b99c7c80f8cdcc482cd1
Dan Gohman
2018-12-10T15:12:20
Add a `Slice` to supplement `PrimaryMap`.
diff --git a/lib/entity/src/boxed_slice.rs b/lib/entity/src/boxed_slice.rs new file mode 100644 index 000000000..6f9890e7d --- /dev/null +++ b/lib/entity/src/boxed_slice.rs @@ -0,0 +1,315 @@ +//! Boxed slices for `PrimaryMap`. + +use iter::{Iter, IterMut}; +use keys::Keys; +use std::marker::PhantomData; +use std::ops::...
3
326
1
5b03581442febc7a2aa57a7227e0051915706c7c
Dan Gohman
2018-12-06T22:59:58
Tidy up `use` declaration syntax.
diff --git a/lib/entity/src/map.rs b/lib/entity/src/map.rs index df8ac115a..dbec7b2f1 100644 --- a/lib/entity/src/map.rs +++ b/lib/entity/src/map.rs @@ -1,10 +1,12 @@ //! Densely numbered entity references as mapping keys. +use iter::{Iter, IterMut}; +use keys::Keys; use std::marker::PhantomData; use std::ops::{In...
7
15
7
95a6a25db388eb96357b383291bff84a79ab9456
Dan Gohman
2018-12-06T22:55:24
Update to pretty_env_logger 0.3.0.
diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index a20993880..709db5bf2 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -34,7 +34,7 @@ term = "0.5.1" capstone = { version = "0.5.0", optional = true } wabt = { version = "0.7.0", optional = true } target-lexicon = "0.2.0" -pretty_env_logger...
1
1
1
7b51195f496fbea4be29a3d7e306aa5e23440be1
Dan Gohman
2018-12-06T22:54:10
Add an offset to cranelift-wasm's `GlobalVariable`.
diff --git a/lib/wasm/Cargo.toml b/lib/wasm/Cargo.toml index 6a768c87b..a88550d1e 100644 --- a/lib/wasm/Cargo.toml +++ b/lib/wasm/Cargo.toml @@ -18,6 +18,7 @@ hashmap_core = { version = "0.1.9", optional = true } failure = { version = "0.1.1", default-features = false, features = ["derive"] } failure_derive = { versi...
5
14
11
605f34257bb7020979964933f5a27fe4daec5235
Dan Gohman
2018-12-06T21:24:54
Fix a missing `#[test]`.
diff --git a/lib/entity/src/primary.rs b/lib/entity/src/primary.rs index 2a4c37154..6fe70523f 100644 --- a/lib/entity/src/primary.rs +++ b/lib/entity/src/primary.rs @@ -371,6 +371,7 @@ mod tests { } } + #[test] fn from_iter() { let mut m: PrimaryMap<E, usize> = PrimaryMap::new(); ...
1
1
0
30a089031919caa8686d3ecefda85e96ec7e98da
Dan Gohman
2018-12-06T21:00:25
Rename GlobalInit::GlobalRef to GlobalInit::GetGlobal. "Ref" is an increasingly overloaded term.
diff --git a/lib/wasm/src/sections_translator.rs b/lib/wasm/src/sections_translator.rs index ea3c6c652..10ec04880 100644 --- a/lib/wasm/src/sections_translator.rs +++ b/lib/wasm/src/sections_translator.rs @@ -187,7 +187,7 @@ pub fn parse_global_section( Operator::F32Const { value } => GlobalInit::F32Const(...
2
2
2
566c160c379609a6937d6720e50c9919208f0e9e
Dan Gohman
2018-12-06T15:50:12
Add a function to return the pointer type for a given triple. Also use a slightly tidier naming convention for such functions.
diff --git a/lib/codegen/src/ir/types.rs b/lib/codegen/src/ir/types.rs index c7f6d12f2..ceffe04e9 100644 --- a/lib/codegen/src/ir/types.rs +++ b/lib/codegen/src/ir/types.rs @@ -2,6 +2,7 @@ use std::default::Default; use std::fmt::{self, Debug, Display, Formatter}; +use target_lexicon::{PointerWidth, Triple}; ///...
3
13
2
38d1d58e06ddfb4d18b7aa00752c044ba29e1679
Dan Gohman
2018-12-06T14:37:34
Change GlobalInit::Import() to GlobalInit::Import.
diff --git a/lib/wasm/src/sections_translator.rs b/lib/wasm/src/sections_translator.rs index 15a1dfc0d..ea3c6c652 100644 --- a/lib/wasm/src/sections_translator.rs +++ b/lib/wasm/src/sections_translator.rs @@ -95,7 +95,7 @@ pub fn parse_import_section<'data>( Global { ty: ty...
2
4
4
76583192a88146640199b21623da3893e47c6877
Dan Gohman
2018-12-06T14:36:48
Change ZeroOneOrMore::Zero() to TableElementType::Zero.
diff --git a/lib/frontend/src/ssa.rs b/lib/frontend/src/ssa.rs index a78ed0b89..15ba1c98c 100644 --- a/lib/frontend/src/ssa.rs +++ b/lib/frontend/src/ssa.rs @@ -192,9 +192,9 @@ impl SSABuilder { /// Small enum used for clarity in some functions. #[derive(Debug)] enum ZeroOneOrMore<T> { - Zero(), + Zero, O...
1
8
8
42e35c4c578b667933f4ff15853ee45285986cfd
Dan Gohman
2018-12-01T00:59:35
Implement `PrimaryMap::with_capacity`.
diff --git a/lib/entity/src/primary.rs b/lib/entity/src/primary.rs index ae1097f6a..2a4c37154 100644 --- a/lib/entity/src/primary.rs +++ b/lib/entity/src/primary.rs @@ -41,6 +41,14 @@ where } } + /// Create a new empty map with the given capacity. + pub fn with_capacity(capacity: usize) -> Self { ...
1
8
0
6e17bebf4419a648234346cdc3ed871dd3a7ec41
Dan Gohman
2018-12-01T00:41:54
Publish `TableElementType` for library users.
diff --git a/lib/wasm/src/lib.rs b/lib/wasm/src/lib.rs index 6c23f9764..354a62f9e 100644 --- a/lib/wasm/src/lib.rs +++ b/lib/wasm/src/lib.rs @@ -64,7 +64,8 @@ pub use func_translator::FuncTranslator; pub use module_translator::translate_module; pub use translation_utils::{ DefinedFuncIndex, DefinedGlobalIndex, D...
2
4
1
f0dbba0ec8b188e0eab701c1cccd616ab4e076c4
Dan Gohman
2018-12-01T00:37:00
Change TableElementType::Func() to TableElementType::Func.
diff --git a/lib/wasm/src/sections_translator.rs b/lib/wasm/src/sections_translator.rs index 511f7d07e..15a1dfc0d 100644 --- a/lib/wasm/src/sections_translator.rs +++ b/lib/wasm/src/sections_translator.rs @@ -106,7 +106,7 @@ pub fn parse_import_section<'data>( Table { ty: m...
2
3
3
c2872317204cb93d84d258fa07c4b7ad51b80d85
Dan Gohman
2018-12-01T00:31:00
Implement FromIterator for PrimaryMap.
diff --git a/lib/entity/src/primary.rs b/lib/entity/src/primary.rs index 9b8709823..ae1097f6a 100644 --- a/lib/entity/src/primary.rs +++ b/lib/entity/src/primary.rs @@ -1,4 +1,5 @@ //! Densely numbered entity references as mapping keys. +use std::iter::FromIterator; use std::marker::PhantomData; use std::ops::{Index...
1
27
0
e623da51c6865c820db54c19217ea4e29095e112
Dan Gohman
2018-12-01T00:27:00
Suppress dead-code warnings on functions expanded from `entity_impl!`.
diff --git a/lib/entity/src/lib.rs b/lib/entity/src/lib.rs index 191a9c09e..7d63eaee1 100644 --- a/lib/entity/src/lib.rs +++ b/lib/entity/src/lib.rs @@ -101,6 +101,7 @@ macro_rules! entity_impl { impl $entity { /// Return the underlying index value as a `u32`. + #[allow(dead_code)] ...
1
1
0
91477d21c8f4536231504ac7b9796b547585e361
Dan Gohman
2018-12-01T00:16:35
Add an `as_u32()` member to `entity_impl` types. This allows us to avoid a lot of casting indices back to u32.
diff --git a/lib/codegen/src/regalloc/virtregs.rs b/lib/codegen/src/regalloc/virtregs.rs index 13ef4a538..ac4856261 100644 --- a/lib/codegen/src/regalloc/virtregs.rs +++ b/lib/codegen/src/regalloc/virtregs.rs @@ -266,7 +266,7 @@ impl UFEntry { /// Encode a link entry. fn encode_link(v: Value) -> i32 { - ...
6
16
9
954573440d83af0ae58c09cd4143371b2b060a78
Dan Gohman
2018-12-01T00:11:59
Remove ModuleEnvironment::get_func_name, which is unused.
diff --git a/lib/wasm/src/environ/dummy.rs b/lib/wasm/src/environ/dummy.rs index 4ff36e6f5..22edbc998 100644 --- a/lib/wasm/src/environ/dummy.rs +++ b/lib/wasm/src/environ/dummy.rs @@ -342,10 +342,6 @@ impl<'data> ModuleEnvironment<'data> for DummyEnvironment { self.info.config } - fn get_func_name(&...
2
0
7
93f33141e9cf8b17c7d2301a8daadb3886b27c1d
Dan Gohman
2018-12-08T21:22:48
Introduce VMFunctionBody to add extra type safety.
diff --git a/lib/execute/src/code.rs b/lib/execute/src/code.rs index 7f319ac95..26e003db8 100644 --- a/lib/execute/src/code.rs +++ b/lib/execute/src/code.rs @@ -4,9 +4,9 @@ use mmap::Mmap; use region; use std::cmp; use std::mem; -use std::slice; use std::string::String; use std::vec::Vec; +use vmcontext::VMFunctio...
10
71
45
10bb311aea7cb7b9049700d78fcdf7dac87cd582
Dan Gohman
2018-12-08T20:28:33
Reorganize unsafe code.
diff --git a/lib/execute/src/invoke.rs b/lib/execute/src/invoke.rs index fc52a5582..5d49228b2 100644 --- a/lib/execute/src/invoke.rs +++ b/lib/execute/src/invoke.rs @@ -207,7 +207,7 @@ fn call_through_wrapper( .as_ptr(); code.publish(); - let func = unsafe { mem::transmute::<_, fn()>(exec_code_buf) }...
4
20
23
fe562297a7c74d7246c06be8ccc2350e63e3e386
Dan Gohman
2018-12-07T06:21:34
Rename wasmtime's --function to --invoke. This highlights the similarity with the `invoke` command in `wast` files.
diff --git a/src/wasmtime.rs b/src/wasmtime.rs index e9d57fb00..2318e495d 100644 --- a/src/wasmtime.rs +++ b/src/wasmtime.rs @@ -63,21 +63,22 @@ static LOG_FILENAME_PREFIX: &str = "cranelift.dbg."; const USAGE: &str = " Wasm runner. -Takes a binary or text WebAssembly module and instantiates it, optionally -allowin...
1
9
8
a63586142572ee741bf51f68f08562a89737f553
Dan Gohman
2018-12-07T04:56:45
Report traps in functions invoked from the command line.
diff --git a/src/wasmtime.rs b/src/wasmtime.rs index 4c23f0a06..e9d57fb00 100644 --- a/src/wasmtime.rs +++ b/src/wasmtime.rs @@ -56,7 +56,7 @@ use std::io::stdout; use std::path::Path; use std::path::PathBuf; use std::process::exit; -use wasmtime_execute::{Code, InstanceWorld, NullResolver}; +use wasmtime_execute::{...
1
7
2
230079d46034c9464c42fe425ebf050ca26ba514
Dan Gohman
2018-12-06T09:25:10
Improved error handling.
diff --git a/lib/wast/src/spectest.rs b/lib/wast/src/spectest.rs index dafec15b3..af05c9714 100644 --- a/lib/wast/src/spectest.rs +++ b/lib/wast/src/spectest.rs @@ -6,7 +6,6 @@ use target_lexicon::HOST; use wasmtime_environ::{translate_signature, MemoryPlan, MemoryStyle, TablePlan, TableStyle}; use wasmtime_execute::...
2
61
13
dca7729313936680285c085ac23588fa7c24a01d
Dan Gohman
2018-12-06T08:43:58
Improve error handling and misc cleanups.
diff --git a/lib/environ/src/lib.rs b/lib/environ/src/lib.rs index bd7d17c83..8a16bf0fa 100644 --- a/lib/environ/src/lib.rs +++ b/lib/environ/src/lib.rs @@ -9,7 +9,7 @@ #![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))] #![cfg_attr( feature = "cargo-clippy", - allow(new_without_...
10
62
42
6198b89110d09397101ec1a533809f6221990d66
Dan Gohman
2018-12-06T08:03:02
Update to pretty_env_logger 0.3.0.
diff --git a/Cargo.toml b/Cargo.toml index 36995d420..833842b23 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ serde = "1.0.75" serde_derive = "1.0.75" faerie = "0.6.0" target-lexicon = { version = "0.2.0", default-features = false } -pretty_env_logger = "0.2.5" +pretty_env_logger = "0.3.0" file-per-thr...
1
1
1
08488591a9166f95722ecb78465fd488dd7e7f81
Dan Gohman
2018-12-06T07:59:39
Fix clippy warning namespaces.
diff --git a/lib/environ/src/lib.rs b/lib/environ/src/lib.rs index 72f0bebbb..bd7d17c83 100644 --- a/lib/environ/src/lib.rs +++ b/lib/environ/src/lib.rs @@ -14,14 +14,14 @@ #![cfg_attr( feature = "cargo-clippy", warn( - float_arithmetic, - mut_mut, - nonminimal_bool, - option_map_...
11
79
57
06de6047298ce6bbb852c2eab0a0d125671603ce
Dan Gohman
2018-12-06T07:52:54
Rename InvokeOutcome to ActionOutcome and move it to its own module.
diff --git a/lib/execute/src/action.rs b/lib/execute/src/action.rs new file mode 100644 index 000000000..7ec3e27da --- /dev/null +++ b/lib/execute/src/action.rs @@ -0,0 +1,77 @@ +//! Support for performing actions with a wasm module from the outside. + +use cranelift_codegen::ir; +use std::string::String; +use std::vec...
7
113
103
8170a9db79e6a44f3feb4236fff83eac00a334f6
Dan Gohman
2018-12-06T16:34:38
Update to the rustfmt in rust 1.31, which is now stable.
diff --git a/lib/environ/src/environ.rs b/lib/environ/src/environ.rs index e472c697a..1117bc4d6 100644 --- a/lib/environ/src/environ.rs +++ b/lib/environ/src/environ.rs @@ -518,7 +518,8 @@ impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'m .as_u32() ...
15
39
48
5d7ece3d158432efe6b5606136d9e9dfb58f193e
Dan Gohman
2018-12-06T21:20:10
Fix clippy warning namespaces.
diff --git a/cranelift/src/clif-util.rs b/cranelift/src/clif-util.rs index 2396af17e..1b9255db4 100755 --- a/cranelift/src/clif-util.rs +++ b/cranelift/src/clif-util.rs @@ -3,13 +3,13 @@ #![cfg_attr( feature = "cargo-clippy", warn( - float_arithmetic, - mut_mut, - nonminimal_bool, - ...
15
116
116
5adab629f22961bf0fb19bfa3c333c96e2e68620
Dan Gohman
2018-12-06T21:15:48
Update to the rustfmt in rust 1.31, which is now stable.
diff --git a/cranelift/src/clif-util.rs b/cranelift/src/clif-util.rs index cedd82326..2396af17e 100755 --- a/cranelift/src/clif-util.rs +++ b/cranelift/src/clif-util.rs @@ -1,9 +1,5 @@ #![deny(trivial_numeric_casts)] -#![warn( - unused_import_braces, - unstable_features, - unused_extern_crates -)] +#![warn(un...
43
181
177
96941a59aff87306dca8d72f4ab667dfe1b9ea57
Dan Gohman
2018-12-05T13:46:17
Implement call_indirect signature checking. The call_indirect.wast spec test now passes.
diff --git a/lib/environ/src/environ.rs b/lib/environ/src/environ.rs index 55e6aac82..e472c697a 100644 --- a/lib/environ/src/environ.rs +++ b/lib/environ/src/environ.rs @@ -1,3 +1,4 @@ +use cast; use cranelift_codegen::cursor::FuncCursor; use cranelift_codegen::ir; use cranelift_codegen::ir::condcodes::*; @@ -109,6 ...
11
263
69
57635eb62b4e474af7da0a9dfb395f8810db6de8
Dan Gohman
2018-12-05T12:46:25
Implement minimal call_indirect signature checking.
diff --git a/lib/environ/src/environ.rs b/lib/environ/src/environ.rs index 50f4f76f7..55e6aac82 100644 --- a/lib/environ/src/environ.rs +++ b/lib/environ/src/environ.rs @@ -1,5 +1,6 @@ use cranelift_codegen::cursor::FuncCursor; use cranelift_codegen::ir; +use cranelift_codegen::ir::condcodes::*; use cranelift_codege...
7
93
22
4db11b610ebc70d838404b1ae44c09f161b9c7af
Dan Gohman
2018-12-03T23:18:23
Generalize to better support the spec proposals tests.
diff --git a/lib/wast/build.rs b/lib/wast/build.rs index ed3b12f72..964fe4ab7 100644 --- a/lib/wast/build.rs +++ b/lib/wast/build.rs @@ -1,7 +1,7 @@ use std::env; use std::fs::{read_dir, File}; use std::io::{self, Write}; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; fn main() { let out_dir = @@ ...
1
11
2
974355e20b5d97c11d642ba15250491f801c3b69
Dan Gohman
2018-12-03T23:08:18
Handle write errors in the build script.
diff --git a/lib/wast/build.rs b/lib/wast/build.rs index ba2a39e18..ed3b12f72 100644 --- a/lib/wast/build.rs +++ b/lib/wast/build.rs @@ -1,6 +1,6 @@ use std::env; use std::fs::{read_dir, File}; -use std::io::Write; +use std::io::{self, Write}; use std::path::PathBuf; fn main() { @@ -9,11 +9,11 @@ fn main() { ...
1
14
13
04b7f0c0df84ce2c84bda8818b666a61e41133cf
Dan Gohman
2018-12-03T13:23:13
Fix the description of the wasmtime program.
diff --git a/src/wasmtime.rs b/src/wasmtime.rs index e3e66445b..cc09f968d 100644 --- a/src/wasmtime.rs +++ b/src/wasmtime.rs @@ -66,9 +66,10 @@ use wasmtime_execute::{compile_and_link_module, finish_instantiation, invoke, Co static LOG_FILENAME_PREFIX: &str = "cranelift.dbg."; const USAGE: &str = " -Wasm to Craneli...
1
4
3
7faa15d7ac1ff1d28c92d4dd4d69bf11e20fca03
Dan Gohman
2018-12-03T12:59:40
More infrastructure. Improve handling of memory.grow/size, add a standalone wast runner, test harness improvements.
diff --git a/Cargo.toml b/Cargo.toml index 9b7d45ac4..36995d420 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,10 @@ publish = false name = "wasmtime" path = "src/wasmtime.rs" +[[bin]] +name = "run_wast" +path = "src/run_wast.rs" + [[bin]] name = "wasm2obj" path = "src/wasm2obj.rs" diff --git a/lib/enviro...
15
316
82
4c47ce9b5356743277df427b93c59b19335e51dd
Dan Gohman
2018-12-03T12:01:48
Add support for math libcalls.
diff --git a/lib/environ/src/compilation.rs b/lib/environ/src/compilation.rs index 427bee39c..ed4c5798a 100644 --- a/lib/environ/src/compilation.rs +++ b/lib/environ/src/compilation.rs @@ -56,6 +56,8 @@ impl binemit::RelocSink for RelocSink { RelocationTarget::MemoryGrow } else if *name == Externa...
4
93
0
bd69768e0df6644c9d12e411f7dfc792b6996565
Dan Gohman
2018-12-03T11:20:15
Improve infrastructure. Do more encapsulation of raw pointers, use more PrimaryMaps instead of Vecs, add a table.rs for managing table storage.
diff --git a/lib/environ/src/compilation.rs b/lib/environ/src/compilation.rs index 87b63d0a9..427bee39c 100644 --- a/lib/environ/src/compilation.rs +++ b/lib/environ/src/compilation.rs @@ -52,10 +52,10 @@ impl binemit::RelocSink for RelocSink { let reloc_target = if let ExternalName::User { namespace, index } ...
14
356
249
fe1643733bae18f114017aaf007b2561081e7a03
Dan Gohman
2018-12-01T00:50:05
Remove use of offset_of! from wasmtime-environ. wasmtime-environ is meant to support cross compilation, so it shouldn't have dependencies on target layout of structs. This moves the layout back into wasmtime-execute, and adds a system of asserts for checking that wasmtime-environ's offsets stay in sync.
diff --git a/lib/environ/Cargo.toml b/lib/environ/Cargo.toml index 33acdbf19..0ab1a41fb 100644 --- a/lib/environ/Cargo.toml +++ b/lib/environ/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" cranelift-codegen = { git = "https://github.com/sunfishcode/cranelift.git", branch = "guard-offset" } cranelift-entity = { git...
10
355
66
099f85f821286a4fb05965fb93e68dbd63f44463
Dan Gohman
2018-11-29T02:38:38
Rename main.rs to wasmtime.rs.
diff --git a/Cargo.toml b/Cargo.toml index 785e80997..188ea582f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ publish = false [[bin]] name = "wasmtime" -path = "src/main.rs" +path = "src/wasmtime.rs" [[bin]] name = "wasm2obj" diff --git a/src/main.rs b/src/wasmtime.rs similarity index 100% rename f...
2
1
1
872f7a10f4ca39f238b756fb5323e5c75ce27cfa
Dan Gohman
2018-11-29T22:20:34
Use MAP_ANON instead of MAP_ANONYMOUS.
diff --git a/lib/execute/src/memory.rs b/lib/execute/src/memory.rs index 916d7af9a..ff515a28e 100644 --- a/lib/execute/src/memory.rs +++ b/lib/execute/src/memory.rs @@ -31,7 +31,7 @@ impl PtrLen { ptr::null_mut(), alloc_size, libc::PROT_READ | libc::PROT_WRITE, - ...
1
1
1
d5ed424b334dd79ae0c88ca055b791a9be67b3fe
Dan Gohman
2018-11-29T21:44:30
Add tunables.rs.
diff --git a/lib/environ/src/tunables.rs b/lib/environ/src/tunables.rs new file mode 100644 index 000000000..7fd9b291b --- /dev/null +++ b/lib/environ/src/tunables.rs @@ -0,0 +1,27 @@ +/// Tunable parameters for WebAssembly compilation. +#[derive(Clone)] +pub struct Tunables { + /// For static heaps, the size of the...
1
27
0