Rustup to rustc 1.44.0-nightly (211365947 2020-03-30)
This commit is contained in:
parent
eefebeeb39
commit
13e3a3c8b0
@ -1 +1 @@
|
||||
nightly-2020-03-30
|
||||
nightly-2020-03-31
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use rustc::mir;
|
||||
use rustc_middle::mir;
|
||||
|
||||
use crate::abi::pass_mode::*;
|
||||
use crate::prelude::*;
|
||||
|
@ -15,7 +15,7 @@ use rustc_ast::expand::allocator::{AllocatorKind, AllocatorTy, ALLOCATOR_METHODS
|
||||
/// Returns whether an allocator shim was created
|
||||
pub(crate) fn codegen(tcx: TyCtxt<'_>, module: &mut Module<impl Backend + 'static>) -> bool {
|
||||
let any_dynamic_crate = tcx.dependency_formats(LOCAL_CRATE).iter().any(|(_, list)| {
|
||||
use rustc::middle::dependency_format::Linkage;
|
||||
use rustc_middle::middle::dependency_format::Linkage;
|
||||
list.iter().any(|&linkage| linkage == Linkage::Dynamic)
|
||||
});
|
||||
if any_dynamic_crate {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::prelude::*;
|
||||
|
||||
use rustc::mir::StatementKind::*;
|
||||
use rustc_middle::mir::StatementKind::*;
|
||||
use rustc_index::vec::IndexVec;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
use rustc::ty::adjustment::PointerCast;
|
||||
use rustc_middle::ty::adjustment::PointerCast;
|
||||
use rustc_index::vec::IndexVec;
|
||||
|
||||
use crate::prelude::*;
|
||||
@ -592,7 +592,7 @@ fn trans_stmt<'tcx>(
|
||||
lval.write_cvalue(fx, CValue::by_val(len, usize_layout));
|
||||
}
|
||||
Rvalue::NullaryOp(NullOp::Box, content_ty) => {
|
||||
use rustc::middle::lang_items::ExchangeMallocFnLangItem;
|
||||
use rustc_middle::middle::lang_items::ExchangeMallocFnLangItem;
|
||||
|
||||
let usize_type = fx.clif_type(fx.tcx.types.usize).unwrap();
|
||||
let content_ty = fx.monomorphize(content_ty);
|
||||
|
@ -1,4 +1,4 @@
|
||||
use rustc::ty::layout::{Integer, Primitive};
|
||||
use rustc_middle::ty::layout::{Integer, Primitive};
|
||||
use rustc_target::spec::{HasTargetSpec, Target};
|
||||
use rustc_index::vec::IndexVec;
|
||||
|
||||
|
@ -2,11 +2,11 @@ use std::borrow::Cow;
|
||||
|
||||
use rustc_span::DUMMY_SP;
|
||||
|
||||
use rustc::middle::codegen_fn_attrs::CodegenFnAttrFlags;
|
||||
use rustc::mir::interpret::{
|
||||
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags;
|
||||
use rustc_middle::mir::interpret::{
|
||||
read_target_uint, AllocId, Allocation, ConstValue, GlobalAlloc, InterpResult, Scalar,
|
||||
};
|
||||
use rustc::ty::{layout::Align, Const, ConstKind};
|
||||
use rustc_middle::ty::{layout::Align, Const, ConstKind};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_mir::interpret::{
|
||||
ImmTy, InterpCx, Machine, Memory, MemoryKind, OpTy, PlaceTy, Pointer,
|
||||
|
@ -16,7 +16,7 @@ use gimli::{Encoding, Format, LineEncoding, Register, RunTimeEndian, X86_64};
|
||||
pub(crate) use emit::{DebugReloc, DebugRelocName};
|
||||
|
||||
fn target_endian(tcx: TyCtxt) -> RunTimeEndian {
|
||||
use rustc::ty::layout::Endian;
|
||||
use rustc_middle::ty::layout::Endian;
|
||||
|
||||
match tcx.data_layout.endian {
|
||||
Endian::Big => RunTimeEndian::Big,
|
||||
|
@ -1,6 +1,6 @@
|
||||
use rustc::dep_graph::{WorkProduct, WorkProductFileKind, WorkProductId};
|
||||
use rustc::middle::cstore::EncodedMetadata;
|
||||
use rustc::mir::mono::CodegenUnit;
|
||||
use rustc_middle::dep_graph::{WorkProduct, WorkProductFileKind, WorkProductId};
|
||||
use rustc_middle::middle::cstore::EncodedMetadata;
|
||||
use rustc_middle::mir::mono::CodegenUnit;
|
||||
use rustc_session::config::{DebugInfo, OutputType};
|
||||
use rustc_session::cgu_reuse_tracker::CguReuse;
|
||||
use rustc_codegen_ssa::back::linker::LinkerInfo;
|
||||
@ -170,7 +170,7 @@ pub(super) fn run_aot(
|
||||
|
||||
let dep_node = cgu.codegen_dep_node(tcx);
|
||||
let (ModuleCodegenResult(module, work_product), _) =
|
||||
tcx.dep_graph.with_task(dep_node, tcx, cgu.name(), module_codegen, rustc::dep_graph::hash_result);
|
||||
tcx.dep_graph.with_task(dep_node, tcx, cgu.name(), module_codegen, rustc_middle::dep_graph::hash_result);
|
||||
|
||||
if let Some((id, product)) = work_product {
|
||||
work_products.insert(id, product);
|
||||
@ -207,7 +207,7 @@ pub(super) fn run_aot(
|
||||
let metadata_module = if need_metadata_module {
|
||||
let _timer = tcx.prof.generic_activity("codegen crate metadata");
|
||||
let (metadata_cgu_name, tmp_file) = tcx.sess.time("write compressed metadata", || {
|
||||
use rustc::mir::mono::CodegenUnitNameBuilder;
|
||||
use rustc_middle::mir::mono::CodegenUnitNameBuilder;
|
||||
|
||||
let cgu_name_builder = &mut CodegenUnitNameBuilder::new(tcx);
|
||||
let metadata_cgu_name = cgu_name_builder
|
||||
|
@ -81,7 +81,7 @@ pub(super) fn run_jit(tcx: TyCtxt<'_>) -> ! {
|
||||
}
|
||||
|
||||
fn load_imported_symbols_for_jit(tcx: TyCtxt<'_>) -> Vec<(String, *const u8)> {
|
||||
use rustc::middle::dependency_format::Linkage;
|
||||
use rustc_middle::middle::dependency_format::Linkage;
|
||||
|
||||
let mut dylib_paths = Vec::new();
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::any::Any;
|
||||
|
||||
use rustc::middle::cstore::EncodedMetadata;
|
||||
use rustc::mir::mono::{Linkage as RLinkage, MonoItem, Visibility};
|
||||
use rustc_middle::middle::cstore::EncodedMetadata;
|
||||
use rustc_middle::mir::mono::{Linkage as RLinkage, MonoItem, Visibility};
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::intrinsics::*;
|
||||
use crate::prelude::*;
|
||||
|
||||
use rustc::ty::subst::SubstsRef;
|
||||
use rustc_middle::ty::subst::SubstsRef;
|
||||
|
||||
pub(crate) fn codegen_llvm_intrinsic_call<'tcx>(
|
||||
fx: &mut FunctionCx<'_, 'tcx, impl Backend>,
|
||||
|
@ -67,7 +67,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
|
||||
let total_len = lane_count * 2;
|
||||
|
||||
let indexes = {
|
||||
use rustc::mir::interpret::*;
|
||||
use rustc_middle::mir::interpret::*;
|
||||
let idx_const = crate::constant::mir_operand_get_const_val(fx, idx).expect("simd_shuffle* idx not const");
|
||||
|
||||
let idx_bytes = match idx_const.val {
|
||||
@ -81,7 +81,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
|
||||
|
||||
(0..ret_lane_count).map(|i| {
|
||||
let i = usize::try_from(i).unwrap();
|
||||
let idx = rustc::mir::interpret::read_target_uint(
|
||||
let idx = rustc_middle::mir::interpret::read_target_uint(
|
||||
fx.tcx.data_layout.endian,
|
||||
&idx_bytes[4*i.. 4*i + 4],
|
||||
).expect("read_target_uint");
|
||||
|
18
src/lib.rs
18
src/lib.rs
@ -4,7 +4,7 @@
|
||||
extern crate flate2;
|
||||
extern crate libc;
|
||||
extern crate tempfile;
|
||||
extern crate rustc;
|
||||
extern crate rustc_middle;
|
||||
extern crate rustc_codegen_ssa;
|
||||
extern crate rustc_data_structures;
|
||||
extern crate rustc_driver;
|
||||
@ -21,11 +21,11 @@ extern crate rustc_ast;
|
||||
|
||||
use std::any::Any;
|
||||
|
||||
use rustc::dep_graph::{DepGraph, WorkProduct, WorkProductId};
|
||||
use rustc::middle::cstore::{EncodedMetadata, MetadataLoader};
|
||||
use rustc_middle::dep_graph::{DepGraph, WorkProduct, WorkProductId};
|
||||
use rustc_middle::middle::cstore::{EncodedMetadata, MetadataLoader};
|
||||
use rustc_session::config::OutputFilenames;
|
||||
use rustc::ty::query::Providers;
|
||||
use rustc::util::common::ErrorReported;
|
||||
use rustc_middle::ty::query::Providers;
|
||||
use rustc_middle::util::common::ErrorReported;
|
||||
use rustc_codegen_ssa::traits::CodegenBackend;
|
||||
|
||||
use cranelift_codegen::settings;
|
||||
@ -68,12 +68,12 @@ mod prelude {
|
||||
pub(crate) use rustc_ast::ast::{FloatTy, IntTy, UintTy};
|
||||
pub(crate) use rustc_span::Span;
|
||||
|
||||
pub(crate) use rustc::bug;
|
||||
pub(crate) use rustc_middle::bug;
|
||||
pub(crate) use rustc_hir::def_id::{DefId, LOCAL_CRATE};
|
||||
pub(crate) use rustc::mir::{self, *};
|
||||
pub(crate) use rustc_middle::mir::{self, *};
|
||||
pub(crate) use rustc_session::Session;
|
||||
pub(crate) use rustc::ty::layout::{self, Abi, LayoutOf, Scalar, Size, TyAndLayout, VariantIdx};
|
||||
pub(crate) use rustc::ty::{
|
||||
pub(crate) use rustc_middle::ty::layout::{self, Abi, LayoutOf, Scalar, Size, TyAndLayout, VariantIdx};
|
||||
pub(crate) use rustc_middle::ty::{
|
||||
self, FnSig, Instance, InstanceDef, ParamEnv, Ty, TyCtxt, TypeAndMut, TypeFoldable,
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
use rustc::mir::mono::{Linkage as RLinkage, MonoItem, Visibility};
|
||||
use rustc_middle::mir::mono::{Linkage as RLinkage, MonoItem, Visibility};
|
||||
|
||||
use crate::prelude::*;
|
||||
|
||||
|
@ -3,7 +3,7 @@ use crate::prelude::*;
|
||||
/// Create the `main` function which will initialize the rust runtime and call
|
||||
/// users main function.
|
||||
pub(crate) fn maybe_create_entry_wrapper(tcx: TyCtxt<'_>, module: &mut Module<impl Backend + 'static>) {
|
||||
use rustc::middle::lang_items::StartFnLangItem;
|
||||
use rustc_middle::middle::lang_items::StartFnLangItem;
|
||||
use rustc_session::config::EntryFnType;
|
||||
|
||||
let (main_def_id, use_start_lang_item) = match tcx.entry_fn(LOCAL_CRATE) {
|
||||
|
@ -2,9 +2,9 @@ use std::convert::TryFrom;
|
||||
use std::fs::File;
|
||||
use std::path::Path;
|
||||
|
||||
use rustc::middle::cstore::{EncodedMetadata, MetadataLoader};
|
||||
use rustc_middle::middle::cstore::{EncodedMetadata, MetadataLoader};
|
||||
use rustc_session::config;
|
||||
use rustc::ty::TyCtxt;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_codegen_ssa::METADATA_FILENAME;
|
||||
use rustc_data_structures::owning_ref::{self, OwningRef};
|
||||
use rustc_data_structures::rustc_erase_owner;
|
||||
@ -104,7 +104,7 @@ pub(crate) fn write_metadata<P: WriteMetadata>(tcx: TyCtxt<'_>, product: &mut P)
|
||||
.unwrap();
|
||||
|
||||
product.add_rustc_section(
|
||||
rustc::middle::exported_symbols::metadata_symbol_name(tcx),
|
||||
rustc_middle::middle::exported_symbols::metadata_symbol_name(tcx),
|
||||
compressed,
|
||||
tcx.sess.target.target.options.is_like_osx,
|
||||
);
|
||||
|
@ -225,7 +225,7 @@ impl<'tcx> CValue<'tcx> {
|
||||
.iconst(clif_ty, u64::try_from(const_val).expect("uint") as i64)
|
||||
}
|
||||
ty::TyKind::Int(_) => {
|
||||
let const_val = rustc::mir::interpret::sign_extend(const_val, layout.size);
|
||||
let const_val = rustc_middle::mir::interpret::sign_extend(const_val, layout.size);
|
||||
fx.bcx.ins().iconst(clif_ty, i64::try_from(const_val as i128).unwrap())
|
||||
}
|
||||
ty::TyKind::Float(FloatTy::F32) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user