Rustup to rustc 1.30.0-nightly (f49f6e73a
2018-09-23)
This commit is contained in:
parent
5b721a2940
commit
a99e458022
2 changed files with 74 additions and 21 deletions
|
@ -1,6 +1,6 @@
|
|||
From a26747487d398af360dc16344b1f9d2b367720c9 Mon Sep 17 00:00:00 2001
|
||||
From 09ba4e4d2574ba591524cffe18eb11e05e6726a4 Mon Sep 17 00:00:00 2001
|
||||
From: bjorn3 <bjorn3@users.noreply.github.com>
|
||||
Date: Thu, 19 Jul 2018 18:26:56 +0200
|
||||
Date: Mon, 24 Sep 2018 18:50:20 +0200
|
||||
Subject: [PATCH] Disable stdsimd in libcore
|
||||
|
||||
---
|
||||
|
@ -8,22 +8,22 @@ Subject: [PATCH] Disable stdsimd in libcore
|
|||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
|
||||
index bbe6ae8619..bdeb6ce426 100644
|
||||
index 3b7646f..d349a49 100644
|
||||
--- a/src/libcore/lib.rs
|
||||
+++ b/src/libcore/lib.rs
|
||||
@@ -238,6 +238,7 @@ macro_rules! test_v256 { ($item:item) => {}; }
|
||||
macro_rules! test_v512 { ($item:item) => {}; }
|
||||
#[allow(unused_macros)]
|
||||
macro_rules! vector_impl { ($([$f:ident, $($args:tt)*]),*) => { $($f!($($args)*);)* } }
|
||||
@@ -226,6 +226,7 @@ mod nonzero;
|
||||
mod tuple;
|
||||
mod unit;
|
||||
|
||||
+/*
|
||||
#[path = "../stdsimd/coresimd/mod.rs"]
|
||||
#[allow(missing_docs, missing_debug_implementations, dead_code, unused_imports)]
|
||||
#[unstable(feature = "stdsimd", issue = "48556")]
|
||||
@@ -250,3 +251,4 @@ pub use coresimd::simd;
|
||||
// Pull in the the `coresimd` crate directly into libcore. This is where all the
|
||||
// architecture-specific (and vendor-specific) intrinsics are defined. AKA
|
||||
// things like SIMD and such. Note that the actual source for all this lies in a
|
||||
@@ -256,3 +257,4 @@ mod coresimd;
|
||||
#[stable(feature = "simd_arch", since = "1.27.0")]
|
||||
#[cfg(not(stage0))]
|
||||
pub use coresimd::arch;
|
||||
+*/
|
||||
--
|
||||
--
|
||||
2.11.0
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
use cranelift_module::*;
|
||||
use crate::prelude::*;
|
||||
use crate::rustc::mir::interpret::{
|
||||
read_target_uint, AllocId, AllocType, Allocation, ConstValue, EvalResult, GlobalId,
|
||||
read_target_uint, AllocId, AllocType, Allocation, ConstValue, EvalResult, GlobalId, Scalar,
|
||||
};
|
||||
use crate::rustc::ty::Const;
|
||||
use crate::rustc_mir::interpret::{CompileTimeEvaluator, EvalContext, Memory, MemoryKind};
|
||||
use crate::rustc_mir::interpret::{EvalContext, Machine, Memory, MemoryKind, OpTy, PlaceTy};
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct ConstantCx {
|
||||
|
@ -124,7 +124,7 @@ fn trans_const_place<'a, 'tcx: 'a>(
|
|||
let mut ecx = EvalContext::new(
|
||||
fx.tcx.at(DUMMY_SP),
|
||||
ty::ParamEnv::reveal_all(),
|
||||
CompileTimeEvaluator,
|
||||
TransPlaceInterpreter,
|
||||
(),
|
||||
);
|
||||
let op = ecx.const_to_op(const_)?;
|
||||
|
@ -155,11 +155,11 @@ fn data_id_for_static<'a, 'tcx: 'a, B: Backend>(
|
|||
) -> DataId {
|
||||
let symbol_name = tcx.symbol_name(Instance::mono(tcx, def_id)).as_str();
|
||||
let is_mutable = if let crate::rustc::hir::Mutability::MutMutable = tcx.is_static(def_id).unwrap() {
|
||||
true
|
||||
} else {
|
||||
!tcx.type_of(def_id)
|
||||
.is_freeze(tcx, ParamEnv::reveal_all(), DUMMY_SP)
|
||||
};
|
||||
true
|
||||
} else {
|
||||
!tcx.type_of(def_id)
|
||||
.is_freeze(tcx, ParamEnv::reveal_all(), DUMMY_SP)
|
||||
};
|
||||
module
|
||||
.declare_data(&*symbol_name, Linkage::Export, is_mutable)
|
||||
.unwrap()
|
||||
|
@ -185,7 +185,7 @@ fn define_all_allocs<'a, 'tcx: 'a, B: Backend + 'a>(
|
|||
module: &mut Module<B>,
|
||||
cx: &mut ConstantCx,
|
||||
) {
|
||||
let memory = Memory::<CompileTimeEvaluator>::new(tcx.at(DUMMY_SP), ());
|
||||
let memory = Memory::<TransPlaceInterpreter>::new(tcx.at(DUMMY_SP), ());
|
||||
|
||||
while let Some(todo_item) = pop_set(&mut cx.todo) {
|
||||
let (data_id, alloc) = match todo_item {
|
||||
|
@ -269,3 +269,56 @@ fn pop_set<T: Copy + Eq + ::std::hash::Hash>(set: &mut HashSet<T>) -> Option<T>
|
|||
None
|
||||
}
|
||||
}
|
||||
|
||||
struct TransPlaceInterpreter;
|
||||
|
||||
impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
|
||||
type MemoryData = ();
|
||||
type MemoryKinds = ();
|
||||
const MUT_STATIC_KIND: Option<()> = None;
|
||||
|
||||
fn before_terminator(_: &mut EvalContext<'a, 'mir, 'tcx, Self>) -> EvalResult<'tcx> {
|
||||
panic!();
|
||||
}
|
||||
|
||||
fn find_fn(
|
||||
_: &mut EvalContext<'a, 'mir, 'tcx, Self>,
|
||||
_: Instance<'tcx>,
|
||||
_: &[OpTy<'tcx>],
|
||||
_: Option<PlaceTy<'tcx>>,
|
||||
_: Option<BasicBlock>,
|
||||
) -> EvalResult<'tcx, Option<&'mir Mir<'tcx>>> {
|
||||
panic!();
|
||||
}
|
||||
|
||||
fn call_intrinsic(
|
||||
_: &mut EvalContext<'a, 'mir, 'tcx, Self>,
|
||||
_: Instance<'tcx>,
|
||||
_: &[OpTy<'tcx>],
|
||||
_: PlaceTy<'tcx>,
|
||||
) -> EvalResult<'tcx> {
|
||||
panic!();
|
||||
}
|
||||
|
||||
fn find_foreign_static(
|
||||
_: crate::rustc::ty::query::TyCtxtAt<'a, 'tcx, 'tcx>,
|
||||
_: DefId,
|
||||
) -> EvalResult<'tcx, &'tcx Allocation> {
|
||||
panic!();
|
||||
}
|
||||
|
||||
fn ptr_op(
|
||||
_: &EvalContext<'a, 'mir, 'tcx, Self>,
|
||||
_: mir::BinOp,
|
||||
_: Scalar,
|
||||
_: TyLayout<'tcx>,
|
||||
_: Scalar,
|
||||
_: TyLayout<'tcx>,
|
||||
) -> EvalResult<'tcx, (Scalar, bool)> {
|
||||
panic!();
|
||||
}
|
||||
|
||||
fn box_alloc(_: &mut EvalContext<'a, 'mir, 'tcx, Self>, _: PlaceTy<'tcx>) -> EvalResult<'tcx> {
|
||||
panic!();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue