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
@@ -8,6 +8,7 @@ documentation = "https://cranelift.readthedocs.io/"
|
||||
categories = ["no-std"]
|
||||
license = "Apache-2.0 WITH LLVM-exception"
|
||||
readme = "README.md"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cranelift-codegen = { path = "../codegen", version = "0.26.0", default-features = false }
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
//! Defines the `Backend` trait.
|
||||
|
||||
use crate::DataContext;
|
||||
use crate::Linkage;
|
||||
use crate::ModuleNamespace;
|
||||
use crate::ModuleResult;
|
||||
use cranelift_codegen::isa::TargetIsa;
|
||||
use cranelift_codegen::Context;
|
||||
use cranelift_codegen::{binemit, ir};
|
||||
use std::marker;
|
||||
use DataContext;
|
||||
use Linkage;
|
||||
use ModuleNamespace;
|
||||
use ModuleResult;
|
||||
|
||||
/// A `Backend` implements the functionality needed to support a `Module`.
|
||||
///
|
||||
@@ -46,7 +46,7 @@ where
|
||||
type Product;
|
||||
|
||||
/// Create a new `Backend` instance.
|
||||
fn new(Self::Builder) -> Self;
|
||||
fn new(_: Self::Builder) -> Self;
|
||||
|
||||
/// Return the `TargetIsa` to compile for.
|
||||
fn isa(&self) -> &TargetIsa;
|
||||
|
||||
@@ -29,21 +29,13 @@
|
||||
#[cfg_attr(test, macro_use)]
|
||||
extern crate alloc;
|
||||
|
||||
extern crate cranelift_codegen;
|
||||
#[macro_use]
|
||||
extern crate cranelift_entity;
|
||||
#[macro_use]
|
||||
extern crate failure;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
mod backend;
|
||||
mod data_context;
|
||||
mod module;
|
||||
|
||||
pub use backend::Backend;
|
||||
pub use data_context::{DataContext, DataDescription, Init};
|
||||
pub use module::{
|
||||
pub use crate::backend::Backend;
|
||||
pub use crate::data_context::{DataContext, DataDescription, Init};
|
||||
pub use crate::module::{
|
||||
DataId, FuncId, FuncOrDataId, Linkage, Module, ModuleError, ModuleNamespace, ModuleResult,
|
||||
};
|
||||
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
// TODO: Factor out `ir::Function`'s `ext_funcs` and `global_values` into a struct
|
||||
// shared with `DataContext`?
|
||||
|
||||
use cranelift_codegen::entity::PrimaryMap;
|
||||
use crate::data_context::DataContext;
|
||||
use crate::Backend;
|
||||
use cranelift_codegen::entity::{entity_impl, PrimaryMap};
|
||||
use cranelift_codegen::{binemit, ir, isa, CodegenError, Context};
|
||||
use data_context::DataContext;
|
||||
use failure::Fail;
|
||||
use log::info;
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::HashMap;
|
||||
use std::string::String;
|
||||
use std::vec::Vec;
|
||||
use Backend;
|
||||
|
||||
/// A function identifier for use in the `Module` interface.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
|
||||
Reference in New Issue
Block a user