Rename 'cton_*' library names to match the 'cretonne_*' crate names.

This renames `cton_frontend` to `cretonne_frontend` and so on.

This fixes the first part of #287.
This commit is contained in:
Dan Gohman
2018-04-17 07:55:59 -07:00
parent f552c8768e
commit 7767186dd0
38 changed files with 42 additions and 62 deletions

View File

@@ -74,7 +74,7 @@ SSA values: In the entry block, ``v4`` is the initial value. In the loop block
variable during each iteration. Finally, ``v12`` is computed as the induction
variable value for the next iteration.
The `cton_frontend` crate contains utilities for translating from programs
The `cretonne_frontend` crate contains utilities for translating from programs
containing multiple assignments to the same variables into SSA form for
Cretonne :term:`IR`.

View File

@@ -4,7 +4,7 @@
//! normalizing formatting and removing comments.
use CommandResult;
use cton_reader::parse_functions;
use cretonne_reader::parse_functions;
use utils::read_to_string;
pub fn run(files: &[String]) -> CommandResult {

View File

@@ -4,7 +4,7 @@ use cretonne::Context;
use cretonne::print_errors::pretty_error;
use cretonne::settings::FlagsOrIsa;
use cretonne::{binemit, ir};
use cton_reader::parse_test;
use cretonne_reader::parse_test;
use std::path::Path;
use std::path::PathBuf;
use utils::{parse_sets_and_isa, read_to_string};

View File

@@ -1,7 +1,7 @@
extern crate cretonne;
extern crate cton_filetests;
extern crate cton_reader;
extern crate cton_wasm;
extern crate cretonne_filetests;
extern crate cretonne_reader;
extern crate cretonne_wasm;
extern crate docopt;
extern crate filecheck;
#[macro_use]
@@ -86,7 +86,7 @@ fn cton_util() -> CommandResult {
// Find the sub-command to execute.
let result = if args.cmd_test {
cton_filetests::run(args.flag_verbose, &args.arg_file).map(|_time| ())
cretonne_filetests::run(args.flag_verbose, &args.arg_file).map(|_time| ())
} else if args.cmd_cat {
cat::run(&args.arg_file)
} else if args.cmd_filecheck {

View File

@@ -5,7 +5,7 @@
use CommandResult;
use cretonne::cfg_printer::CFGPrinter;
use cton_reader::parse_functions;
use cretonne_reader::parse_functions;
use utils::read_to_string;
pub fn run(files: &[String]) -> CommandResult {

View File

@@ -3,7 +3,7 @@
use cretonne::isa;
use cretonne::isa::TargetIsa;
use cretonne::settings::{self, FlagsOrIsa};
use cton_reader::{parse_options, Location};
use cretonne_reader::{parse_options, Location};
use std::fs::File;
use std::io::{self, Read};
use std::path::Path;

View File

@@ -1,4 +1,5 @@
//! CLI tool to use the functions provided by the [cretonne-wasm](../cton_wasm/index.html) crate.
//! CLI tool to use the functions provided by the [cretonne-wasm](../cretonne_wasm/index.html)
//! crate.
//!
//! Reads Wasm binary files, translates the functions' code to Cretonne IR.
#![cfg_attr(feature = "cargo-clippy", allow(too_many_arguments, cyclomatic_complexity))]
@@ -6,7 +7,7 @@
use cretonne::Context;
use cretonne::print_errors::{pretty_error, pretty_verifier_error};
use cretonne::settings::FlagsOrIsa;
use cton_wasm::{translate_module, DummyEnvironment, ModuleEnvironment};
use cretonne_wasm::{translate_module, DummyEnvironment, ModuleEnvironment};
use std::error::Error;
use std::fs::File;
use std::io;

View File

@@ -1,7 +1,7 @@
extern crate cton_filetests;
extern crate cretonne_filetests;
#[test]
fn filetests() {
// Run all the filetests in the following directories.
cton_filetests::run(false, &["filetests".into(), "docs".into()]).expect("test harness");
cretonne_filetests::run(false, &["filetests".into(), "docs".into()]).expect("test harness");
}

View File

@@ -10,9 +10,6 @@ readme = "README.md"
keywords = ["compile", "compiler", "jit"]
build = "build.rs"
[lib]
name = "cretonne"
[dependencies]
cretonne-entity = { path = "../entity", version = "0.4.4" }
# It is a goal of the cretonne crate to have minimal external dependencies.

View File

@@ -39,7 +39,7 @@ pub use write::write_function;
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
#[macro_use]
pub extern crate cton_entity as entity;
pub extern crate cretonne_entity as entity;
#[macro_use]
pub mod dbg;

View File

@@ -9,9 +9,6 @@ repository = "https://github.com/Cretonne/cretonne"
readme = "README.md"
keywords = ["entity", "set", "map"]
[lib]
name = "cton_entity"
[features]
default = ["std"]
std = []

View File

@@ -8,9 +8,6 @@ documentation = "http://cretonne.readthedocs.io/en/latest/testing.html#file-test
repository = "https://github.com/Cretonne/cretonne"
publish = false
[lib]
name = "cton_filetests"
[dependencies]
cretonne = { path = "../cretonne", version = "0.4.4" }
cretonne-reader = { path = "../reader", version = "0.4.4" }

View File

@@ -10,11 +10,11 @@
#[macro_use(dbg)]
extern crate cretonne;
extern crate cton_reader;
extern crate cretonne_reader;
extern crate filecheck;
extern crate num_cpus;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use runner::TestRunner;
use std::path::Path;
use std::time;

View File

@@ -6,8 +6,8 @@ use cretonne::print_errors::pretty_verifier_error;
use cretonne::settings::Flags;
use cretonne::timing;
use cretonne::verify_function;
use cton_reader::IsaSpec;
use cton_reader::parse_test;
use cretonne_reader::IsaSpec;
use cretonne_reader::parse_test;
use std::borrow::Cow;
use std::fs;
use std::io::{self, Read};

View File

@@ -3,7 +3,7 @@
use cretonne::ir::Function;
use cretonne::isa::TargetIsa;
use cretonne::settings::{Flags, FlagsOrIsa};
use cton_reader::{Comment, Details};
use cretonne_reader::{Comment, Details};
use filecheck::{Checker, CheckerBuilder, NO_VARIABLES};
use std::borrow::Cow;
use std::result;

View File

@@ -9,7 +9,7 @@ use cretonne::dbg::DisplayList;
use cretonne::ir;
use cretonne::ir::entities::AnyEntity;
use cretonne::print_errors::pretty_error;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use match_directive::match_directive;
use std::borrow::Cow;
use std::collections::HashMap;

View File

@@ -1,7 +1,7 @@
//! The `cat` subtest.
use cretonne::ir::Function;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use std::borrow::Cow;
use subtest::{self, Context, Result as STResult, SubTest};

View File

@@ -6,7 +6,7 @@ use cretonne;
use cretonne::binemit;
use cretonne::ir;
use cretonne::print_errors::pretty_error;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use std::borrow::Cow;
use std::fmt::Write;
use subtest::{run_filecheck, Context, Result, SubTest};

View File

@@ -8,7 +8,7 @@
use cretonne;
use cretonne::ir::Function;
use cretonne::print_errors::pretty_error;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use std::borrow::Cow;
use std::fmt::Write;
use subtest::{run_filecheck, Context, Result, SubTest};

View File

@@ -16,7 +16,7 @@ use cretonne::dominator_tree::{DominatorTree, DominatorTreePreorder};
use cretonne::flowgraph::ControlFlowGraph;
use cretonne::ir::Function;
use cretonne::ir::entities::AnyEntity;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use match_directive::match_directive;
use std::borrow::{Borrow, Cow};
use std::collections::HashMap;

View File

@@ -6,7 +6,7 @@
use cretonne;
use cretonne::ir::Function;
use cretonne::print_errors::pretty_error;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use std::borrow::Cow;
use std::fmt::Write;
use subtest::{run_filecheck, Context, Result, SubTest};

View File

@@ -8,7 +8,7 @@
use cretonne;
use cretonne::ir::Function;
use cretonne::print_errors::pretty_error;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use std::borrow::Cow;
use std::fmt::Write;
use subtest::{run_filecheck, Context, Result, SubTest};

View File

@@ -5,7 +5,7 @@
use cretonne;
use cretonne::ir::Function;
use cretonne::print_errors::pretty_error;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use std::borrow::Cow;
use std::fmt::Write;
use subtest::{run_filecheck, Context, Result, SubTest};

View File

@@ -5,7 +5,7 @@
use cretonne;
use cretonne::ir::Function;
use cretonne::print_errors::pretty_error;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use std::borrow::Cow;
use std::fmt::Write;
use subtest::{run_filecheck, Context, Result, SubTest};

View File

@@ -7,7 +7,7 @@ use std::borrow::Cow;
use cretonne::cfg_printer::CFGPrinter;
use cretonne::ir::Function;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use subtest::{self, Context, Result as STResult, SubTest};
/// Object implementing the `test print-cfg` sub-test.

View File

@@ -8,7 +8,7 @@
use cretonne;
use cretonne::ir::Function;
use cretonne::print_errors::pretty_error;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use std::borrow::Cow;
use std::fmt::Write;
use subtest::{run_filecheck, Context, Result, SubTest};

View File

@@ -8,7 +8,7 @@
use cretonne;
use cretonne::ir::Function;
use cretonne::print_errors::pretty_error;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use std::borrow::Cow;
use std::fmt::Write;
use subtest::{run_filecheck, Context, Result, SubTest};

View File

@@ -11,7 +11,7 @@
use cretonne::ir::Function;
use cretonne::verify_function;
use cton_reader::TestCommand;
use cretonne_reader::TestCommand;
use match_directive::match_directive;
use std::borrow::{Borrow, Cow};
use subtest::{Context, Result, SubTest};

View File

@@ -8,9 +8,6 @@ documentation = "https://cretonne.readthedocs.io/"
repository = "https://github.com/Cretonne/cretonne"
readme = "README.md"
[lib]
name = "cton_frontend"
[dependencies]
cretonne = { path = "../cretonne", version = "0.4.4" }

View File

@@ -33,13 +33,13 @@
//!
//! ```rust
//! extern crate cretonne;
//! extern crate cton_frontend;
//! extern crate cretonne_frontend;
//!
//! use cretonne::entity::EntityRef;
//! use cretonne::ir::{ExternalName, CallConv, Function, Signature, AbiParam, InstBuilder};
//! use cretonne::ir::types::*;
//! use cretonne::settings;
//! use cton_frontend::{FunctionBuilderContext, FunctionBuilder, Variable};
//! use cretonne_frontend::{FunctionBuilderContext, FunctionBuilder, Variable};
//! use cretonne::verifier::verify_function;
//!
//! fn main() {

View File

@@ -7,9 +7,6 @@ repository = "https://github.com/Cretonne/cretonne"
license = "Apache-2.0"
readme = "README.md"
[lib]
name = "cton_native"
[dependencies]
cretonne = { path = "../cretonne", version = "0.4.4" }

View File

@@ -8,9 +8,6 @@ documentation = "https://cretonne.readthedocs.io/"
repository = "https://github.com/Cretonne/cretonne"
readme = "README.md"
[lib]
name = "cton_reader"
[dependencies]
cretonne = { path = "../cretonne", version = "0.4.4" }

View File

@@ -1,7 +1,7 @@
//! Cretonne file reader library.
//!
//! The `cton_reader` library supports reading .cton files. This functionality is needed for testing
//! Cretonne, but is not essential for a JIT compiler.
//! The `cretonne_reader` library supports reading .cton files. This functionality is needed for
//! testing Cretonne, but is not essential for a JIT compiler.
#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]

View File

@@ -8,9 +8,6 @@ license = "Apache-2.0"
readme = "README.md"
keywords = ["webassembly", "wasm"]
[lib]
name = "cton_wasm"
[dependencies]
wasmparser = "0.15.1"
cretonne = { path = "../cretonne", version = "0.4.4" }

View File

@@ -26,7 +26,7 @@ use cretonne::ir::condcodes::{FloatCC, IntCC};
use cretonne::ir::types::*;
use cretonne::ir::{self, InstBuilder, JumpTableData, MemFlags};
use cretonne::packed_option::ReservedValue;
use cton_frontend::{FunctionBuilder, Variable};
use cretonne_frontend::{FunctionBuilder, Variable};
use environ::{FuncEnvironment, GlobalValue};
use state::{ControlStackFrame, TranslationState};
use std::collections::{hash_map, HashMap};

View File

@@ -9,7 +9,7 @@ use cretonne::entity::EntityRef;
use cretonne::ir::{self, Ebb, InstBuilder};
use cretonne::result::{CtonError, CtonResult};
use cretonne::timing;
use cton_frontend::{FunctionBuilder, FunctionBuilderContext, Variable};
use cretonne_frontend::{FunctionBuilder, FunctionBuilderContext, Variable};
use environ::FuncEnvironment;
use state::TranslationState;
use wasmparser::{self, BinaryReader};

View File

@@ -15,7 +15,7 @@
#[macro_use(dbg)]
extern crate cretonne;
extern crate cton_frontend;
extern crate cretonne_frontend;
extern crate wasmparser;
mod code_translator;

View File

@@ -1,11 +1,11 @@
extern crate cretonne;
extern crate cton_wasm;
extern crate cretonne_wasm;
extern crate tempdir;
use cretonne::print_errors::pretty_verifier_error;
use cretonne::settings::{self, Configurable, Flags};
use cretonne::verifier;
use cton_wasm::{translate_module, DummyEnvironment};
use cretonne_wasm::{translate_module, DummyEnvironment};
use std::error::Error;
use std::fs;
use std::fs::File;