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 |
|---|---|---|---|---|---|---|---|
94921c0b7448c982448cfc8308f9a12732c3c8af | Jakob Stoklund Olesen | 2017-10-24T16:09:02 | Remove the dead B-Tree interface.
We're starting over from scratch. | diff --git a/lib/cretonne/src/btree.rs b/lib/cretonne/src/btree.rs
deleted file mode 100644
index e625b6108..000000000
--- a/lib/cretonne/src/btree.rs
+++ /dev/null
@@ -1,112 +0,0 @@
-//! Generic B-Tree implementation.
-//!
-//! This module defines a `Btree<K, V>` type which provides similar functionality to
-//! `Btre... | 1 | 0 | 112 |
bfa5a72b77c71e00e346607bd411001d172d5d98 | Dan Gohman | 2017-11-16T23:16:23 | Use reserve_exact instead of reserve when the max size is known. | diff --git a/lib/cretonne/src/regalloc/coalescing.rs b/lib/cretonne/src/regalloc/coalescing.rs
index 445a127ac..5f41ddc72 100644
--- a/lib/cretonne/src/regalloc/coalescing.rs
+++ b/lib/cretonne/src/regalloc/coalescing.rs
@@ -148,7 +148,7 @@ impl DomForest {
liveness: &Liveness,
) -> Result<(), (Value, Val... | 1 | 1 | 1 |
4d9aedbacad450f1e21eebb2209a927ad48f5cb6 | Dan Gohman | 2017-11-15T18:49:32 | Add a 'clear()' function to Context.
This includes adding `clear()` functions to its (transitive) members. | diff --git a/lib/cretonne/src/context.rs b/lib/cretonne/src/context.rs
index 6f7f7a65c..aa900ff9e 100644
--- a/lib/cretonne/src/context.rs
+++ b/lib/cretonne/src/context.rs
@@ -57,6 +57,15 @@ impl Context {
}
}
+ /// Clear all data structures in this context.
+ pub fn clear(&mut self) {
+ s... | 10 | 85 | 2 |
355e3e3c15abca3fae611dfa91d7de0ec2a273bb | Dan Gohman | 2017-11-13T22:34:35 | Remove redundant validation for function locals.
Remove the MAX_LOCALS constraint, and the local type validation.
These are checked by whatever is performing proper validation. | diff --git a/lib/wasm/src/func_translator.rs b/lib/wasm/src/func_translator.rs
index 57821c49c..73aa7b433 100644
--- a/lib/wasm/src/func_translator.rs
+++ b/lib/wasm/src/func_translator.rs
@@ -14,10 +14,6 @@ use state::TranslationState;
use translation_utils::Local;
use wasmparser::{self, BinaryReader};
-/// Maximu... | 1 | 3 | 15 |
54e4ab71d918c778fa380a25250942c77a793be9 | Dan Gohman | 2017-09-02T15:06:55 | Enable pager in cton-util. | diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml
index 45b39ef0a..b328febdd 100644
--- a/cranelift/Cargo.toml
+++ b/cranelift/Cargo.toml
@@ -26,6 +26,9 @@ num_cpus = "1.5.1"
tempdir="0.3.5"
term = "0.4.6"
+[target.'cfg(unix)'.dependencies]
+pager = "0.13.0"
+
[workspace]
# Enable debug assertions and pa... | 2 | 21 | 0 |
8dd46054a5afccde105014d3b57cdc5cbc022067 | Dan Gohman | 2017-11-10T06:02:07 | In the verifier, clarify expected versus observed values. | diff --git a/lib/cretonne/src/verifier/mod.rs b/lib/cretonne/src/verifier/mod.rs
index 7332f2469..f82043fce 100644
--- a/lib/cretonne/src/verifier/mod.rs
+++ b/lib/cretonne/src/verifier/mod.rs
@@ -149,20 +149,20 @@ pub fn verify_context<'a, FOI: Into<FlagsOrIsa<'a>>>(
struct Verifier<'a> {
func: &'a Function,
-... | 1 | 34 | 22 |
ced7a88ecca40c2b9abc02b336ad4e146bb6ea0c | Dan Gohman | 2017-11-08T22:49:27 | Use consistent formatting for module-level comments. | diff --git a/cranelift/src/filetest/domtree.rs b/cranelift/src/filetest/domtree.rs
index 622b01a89..1063429b1 100644
--- a/cranelift/src/filetest/domtree.rs
+++ b/cranelift/src/filetest/domtree.rs
@@ -1,4 +1,3 @@
-
//! Test command for verifying dominator trees.
//!
//! The `test domtree` test command looks for anno... | 8 | 7 | 21 |
889b06fd16678f931bae2960417f7797d422699e | Dan Gohman | 2017-11-08T18:41:09 | Replace `as` casts with type-conversion functions. | diff --git a/lib/cretonne/src/entity/set.rs b/lib/cretonne/src/entity/set.rs
index 8b5d32e79..82dc1384e 100644
--- a/lib/cretonne/src/entity/set.rs
+++ b/lib/cretonne/src/entity/set.rs
@@ -78,6 +78,7 @@ where
#[cfg(test)]
mod tests {
use super::*;
+ use std::u32;
// `EntityRef` impl for testing.
#... | 15 | 54 | 47 |
7c579a80c28b0e86a4f03c33aa7adbbcd1590581 | Dan Gohman | 2017-11-08T18:41:00 | Avoid an unneeded .into_iter(). | diff --git a/cranelift/src/compile.rs b/cranelift/src/compile.rs
index 828625120..9e828cfed 100644
--- a/cranelift/src/compile.rs
+++ b/cranelift/src/compile.rs
@@ -50,7 +50,7 @@ fn handle_module(
return Err(String::from("compilation requires a target isa"));
};
- for (func, _) in test_file.functions... | 1 | 1 | 1 |
d939bc5137266288eea7f47d4c5be47182817014 | Dan Gohman | 2017-11-08T18:40:58 | Use is_empty() instead of comparing len() with 0. | diff --git a/lib/cretonne/src/verifier/mod.rs b/lib/cretonne/src/verifier/mod.rs
index c2753d133..7d2338c82 100644
--- a/lib/cretonne/src/verifier/mod.rs
+++ b/lib/cretonne/src/verifier/mod.rs
@@ -991,7 +991,7 @@ impl<'a> Verifier<'a> {
self.func.dfg.ctrl_typevar(inst),
)
... | 1 | 1 | 1 |
5d3ae0596c5265616157659935b40c78b8ff337b | Dan Gohman | 2017-11-08T18:40:56 | Avoid matching with reference patterns. | diff --git a/lib/cretonne/src/regalloc/solver.rs b/lib/cretonne/src/regalloc/solver.rs
index a18599a12..c13ec6529 100644
--- a/lib/cretonne/src/regalloc/solver.rs
+++ b/lib/cretonne/src/regalloc/solver.rs
@@ -317,10 +317,10 @@ impl Move {
/// Replace the "to" register with `new` and return the old value.
fn r... | 1 | 4 | 4 |
809e2f0c910c7426b064f4fb262bfb61e4dfbad3 | Dan Gohman | 2017-11-08T18:40:54 | Avoid unneeded return keywords. | diff --git a/lib/cretonne/src/isa/stack.rs b/lib/cretonne/src/isa/stack.rs
index ea7ee3724..907afe020 100644
--- a/lib/cretonne/src/isa/stack.rs
+++ b/lib/cretonne/src/isa/stack.rs
@@ -41,10 +41,10 @@ impl StackRef {
// Offset where SP is pointing. (All ISAs have stacks growing downwards.)
let sp_of... | 1 | 2 | 2 |
0d825b4643acabd670f3d11c1c6137d945076c50 | Dan Gohman | 2017-11-08T18:40:52 | Remove a redundant `.into()`. | diff --git a/lib/cretonne/src/isa/mod.rs b/lib/cretonne/src/isa/mod.rs
index f6c95edec..78a7e7917 100644
--- a/lib/cretonne/src/isa/mod.rs
+++ b/lib/cretonne/src/isa/mod.rs
@@ -177,7 +177,7 @@ pub trait TargetIsa {
ctrl_typevar: ir::Type,
) -> Result<Encoding, Legalize> {
let mut iter = self.lega... | 1 | 1 | 1 |
3ab4349c1bdc2a13767371f771d33d7d722b0a81 | Dan Gohman | 2017-11-08T18:40:47 | Use `Self` instead of repeating the type name. | diff --git a/cranelift/src/filetest/binemit.rs b/cranelift/src/filetest/binemit.rs
index cc8dcad0b..9c19533c6 100644
--- a/cranelift/src/filetest/binemit.rs
+++ b/cranelift/src/filetest/binemit.rs
@@ -35,8 +35,8 @@ struct TextSink {
impl TextSink {
/// Create a new empty TextSink.
- pub fn new(isa: &TargetIs... | 41 | 105 | 105 |
b7f979a8be432b0fa20d2802ec418074ba7e5281 | Dan Gohman | 2017-11-08T18:40:43 | Combine identical match arms. | diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs
index 6528416b2..133004aa1 100644
--- a/lib/wasm/src/code_translator.rs
+++ b/lib/wasm/src/code_translator.rs
@@ -486,26 +486,15 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
state.push1(builder.ins().f64const(f64_... | 1 | 3 | 14 |
388ebde41de8f49b504fee38cb6c07befc3ae2a4 | Dan Gohman | 2017-11-08T18:40:42 | Use .any(...) rather than .position(...).is_some(). | diff --git a/lib/cretonne/src/verifier/mod.rs b/lib/cretonne/src/verifier/mod.rs
index 342e501b0..c2753d133 100644
--- a/lib/cretonne/src/verifier/mod.rs
+++ b/lib/cretonne/src/verifier/mod.rs
@@ -979,9 +979,7 @@ impl<'a> Verifier<'a> {
);
}
- let has_valid_encoding = encoding... | 1 | 1 | 3 |
8b053aa923ef28559c3816ab71bae9f4ca9fbc40 | Dan Gohman | 2017-11-08T18:40:39 | Remove a trivial cast. | diff --git a/lib/cretonne/src/regalloc/solver.rs b/lib/cretonne/src/regalloc/solver.rs
index 39f6e3a83..69b7bd1dd 100644
--- a/lib/cretonne/src/regalloc/solver.rs
+++ b/lib/cretonne/src/regalloc/solver.rs
@@ -421,7 +421,8 @@ impl fmt::Display for Move {
impl fmt::Debug for Move {
fn fmt(&self, f: &mut fmt::Form... | 1 | 2 | 1 |
24e185c8c5451d030aef9be604adcc8a6e1eaf92 | Dan Gohman | 2017-11-08T18:40:37 | Remove unnecessary parens. | diff --git a/lib/native/src/lib.rs b/lib/native/src/lib.rs
index 49cb17338..6cdb39a15 100644
--- a/lib/native/src/lib.rs
+++ b/lib/native/src/lib.rs
@@ -38,7 +38,7 @@ pub fn builders() -> Result<(settings::Builder, isa::Builder), ()> {
let mut isa_builder = isa::lookup(name).map_err(|err| match err {
is... | 1 | 1 | 1 |
d7796cbf25b6916d41e229895abb342ce9915a4a | Dan Gohman | 2017-11-08T18:40:29 | Suppress an unused-import warning on AsciiExt.
See
https://users.rust-lang.org/t/psa-dealing-with-warning-unused-import-std-ascii-asciiext-in-today-s-nightly/13726
for details. | diff --git a/lib/cretonne/src/ir/extname.rs b/lib/cretonne/src/ir/extname.rs
index 273006b57..ba5ddba40 100644
--- a/lib/cretonne/src/ir/extname.rs
+++ b/lib/cretonne/src/ir/extname.rs
@@ -5,6 +5,7 @@
//! Cretonne, which compiles functions independently.
use std::fmt::{self, Write};
+#[allow(unused_imports)]
use s... | 2 | 2 | 0 |
2b6502ac6e634bc1a2a68b47849dffd9302e38a2 | Dan Gohman | 2017-11-08T00:57:22 | Fix handling of CFG triangles in compute_postorder.
For example, in `loops_one`, ebb3 is the bottom of a triangle, so
postorder should order it after the rest of the triangle. | diff --git a/cranelift/tests/cfg_traversal.rs b/cranelift/tests/cfg_traversal.rs
index 90fb900df..73b4b9fad 100644
--- a/cranelift/tests/cfg_traversal.rs
+++ b/cranelift/tests/cfg_traversal.rs
@@ -51,7 +51,7 @@ fn simple_traversal() {
trap user0
}
",
- vec![0, 1, 3, 2, 4, 5],
+ ... | 3 | 24 | 36 |
849f090562eac5574f8412091c5b4173bc609970 | Dan Gohman | 2017-11-07T23:33:35 | Fix nondeterminism in br_table translation. | diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs
index 040a53fe5..6528416b2 100644
--- a/lib/wasm/src/code_translator.rs
+++ b/lib/wasm/src/code_translator.rs
@@ -22,7 +22,7 @@
//!
//! That is why `translate_function_body` takes an object having the `WasmRuntime` trait as
//! argument.
... | 1 | 14 | 13 |
15aff899ee5f30be81a0d7a915ed796044c1fb20 | Dan Gohman | 2017-11-07T23:19:55 | Block no longer needs to implement Hash. | diff --git a/lib/frontend/src/ssa.rs b/lib/frontend/src/ssa.rs
index c7c4d0802..2b758ef18 100644
--- a/lib/frontend/src/ssa.rs
+++ b/lib/frontend/src/ssa.rs
@@ -124,7 +124,7 @@ struct EbbHeaderBlockData<Variable> {
}
/// A opaque reference to a basic block.
-#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
+#[der... | 1 | 1 | 1 |
6d91a32d396aef926ae82ebc252c79b5023395e0 | Dan Gohman | 2017-11-07T22:57:35 | Add comments about "user" parameters. | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index 69d9473a5..ac86e3d64 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -389,6 +389,8 @@ where
/// parameters. This can be used to set up the ebb parameters for the
/// entry block.
pub fn append_e... | 1 | 4 | 0 |
cbb99bf233f4bec60d924fb0040e2def856e9f4f | Dan Gohman | 2017-11-07T22:56:32 | Rename "user_arg_count" to "user_param_count" for consistency. | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index 95900b816..69d9473a5 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -44,7 +44,7 @@ where
struct EbbData {
filled: bool,
pristine: bool,
- user_arg_count: usize,
+ user_param_count: usize,
}
... | 1 | 8 | 8 |
9b15fe7dfd61f0347f1e4411f7d59c6456e1a1e7 | Dan Gohman | 2017-11-07T22:55:08 | Simplify Ebb parameter creation.
Ebb parameters are appended explicitly by whoever calls create_block,
so they don't need to also be inferred from branches. This makes the
frontend code more flexible for producers that want to create things
in a different order, and it eliminates more temporary allocations.
FunctionB... | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index 6dab86b24..95900b816 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -4,7 +4,6 @@ use cretonne::ir;
use cretonne::ir::{Ebb, Type, Value, Function, Inst, JumpTable, StackSlot, JumpTableData,
... | 3 | 47 | 145 |
cce2384edef10eb17a35f9e4c366645e9ea5a6af | Dan Gohman | 2017-11-07T00:38:13 | Remove switch_to_block's jump_args argument.
switch_to_block doesn't need its jump_args argument, since jump
arguments are handled by the `jump` instruction and others, rather
than on the switch to a new ebb itself. | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index 9ae7cfe0f..6dab86b24 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -266,7 +266,7 @@ where
/// When inserting the terminator instruction (which doesn't have a falltrough to its immediate
/// success... | 4 | 14 | 16 |
f76640778c2959971916ad23f297ef9a55a927d0 | Dan Gohman | 2017-11-07T00:28:15 | Fix printing with -p when -c is also given. | diff --git a/cranelift/src/wasm.rs b/cranelift/src/wasm.rs
index 679fc7911..04810e298 100644
--- a/cranelift/src/wasm.rs
+++ b/cranelift/src/wasm.rs
@@ -120,14 +120,14 @@ fn handle_module(
context.verify(fisa).map_err(|err| {
pretty_verifier_error(&context.func, fisa.isa, err)
... | 1 | 7 | 7 |
5dda19035d8d037e326adb697d3c613ca6a4a620 | Dan Gohman | 2017-11-06T19:34:09 | Implement Hash for ExternalName.
This allows users to have HashMaps etc. with ExternalNames as keys. | diff --git a/lib/cretonne/src/ir/extname.rs b/lib/cretonne/src/ir/extname.rs
index bd8c4e631..273006b57 100644
--- a/lib/cretonne/src/ir/extname.rs
+++ b/lib/cretonne/src/ir/extname.rs
@@ -15,7 +15,7 @@ use std::ascii::AsciiExt;
/// External names can also serve as a primitive testing and debugging tool.
/// In parti... | 1 | 2 | 2 |
1d8df2ed1ee25bb7ce46f4d337ec0d9931c37548 | Dan Gohman | 2017-11-06T19:10:14 | Remove the requirement that `Variable` implement `Default`. | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index 4cbdcd527..9ae7cfe0f 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -17,7 +17,7 @@ use cretonne::entity::{EntityRef, EntityMap, EntitySet};
/// functions, rather than dropped, preserving the underlying alloc... | 3 | 13 | 28 |
4091688cc0abd30cb7734923c624273495e2a6f0 | Dan Gohman | 2017-11-06T19:10:03 | Avoid unnecessary name qualification. | diff --git a/lib/cretonne/src/dominator_tree.rs b/lib/cretonne/src/dominator_tree.rs
index 300c9453d..043ebad4e 100644
--- a/lib/cretonne/src/dominator_tree.rs
+++ b/lib/cretonne/src/dominator_tree.rs
@@ -431,7 +431,7 @@ mod test {
use cursor::{Cursor, FuncCursor};
use flowgraph::ControlFlowGraph;
use ir... | 1 | 3 | 3 |
d9743290ea9863b3c63af039194bce286b47951a | Dan Gohman | 2017-11-06T19:09:56 | Elide elidable lifetime parameters. | diff --git a/lib/cretonne/src/ir/dfg.rs b/lib/cretonne/src/ir/dfg.rs
index 4a98fc690..83a32f7ff 100644
--- a/lib/cretonne/src/ir/dfg.rs
+++ b/lib/cretonne/src/ir/dfg.rs
@@ -660,14 +660,14 @@ impl DataFlowGraph {
impl Index<Inst> for DataFlowGraph {
type Output = InstructionData;
- fn index<'a>(&'a self, inst... | 2 | 4 | 4 |
89d3038c1cde8e389d69f6373ad644b87c73727e | m4b | 2017-11-05T07:03:56 | obj: minor fix to emit_module compile | diff --git a/lib/obj/src/emit_module.rs b/lib/obj/src/emit_module.rs
index 2462ed836..b73e88080 100644
--- a/lib/obj/src/emit_module.rs
+++ b/lib/obj/src/emit_module.rs
@@ -28,7 +28,7 @@ pub fn emit_module<'module>(
let body = &compilation.functions[i];
let external_name =
wasmstandalone_... | 1 | 1 | 1 |
114da83ad678a86d9bf25e148327a97e0a8809bd | Dan Gohman | 2017-11-04T22:29:16 | Avoid using `to_string()` on ExternalName to create strings for symbol names.
ExternalName's `to_string()` prepends a '%' for Cretonne's text syntax,
but for creating symbol names we just want the raw bytes. | diff --git a/lib/obj/src/emit_module.rs b/lib/obj/src/emit_module.rs
index 2c115c8d8..2462ed836 100644
--- a/lib/obj/src/emit_module.rs
+++ b/lib/obj/src/emit_module.rs
@@ -2,6 +2,8 @@ use cretonne::settings;
use cretonne::settings::Configurable;
use faerie::Artifact;
use wasmstandalone_runtime;
+use std::error::Err... | 1 | 8 | 4 |
be9e3e88e49ff7daee0b5e10c2b6f906fd8a3eac | Dan Gohman | 2017-11-04T22:28:19 | Emit wasm data initializers as faerie data segments.
This is a temporary measure while other parts of the system are being
developed, and will need to be replaced by a proper solution. | diff --git a/src/wasm2obj.rs b/src/wasm2obj.rs
index be016413b..d629140f8 100644
--- a/src/wasm2obj.rs
+++ b/src/wasm2obj.rs
@@ -97,6 +97,12 @@ fn handle_module(path: PathBuf, output: &str) -> Result<(), String> {
let mut obj = Artifact::new(faerie_target(&*isa)?, Some(String::from(output)));
+ // FIXME: We... | 1 | 6 | 8 |
8501cb798e9f9262307f4c26c089d4aae3760864 | Dan Gohman | 2017-11-03T23:43:29 | Minor comment cleanups. | diff --git a/lib/cretonne/src/bitset.rs b/lib/cretonne/src/bitset.rs
index a9c41ce78..2ed4efe15 100644
--- a/lib/cretonne/src/bitset.rs
+++ b/lib/cretonne/src/bitset.rs
@@ -1,10 +1,10 @@
//! Small Bitset
//!
-//! This module defines a struct BitSet<T> encapsulating a bitset built over the type T.
+//! This module def... | 1 | 2 | 2 |
acc6d941a365318cc3ba93cd9c141b7df1e52d9c | Dan Gohman | 2017-11-03T23:40:51 | Combine redundant match arm bodies. | diff --git a/lib/cretonne/src/abi.rs b/lib/cretonne/src/abi.rs
index 7eb459fe6..5c121824a 100644
--- a/lib/cretonne/src/abi.rs
+++ b/lib/cretonne/src/abi.rs
@@ -61,7 +61,7 @@ impl ValueConversion {
ValueConversion::IntSplit => ty.half_width().expect("Integer type too small to split"),
ValueCon... | 6 | 14 | 14 |
c7f01f88b2ae7b8364ed1478f12ba60b5f2691ec | Dan Gohman | 2017-11-03T18:44:58 | Clarify some comments. | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index b382951f7..4cbdcd527 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -10,7 +10,7 @@ use cretonne::isa::TargetIsa;
use ssa::{SSABuilder, SideEffects, Block};
use cretonne::entity::{EntityRef, EntityMap, Entit... | 1 | 2 | 2 |
e21479a84340b1d2ab4e78eb26f5cd269b638be4 | Dan Gohman | 2017-11-02T19:28:01 | Mark check_return_args as #[cfg(debug_assertions)]. | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index fc7e8a90b..b382951f7 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -122,7 +122,7 @@ impl<'short, 'long, Variable> InstBuilderBase<'short> for FuncInstBuilder<'short
// instruction being inserted to add ... | 1 | 2 | 1 |
1cbf921d9d55011b8c6f8f59c49860a5158f7dad | Dan Gohman | 2017-11-01T20:09:20 | Add a function to seal all the blocks at once. | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index 1c41e1899..fc7e8a90b 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -300,6 +300,17 @@ where
self.handle_ssa_side_effects(side_effects);
}
+ /// Effectively calls seal_block on all blocks in... | 2 | 58 | 6 |
c30116d948d1c6d198d604bf13f846020142ce9a | Dan Gohman | 2017-11-02T14:42:03 | Fix copypasta in a FIXME message. | diff --git a/src/wasm2obj.rs b/src/wasm2obj.rs
index 1938edfcd..be016413b 100644
--- a/src/wasm2obj.rs
+++ b/src/wasm2obj.rs
@@ -115,7 +115,7 @@ fn handle_module(path: PathBuf, output: &str) -> Result<(), String> {
return Err(String::from("multiple memories not supported yet"));
}
//obj.a... | 1 | 1 | 1 |
c6d39dea5d76d3d09e89813126cb11039a8c5a3e | Dan Gohman | 2017-11-01T18:35:15 | Add a comment about shrink_to_fit(). | diff --git a/lib/frontend/src/ssa.rs b/lib/frontend/src/ssa.rs
index 8ba9bfdb9..12e77170d 100644
--- a/lib/frontend/src/ssa.rs
+++ b/lib/frontend/src/ssa.rs
@@ -441,6 +441,9 @@ where
debug_assert!(!data.sealed);
debug_assert!(data.undef_variables.is_empty());
data.seal... | 1 | 3 | 0 |
61a51f5275d06b8fc79187307932e49de0e672ab | Dan Gohman | 2017-11-01T18:34:16 | Rename a variable to clarify its purpose. | diff --git a/lib/frontend/src/ssa.rs b/lib/frontend/src/ssa.rs
index 35d3486da..8ba9bfdb9 100644
--- a/lib/frontend/src/ssa.rs
+++ b/lib/frontend/src/ssa.rs
@@ -611,9 +611,9 @@ where
// We have to split the critical edge
let middle_ebb = func.dfg.make_ebb();
func.layou... | 1 | 5 | 5 |
57041ea9ebe47e37a703218bdba2c4e2bd51cc4b | Dan Gohman | 2017-11-01T18:30:37 | Tidy up semicolons. | diff --git a/lib/frontend/src/ssa.rs b/lib/frontend/src/ssa.rs
index c8f80205e..35d3486da 100644
--- a/lib/frontend/src/ssa.rs
+++ b/lib/frontend/src/ssa.rs
@@ -442,7 +442,7 @@ where
debug_assert!(data.undef_variables.is_empty());
data.sealed = true;
}
- };
+ ... | 1 | 4 | 4 |
39c0fbb6c70138852a5eac9499590b31460977ca | Dan Gohman | 2017-11-01T18:27:54 | Assert that sealed blocks cannot accept new predecessors. | diff --git a/lib/frontend/src/ssa.rs b/lib/frontend/src/ssa.rs
index 65d1873fc..c8f80205e 100644
--- a/lib/frontend/src/ssa.rs
+++ b/lib/frontend/src/ssa.rs
@@ -90,6 +90,7 @@ impl<Variable> BlockData<Variable> {
match *self {
BlockData::EbbBody { .. } => panic!("you can't add a predecessor to a bo... | 1 | 1 | 0 |
1663f141c89453f60f03e02aeb7d4e4ee908ad06 | Dan Gohman | 2017-11-01T18:26:55 | Tidy up unneeded parentheses. | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index e2d090f01..1c41e1899 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -484,8 +484,8 @@ where
None => false,
Some(entry) => self.position.ebb == entry,
};
- (!is_entry &... | 1 | 2 | 2 |
aa724846f6a5947864ed49f00219f260def1f757 | Dan Gohman | 2017-11-01T18:25:22 | Clear the wasm operand stack at the end of a function.
This preserves an invariant that the stack is empty between function
body translations. | diff --git a/lib/wasm/src/func_translator.rs b/lib/wasm/src/func_translator.rs
index 9723f22ca..aad791c9a 100644
--- a/lib/wasm/src/func_translator.rs
+++ b/lib/wasm/src/func_translator.rs
@@ -215,6 +215,10 @@ fn parse_function_body<FE: FuncEnvironment + ?Sized>(
builder.ins().return_(&state.stack);
}
+... | 1 | 4 | 0 |
09b1bdc1084a1509c94225a29a6e14c611da63fc | Dan Gohman | 2017-10-31T21:12:29 | Make "cton-util compile" default to the isa specified in the test file. | diff --git a/cranelift/src/compile.rs b/cranelift/src/compile.rs
index 6b0bda21b..828625120 100644
--- a/cranelift/src/compile.rs
+++ b/cranelift/src/compile.rs
@@ -2,7 +2,7 @@
//!
//! Reads IR files into Cretonne IL and compiles it.
-use cton_reader::parse_functions;
+use cton_reader::parse_test;
use std::path::P... | 1 | 19 | 13 |
3d83d0e4f0abea56e80c461f541d23d7952f0f51 | Dan Gohman | 2017-10-31T19:45:22 | Clean up redundant blank lines. | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index 80d9768b6..e2d090f01 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -585,7 +585,6 @@ where
self.params_values_initialized = true;
}
-
fn ebb_params_adjustment(&mut self, dest_ebb: Ebb, ju... | 1 | 0 | 1 |
2b40f72f00c533e8cd9963b899024d2c7a647ab3 | Dan Gohman | 2017-10-31T19:36:53 | Update for more Cretonne API changes.
This updates to ExternalName and reloc_external. | diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs
index e10ff681f..9a5f074fd 100644
--- a/lib/runtime/src/lib.rs
+++ b/lib/runtime/src/lib.rs
@@ -19,7 +19,7 @@ pub use instance::Instance;
use cton_wasm::{FunctionIndex, GlobalIndex, TableIndex, MemoryIndex, Global, Table, Memory,
GlobalVal... | 1 | 22 | 11 |
871bf95acfa81210fa703458997c70031900dd1a | Dan Gohman | 2017-10-31T19:18:17 | Change reloc_ebb to pass a CodeOffset rather than an Ebb index. | diff --git a/cranelift/src/filetest/binemit.rs b/cranelift/src/filetest/binemit.rs
index 7ffef262a..cc8dcad0b 100644
--- a/cranelift/src/filetest/binemit.rs
+++ b/cranelift/src/filetest/binemit.rs
@@ -71,8 +71,13 @@ impl binemit::CodeSink for TextSink {
self.offset += 8;
}
- fn reloc_ebb(&mut self, r... | 4 | 14 | 9 |
149a41a684d39b95714271485fac4cd87d1615fe | Dan Gohman | 2017-10-31T19:19:58 | Clean up copypasta. | diff --git a/lib/cretonne/src/binemit/memorysink.rs b/lib/cretonne/src/binemit/memorysink.rs
index 610fd9666..00ac5fe34 100644
--- a/lib/cretonne/src/binemit/memorysink.rs
+++ b/lib/cretonne/src/binemit/memorysink.rs
@@ -58,7 +58,6 @@ pub trait RelocSink {
/// current offset.
fn reloc_globalsym(&mut self, Cod... | 1 | 0 | 1 |
c2665385b1932cab59c9defe4268c2e84e277ce1 | Dan Gohman | 2017-10-27T20:05:49 | Rename FunctionName to ExternalName. | diff --git a/lib/cretonne/src/ir/extfunc.rs b/lib/cretonne/src/ir/extfunc.rs
index c82ff53be..4403b6ebe 100644
--- a/lib/cretonne/src/ir/extfunc.rs
+++ b/lib/cretonne/src/ir/extfunc.rs
@@ -5,7 +5,7 @@
//!
//! This module declares the data types used to represent external functions and call signatures.
-use ir::{Typ... | 11 | 56 | 55 |
226fbce0b33a36ad3f636b2a189ab0c04522105e | Dan Gohman | 2017-10-28T13:11:56 | Update for Cretonne API changes. | diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs
index da86954e6..e10ff681f 100644
--- a/lib/runtime/src/lib.rs
+++ b/lib/runtime/src/lib.rs
@@ -19,8 +19,8 @@ pub use instance::Instance;
use cton_wasm::{FunctionIndex, GlobalIndex, TableIndex, MemoryIndex, Global, Table, Memory,
GlobalVal... | 1 | 8 | 8 |
469b7bb5e9b4b05c267bdc78b2b1cfb24c4ada4f | Dan Gohman | 2017-10-27T23:46:04 | Add a FIXME comment for grow/current_memory. | diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs
index 8bfb0e37b..da86954e6 100644
--- a/lib/runtime/src/lib.rs
+++ b/lib/runtime/src/lib.rs
@@ -66,6 +66,7 @@ impl<'func> binemit::RelocSink for RelocSink<'func> {
let name = from_utf8(name_bytes).unwrap();
// See `get_func_name`; names are ... | 1 | 1 | 0 |
1b61d5cd1eaad11a932dcc48ad3a452e7dace29e | Dan Gohman | 2017-10-27T03:55:45 | Enable the verifier by default in "cton-util compile". | diff --git a/cranelift/src/compile.rs b/cranelift/src/compile.rs
index f9f718685..6b0bda21b 100644
--- a/cranelift/src/compile.rs
+++ b/cranelift/src/compile.rs
@@ -12,9 +12,13 @@ use utils::{pretty_error, read_to_string, parse_sets_and_isa};
pub fn run(
files: Vec<String>,
flag_print: bool,
- flag_set: V... | 1 | 5 | 1 |
683408f30b37a84e84ece98ec55703d83604c51d | Dan Gohman | 2017-10-26T19:22:16 | Break alias cycles by inserting zero values. | diff --git a/lib/frontend/src/ssa.rs b/lib/frontend/src/ssa.rs
index 3c7e112b5..65d1873fc 100644
--- a/lib/frontend/src/ssa.rs
+++ b/lib/frontend/src/ssa.rs
@@ -530,13 +530,18 @@ where
// so we don't need to have it as an ebb argument.
// We need to replace all the occurences of val wi... | 1 | 19 | 4 |
53e93d94a85f8245d4b36e027492ad2c19465d32 | Dan Gohman | 2017-10-26T18:37:43 | Avoid creating cyclic aliases in unreachable code. | diff --git a/lib/frontend/src/ssa.rs b/lib/frontend/src/ssa.rs
index 68f999c88..3c7e112b5 100644
--- a/lib/frontend/src/ssa.rs
+++ b/lib/frontend/src/ssa.rs
@@ -531,8 +531,13 @@ where
// We need to replace all the occurences of val with pred_val but since
// we can't afford a re-writin... | 1 | 48 | 2 |
2932a9314dca1a6ccb3de70bf505c84419a25aa9 | Dan Gohman | 2017-10-25T18:17:29 | Don't allocate srclocs if we only have default SourceLoc values.
This avoids needless extra indentation in `write_function` in the
case where no SourceLoc information is available. | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index 0534fa487..92eca41dc 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -132,7 +132,9 @@ impl<'short, 'long, Variable> InstBuilderBase<'short> for FuncInstBuilder<'short
let inst = self.builder.func.dfg.... | 1 | 3 | 1 |
dbd75483e8b1f8aecca26312d04fce46b419fae3 | Dan Gohman | 2017-10-25T17:14:10 | Rename `arg_value` to `param_value` for consistency.
Also rename FunctionBuilder's `pristine` to `params_values_initialized`
to avoid confusion with the unrelated `is_pristine` accessor function. | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index 708de6988..0534fa487 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -22,7 +22,7 @@ where
ssa: SSABuilder<Variable>,
ebbs: EntityMap<Ebb, EbbData>,
types: EntityMap<Variable, Type>,
- functio... | 3 | 48 | 31 |
b6eae2cfb669e7b6a1bcb107ff25d00c95adfb32 | Dan Gohman | 2017-10-25T17:11:36 | Put `FlagsOrIsa` in code-comments. | diff --git a/cranelift/src/utils.rs b/cranelift/src/utils.rs
index b243b8953..25c6dbf06 100644
--- a/cranelift/src/utils.rs
+++ b/cranelift/src/utils.rs
@@ -73,7 +73,7 @@ pub fn pretty_error(func: &ir::Function, isa: Option<&TargetIsa>, err: CtonError
}
}
-/// Like FlagsOrIsa, but holds ownership.
+/// Like `Fl... | 1 | 1 | 1 |
2d5faa01af36ab27bb15dedc25ae20c81990bfcf | Dan Gohman | 2017-10-24T22:28:28 | Simplify code using the FunctionBuilder helper functions. | diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs
index 7c2d8ae15..d74bbbc68 100644
--- a/lib/wasm/src/code_translator.rs
+++ b/lib/wasm/src/code_translator.rs
@@ -362,7 +362,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
state.peekn(num_args),
)... | 1 | 2 | 2 |
bbdce7e3e077245bdfb904204d63e8eec756255a | Dan Gohman | 2017-10-24T17:39:01 | Update the comment for 'notrap()'. | diff --git a/lib/cretonne/src/ir/memflags.rs b/lib/cretonne/src/ir/memflags.rs
index 8d0694e1a..fd836d275 100644
--- a/lib/cretonne/src/ir/memflags.rs
+++ b/lib/cretonne/src/ir/memflags.rs
@@ -54,8 +54,9 @@ impl MemFlags {
/// would cause a trap when accessing the effective address, the Cretonne memory operation i... | 1 | 3 | 2 |
fdf2486c0a38b0cb2409d44c381cdbdc3a5e9667 | Dan Gohman | 2017-10-23T21:57:20 | Handle uninitialized values of type b1 and vector. | diff --git a/lib/frontend/src/ssa.rs b/lib/frontend/src/ssa.rs
index 68e234018..aed83e4a1 100644
--- a/lib/frontend/src/ssa.rs
+++ b/lib/frontend/src/ssa.rs
@@ -488,19 +488,26 @@ where
if !func.layout.is_ebb_inserted(dest_ebb) {
func.layout.append_ebb(dest_ebb)
};
... | 1 | 40 | 12 |
c93959de7e5fa3a413bb699b217f285f8389cf52 | Dan Gohman | 2017-10-20T22:41:09 | Fix a bug handling a use_var of a value not defined in the entry block. | diff --git a/lib/frontend/src/ssa.rs b/lib/frontend/src/ssa.rs
index d735caabb..68e234018 100644
--- a/lib/frontend/src/ssa.rs
+++ b/lib/frontend/src/ssa.rs
@@ -484,6 +484,7 @@ where
// The variable is used but never defined before. This is an irregularity in the
// code, but rather th... | 1 | 42 | 1 |
f4b25ff058f71eff2e5b15a4741dc98137811f01 | Dan Gohman | 2017-10-19T22:13:59 | Have FunctionBuilder clear the ILBuilder's state in its drop(). | diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs
index 78f3725bc..708de6988 100644
--- a/lib/frontend/src/frontend.rs
+++ b/lib/frontend/src/frontend.rs
@@ -11,6 +11,10 @@ use ssa::{SSABuilder, SideEffects, Block};
use cretonne::entity::{EntityRef, EntityMap, EntitySet};
/// Permanent struct... | 2 | 25 | 5 |
9fdf44afd4043dc443809e4db111b4a199a857d0 | Dan Gohman | 2017-10-19T22:03:43 | Clean up a stale comment. | diff --git a/lib/wasm/src/environ/dummy.rs b/lib/wasm/src/environ/dummy.rs
index b2d4e6615..5900b32ea 100644
--- a/lib/wasm/src/environ/dummy.rs
+++ b/lib/wasm/src/environ/dummy.rs
@@ -306,7 +306,6 @@ impl<'data> ModuleEnvironment<'data> for DummyEnvironment {
self.info.start_func = Some(func_index);
}
... | 1 | 0 | 1 |
f5e4058eb8c61a3e8288d519f891bf555c9789bc | Dan Gohman | 2017-10-19T20:49:36 | Update a stale comment. | diff --git a/cranelift/src/wasm.rs b/cranelift/src/wasm.rs
index 8833dc81b..679fc7911 100644
--- a/cranelift/src/wasm.rs
+++ b/cranelift/src/wasm.rs
@@ -1,8 +1,6 @@
//! CLI tool to use the functions provided by the [cretonne-wasm](../cton_wasm/index.html) crate.
//!
-//! Reads Wasm binary files (one Wasm module per f... | 1 | 1 | 3 |
d3077acf1c03dfc38279655278edf32ac7107315 | Dan Gohman | 2017-10-19T20:36:59 | TranslationState can assert that its stacks are empty between functions. | diff --git a/lib/wasm/src/state.rs b/lib/wasm/src/state.rs
index 4117d3509..91737a370 100644
--- a/lib/wasm/src/state.rs
+++ b/lib/wasm/src/state.rs
@@ -140,10 +140,10 @@ impl TranslationState {
}
fn clear(&mut self) {
- self.stack.clear();
- self.control_stack.clear();
- self.phantom_u... | 1 | 4 | 4 |
8e9ac361bd234856d75438afb817abe9d4d06a4e | Jakob Stoklund Olesen | 2017-10-20T16:19:28 | Remove the CFG entry_block member.
It was not used. | diff --git a/lib/cretonne/src/flowgraph.rs b/lib/cretonne/src/flowgraph.rs
index ce9744ac3..67ff15019 100644
--- a/lib/cretonne/src/flowgraph.rs
+++ b/lib/cretonne/src/flowgraph.rs
@@ -45,7 +45,6 @@ pub struct CFGNode {
/// extended basic blocks.
#[derive(Debug)]
pub struct ControlFlowGraph {
- entry_block: Optio... | 1 | 0 | 3 |
1a1774af15e0db949a803b5a81f476752b7e2b2f | Dan Gohman | 2017-10-19T15:39:35 | Fix a typo in a comment. | diff --git a/lib/frontend/src/ssa.rs b/lib/frontend/src/ssa.rs
index 90090d6d0..a359ab4b3 100644
--- a/lib/frontend/src/ssa.rs
+++ b/lib/frontend/src/ssa.rs
@@ -612,7 +612,7 @@ where
}
/// The main algorithm is naturally recursive: when there's a `use_var` in a
- /// block with no correspondin local defs... | 1 | 1 | 1 |
57b81a179efdffeca724549a4c117584d7a1f51b | Jakob Stoklund Olesen | 2017-10-19T18:33:53 | Move the CursorBase trait into the cursor module.
Also move the CursorPosition type into the cursor module.
Move layout::cursor into the tests module as LayoutCursor and remove its
ability to insert instructions via the dfg.ins() method. This cursor
type is only used in the layout unit tests now.
The FuncCursor and ... | diff --git a/lib/cretonne/src/cursor.rs b/lib/cretonne/src/cursor.rs
index 5e3ea866f..56ad65704 100644
--- a/lib/cretonne/src/cursor.rs
+++ b/lib/cretonne/src/cursor.rs
@@ -5,10 +5,557 @@
use ir;
use isa::TargetIsa;
-// Re-export these types, anticipating their being moved here.
-pub use ir::layout::CursorBase as C... | 4 | 599 | 674 |
ee0f061ee8604ce6ba152a0c424a6dd3c78da171 | Dan Gohman | 2017-10-14T16:46:13 | Rename "runtime" to "environment". | diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs
index dab7d3a08..a4a22435a 100644
--- a/lib/wasm/src/code_translator.rs
+++ b/lib/wasm/src/code_translator.rs
@@ -11,7 +11,8 @@
//! Another data structure, the translation state, records information concerning unreachable code
//! status a... | 10 | 29 | 27 |
233d2cd773e4992fea3bc63c2e49438bc5214882 | Dan Gohman | 2017-10-13T23:42:40 | Initialize function names and signatures before calling translate_from_reader. | diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs
index d02422c26..8bfb0e37b 100644
--- a/lib/runtime/src/lib.rs
+++ b/lib/runtime/src/lib.rs
@@ -508,18 +508,17 @@ impl<'data, 'module> ModuleTranslation<'data, 'module> {
) -> Result<(Compilation<'module>, Relocations), String> {
let mut functio... | 1 | 9 | 10 |
b87178647be08f2016fa17b7fd0b449122d14ddc | Dan Gohman | 2017-10-13T23:42:01 | Change `get_func_type`'s return type to SignatureType.
It's the same thing, but provides more readability. | diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs
index 599235805..d02422c26 100644
--- a/lib/runtime/src/lib.rs
+++ b/lib/runtime/src/lib.rs
@@ -388,7 +388,7 @@ impl<'data, 'module> cton_wasm::ModuleEnvironment<'data> for ModuleEnvironment<'
self.module.functions.push(sig_index);
}
- fn g... | 1 | 1 | 1 |
2c53dc69ff9cb84485895bf73c9299410e96eb5e | Dan Gohman | 2017-10-13T23:41:45 | Use `from_str_radix` to parse hex digits. | diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs
index 472e0b403..599235805 100644
--- a/lib/runtime/src/lib.rs
+++ b/lib/runtime/src/lib.rs
@@ -28,7 +28,7 @@ use cretonne::ir;
use cretonne::isa;
use cretonne::settings;
use cretonne::binemit;
-use std::str::{FromStr, from_utf8};
+use std::str::from_utf8;... | 1 | 3 | 3 |
c8084474680aa8b2bfb268b4e2a0236c489334a6 | Dan Gohman | 2017-10-13T19:40:15 | Have declare_table_elements consume its elements argument.
The producer is already allocating a new Vec, so no need to require the
consumer to allocate one too. | diff --git a/lib/wasm/src/runtime/dummy.rs b/lib/wasm/src/runtime/dummy.rs
index 085fb9b27..aab8ed6a4 100644
--- a/lib/wasm/src/runtime/dummy.rs
+++ b/lib/wasm/src/runtime/dummy.rs
@@ -254,7 +254,7 @@ impl<'data> ModuleEnvironment<'data> for DummyEnvironment {
_table_index: TableIndex,
_base: Option<G... | 3 | 3 | 3 |
bd94a3b20276ec484c2acb6cbb77b66a07db1737 | Dan Gohman | 2017-10-12T04:28:36 | Move the 'data lifetime parameter to the ModuleEnvironment trait.
This is needed to allow implementations to have 'data-lifetime
references if they choose to. The DummyEnvironment is an example of an
implementation that doesn't choose to. | diff --git a/lib/wasm/src/module_translator.rs b/lib/wasm/src/module_translator.rs
index 4aed1e985..ef68350e8 100644
--- a/lib/wasm/src/module_translator.rs
+++ b/lib/wasm/src/module_translator.rs
@@ -13,7 +13,7 @@ use runtime::ModuleEnvironment;
/// indexes in the wasm module and the indexes inside each functions.
p... | 4 | 26 | 26 |
d6ab7e3abfd3420498a4f08ebeed0f3e95ae70b3 | Dan Gohman | 2017-10-11T22:00:34 | Minor comment cleanup. | diff --git a/lib/wasm/src/runtime/dummy.rs b/lib/wasm/src/runtime/dummy.rs
index e3828d6e6..65040a51e 100644
--- a/lib/wasm/src/runtime/dummy.rs
+++ b/lib/wasm/src/runtime/dummy.rs
@@ -113,7 +113,7 @@ impl DummyEnvironment {
}
}
-/// The FuncEnvironment implementation for use by the DummyEnvironment.
+/// The F... | 1 | 1 | 1 |
ad2ffcd7fcad1a22242cede3b8dd975b5550bfda | Dan Gohman | 2017-10-11T18:11:33 | Update to wasmparser 0.13.0. | diff --git a/lib/wasm/Cargo.toml b/lib/wasm/Cargo.toml
index 0aacd4b6a..2aa984d72 100644
--- a/lib/wasm/Cargo.toml
+++ b/lib/wasm/Cargo.toml
@@ -11,7 +11,7 @@ license = "Apache-2.0"
name = "cton_wasm"
[dependencies]
-wasmparser = "0.12.1"
+wasmparser = "0.13.0"
cretonne = { path = "../cretonne" }
cretonne-fronten... | 1 | 1 | 1 |
699cb9895e7486ede23a065c4765357def34ab73 | Jakob Stoklund Olesen | 2017-10-11T16:32:52 | Enforce a 4-byte minimum spill slot size.
This is primarily for the benefit of 32-bit x86 code which can't spill
1-byte types from arbitrary registers. This makes it possible to use
32-bit writes to spill types like b1 and i8.
These small types are expected to be very rare since WebAssembly doesn't
have then, and we ... | diff --git a/lib/cretonne/src/ir/stackslot.rs b/lib/cretonne/src/ir/stackslot.rs
index c1ad330e2..f46f91dd7 100644
--- a/lib/cretonne/src/ir/stackslot.rs
+++ b/lib/cretonne/src/ir/stackslot.rs
@@ -6,6 +6,7 @@
use entity::{PrimaryMap, Keys};
use ir::{Type, StackSlot};
use packed_option::PackedOption;
+use std::cmp;
... | 1 | 14 | 2 |
1a04c4260f8c388f72116b6834a4f8a7b4671f27 | Jakob Stoklund Olesen | 2017-10-11T17:04:23 | Remove an unused import to silence a compiler warning. | diff --git a/lib/cretonne/src/context.rs b/lib/cretonne/src/context.rs
index e69d5e9aa..ca2cd4385 100644
--- a/lib/cretonne/src/context.rs
+++ b/lib/cretonne/src/context.rs
@@ -18,7 +18,7 @@ use isa::TargetIsa;
use legalize_function;
use regalloc;
use result::{CtonError, CtonResult};
-use settings::{FlagsOrIsa, OptL... | 1 | 1 | 1 |
ac85ba0d68c6cfae5926a75ecf87ba93eea1df9a | Dan Gohman | 2017-10-11T18:33:02 | Update to wasmparser 0.12.1. | diff --git a/lib/wasm/Cargo.toml b/lib/wasm/Cargo.toml
index 97c63ff36..0aacd4b6a 100644
--- a/lib/wasm/Cargo.toml
+++ b/lib/wasm/Cargo.toml
@@ -11,7 +11,7 @@ license = "Apache-2.0"
name = "cton_wasm"
[dependencies]
-wasmparser = "0.11.2"
+wasmparser = "0.12.1"
cretonne = { path = "../cretonne" }
cretonne-fronten... | 2 | 34 | 24 |
3f30171b79361bdc85f6a878122bd80a282d3d94 | Dan Gohman | 2017-10-10T23:28:29 | Actually disable simple_gvn and licm by default.
See
https://github.com/stoklund/cretonne/pull/164#discussion_r142449999
for details. | diff --git a/lib/cretonne/src/context.rs b/lib/cretonne/src/context.rs
index 6c04a7f21..e69d5e9aa 100644
--- a/lib/cretonne/src/context.rs
+++ b/lib/cretonne/src/context.rs
@@ -69,12 +69,14 @@ impl Context {
self.compute_cfg();
self.legalize(isa)?;
+ /* TODO: Enable additional optimization pa... | 1 | 2 | 0 |
733870aee4df84ec177d1124ed1c2bbd74d42ff1 | Dan Gohman | 2017-10-10T22:21:29 | Make FuncEnvironment independent from ModuleEnvironment (formerly WasmRuntime).
This renames WasmRuntime to ModuleEnvironment, and makes several changes
to allow for more flexible compilation.
ModuleEnvironment no longer derives from FuncEnvironment, and no longer
has the `begin_translation` and `next_translation` fu... | diff --git a/cranelift/src/wasm.rs b/cranelift/src/wasm.rs
index f632a2162..8833dc81b 100644
--- a/cranelift/src/wasm.rs
+++ b/cranelift/src/wasm.rs
@@ -4,7 +4,7 @@
//! IL. Can also executes the `start` function of the module by laying out the memories, globals
//! and tables, then emitting the translated code with h... | 9 | 242 | 184 |
3d6f0f704561ec1b32caf39e7d9b75ca3e60df2b | Dan Gohman | 2017-10-10T17:24:15 | Update for Cretonne API changes. | diff --git a/lib/execute/src/lib.rs b/lib/execute/src/lib.rs
index 96dd16daa..fcde10226 100644
--- a/lib/execute/src/lib.rs
+++ b/lib/execute/src/lib.rs
@@ -72,8 +72,7 @@ pub fn compile_module(
runtime: &wasmstandalone_runtime::Runtime,
) -> Result<ExecutableCode, String> {
debug_assert!(
- trans_resu... | 3 | 157 | 91 |
d4c0c5babc2a8a941bde84f839c7a4936f0f6df9 | Dan Gohman | 2017-10-10T17:21:06 | Rename WasmRuntime's `get_name` to `get_func_name`. | diff --git a/lib/wasm/src/module_translator.rs b/lib/wasm/src/module_translator.rs
index 434f2b0da..3cbb11de6 100644
--- a/lib/wasm/src/module_translator.rs
+++ b/lib/wasm/src/module_translator.rs
@@ -152,7 +152,7 @@ pub fn translate_module(
func.signature = runtime
.get_signature(runtime.get_func... | 3 | 4 | 4 |
142b17a3f0dcea9cebdd30d45f639e04e30616da | Dan Gohman | 2017-10-10T16:43:33 | Delete an unused settings builder. | diff --git a/lib/execute/src/lib.rs b/lib/execute/src/lib.rs
index 9016485f5..96dd16daa 100644
--- a/lib/execute/src/lib.rs
+++ b/lib/execute/src/lib.rs
@@ -8,11 +8,9 @@ extern crate region;
extern crate wasmstandalone_runtime;
use cretonne::Context;
-use cretonne::settings;
use cretonne::isa::TargetIsa;
use cret... | 2 | 1 | 10 |
6dea25ee9f5195f1b638226c5bc5d2716188d7bd | Dan Gohman | 2017-10-10T16:43:06 | Store relocs in a Vec rather than in a HashMap. | diff --git a/lib/execute/src/lib.rs b/lib/execute/src/lib.rs
index d07dd97d1..9016485f5 100644
--- a/lib/execute/src/lib.rs
+++ b/lib/execute/src/lib.rs
@@ -21,7 +21,6 @@ use cton_wasm::{TranslationResult, FunctionIndex};
use std::mem::transmute;
use region::Protection;
use region::protect;
-use std::collections::Ha... | 1 | 11 | 12 |
8e1ba080c0203b955c354e19eb2b35af83519633 | Dan Gohman | 2017-10-10T16:35:10 | Complete support for global init expressions. | diff --git a/lib/wasm/src/runtime/dummy.rs b/lib/wasm/src/runtime/dummy.rs
index 09a985a08..4ebbdd39d 100644
--- a/lib/wasm/src/runtime/dummy.rs
+++ b/lib/wasm/src/runtime/dummy.rs
@@ -197,6 +197,7 @@ impl WasmRuntime for DummyRuntime {
fn declare_table_elements(
&mut self,
_table_index: TableInd... | 3 | 25 | 57 |
653e8bb56300b12baf3a81d30a2b1e0c4cd93fa0 | Dan Gohman | 2017-10-09T20:22:06 | Declare exports via the WasmRuntime.
Also, redo how functions are named in the DummyRuntime. Use the FunctionName
field to just encode the wasm function index rather than trying to shoehorn
a printable name into it. And to make up for that, teach the wasm printer
to print export names as comments next to the function ... | diff --git a/cranelift/src/wasm.rs b/cranelift/src/wasm.rs
index 1c853efaf..f632a2162 100644
--- a/cranelift/src/wasm.rs
+++ b/cranelift/src/wasm.rs
@@ -4,7 +4,7 @@
//! IL. Can also executes the `start` function of the module by laying out the memories, globals
//! and tables, then emitting the translated code with h... | 5 | 145 | 77 |
2c9d03f9bd1b7faaecb7431b139ba51130cdc64d | Dan Gohman | 2017-10-09T18:41:01 | Let the runtime provide the number of imported functions.
This obviates the need to keep a separate running total of the number of
functions seen. | diff --git a/lib/wasm/src/module_translator.rs b/lib/wasm/src/module_translator.rs
index baab08b63..7aee73c97 100644
--- a/lib/wasm/src/module_translator.rs
+++ b/lib/wasm/src/module_translator.rs
@@ -36,7 +36,6 @@ pub fn translate_module(
}
let mut exports: HashMap<FunctionIndex, String> = HashMap::new();
... | 4 | 10 | 5 |
e74bc0638022b8058c581025b4b5618475fcd537 | Dan Gohman | 2017-10-09T15:37:04 | Move start_index out of TranslationResult and into the WasmRuntime.
This makes it more consistent with how all the rest of the content of
a wasm module is handled. And, now TranslationResult just has a Vec
of translated functions, which will make it easier to refactor further. | diff --git a/lib/wasm/src/module_translator.rs b/lib/wasm/src/module_translator.rs
index e3395c0b9..baab08b63 100644
--- a/lib/wasm/src/module_translator.rs
+++ b/lib/wasm/src/module_translator.rs
@@ -2,9 +2,9 @@
//! to deal with each part of it.
use wasmparser::{ParserState, SectionCode, ParserInput, Parser, WasmDec... | 4 | 39 | 29 |
ef5ad630c873aa69211ed29b482247ca305ac3f2 | Dan Gohman | 2017-10-07T15:12:07 | Use the WasmRuntime's global list rather than keeping a separate list. | diff --git a/lib/wasm/src/module_translator.rs b/lib/wasm/src/module_translator.rs
index 2715aeb39..e3395c0b9 100644
--- a/lib/wasm/src/module_translator.rs
+++ b/lib/wasm/src/module_translator.rs
@@ -5,7 +5,7 @@ use sections_translator::{SectionParsingError, parse_function_signatures, parse_
... | 5 | 41 | 67 |
3841552b7c3da60ffc4992912d301b465bc3f105 | Dan Gohman | 2017-10-06T23:16:39 | Use the WasmRuntime's type list rather than keeping a separate list. | diff --git a/lib/wasm/src/module_translator.rs b/lib/wasm/src/module_translator.rs
index 001a85bd6..2715aeb39 100644
--- a/lib/wasm/src/module_translator.rs
+++ b/lib/wasm/src/module_translator.rs
@@ -5,7 +5,7 @@ use sections_translator::{SectionParsingError, parse_function_signatures, parse_
... | 4 | 14 | 11 |
893a6716c6b1197a1a52c2d3e121d83e939490ff | Jakob Stoklund Olesen | 2017-10-07T01:51:36 | Enforce all instruction constraints in iterate_solution().
During iterate_solution(), live-through values may be converted to
solver variables so they can be moved out of the way in order to satisfy
all constraints. Make sure that the instruction's operand constraints
are also considered for these new variables.
Add ... | diff --git a/lib/cretonne/src/regalloc/coloring.rs b/lib/cretonne/src/regalloc/coloring.rs
index 8c4de9163..cdea49443 100644
--- a/lib/cretonne/src/regalloc/coloring.rs
+++ b/lib/cretonne/src/regalloc/coloring.rs
@@ -374,7 +374,7 @@ impl<'a> Context<'a> {
// Finally, we've fully programmed the constraint solve... | 2 | 116 | 32 |
4a2bf6d9a6c30910bbd75e3bedd2c3fd2819f32e | Jakob Stoklund Olesen | 2017-10-07T02:17:37 | Use a more compact display of AllocatableSet.
Since only Intel uses named registers, we can use a one-char shorthand
for the registers. | diff --git a/lib/cretonne/src/regalloc/allocatable_set.rs b/lib/cretonne/src/regalloc/allocatable_set.rs
index c6f8c86a0..355443aff 100644
--- a/lib/cretonne/src/regalloc/allocatable_set.rs
+++ b/lib/cretonne/src/regalloc/allocatable_set.rs
@@ -6,6 +6,7 @@
//! share a register unit can't be in use at the same time.
... | 3 | 41 | 6 |
ac8c8a676a799d7efdc24316a724398f0ac0f88b | Jakob Stoklund Olesen | 2017-10-06T22:03:50 | Constrain solver variables as little as possible.
When solver variables represent operands on the current instruction,
they need to be constrained as required by the instructions, but
variables that are simply moved out of the way should only be
constrained to their top-level register class. The live range affinity
is... | diff --git a/lib/cretonne/src/isa/registers.rs b/lib/cretonne/src/isa/registers.rs
index b8e7fe114..db68399cb 100644
--- a/lib/cretonne/src/isa/registers.rs
+++ b/lib/cretonne/src/isa/registers.rs
@@ -296,6 +296,11 @@ impl RegInfo {
pub fn rc(&self, idx: RegClassIndex) -> RegClass {
self.classes[idx.index... | 2 | 16 | 15 |
12a8d6cce1f98337f6c5c19dca859285b8524767 | Jakob Stoklund Olesen | 2017-10-06T21:50:33 | Avoid diverting values that are live on an outgoing CFG edge.
When try_add_var is looking for values that can be moved out of the way
in order to satisfy constraints for the current instruction, avoid
values that are live on a CFG edge originating at the current (branch)
instruction.
These values must be in their glo... | diff --git a/lib/cretonne/src/regalloc/coloring.rs b/lib/cretonne/src/regalloc/coloring.rs
index 2aad6093a..a7a0d2388 100644
--- a/lib/cretonne/src/regalloc/coloring.rs
+++ b/lib/cretonne/src/regalloc/coloring.rs
@@ -711,7 +711,9 @@ impl<'a> Context<'a> {
if let Affinity::Reg(rci) = lv.affinity {
... | 1 | 28 | 1 |
0c4500897f792451333d77f75aef05efd4f1e8de | Dan Gohman | 2017-10-09T20:50:03 | Clarify FunctionName's role in its comment. | diff --git a/lib/cretonne/src/ir/funcname.rs b/lib/cretonne/src/ir/funcname.rs
index 142a846c2..0cffae6d7 100644
--- a/lib/cretonne/src/ir/funcname.rs
+++ b/lib/cretonne/src/ir/funcname.rs
@@ -8,8 +8,12 @@ use std::ascii::AsciiExt;
/// The name of a function can be any sequence of bytes.
///
-/// Function names are... | 1 | 6 | 2 |
d1766f0ba46fb5318fc5f3929a6d6ee1ec184fdc | Dan Gohman | 2017-09-25T23:22:36 | Simplify code by removing unnecessary `Option`s. | diff --git a/lib/wasm/src/module_translator.rs b/lib/wasm/src/module_translator.rs
index 7966bdd54..001a85bd6 100644
--- a/lib/wasm/src/module_translator.rs
+++ b/lib/wasm/src/module_translator.rs
@@ -39,9 +39,9 @@ pub fn translate_module(
}
ref s => panic!("modules should begin properly: {:?}", s),
... | 1 | 7 | 23 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.