Update to Rust 2018 edition (#632)
* initial cargo fix run * Upgrade cranelift-entity crate * Upgrade bforest crate * Upgrade the codegen crate * Upgrade the faerie crate * Upgrade the filetests crate * Upgrade the codegen-meta crate * Upgrade the frontend crate * Upgrade the cranelift-module crate * Upgrade the cranelift-native crate * Upgrade the cranelift-preopt crate * Upgrade the cranelift-reader crate * Upgrade the cranelift-serde crate * Upgrade the cranelift-simplejit crate * Upgrade the cranelift or cranelift-umbrella crate * Upgrade the cranelift-wasm crate * Upgrade cranelift-tools crate * Use new import style on remaining files * run format-all.sh * run test-all.sh, update Readme and travis ci configuration fixed an AssertionError also * Remove deprecated functions
This commit is contained in:
committed by
Dan Gohman
parent
e3db942b0c
commit
effe6c04e4
@@ -1,4 +1,6 @@
|
||||
//! A frontend for building Cranelift IR from other languages.
|
||||
use crate::ssa::{Block, SSABuilder, SideEffects};
|
||||
use crate::variable::Variable;
|
||||
use cranelift_codegen::cursor::{Cursor, FuncCursor};
|
||||
use cranelift_codegen::entity::{EntitySet, SecondaryMap};
|
||||
use cranelift_codegen::ir;
|
||||
@@ -11,9 +13,7 @@ use cranelift_codegen::ir::{
|
||||
};
|
||||
use cranelift_codegen::isa::{TargetFrontendConfig, TargetIsa};
|
||||
use cranelift_codegen::packed_option::PackedOption;
|
||||
use ssa::{Block, SSABuilder, SideEffects};
|
||||
use std::vec::Vec;
|
||||
use variable::Variable;
|
||||
|
||||
/// Structure used for translating a series of functions into Cranelift IR.
|
||||
///
|
||||
@@ -822,15 +822,15 @@ impl<'a> FunctionBuilder<'a> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::greatest_divisible_power_of_two;
|
||||
use crate::frontend::{FunctionBuilder, FunctionBuilderContext};
|
||||
use crate::Variable;
|
||||
use cranelift_codegen::entity::EntityRef;
|
||||
use cranelift_codegen::ir::types::*;
|
||||
use cranelift_codegen::ir::{AbiParam, ExternalName, Function, InstBuilder, Signature};
|
||||
use cranelift_codegen::isa::CallConv;
|
||||
use cranelift_codegen::settings;
|
||||
use cranelift_codegen::verifier::verify_function;
|
||||
use frontend::{FunctionBuilder, FunctionBuilderContext};
|
||||
use std::string::ToString;
|
||||
use Variable;
|
||||
|
||||
fn sample_function(lazy_seal: bool) {
|
||||
let mut sig = Signature::new(CallConv::SystemV);
|
||||
|
||||
@@ -180,15 +180,10 @@
|
||||
#[cfg(not(feature = "std"))]
|
||||
#[macro_use]
|
||||
extern crate alloc;
|
||||
extern crate cranelift_codegen;
|
||||
#[cfg(test)]
|
||||
extern crate target_lexicon;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
pub use frontend::{FunctionBuilder, FunctionBuilderContext};
|
||||
pub use switch::Switch;
|
||||
pub use variable::Variable;
|
||||
pub use crate::frontend::{FunctionBuilder, FunctionBuilderContext};
|
||||
pub use crate::switch::Switch;
|
||||
pub use crate::variable::Variable;
|
||||
|
||||
mod frontend;
|
||||
mod ssa;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
//! In: Jhala R., De Bosschere K. (eds) Compiler Construction. CC 2013.
|
||||
//! Lecture Notes in Computer Science, vol 7791. Springer, Berlin, Heidelberg
|
||||
|
||||
use crate::Variable;
|
||||
use cranelift_codegen::cursor::{Cursor, FuncCursor};
|
||||
use cranelift_codegen::entity::{EntityRef, PrimaryMap, SecondaryMap};
|
||||
use cranelift_codegen::ir::immediates::{Ieee32, Ieee64};
|
||||
@@ -16,7 +17,6 @@ use cranelift_codegen::packed_option::ReservedValue;
|
||||
use std::mem;
|
||||
use std::u32;
|
||||
use std::vec::Vec;
|
||||
use Variable;
|
||||
|
||||
/// Structure containing the data relevant the construction of SSA for a given function.
|
||||
///
|
||||
@@ -749,6 +749,8 @@ impl SSABuilder {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::ssa::SSABuilder;
|
||||
use crate::Variable;
|
||||
use cranelift_codegen::cursor::{Cursor, FuncCursor};
|
||||
use cranelift_codegen::entity::EntityRef;
|
||||
use cranelift_codegen::ir::instructions::BranchInfo;
|
||||
@@ -756,8 +758,6 @@ mod tests {
|
||||
use cranelift_codegen::ir::{Function, Inst, InstBuilder, JumpTableData, Opcode};
|
||||
use cranelift_codegen::settings;
|
||||
use cranelift_codegen::verify_function;
|
||||
use ssa::SSABuilder;
|
||||
use Variable;
|
||||
|
||||
#[test]
|
||||
fn simple_block() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use crate::frontend::FunctionBuilder;
|
||||
use cranelift_codegen::ir::condcodes::IntCC;
|
||||
use cranelift_codegen::ir::*;
|
||||
use frontend::FunctionBuilder;
|
||||
use log::debug;
|
||||
use std::collections::HashMap;
|
||||
use std::vec::Vec;
|
||||
|
||||
@@ -200,8 +201,8 @@ impl ContiguousCaseRange {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::frontend::FunctionBuilderContext;
|
||||
use cranelift_codegen::ir::Function;
|
||||
use frontend::FunctionBuilderContext;
|
||||
use std::string::ToString;
|
||||
|
||||
macro_rules! setup {
|
||||
|
||||
Reference in New Issue
Block a user