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 |
|---|---|---|---|---|---|---|---|
622006ecc54b8e8150020b14ca81d19c2f435c78 | Jakob Stoklund Olesen | 2016-09-19T18:42:56 | Remove the inst_locs vector in the parser.
Use the source map to track instruction locations instead.
The rewrite methods now take an AnyEntity argument as the location to
use for errors. This means that bad EBB references in jump tables are
now reported correctly. | diff --git a/src/libreader/error.rs b/src/libreader/error.rs
index edc6e4064..cf8bd12f0 100644
--- a/src/libreader/error.rs
+++ b/src/libreader/error.rs
@@ -6,7 +6,7 @@ use std::fmt;
use std::result;
/// The location of a `Token` or `Error`.
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+#[derive(Debug, Clone, Copy... | 3 | 61 | 59 |
1a73b4f3f2f955c743924ffc157b084a559010af | Jakob Stoklund Olesen | 2016-09-19T18:29:55 | Also record locations for tracked entities. | diff --git a/cranelift/src/libreader/sourcemap.rs b/cranelift/src/libreader/sourcemap.rs
index 090e438d5..e7828a180 100644
--- a/cranelift/src/libreader/sourcemap.rs
+++ b/cranelift/src/libreader/sourcemap.rs
@@ -8,7 +8,7 @@
//! clients.
use std::collections::HashMap;
-use cretonne::ir::{StackSlot, JumpTable, Ebb, ... | 1 | 31 | 1 |
d0f9f92317dedb5ba8b90f62eeb40d1ac1a86d1f | Jakob Stoklund Olesen | 2016-09-19T18:29:55 | Also record locations for tracked entities. | diff --git a/src/libreader/sourcemap.rs b/src/libreader/sourcemap.rs
index 090e438d5..e7828a180 100644
--- a/src/libreader/sourcemap.rs
+++ b/src/libreader/sourcemap.rs
@@ -8,7 +8,7 @@
//! clients.
use std::collections::HashMap;
-use cretonne::ir::{StackSlot, JumpTable, Ebb, Value};
+use cretonne::ir::{StackSlot, J... | 1 | 31 | 1 |
b5514748a4bd901dd0614db9ff7c3b6eb50d9aa2 | Jakob Stoklund Olesen | 2016-09-19T18:11:30 | Add an internal MutableSourceMap trait.
Use the SourceMap for mapping during parsing too. | diff --git a/cranelift/src/libreader/parser.rs b/cranelift/src/libreader/parser.rs
index 68a5e72a4..b2c9f40d6 100644
--- a/cranelift/src/libreader/parser.rs
+++ b/cranelift/src/libreader/parser.rs
@@ -5,12 +5,11 @@
//
// ====--------------------------------------------------------------------------------------====//
... | 2 | 138 | 117 |
dd8e7df8ba5712c31ab257be538ff974d84913cc | Jakob Stoklund Olesen | 2016-09-19T18:11:30 | Add an internal MutableSourceMap trait.
Use the SourceMap for mapping during parsing too. | diff --git a/src/libreader/parser.rs b/src/libreader/parser.rs
index 68a5e72a4..b2c9f40d6 100644
--- a/src/libreader/parser.rs
+++ b/src/libreader/parser.rs
@@ -5,12 +5,11 @@
//
// ====--------------------------------------------------------------------------------------====//
-use std::collections::HashMap;
use s... | 2 | 138 | 117 |
ac46de7200202faafbfd045b1f82876fa2c357b2 | Jakob Stoklund Olesen | 2016-09-19T17:08:21 | Extract Result and Error into their own module.
Also include the err! macro and make it usable outside the module. | diff --git a/cranelift/src/libreader/error.rs b/cranelift/src/libreader/error.rs
new file mode 100644
index 000000000..edc6e4064
--- /dev/null
+++ b/cranelift/src/libreader/error.rs
@@ -0,0 +1,44 @@
+//! Define the `Location`, `Error`, and `Result` types.
+
+#![macro_use]
+
+use std::fmt;
+use std::result;
+
+/// The l... | 5 | 53 | 45 |
feef2ecf3f556c88f50acf0341d34499ed9d7c4c | Jakob Stoklund Olesen | 2016-09-19T17:08:21 | Extract Result and Error into their own module.
Also include the err! macro and make it usable outside the module. | diff --git a/src/libreader/error.rs b/src/libreader/error.rs
new file mode 100644
index 000000000..edc6e4064
--- /dev/null
+++ b/src/libreader/error.rs
@@ -0,0 +1,44 @@
+//! Define the `Location`, `Error`, and `Result` types.
+
+#![macro_use]
+
+use std::fmt;
+use std::result;
+
+/// The location of a `Token` or `Error... | 5 | 53 | 45 |
b5828cb9a3988b3ae2952582f1996b7cdc366ba3 | Jakob Stoklund Olesen | 2016-09-18T18:35:10 | Print out a report of slow-running tests.
The slow tests are computed as those that would be printed as outliers
on a boxplot of all the test runtimes. These are more than 1.5
inter-quartile range away from the 75% quartile. | diff --git a/cranelift/src/tools/filetest/runner.rs b/cranelift/src/tools/filetest/runner.rs
index 11a98fb43..8794de000 100644
--- a/cranelift/src/tools/filetest/runner.rs
+++ b/cranelift/src/tools/filetest/runner.rs
@@ -271,11 +271,55 @@ impl TestRunner {
}
}
+ /// Print out a report of slow tests.
... | 1 | 44 | 0 |
17c2b5213a34cd71fb98abc7d8e2029e3addf261 | Jakob Stoklund Olesen | 2016-09-18T18:35:10 | Print out a report of slow-running tests.
The slow tests are computed as those that would be printed as outliers
on a boxplot of all the test runtimes. These are more than 1.5
inter-quartile range away from the 75% quartile. | diff --git a/src/tools/filetest/runner.rs b/src/tools/filetest/runner.rs
index 11a98fb43..8794de000 100644
--- a/src/tools/filetest/runner.rs
+++ b/src/tools/filetest/runner.rs
@@ -271,11 +271,55 @@ impl TestRunner {
}
}
+ /// Print out a report of slow tests.
+ fn report_slow_tests(&self) {
+ ... | 1 | 44 | 0 |
67c8ae7f14e13c6d172574d4a75f51c0e1758c14 | Jakob Stoklund Olesen | 2016-09-18T00:11:17 | Add --verbose flag to cton-util test. | diff --git a/cranelift/src/tools/filetest/mod.rs b/cranelift/src/tools/filetest/mod.rs
index 60b6180c0..a924cb04e 100644
--- a/cranelift/src/tools/filetest/mod.rs
+++ b/cranelift/src/tools/filetest/mod.rs
@@ -30,8 +30,8 @@ pub type TestResult = Result<time::Duration, String>;
/// Directories are scanned recursively fo... | 3 | 50 | 23 |
5cb5110330f6eb6993681902f94919dd41d0d035 | Jakob Stoklund Olesen | 2016-09-18T00:11:17 | Add --verbose flag to cton-util test. | diff --git a/src/tools/filetest/mod.rs b/src/tools/filetest/mod.rs
index 60b6180c0..a924cb04e 100644
--- a/src/tools/filetest/mod.rs
+++ b/src/tools/filetest/mod.rs
@@ -30,8 +30,8 @@ pub type TestResult = Result<time::Duration, String>;
/// Directories are scanned recursively for test cases ending in `.cton`. These te... | 3 | 50 | 23 |
23887358dd31d9570bb1d595ac45f99f95b8dbd5 | Jakob Stoklund Olesen | 2016-09-17T19:36:35 | Simplify with unwrap_or_else(). | diff --git a/cranelift/src/tools/filetest/concurrent.rs b/cranelift/src/tools/filetest/concurrent.rs
index 312312408..30abb844d 100644
--- a/cranelift/src/tools/filetest/concurrent.rs
+++ b/cranelift/src/tools/filetest/concurrent.rs
@@ -127,20 +127,17 @@ fn worker_thread(thread_num: usize,
})
... | 1 | 10 | 13 |
b1468ee0bcf7e3e94a91b9557ead2501e9171e30 | Jakob Stoklund Olesen | 2016-09-17T19:36:35 | Simplify with unwrap_or_else(). | diff --git a/src/tools/filetest/concurrent.rs b/src/tools/filetest/concurrent.rs
index 312312408..30abb844d 100644
--- a/src/tools/filetest/concurrent.rs
+++ b/src/tools/filetest/concurrent.rs
@@ -127,20 +127,17 @@ fn worker_thread(thread_num: usize,
})
.unwrap();
- ... | 1 | 10 | 13 |
a4774ce87d72e22bb4fe04eaa698de48b3567cf6 | Jakob Stoklund Olesen | 2016-09-17T18:42:08 | Record the location of parsed functions.
Remember the location of the 'function' keyword that starts every
function. This can be useful for reporting test failures etc. | diff --git a/cranelift/src/libreader/parser.rs b/cranelift/src/libreader/parser.rs
index 54a53310e..6fea02b22 100644
--- a/cranelift/src/libreader/parser.rs
+++ b/cranelift/src/libreader/parser.rs
@@ -523,7 +523,7 @@ impl<'a> Parser<'a> {
self.comments.clear();
self.gather_comments(AnyEntity::Function... | 2 | 7 | 3 |
aa1da4d87163f9bb4cb66a23d6625d3800138d34 | Jakob Stoklund Olesen | 2016-09-17T18:42:08 | Record the location of parsed functions.
Remember the location of the 'function' keyword that starts every
function. This can be useful for reporting test failures etc. | diff --git a/src/libreader/parser.rs b/src/libreader/parser.rs
index 54a53310e..6fea02b22 100644
--- a/src/libreader/parser.rs
+++ b/src/libreader/parser.rs
@@ -523,7 +523,7 @@ impl<'a> Parser<'a> {
self.comments.clear();
self.gather_comments(AnyEntity::Function);
- let (name, sig) = try!(sel... | 2 | 7 | 3 |
b2f0dd7da3651d38182a1709486d22ee4e45127a | Jakob Stoklund Olesen | 2016-09-17T16:51:06 | Run tests concurrently.
Spin up one worker thread per cpu, and run filetests on all of them. Use
a reorder buffer in Runner to make sure results are still reported in
order.
Individual test files given as command line arguments are still run
synchronously for easier debugging. Only directories are run on worker
threa... | diff --git a/cranelift/src/tools/Cargo.lock b/cranelift/src/tools/Cargo.lock
index ca97206cc..28d0f79f5 100644
--- a/cranelift/src/tools/Cargo.lock
+++ b/cranelift/src/tools/Cargo.lock
@@ -6,6 +6,7 @@ dependencies = [
"cretonne-reader 0.0.0",
"docopt 0.6.83 (registry+https://github.com/rust-lang/crates.io-index)",
... | 6 | 267 | 30 |
1c1ae524aaf55aa6a8ab37669a99b047453c824d | Jakob Stoklund Olesen | 2016-09-17T16:51:06 | Run tests concurrently.
Spin up one worker thread per cpu, and run filetests on all of them. Use
a reorder buffer in Runner to make sure results are still reported in
order.
Individual test files given as command line arguments are still run
synchronously for easier debugging. Only directories are run on worker
threa... | diff --git a/src/tools/Cargo.lock b/src/tools/Cargo.lock
index ca97206cc..28d0f79f5 100644
--- a/src/tools/Cargo.lock
+++ b/src/tools/Cargo.lock
@@ -6,6 +6,7 @@ dependencies = [
"cretonne-reader 0.0.0",
"docopt 0.6.83 (registry+https://github.com/rust-lang/crates.io-index)",
"filecheck 0.0.0",
+ "num_cpus 1.1.0 (... | 6 | 267 | 30 |
5ea9a439289b6c04b7584db53a562d2e0ae6bc8a | Jakob Stoklund Olesen | 2016-09-17T04:48:20 | Simplify job queue.
Always keep PathBufs for every entry in the test list. When concurrent
testing is enabled, we'll want to clone the path for the worker threads.
Remove the Job struct for the same reason. | diff --git a/cranelift/src/tools/filetest/runner.rs b/cranelift/src/tools/filetest/runner.rs
index 7de282929..44501489d 100644
--- a/cranelift/src/tools/filetest/runner.rs
+++ b/cranelift/src/tools/filetest/runner.rs
@@ -5,17 +5,26 @@
use std::error::Error;
use std::ffi::OsStr;
-use std::mem;
-use std::panic::catch... | 1 | 36 | 51 |
356e05d2255e72d5bf30519e3fbc66d4b53aa7ef | Jakob Stoklund Olesen | 2016-09-17T04:48:20 | Simplify job queue.
Always keep PathBufs for every entry in the test list. When concurrent
testing is enabled, we'll want to clone the path for the worker threads.
Remove the Job struct for the same reason. | diff --git a/src/tools/filetest/runner.rs b/src/tools/filetest/runner.rs
index 7de282929..44501489d 100644
--- a/src/tools/filetest/runner.rs
+++ b/src/tools/filetest/runner.rs
@@ -5,17 +5,26 @@
use std::error::Error;
use std::ffi::OsStr;
-use std::mem;
-use std::panic::catch_unwind;
use std::path::{Path, PathBuf}... | 1 | 36 | 51 |
91167f0153597404477836cb4e9acc93e4017da0 | Jakob Stoklund Olesen | 2016-09-17T04:06:50 | Move the code to run test into its own module.
Loading a file and running the test in it can be separated from the
mechanics of running multiple tests and scanning directories for test
files. | diff --git a/cranelift/src/tools/filetest/mod.rs b/cranelift/src/tools/filetest/mod.rs
index 9126efbfc..dec7ff601 100644
--- a/cranelift/src/tools/filetest/mod.rs
+++ b/cranelift/src/tools/filetest/mod.rs
@@ -4,6 +4,7 @@
//! available test commands.
use std::path::Path;
+use std::time;
use cton_reader::TestCommand... | 3 | 75 | 70 |
c04b2fa7938036d09695ef2ef14ebe0a33578d0c | Jakob Stoklund Olesen | 2016-09-17T04:06:50 | Move the code to run test into its own module.
Loading a file and running the test in it can be separated from the
mechanics of running multiple tests and scanning directories for test
files. | diff --git a/src/tools/filetest/mod.rs b/src/tools/filetest/mod.rs
index 9126efbfc..dec7ff601 100644
--- a/src/tools/filetest/mod.rs
+++ b/src/tools/filetest/mod.rs
@@ -4,6 +4,7 @@
//! available test commands.
use std::path::Path;
+use std::time;
use cton_reader::TestCommand;
use CommandResult;
use cat;
@@ -12,9... | 3 | 75 | 70 |
4bc41bbcffd780c6778b053e7f33d2b058f9bf56 | Jakob Stoklund Olesen | 2016-09-17T00:00:55 | Move subtest::new() into the parent module.
This saves on importing of all the sub-modules that implement new test
commands, and it provides a nice overview of what 'cton-util test' can
do. | diff --git a/cranelift/src/tools/filetest/mod.rs b/cranelift/src/tools/filetest/mod.rs
index b36895912..9126efbfc 100644
--- a/cranelift/src/tools/filetest/mod.rs
+++ b/cranelift/src/tools/filetest/mod.rs
@@ -4,7 +4,10 @@
//! available test commands.
use std::path::Path;
+use cton_reader::TestCommand;
use CommandR... | 3 | 20 | 17 |
30009356a65350a3f71cd1e26727b9ed113b422f | Jakob Stoklund Olesen | 2016-09-17T00:00:55 | Move subtest::new() into the parent module.
This saves on importing of all the sub-modules that implement new test
commands, and it provides a nice overview of what 'cton-util test' can
do. | diff --git a/src/tools/filetest/mod.rs b/src/tools/filetest/mod.rs
index b36895912..9126efbfc 100644
--- a/src/tools/filetest/mod.rs
+++ b/src/tools/filetest/mod.rs
@@ -4,7 +4,10 @@
//! available test commands.
use std::path::Path;
+use cton_reader::TestCommand;
use CommandResult;
+use cat;
+use print_cfg;
use fi... | 3 | 20 | 17 |
b26f7be6c99977b07f18293599c4dbd2996aa21f | Jakob Stoklund Olesen | 2016-09-16T23:41:04 | cargo update. | diff --git a/cranelift/src/tools/Cargo.lock b/cranelift/src/tools/Cargo.lock
index 50576fd02..ca97206cc 100644
--- a/cranelift/src/tools/Cargo.lock
+++ b/cranelift/src/tools/Cargo.lock
@@ -4,14 +4,14 @@ version = "0.0.0"
dependencies = [
"cretonne 0.0.0",
"cretonne-reader 0.0.0",
- "docopt 0.6.80 (registry+https:/... | 1 | 22 | 16 |
7f1f4175ac9a1f515ed5336704f1a8dc378b224b | Jakob Stoklund Olesen | 2016-09-16T23:41:04 | cargo update. | diff --git a/src/tools/Cargo.lock b/src/tools/Cargo.lock
index 50576fd02..ca97206cc 100644
--- a/src/tools/Cargo.lock
+++ b/src/tools/Cargo.lock
@@ -4,14 +4,14 @@ version = "0.0.0"
dependencies = [
"cretonne 0.0.0",
"cretonne-reader 0.0.0",
- "docopt 0.6.80 (registry+https://github.com/rust-lang/crates.io-index)",... | 1 | 22 | 16 |
dd9696e2941d5f111bed560283fd18d1746527a1 | Jakob Stoklund Olesen | 2016-09-16T23:34:50 | Remove unnecessary external dependencies.
The main libcretonne crate should not have any external dependencies if
at all possible. Use simple substring matching instead of regular
expressions in the verifier tests to achieve this.
The tools crate no longer depends directly on glob and regex. It still
has an indirect ... | diff --git a/cranelift/src/libcretonne/Cargo.toml b/cranelift/src/libcretonne/Cargo.toml
index 5d3a9511e..174fb2e0b 100644
--- a/cranelift/src/libcretonne/Cargo.toml
+++ b/cranelift/src/libcretonne/Cargo.toml
@@ -13,4 +13,7 @@ name = "cretonne"
path = "lib.rs"
[dependencies]
-regex = "0.1.71"
+# It is a goal of the... | 4 | 7 | 20 |
d2e5059ab90e1e83f5214bc0ec09ead6a257ffb8 | Jakob Stoklund Olesen | 2016-09-16T23:34:50 | Remove unnecessary external dependencies.
The main libcretonne crate should not have any external dependencies if
at all possible. Use simple substring matching instead of regular
expressions in the verifier tests to achieve this.
The tools crate no longer depends directly on glob and regex. It still
has an indirect ... | diff --git a/src/libcretonne/Cargo.toml b/src/libcretonne/Cargo.toml
index 5d3a9511e..174fb2e0b 100644
--- a/src/libcretonne/Cargo.toml
+++ b/src/libcretonne/Cargo.toml
@@ -13,4 +13,7 @@ name = "cretonne"
path = "lib.rs"
[dependencies]
-regex = "0.1.71"
+# It is a goal of the cretonne crate to have minimal external... | 4 | 7 | 20 |
45559a21c1f50923e3a96efb64f00f4489684bfc | Jakob Stoklund Olesen | 2016-09-16T22:17:19 | Remove dead public functions from DominatorTree. | diff --git a/cranelift/src/libcretonne/dominator_tree.rs b/cranelift/src/libcretonne/dominator_tree.rs
index a3a00b2cc..c741b5992 100644
--- a/cranelift/src/libcretonne/dominator_tree.rs
+++ b/cranelift/src/libcretonne/dominator_tree.rs
@@ -3,18 +3,13 @@
use cfg::*;
use ir::Ebb;
use ir::entities::NO_INST;
-use entit... | 1 | 2 | 12 |
52aca982a1bcb73cf9c56a551bf990459cc50406 | Jakob Stoklund Olesen | 2016-09-16T22:17:19 | Remove dead public functions from DominatorTree. | diff --git a/src/libcretonne/dominator_tree.rs b/src/libcretonne/dominator_tree.rs
index a3a00b2cc..c741b5992 100644
--- a/src/libcretonne/dominator_tree.rs
+++ b/src/libcretonne/dominator_tree.rs
@@ -3,18 +3,13 @@
use cfg::*;
use ir::Ebb;
use ir::entities::NO_INST;
-use entity_map::{EntityMap, Keys};
+use entity_ma... | 1 | 2 | 12 |
3796be696fc45c96e441eaaa60338c53771f77e5 | Jakob Stoklund Olesen | 2016-09-16T19:14:23 | Add a SourceMap to libreader.
Give crate clients the possiblility of mapping source-level entity names
to proper entity references that are valid in the parsed function. | diff --git a/cranelift/src/libreader/lib.rs b/cranelift/src/libreader/lib.rs
index 94436e12f..79f9b2352 100644
--- a/cranelift/src/libreader/lib.rs
+++ b/cranelift/src/libreader/lib.rs
@@ -8,8 +8,10 @@ extern crate cretonne;
pub use parser::{Result, parse_functions, parse_test};
pub use testcommand::{TestCommand, Tes... | 4 | 146 | 3 |
77264ead08b67fad905f647f2e2e9d4a00995180 | Jakob Stoklund Olesen | 2016-09-16T19:14:23 | Add a SourceMap to libreader.
Give crate clients the possiblility of mapping source-level entity names
to proper entity references that are valid in the parsed function. | diff --git a/src/libreader/lib.rs b/src/libreader/lib.rs
index 94436e12f..79f9b2352 100644
--- a/src/libreader/lib.rs
+++ b/src/libreader/lib.rs
@@ -8,8 +8,10 @@ extern crate cretonne;
pub use parser::{Result, parse_functions, parse_test};
pub use testcommand::{TestCommand, TestOption};
pub use testfile::{TestFile, ... | 4 | 146 | 3 |
d5ed27cce63b1f724e39665dc8294487a009c6b2 | Jakob Stoklund Olesen | 2016-09-16T16:36:34 | Use Cow<str> for the values of filecheck variables.
Often, an implementation of VariableMap can return references to
internal strings, and Cow::Borrow() allows that without making any
copies.
We still want to allow VariableMap implementations to return owned
strings in case they have to manufacture variable values on... | diff --git a/cranelift/src/libfilecheck/checker.rs b/cranelift/src/libfilecheck/checker.rs
index 6bb458b55..a2af0815e 100644
--- a/cranelift/src/libfilecheck/checker.rs
+++ b/cranelift/src/libfilecheck/checker.rs
@@ -2,6 +2,7 @@ use error::{Error, Result};
use variable::{VariableMap, Value, varname_prefix};
use patte... | 3 | 19 | 21 |
ea748f77180c8c7f3c1fd1ad513d4b69d22e0ae1 | Jakob Stoklund Olesen | 2016-09-16T16:36:34 | Use Cow<str> for the values of filecheck variables.
Often, an implementation of VariableMap can return references to
internal strings, and Cow::Borrow() allows that without making any
copies.
We still want to allow VariableMap implementations to return owned
strings in case they have to manufacture variable values on... | diff --git a/src/libfilecheck/checker.rs b/src/libfilecheck/checker.rs
index 6bb458b55..a2af0815e 100644
--- a/src/libfilecheck/checker.rs
+++ b/src/libfilecheck/checker.rs
@@ -2,6 +2,7 @@ use error::{Error, Result};
use variable::{VariableMap, Value, varname_prefix};
use pattern::Pattern;
use regex::{Regex, Capture... | 3 | 19 | 21 |
fb16762866d332013f248a606c143c9d0cd475a4 | Jakob Stoklund Olesen | 2016-09-16T00:28:09 | Print the number of tests run.
Don't let 'cton-util test' finish without printing anything. | diff --git a/cranelift/src/tools/filetest/runner.rs b/cranelift/src/tools/filetest/runner.rs
index 1f7ac7ee8..ceb1e34c6 100644
--- a/cranelift/src/tools/filetest/runner.rs
+++ b/cranelift/src/tools/filetest/runner.rs
@@ -179,6 +179,7 @@ impl TestRunner {
pub fn run(&mut self) -> CommandResult {
self.scan_... | 1 | 1 | 0 |
8a9b34411aaca59ed94e1b87ce2ec0079203e9b5 | Jakob Stoklund Olesen | 2016-09-16T00:28:09 | Print the number of tests run.
Don't let 'cton-util test' finish without printing anything. | diff --git a/src/tools/filetest/runner.rs b/src/tools/filetest/runner.rs
index 1f7ac7ee8..ceb1e34c6 100644
--- a/src/tools/filetest/runner.rs
+++ b/src/tools/filetest/runner.rs
@@ -179,6 +179,7 @@ impl TestRunner {
pub fn run(&mut self) -> CommandResult {
self.scan_dirs();
self.schedule_jobs();
+... | 1 | 1 | 0 |
1342a0fb71f6310bd11e174aee3a9bc22238f6cc | Jakob Stoklund Olesen | 2016-09-16T00:10:21 | Also use fmt::Write for the print-cfg command.
This prepares use for implementing a 'test print-cfg' sub-test. | diff --git a/cranelift/src/tools/print_cfg.rs b/cranelift/src/tools/print_cfg.rs
index 1c57710b2..d4d6ccf79 100644
--- a/cranelift/src/tools/print_cfg.rs
+++ b/cranelift/src/tools/print_cfg.rs
@@ -2,13 +2,13 @@
//!
//! Read a series of Cretonne IL files and print their control flow graphs
//! in graphviz format.
-us... | 1 | 48 | 118 |
1ed8e1206df391c5aa767e4c7806e813ac76635a | Jakob Stoklund Olesen | 2016-09-16T00:10:21 | Also use fmt::Write for the print-cfg command.
This prepares use for implementing a 'test print-cfg' sub-test. | diff --git a/src/tools/print_cfg.rs b/src/tools/print_cfg.rs
index 1c57710b2..d4d6ccf79 100644
--- a/src/tools/print_cfg.rs
+++ b/src/tools/print_cfg.rs
@@ -2,13 +2,13 @@
//!
//! Read a series of Cretonne IL files and print their control flow graphs
//! in graphviz format.
-use std::io::{Write, stdout};
+use std::fm... | 1 | 48 | 118 |
edc4fff50cde64db315b23a1f552e08b665ea1d7 | Jakob Stoklund Olesen | 2016-09-15T23:07:00 | Ignore test commands in parse_functions().
No point in returning a syntax error if the file contains test commands. | diff --git a/cranelift/src/libreader/parser.rs b/cranelift/src/libreader/parser.rs
index 4a10f1cec..63a635b3f 100644
--- a/cranelift/src/libreader/parser.rs
+++ b/cranelift/src/libreader/parser.rs
@@ -28,9 +28,7 @@ pub use lexer::Location;
///
/// Any test commands or ISA declarations are ignored.
pub fn parse_funct... | 1 | 1 | 3 |
5ade8dc36a6f5779a556fa77c8a650551445b245 | Jakob Stoklund Olesen | 2016-09-15T23:07:00 | Ignore test commands in parse_functions().
No point in returning a syntax error if the file contains test commands. | diff --git a/src/libreader/parser.rs b/src/libreader/parser.rs
index 4a10f1cec..63a635b3f 100644
--- a/src/libreader/parser.rs
+++ b/src/libreader/parser.rs
@@ -28,9 +28,7 @@ pub use lexer::Location;
///
/// Any test commands or ISA declarations are ignored.
pub fn parse_functions(text: &str) -> Result<Vec<Function>... | 1 | 1 | 3 |
524bf154283f34fcdeb39f2a23472113bd4e2fe5 | Jakob Stoklund Olesen | 2016-09-15T15:17:50 | Add a SubTest trait and filecheck utilities.
This trait serves as a shared interface for the different kinds of test
commands the 'cton-util test' understands.
Many tests produce output that is run through filecheck for validation.
Provide a simple run_filecheck() function to help with this.
Implement the 'test cat'... | diff --git a/cranelift/src/libcretonne/lib.rs b/cranelift/src/libcretonne/lib.rs
index 7b90a902c..de6cf109b 100644
--- a/cranelift/src/libcretonne/lib.rs
+++ b/cranelift/src/libcretonne/lib.rs
@@ -5,6 +5,8 @@
//
// ====------------------------------------------------------------------------------------==== //
+pub ... | 6 | 169 | 4 |
d221249e7f3c2d8dd3dba942da99f16ef334a33d | Jakob Stoklund Olesen | 2016-09-15T15:17:50 | Add a SubTest trait and filecheck utilities.
This trait serves as a shared interface for the different kinds of test
commands the 'cton-util test' understands.
Many tests produce output that is run through filecheck for validation.
Provide a simple run_filecheck() function to help with this.
Implement the 'test cat'... | diff --git a/src/libcretonne/lib.rs b/src/libcretonne/lib.rs
index 7b90a902c..de6cf109b 100644
--- a/src/libcretonne/lib.rs
+++ b/src/libcretonne/lib.rs
@@ -5,6 +5,8 @@
//
// ====------------------------------------------------------------------------------------==== //
+pub use verifier::verify_function;
+
pub co... | 6 | 169 | 4 |
b40a3495fefac98d1b305fb59dd85607fc24e6f7 | Jakob Stoklund Olesen | 2016-09-15T20:56:42 | Use fmt::Write instead of io::Write in write.rs.
It is common to represent a function as a String, and previously that
required re-validating the UTF-8 in a Vec<u8>. The fmt::Write trait
writes UTF-8 directly into a String, so no extra checking is required.
This also means we can implement Display for Function which ... | diff --git a/cranelift/src/libcretonne/ir/function.rs b/cranelift/src/libcretonne/ir/function.rs
index d6a44edfa..415e8de9c 100644
--- a/cranelift/src/libcretonne/ir/function.rs
+++ b/cranelift/src/libcretonne/ir/function.rs
@@ -6,7 +6,8 @@
use ir::{FunctionName, Signature, StackSlot, StackSlotData, JumpTable, JumpTab... | 4 | 20 | 29 |
d16b57d54056d92fa423778c6b4f8b6f887d3e7a | Jakob Stoklund Olesen | 2016-09-15T20:56:42 | Use fmt::Write instead of io::Write in write.rs.
It is common to represent a function as a String, and previously that
required re-validating the UTF-8 in a Vec<u8>. The fmt::Write trait
writes UTF-8 directly into a String, so no extra checking is required.
This also means we can implement Display for Function which ... | diff --git a/src/libcretonne/ir/function.rs b/src/libcretonne/ir/function.rs
index d6a44edfa..415e8de9c 100644
--- a/src/libcretonne/ir/function.rs
+++ b/src/libcretonne/ir/function.rs
@@ -6,7 +6,8 @@
use ir::{FunctionName, Signature, StackSlot, StackSlotData, JumpTable, JumpTableData,
DataFlowGraph, Layout}... | 4 | 20 | 29 |
0b8bf530b075085768d0161e35facc9dd6f1817b | Jakob Stoklund Olesen | 2016-09-15T15:41:19 | Make functions cloneable for testing.
It's not super fast to clone a function, but it is faster than
re-parsing the test case file it came from.
Some tests want to mutate the function, and there may be other tests in
the same script that need the original function. | diff --git a/cranelift/src/libcretonne/entity_map.rs b/cranelift/src/libcretonne/entity_map.rs
index df486c48e..2a76e3cce 100644
--- a/cranelift/src/libcretonne/entity_map.rs
+++ b/cranelift/src/libcretonne/entity_map.rs
@@ -45,7 +45,7 @@ pub trait EntityRef: Copy + Eq {
}
/// A mapping `K -> V` for densely indexed... | 7 | 17 | 8 |
6ffca9ec99399d204486a2ae03abb4cc40a6a1ca | Jakob Stoklund Olesen | 2016-09-15T15:41:19 | Make functions cloneable for testing.
It's not super fast to clone a function, but it is faster than
re-parsing the test case file it came from.
Some tests want to mutate the function, and there may be other tests in
the same script that need the original function. | diff --git a/src/libcretonne/entity_map.rs b/src/libcretonne/entity_map.rs
index df486c48e..2a76e3cce 100644
--- a/src/libcretonne/entity_map.rs
+++ b/src/libcretonne/entity_map.rs
@@ -45,7 +45,7 @@ pub trait EntityRef: Copy + Eq {
}
/// A mapping `K -> V` for densely indexed entity references.
-#[derive(Debug)]
+#... | 7 | 17 | 8 |
7e98985ea626ac3a782f6ba76e409fa64443ad0c | Jakob Stoklund Olesen | 2016-09-15T15:32:03 | Break DetailedFunction into a tuple.
Use (Function, Details) in place of the aggregrate DetailedFunction.
It turns out that some tests want to clone and manipulate the function
while the details never change. | diff --git a/cranelift/src/libreader/lib.rs b/cranelift/src/libreader/lib.rs
index d435b4ac3..94436e12f 100644
--- a/cranelift/src/libreader/lib.rs
+++ b/cranelift/src/libreader/lib.rs
@@ -7,7 +7,7 @@ extern crate cretonne;
pub use parser::{Result, parse_functions, parse_test};
pub use testcommand::{TestCommand, Te... | 3 | 52 | 56 |
2901a85a36b82714648398deb1a7befdb481b26f | Jakob Stoklund Olesen | 2016-09-15T15:32:03 | Break DetailedFunction into a tuple.
Use (Function, Details) in place of the aggregrate DetailedFunction.
It turns out that some tests want to clone and manipulate the function
while the details never change. | diff --git a/src/libreader/lib.rs b/src/libreader/lib.rs
index d435b4ac3..94436e12f 100644
--- a/src/libreader/lib.rs
+++ b/src/libreader/lib.rs
@@ -7,7 +7,7 @@ extern crate cretonne;
pub use parser::{Result, parse_functions, parse_test};
pub use testcommand::{TestCommand, TestOption};
-pub use testfile::TestFile;
... | 3 | 52 | 56 |
03170927ddda3a0bc4243b8a1073cd3950724e02 | Jakob Stoklund Olesen | 2016-09-14T22:15:02 | Add a job queue and begin loading test files.
This code looks overly complicated because it is anticipating running
jobs in a thread pool.
The test files are loaded and parsed, but not actually executed yet.
Errors are reported back to the test runner. | diff --git a/cranelift/src/tools/filetest/runner.rs b/cranelift/src/tools/filetest/runner.rs
index 7f39ec649..e7e33b735 100644
--- a/cranelift/src/tools/filetest/runner.rs
+++ b/cranelift/src/tools/filetest/runner.rs
@@ -4,16 +4,36 @@
//! scanning directories for tests.
use std::ffi::OsStr;
-use std::path::PathBuf;... | 1 | 113 | 5 |
a24ca56c0d67fed324315f7213fbc6cfc8df6f1f | Jakob Stoklund Olesen | 2016-09-14T22:15:02 | Add a job queue and begin loading test files.
This code looks overly complicated because it is anticipating running
jobs in a thread pool.
The test files are loaded and parsed, but not actually executed yet.
Errors are reported back to the test runner. | diff --git a/src/tools/filetest/runner.rs b/src/tools/filetest/runner.rs
index 7f39ec649..e7e33b735 100644
--- a/src/tools/filetest/runner.rs
+++ b/src/tools/filetest/runner.rs
@@ -4,16 +4,36 @@
//! scanning directories for tests.
use std::ffi::OsStr;
-use std::path::PathBuf;
+use std::path::{Path, PathBuf};
use s... | 1 | 113 | 5 |
99c04383c8e1ffd339ad007dad98a1e6b7ec18f4 | Jakob Stoklund Olesen | 2016-09-14T20:14:43 | Add a utility read_to_string() function. | diff --git a/cranelift/src/tools/cat.rs b/cranelift/src/tools/cat.rs
index a41b5b5f2..566997c40 100644
--- a/cranelift/src/tools/cat.rs
+++ b/cranelift/src/tools/cat.rs
@@ -3,11 +3,9 @@
//! Read a sequence of Cretonne IL files and print them again to stdout. This has the effect of
//! normalizing formatting and remov... | 5 | 22 | 20 |
480054a094d0b71fb0984e7c87f97d39c55d46e7 | Jakob Stoklund Olesen | 2016-09-14T20:14:43 | Add a utility read_to_string() function. | diff --git a/src/tools/cat.rs b/src/tools/cat.rs
index a41b5b5f2..566997c40 100644
--- a/src/tools/cat.rs
+++ b/src/tools/cat.rs
@@ -3,11 +3,9 @@
//! Read a sequence of Cretonne IL files and print them again to stdout. This has the effect of
//! normalizing formatting and removing comments.
-use std::fs::File;
-use... | 5 | 22 | 20 |
ddadf2e7c1f71d0641f1179adc6e67bcd12687bc | Jakob Stoklund Olesen | 2016-09-14T19:20:41 | Add scaffolding for a 'cton-util test' command.
This command accepts files and directories containing test cases to run.
Recursively searches for test files in any directory it is passed.
Actually running tests is not yet implemented. | diff --git a/cranelift/src/tools/filetest/mod.rs b/cranelift/src/tools/filetest/mod.rs
new file mode 100644
index 000000000..078e287dd
--- /dev/null
+++ b/cranelift/src/tools/filetest/mod.rs
@@ -0,0 +1,33 @@
+//! File tests.
+//!
+//! This module contains the main driver for `cton-util test` as well as implementations ... | 3 | 151 | 2 |
4521afd4744a414a9e11dee92844e0620a9f7e00 | Jakob Stoklund Olesen | 2016-09-14T19:20:41 | Add scaffolding for a 'cton-util test' command.
This command accepts files and directories containing test cases to run.
Recursively searches for test files in any directory it is passed.
Actually running tests is not yet implemented. | diff --git a/src/tools/filetest/mod.rs b/src/tools/filetest/mod.rs
new file mode 100644
index 000000000..078e287dd
--- /dev/null
+++ b/src/tools/filetest/mod.rs
@@ -0,0 +1,33 @@
+//! File tests.
+//!
+//! This module contains the main driver for `cton-util test` as well as implementations of the
+//! available test com... | 3 | 151 | 2 |
538b773e6d3fef40fc9fc6a6b1cac10537b18b23 | Jakob Stoklund Olesen | 2016-09-14T16:10:32 | Parse test commands in a .cton file.
The top-level parse_test() function now parses test commands in the
preamble of a .cton file. | diff --git a/cranelift/src/libreader/parser.rs b/cranelift/src/libreader/parser.rs
index 5e18af59b..7f8cc543a 100644
--- a/cranelift/src/libreader/parser.rs
+++ b/cranelift/src/libreader/parser.rs
@@ -20,6 +20,7 @@ use cretonne::ir::entities::{AnyEntity, NO_EBB, NO_INST, NO_VALUE};
use cretonne::ir::instructions::{Ins... | 1 | 37 | 2 |
a544c0e1719a3529d76558e50286780f8daf1f6e | Jakob Stoklund Olesen | 2016-09-14T16:10:32 | Parse test commands in a .cton file.
The top-level parse_test() function now parses test commands in the
preamble of a .cton file. | diff --git a/src/libreader/parser.rs b/src/libreader/parser.rs
index 5e18af59b..7f8cc543a 100644
--- a/src/libreader/parser.rs
+++ b/src/libreader/parser.rs
@@ -20,6 +20,7 @@ use cretonne::ir::entities::{AnyEntity, NO_EBB, NO_INST, NO_VALUE};
use cretonne::ir::instructions::{InstructionFormat, InstructionData, Variabl... | 1 | 37 | 2 |
21ad1d1e2d99c4107594c8d56114d82a18305207 | Jakob Stoklund Olesen | 2016-09-13T23:50:10 | Add a public rest_of_line() function to lexer.
This is used to grap the tail of a 'test' line which doesn't use the
same tokens as a normal .cton file. | diff --git a/cranelift/src/libreader/lexer.rs b/cranelift/src/libreader/lexer.rs
index 150c38da1..6b5e881a1 100644
--- a/cranelift/src/libreader/lexer.rs
+++ b/cranelift/src/libreader/lexer.rs
@@ -166,21 +166,25 @@ impl<'a> Lexer<'a> {
token(tok, loc)
}
- // Scan a comment extending to the end of the... | 1 | 11 | 7 |
55a89c21675141caacbce2e0e1a23ef43e7cebcf | Jakob Stoklund Olesen | 2016-09-13T23:50:10 | Add a public rest_of_line() function to lexer.
This is used to grap the tail of a 'test' line which doesn't use the
same tokens as a normal .cton file. | diff --git a/src/libreader/lexer.rs b/src/libreader/lexer.rs
index 150c38da1..6b5e881a1 100644
--- a/src/libreader/lexer.rs
+++ b/src/libreader/lexer.rs
@@ -166,21 +166,25 @@ impl<'a> Lexer<'a> {
token(tok, loc)
}
- // Scan a comment extending to the end of the current line.
- fn scan_comment(&mut... | 1 | 11 | 7 |
4e3f0fc41d6fbbfd18409c31a7a2dfe601b0beb7 | Jakob Stoklund Olesen | 2016-09-13T23:15:42 | Collect comments while parsing functions.
The result from parsing a function is now a DetailedFunction which
includes all comments that can be associated with an entity.
Comments before the first function are ignored, everything else is
associated with the preceeding entity.
The parse_functions() function still retu... | diff --git a/cranelift/src/libreader/parser.rs b/cranelift/src/libreader/parser.rs
index e9d77c67d..5e18af59b 100644
--- a/cranelift/src/libreader/parser.rs
+++ b/cranelift/src/libreader/parser.rs
@@ -10,15 +10,16 @@ use std::result;
use std::fmt::{self, Display, Formatter};
use std::str::FromStr;
use std::u32;
+use... | 1 | 109 | 10 |
dedc44be698eae574627e7e45dd367f159ada000 | Jakob Stoklund Olesen | 2016-09-13T23:15:42 | Collect comments while parsing functions.
The result from parsing a function is now a DetailedFunction which
includes all comments that can be associated with an entity.
Comments before the first function are ignored, everything else is
associated with the preceeding entity.
The parse_functions() function still retu... | diff --git a/src/libreader/parser.rs b/src/libreader/parser.rs
index e9d77c67d..5e18af59b 100644
--- a/src/libreader/parser.rs
+++ b/src/libreader/parser.rs
@@ -10,15 +10,16 @@ use std::result;
use std::fmt::{self, Display, Formatter};
use std::str::FromStr;
use std::u32;
+use std::mem;
use lexer::{self, Lexer, Tok... | 1 | 109 | 10 |
458ecebe8f591457fd6c91b7b66ca79bd20376bf | Jakob Stoklund Olesen | 2016-09-13T23:14:46 | Add a next_key() method to primary entity maps.
It is sometimes useful to know the entity reference number that will be
assigned to the next thing added to a map. | diff --git a/cranelift/src/libcretonne/entity_map.rs b/cranelift/src/libcretonne/entity_map.rs
index 91ff7505a..df486c48e 100644
--- a/cranelift/src/libcretonne/entity_map.rs
+++ b/cranelift/src/libcretonne/entity_map.rs
@@ -94,9 +94,14 @@ impl<K, V> EntityMap<K, V>
where K: EntityRef,
V: PrimaryEntityD... | 1 | 6 | 1 |
525c69bbe81edb352c9e87c4581c537dcb0ad91c | Jakob Stoklund Olesen | 2016-09-13T23:14:46 | Add a next_key() method to primary entity maps.
It is sometimes useful to know the entity reference number that will be
assigned to the next thing added to a map. | diff --git a/src/libcretonne/entity_map.rs b/src/libcretonne/entity_map.rs
index 91ff7505a..df486c48e 100644
--- a/src/libcretonne/entity_map.rs
+++ b/src/libcretonne/entity_map.rs
@@ -94,9 +94,14 @@ impl<K, V> EntityMap<K, V>
where K: EntityRef,
V: PrimaryEntityData
{
+ /// Get the key that will be... | 1 | 6 | 1 |
1b6623f068ec5bdb74df40fb65b92b88423e4a1e | Jakob Stoklund Olesen | 2016-09-13T19:18:36 | Add a representation of a parsed test case file.
The new exported function `parse_test()` will produce it eventually. | diff --git a/cranelift/src/libreader/lib.rs b/cranelift/src/libreader/lib.rs
index 519fee7ee..d435b4ac3 100644
--- a/cranelift/src/libreader/lib.rs
+++ b/cranelift/src/libreader/lib.rs
@@ -5,9 +5,11 @@
extern crate cretonne;
-pub use parser::{Result, parse_functions};
+pub use parser::{Result, parse_functions, par... | 3 | 52 | 1 |
4fd15f98eda4771bdcfbd5a406c9b1cd23daee02 | Jakob Stoklund Olesen | 2016-09-13T19:18:36 | Add a representation of a parsed test case file.
The new exported function `parse_test()` will produce it eventually. | diff --git a/src/libreader/lib.rs b/src/libreader/lib.rs
index 519fee7ee..d435b4ac3 100644
--- a/src/libreader/lib.rs
+++ b/src/libreader/lib.rs
@@ -5,9 +5,11 @@
extern crate cretonne;
-pub use parser::{Result, parse_functions};
+pub use parser::{Result, parse_functions, parse_test};
pub use testcommand::{TestCom... | 3 | 52 | 1 |
fcec517fc5cfa0d3e90f32f021be0ed83e11bfb9 | Jakob Stoklund Olesen | 2016-09-13T18:01:21 | Simplify the interface to cretonne-reader.
Export a single function: parse_functions() which results a vector of
functions parsed from the source string.
Hide the parser and lexer modules. They are not useful to external
clients. | diff --git a/cranelift/src/libreader/lib.rs b/cranelift/src/libreader/lib.rs
index 4c53c79fa..519fee7ee 100644
--- a/cranelift/src/libreader/lib.rs
+++ b/cranelift/src/libreader/lib.rs
@@ -5,8 +5,9 @@
extern crate cretonne;
+pub use parser::{Result, parse_functions};
pub use testcommand::{TestCommand, TestOption}... | 7 | 20 | 17 |
169a2f75426e854338b596aa441e8562fde339bf | Jakob Stoklund Olesen | 2016-09-13T18:01:21 | Simplify the interface to cretonne-reader.
Export a single function: parse_functions() which results a vector of
functions parsed from the source string.
Hide the parser and lexer modules. They are not useful to external
clients. | diff --git a/src/libreader/lib.rs b/src/libreader/lib.rs
index 4c53c79fa..519fee7ee 100644
--- a/src/libreader/lib.rs
+++ b/src/libreader/lib.rs
@@ -5,8 +5,9 @@
extern crate cretonne;
+pub use parser::{Result, parse_functions};
pub use testcommand::{TestCommand, TestOption};
-pub mod lexer;
-pub mod parser;
+mo... | 7 | 20 | 17 |
c80934d0846ae87031e4ac9b0279b1dc03ed7727 | Jakob Stoklund Olesen | 2016-09-13T17:51:15 | Add a data structure representing a parsed test command.
It's not used for anything yet. | diff --git a/cranelift/src/libreader/lib.rs b/cranelift/src/libreader/lib.rs
index 2d63e6826..4c53c79fa 100644
--- a/cranelift/src/libreader/lib.rs
+++ b/cranelift/src/libreader/lib.rs
@@ -1,16 +1,12 @@
-
-// ====------------------------------------------------------------------------------------==== //
-//
-// Cretonn... | 2 | 95 | 11 |
d0fb647357c5500a32fd60bd907b20cecc61a649 | Jakob Stoklund Olesen | 2016-09-13T17:51:15 | Add a data structure representing a parsed test command.
It's not used for anything yet. | diff --git a/src/libreader/lib.rs b/src/libreader/lib.rs
index 2d63e6826..4c53c79fa 100644
--- a/src/libreader/lib.rs
+++ b/src/libreader/lib.rs
@@ -1,16 +1,12 @@
-
-// ====------------------------------------------------------------------------------------==== //
-//
-// Cretonne file reader library.
-//
-// ====-----... | 2 | 95 | 11 |
b14be8b14bd341c4d0f3785193652c52c9dfa99d | Jakob Stoklund Olesen | 2016-09-12T21:14:41 | Add an AnyEntity enum type.
This type can reference any type of entity in a function. It will be
used for the location of verifier error messages and other annotations. | diff --git a/cranelift/src/libcretonne/ir/entities.rs b/cranelift/src/libcretonne/ir/entities.rs
index 1a887452a..5672e5b3d 100644
--- a/cranelift/src/libcretonne/ir/entities.rs
+++ b/cranelift/src/libcretonne/ir/entities.rs
@@ -245,6 +245,61 @@ impl Default for JumpTable {
}
}
+/// A reference to any of the en... | 1 | 55 | 0 |
eeb8f5e4e41b8efc05e0dc2181a044756efbbd0a | Jakob Stoklund Olesen | 2016-09-12T21:14:41 | Add an AnyEntity enum type.
This type can reference any type of entity in a function. It will be
used for the location of verifier error messages and other annotations. | diff --git a/src/libcretonne/ir/entities.rs b/src/libcretonne/ir/entities.rs
index 1a887452a..5672e5b3d 100644
--- a/src/libcretonne/ir/entities.rs
+++ b/src/libcretonne/ir/entities.rs
@@ -245,6 +245,61 @@ impl Default for JumpTable {
}
}
+/// A reference to any of the entities defined in this module.
+#[derive... | 1 | 55 | 0 |
1c5547970a09791756169d006c40a38496912ee1 | Jakob Stoklund Olesen | 2016-09-10T19:33:58 | Idiomatic impl of unordered_begin. | diff --git a/cranelift/src/libfilecheck/checker.rs b/cranelift/src/libfilecheck/checker.rs
index eba5da78a..6bb458b55 100644
--- a/cranelift/src/libfilecheck/checker.rs
+++ b/cranelift/src/libfilecheck/checker.rs
@@ -302,13 +302,11 @@ impl<'a> State<'a> {
// Get the beginning of the range in text to be matched by ... | 1 | 5 | 7 |
0eea144fefad18690c86712d931af3ec8ca54499 | Jakob Stoklund Olesen | 2016-09-10T19:33:58 | Idiomatic impl of unordered_begin. | diff --git a/src/libfilecheck/checker.rs b/src/libfilecheck/checker.rs
index eba5da78a..6bb458b55 100644
--- a/src/libfilecheck/checker.rs
+++ b/src/libfilecheck/checker.rs
@@ -302,13 +302,11 @@ impl<'a> State<'a> {
// Get the beginning of the range in text to be matched by a `unordered:` or `not:` directive.
... | 1 | 5 | 7 |
d9cceb18d33380057b4abf6bb865d93c3d3fdda3 | Jakob Stoklund Olesen | 2016-09-09T21:11:56 | Add a MatchRange type alias.
The regex library also uses (usize, usize) for ranges. The type alias is just
to make it clearer what the tuple means. | diff --git a/cranelift/src/libfilecheck/checker.rs b/cranelift/src/libfilecheck/checker.rs
index 8abcbfdd3..ea23f9e0d 100644
--- a/cranelift/src/libfilecheck/checker.rs
+++ b/cranelift/src/libfilecheck/checker.rs
@@ -5,6 +5,7 @@ use regex::{Regex, Captures};
use std::collections::HashMap;
use std::cmp::max;
use std:... | 2 | 9 | 8 |
7317775052c612e74c87d074af0f02651e275bc0 | Jakob Stoklund Olesen | 2016-09-09T21:11:56 | Add a MatchRange type alias.
The regex library also uses (usize, usize) for ranges. The type alias is just
to make it clearer what the tuple means. | diff --git a/src/libfilecheck/checker.rs b/src/libfilecheck/checker.rs
index 8abcbfdd3..ea23f9e0d 100644
--- a/src/libfilecheck/checker.rs
+++ b/src/libfilecheck/checker.rs
@@ -5,6 +5,7 @@ use regex::{Regex, Captures};
use std::collections::HashMap;
use std::cmp::max;
use std::fmt::{self, Display, Formatter};
+use M... | 2 | 9 | 8 |
cdac6d1c8e1ca54f344f9eb91e7d5ab70bcf2621 | Jakob Stoklund Olesen | 2016-08-30T21:54:18 | Add encoding tests for RV32.
The 32-bit CPU mode uses a different encoding for iadd_imm.i32, and 64-bit
instructions are not supported. | diff --git a/cranelift/src/libcretonne/isa/riscv/mod.rs b/cranelift/src/libcretonne/isa/riscv/mod.rs
index 8abb53467..ef87ade3f 100644
--- a/cranelift/src/libcretonne/isa/riscv/mod.rs
+++ b/cranelift/src/libcretonne/isa/riscv/mod.rs
@@ -114,4 +114,51 @@ mod tests {
// ADDIW is I/0b00110
assert_eq!(enc... | 1 | 47 | 0 |
74e731ed25487482371b1c2a2f904d41b112e1ce | Jakob Stoklund Olesen | 2016-08-30T21:54:18 | Add encoding tests for RV32.
The 32-bit CPU mode uses a different encoding for iadd_imm.i32, and 64-bit
instructions are not supported. | diff --git a/src/libcretonne/isa/riscv/mod.rs b/src/libcretonne/isa/riscv/mod.rs
index 8abb53467..ef87ade3f 100644
--- a/src/libcretonne/isa/riscv/mod.rs
+++ b/src/libcretonne/isa/riscv/mod.rs
@@ -114,4 +114,51 @@ mod tests {
// ADDIW is I/0b00110
assert_eq!(encstr(&*isa, isa.encode(&dfg, &inst32).unw... | 1 | 47 | 0 |
dddcc0b2caae9bdd805e98c002059114d3488a2a | Jakob Stoklund Olesen | 2016-08-30T17:44:33 | Add an encoding test for RISC-V.
Test that the generated encoding tables work as expected.
Change isa::Encoding into a struct with named fields so the recipe and bits can
be accessed. | diff --git a/cranelift/src/libcretonne/isa/mod.rs b/cranelift/src/libcretonne/isa/mod.rs
index 18723a16a..6eaae9fc6 100644
--- a/cranelift/src/libcretonne/isa/mod.rs
+++ b/cranelift/src/libcretonne/isa/mod.rs
@@ -107,11 +107,28 @@ pub trait TargetIsa {
/// encoding *bits*. The recipe determines the native instruction ... | 2 | 77 | 2 |
727510f97f63e778ba772454259e45cf86c18a4d | Jakob Stoklund Olesen | 2016-08-30T17:44:33 | Add an encoding test for RISC-V.
Test that the generated encoding tables work as expected.
Change isa::Encoding into a struct with named fields so the recipe and bits can
be accessed. | diff --git a/src/libcretonne/isa/mod.rs b/src/libcretonne/isa/mod.rs
index 18723a16a..6eaae9fc6 100644
--- a/src/libcretonne/isa/mod.rs
+++ b/src/libcretonne/isa/mod.rs
@@ -107,11 +107,28 @@ pub trait TargetIsa {
/// encoding *bits*. The recipe determines the native instruction format and the mapping of
/// operands ... | 2 | 77 | 2 |
d67bba1e85fbfceabdf233d56b35ba69d47191ba | Jakob Stoklund Olesen | 2016-08-29T23:31:16 | Split the Encoding data type into two u16 values.
This hardcodes the division line between the recipe bits and the
encoding bits. It does not seem that any ISA will need more than 16 bits for
either. | diff --git a/cranelift/src/libcretonne/isa/mod.rs b/cranelift/src/libcretonne/isa/mod.rs
index a84efdbc5..fb2a4dadf 100644
--- a/cranelift/src/libcretonne/isa/mod.rs
+++ b/cranelift/src/libcretonne/isa/mod.rs
@@ -100,18 +100,11 @@ pub trait TargetIsa {
/// encoding *bits*. The recipe determines the native instruction ... | 1 | 4 | 11 |
cdbea59269f384415635ed01b7dd6f7c929e9f54 | Jakob Stoklund Olesen | 2016-08-29T23:31:16 | Split the Encoding data type into two u16 values.
This hardcodes the division line between the recipe bits and the
encoding bits. It does not seem that any ISA will need more than 16 bits for
either. | diff --git a/src/libcretonne/isa/mod.rs b/src/libcretonne/isa/mod.rs
index a84efdbc5..fb2a4dadf 100644
--- a/src/libcretonne/isa/mod.rs
+++ b/src/libcretonne/isa/mod.rs
@@ -100,18 +100,11 @@ pub trait TargetIsa {
/// encoding *bits*. The recipe determines the native instruction format and the mapping of
/// operands ... | 1 | 4 | 11 |
26cd358bd46cf57eee6e74f7aa8b39aac08c7708 | Morgan Phillips | 2016-08-29T20:17:08 | Rustfmt fixes | diff --git a/cranelift/src/libcretonne/dominator_tree.rs b/cranelift/src/libcretonne/dominator_tree.rs
index a3a00b2cc..1b99db342 100644
--- a/cranelift/src/libcretonne/dominator_tree.rs
+++ b/cranelift/src/libcretonne/dominator_tree.rs
@@ -108,7 +108,11 @@ impl DominatorTree {
// TODO: we can't rely on instru... | 5 | 22 | 5 |
894d3796fb0e103fbcebea0442fc01e6dffc440d | Morgan Phillips | 2016-08-29T20:17:08 | Rustfmt fixes | diff --git a/src/libcretonne/dominator_tree.rs b/src/libcretonne/dominator_tree.rs
index a3a00b2cc..1b99db342 100644
--- a/src/libcretonne/dominator_tree.rs
+++ b/src/libcretonne/dominator_tree.rs
@@ -108,7 +108,11 @@ impl DominatorTree {
// TODO: we can't rely on instruction numbers to always be ordered
... | 5 | 22 | 5 |
1a92876989f382ee545612b2c07de97b37fad525 | Jakob Stoklund Olesen | 2016-08-24T22:15:37 | Add module with commonly used immediate predicates. | diff --git a/cranelift/src/libcretonne/lib.rs b/cranelift/src/libcretonne/lib.rs
index 7bdda395a..fcddbdb90 100644
--- a/cranelift/src/libcretonne/lib.rs
+++ b/cranelift/src/libcretonne/lib.rs
@@ -16,6 +16,7 @@ pub mod entity_map;
pub mod settings;
mod constant_hash;
+mod predicates;
#[cfg(test)]
pub mod test_u... | 2 | 67 | 0 |
e812041738800c5ea256c5a033329528acdb83ad | Jakob Stoklund Olesen | 2016-08-24T22:15:37 | Add module with commonly used immediate predicates. | diff --git a/src/libcretonne/lib.rs b/src/libcretonne/lib.rs
index 7bdda395a..fcddbdb90 100644
--- a/src/libcretonne/lib.rs
+++ b/src/libcretonne/lib.rs
@@ -16,6 +16,7 @@ pub mod entity_map;
pub mod settings;
mod constant_hash;
+mod predicates;
#[cfg(test)]
pub mod test_utils;
diff --git a/src/libcretonne/predi... | 2 | 67 | 0 |
055c7a03742b87613167da33a751cae2147a7559 | Jakob Stoklund Olesen | 2016-08-24T21:37:32 | Clarify that Imm64 holds sign-extended values.
When representing smaller integer types, immediate values should be
sign-extended to i64. | diff --git a/cranelift/src/libcretonne/ir/immediates.rs b/cranelift/src/libcretonne/ir/immediates.rs
index 077ea4205..99276bfd6 100644
--- a/cranelift/src/libcretonne/ir/immediates.rs
+++ b/cranelift/src/libcretonne/ir/immediates.rs
@@ -11,16 +11,20 @@ use std::str::FromStr;
/// 64-bit immediate integer operand.
//... | 2 | 14 | 7 |
cdd5872a1b93b575503faabc63aacaa83a2caac1 | Jakob Stoklund Olesen | 2016-08-24T21:37:32 | Clarify that Imm64 holds sign-extended values.
When representing smaller integer types, immediate values should be
sign-extended to i64. | diff --git a/src/libcretonne/ir/immediates.rs b/src/libcretonne/ir/immediates.rs
index 077ea4205..99276bfd6 100644
--- a/src/libcretonne/ir/immediates.rs
+++ b/src/libcretonne/ir/immediates.rs
@@ -11,16 +11,20 @@ use std::str::FromStr;
/// 64-bit immediate integer operand.
///
+/// An `Imm64` operand can also be us... | 2 | 14 | 7 |
bdefbdeccc10f9066defb761eb5ebafb6e5e2a5b | Morgan Phillips | 2016-08-23T20:37:04 | rustfmt changes | diff --git a/cranelift/src/libcretonne/dominator_tree.rs b/cranelift/src/libcretonne/dominator_tree.rs
index 1b99db342..a3a00b2cc 100644
--- a/cranelift/src/libcretonne/dominator_tree.rs
+++ b/cranelift/src/libcretonne/dominator_tree.rs
@@ -108,11 +108,7 @@ impl DominatorTree {
// TODO: we can't rely on instru... | 1 | 1 | 5 |
102c0049e0011d6472f1a26600f474789b923c1d | Morgan Phillips | 2016-08-23T20:37:04 | rustfmt changes | diff --git a/src/libcretonne/dominator_tree.rs b/src/libcretonne/dominator_tree.rs
index 1b99db342..a3a00b2cc 100644
--- a/src/libcretonne/dominator_tree.rs
+++ b/src/libcretonne/dominator_tree.rs
@@ -108,11 +108,7 @@ impl DominatorTree {
// TODO: we can't rely on instruction numbers to always be ordered
... | 1 | 1 | 5 |
d8c587a1bf9436729d69bf534de316afb2e3ac60 | Morgan Phillips | 2016-08-23T20:33:51 | Synchronize regex versions | diff --git a/cranelift/src/tools/Cargo.toml b/cranelift/src/tools/Cargo.toml
index b5ee71822..79e9d2685 100644
--- a/cranelift/src/tools/Cargo.toml
+++ b/cranelift/src/tools/Cargo.toml
@@ -14,4 +14,4 @@ cretonne = { path = "../libcretonne" }
cretonne-reader = { path = "../libreader" }
docopt = "0.6.80"
rustc-seriali... | 1 | 1 | 1 |
67fdd27d04743ffdd074c6db652e848562feade9 | Morgan Phillips | 2016-08-23T20:33:51 | Synchronize regex versions | diff --git a/src/tools/Cargo.toml b/src/tools/Cargo.toml
index b5ee71822..79e9d2685 100644
--- a/src/tools/Cargo.toml
+++ b/src/tools/Cargo.toml
@@ -14,4 +14,4 @@ cretonne = { path = "../libcretonne" }
cretonne-reader = { path = "../libreader" }
docopt = "0.6.80"
rustc-serialize = "0.3.19"
-regex = "0.1.73"
+regex =... | 1 | 1 | 1 |
a9e302e8613df6c689b40a33b0a6d8cec8de4a44 | Morgan Phillips | 2016-08-23T20:30:38 | Modify the dominator tree's intersect method to interact with Basic Blocks
Corresponding changes to test cases are also included. | diff --git a/cranelift/src/libcretonne/dominator_tree.rs b/cranelift/src/libcretonne/dominator_tree.rs
index 7c32a8e7f..1b99db342 100644
--- a/cranelift/src/libcretonne/dominator_tree.rs
+++ b/cranelift/src/libcretonne/dominator_tree.rs
@@ -10,6 +10,11 @@ pub struct DominatorTree {
}
impl DominatorTree {
+ /// I... | 3 | 99 | 82 |
9165eef82301792c245aa7b7aebb54591672d019 | Morgan Phillips | 2016-08-23T20:30:38 | Modify the dominator tree's intersect method to interact with Basic Blocks
Corresponding changes to test cases are also included. | diff --git a/src/libcretonne/dominator_tree.rs b/src/libcretonne/dominator_tree.rs
index 7c32a8e7f..1b99db342 100644
--- a/src/libcretonne/dominator_tree.rs
+++ b/src/libcretonne/dominator_tree.rs
@@ -10,6 +10,11 @@ pub struct DominatorTree {
}
impl DominatorTree {
+ /// Insert data directly into a dominator tre... | 3 | 99 | 82 |
96b648056d88072eb436ecf60b9f200a149e2fbb | Jakob Stoklund Olesen | 2016-08-23T18:01:08 | Upgrade to rustfmt 0.6.0 | diff --git a/cranelift/src/libcretonne/ir/entities.rs b/cranelift/src/libcretonne/ir/entities.rs
index 33b41e527..1a887452a 100644
--- a/cranelift/src/libcretonne/ir/entities.rs
+++ b/cranelift/src/libcretonne/ir/entities.rs
@@ -42,11 +42,7 @@ impl EntityRef for Ebb {
impl Ebb {
/// Create a new EBB reference fro... | 5 | 6 | 18 |
ddd205ff78e5a0eb9e656de63eb23a40532233c6 | Jakob Stoklund Olesen | 2016-08-23T18:01:08 | Upgrade to rustfmt 0.6.0 | diff --git a/src/libcretonne/ir/entities.rs b/src/libcretonne/ir/entities.rs
index 33b41e527..1a887452a 100644
--- a/src/libcretonne/ir/entities.rs
+++ b/src/libcretonne/ir/entities.rs
@@ -42,11 +42,7 @@ impl EntityRef for Ebb {
impl Ebb {
/// Create a new EBB reference from its number. This corresponds to the eb... | 5 | 6 | 18 |
9b8d2a04fbcb8827c95a70ffe4e0691af9af96ef | Morgan Phillips | 2016-08-18T21:37:32 | Add basic block information to the dominator tree.
To be complete the dominator tree must represent idoms as Ebb, Inst pairs, i.e.
bais blocks. | diff --git a/cranelift/src/libcretonne/dominator_tree.rs b/cranelift/src/libcretonne/dominator_tree.rs
index 5909f6874..7c32a8e7f 100644
--- a/cranelift/src/libcretonne/dominator_tree.rs
+++ b/cranelift/src/libcretonne/dominator_tree.rs
@@ -2,10 +2,11 @@
use cfg::*;
use ir::Ebb;
+use ir::entities::NO_INST;
use ent... | 2 | 79 | 22 |
8683541ed3e8a71a908b2d3beddf19ce31e2f39e | Morgan Phillips | 2016-08-18T21:37:32 | Add basic block information to the dominator tree.
To be complete the dominator tree must represent idoms as Ebb, Inst pairs, i.e.
bais blocks. | diff --git a/src/libcretonne/dominator_tree.rs b/src/libcretonne/dominator_tree.rs
index 5909f6874..7c32a8e7f 100644
--- a/src/libcretonne/dominator_tree.rs
+++ b/src/libcretonne/dominator_tree.rs
@@ -2,10 +2,11 @@
use cfg::*;
use ir::Ebb;
+use ir::entities::NO_INST;
use entity_map::{EntityMap, Keys};
pub struc... | 2 | 79 | 22 |
f9850b1405f6cc86b9d46d50f531c052ffcea017 | Jakob Stoklund Olesen | 2016-08-18T20:23:46 | Use shared quadratic probing for settings. | diff --git a/cranelift/src/libcretonne/settings.rs b/cranelift/src/libcretonne/settings.rs
index 72e8f06a5..b3cf49495 100644
--- a/cranelift/src/libcretonne/settings.rs
+++ b/cranelift/src/libcretonne/settings.rs
@@ -23,7 +23,7 @@
use std::fmt;
use std::result;
-use constant_hash::simple_hash;
+use constant_hash::{... | 1 | 23 | 21 |
55f1e69e3e5a82089985688426d651d5cc0d94d6 | Jakob Stoklund Olesen | 2016-08-18T20:23:46 | Use shared quadratic probing for settings. | diff --git a/src/libcretonne/settings.rs b/src/libcretonne/settings.rs
index 72e8f06a5..b3cf49495 100644
--- a/src/libcretonne/settings.rs
+++ b/src/libcretonne/settings.rs
@@ -23,7 +23,7 @@
use std::fmt;
use std::result;
-use constant_hash::simple_hash;
+use constant_hash::{probe, simple_hash};
/// A string-bas... | 1 | 23 | 21 |
722a3a6ae6918a900f54c9d65909f98f6dfb1590 | Jakob Stoklund Olesen | 2016-08-18T19:32:46 | Add a generic implementation of quadratic hash table probing.
We have multiple pre-computed constant hash tables that all use the same
quadratic probing algorithm.
Add a constant_hash Rust module to match the meta/constant_hash.py module.
Move the simple_hash() function into constant_hash. Its Python equivalent is i... | diff --git a/cranelift/src/libcretonne/constant_hash.rs b/cranelift/src/libcretonne/constant_hash.rs
new file mode 100644
index 000000000..fd8115c7f
--- /dev/null
+++ b/cranelift/src/libcretonne/constant_hash.rs
@@ -0,0 +1,74 @@
+//! Runtime support for precomputed constant hash tables.
+//!
+//! The `meta/constant_has... | 5 | 91 | 43 |
15d0108e4b9c17b34ae78745efefc5554822e546 | Jakob Stoklund Olesen | 2016-08-18T19:32:46 | Add a generic implementation of quadratic hash table probing.
We have multiple pre-computed constant hash tables that all use the same
quadratic probing algorithm.
Add a constant_hash Rust module to match the meta/constant_hash.py module.
Move the simple_hash() function into constant_hash. Its Python equivalent is i... | diff --git a/src/libcretonne/constant_hash.rs b/src/libcretonne/constant_hash.rs
new file mode 100644
index 000000000..fd8115c7f
--- /dev/null
+++ b/src/libcretonne/constant_hash.rs
@@ -0,0 +1,74 @@
+//! Runtime support for precomputed constant hash tables.
+//!
+//! The `meta/constant_hash.py` Python module can genera... | 5 | 91 | 43 |
f17ea61593d9a1b53f5e7861ac99d3d990af3fdd | Jakob Stoklund Olesen | 2016-08-12T23:41:48 | Move ir::Function into a sub-module.
Keep the top-level ir module free of implementation details that are
inadvertently exposed to sub-modules. | diff --git a/cranelift/src/libcretonne/ir/function.rs b/cranelift/src/libcretonne/ir/function.rs
new file mode 100644
index 000000000..2f8344d80
--- /dev/null
+++ b/cranelift/src/libcretonne/ir/function.rs
@@ -0,0 +1,64 @@
+//! Intermediate representation of a function.
+//!
+//! The `Function` struct defined in this m... | 2 | 66 | 58 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.