Remove the quad_precision_float feature gate

The f128 type has very little support in the compiler and the feature is
basically unusable today. Supporting half-baked features in the compiler can be
detrimental to the long-term development of the compiler, and hence this feature
is being removed.
This commit is contained in:
Alex Crichton 2014-06-24 16:34:46 -07:00
parent 719ffc2484
commit 3d308fe65b
21 changed files with 4 additions and 74 deletions

View file

@ -64,7 +64,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
("overloaded_calls", Active),
("unboxed_closure_sugar", Active),
("quad_precision_float", Active),
("quad_precision_float", Removed),
// A temporary feature gate used to enable parser extensions needed
// to bootstrap fix for #5723.
@ -91,7 +91,6 @@ enum Status {
/// A set of features to be used by later passes.
pub struct Features {
pub default_type_params: Cell<bool>,
pub quad_precision_float: Cell<bool>,
pub issue_5723_bootstrap: Cell<bool>,
pub overloaded_calls: Cell<bool>,
}
@ -100,7 +99,6 @@ impl Features {
pub fn new() -> Features {
Features {
default_type_params: Cell::new(false),
quad_precision_float: Cell::new(false),
issue_5723_bootstrap: Cell::new(false),
overloaded_calls: Cell::new(false),
}
@ -425,7 +423,6 @@ pub fn check_crate(sess: &Session, krate: &ast::Crate) {
sess.abort_if_errors();
sess.features.default_type_params.set(cx.has_feature("default_type_params"));
sess.features.quad_precision_float.set(cx.has_feature("quad_precision_float"));
sess.features.issue_5723_bootstrap.set(cx.has_feature("issue_5723_bootstrap"));
sess.features.overloaded_calls.set(cx.has_feature("overloaded_calls"));
}

View file

@ -330,7 +330,6 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
'D' => return ty::mk_mach_int(ast::TyI64),
'f' => return ty::mk_mach_float(ast::TyF32),
'F' => return ty::mk_mach_float(ast::TyF64),
'Q' => return ty::mk_mach_float(ast::TyF128),
_ => fail!("parse_ty: bad numeric type")
}
}

View file

@ -221,7 +221,6 @@ fn enc_sty(w: &mut MemWriter, cx: &ctxt, st: &ty::sty) {
match t {
TyF32 => mywrite!(w, "Mf"),
TyF64 => mywrite!(w, "MF"),
TyF128 => mywrite!(w, "MQ")
}
}
ty::ty_enum(def, ref substs) => {

View file

@ -770,7 +770,6 @@ impl PrimitiveTypeTable {
table.intern("char", TyChar);
table.intern("f32", TyFloat(TyF32));
table.intern("f64", TyFloat(TyF64));
table.intern("f128", TyFloat(TyF128));
table.intern("int", TyInt(TyI));
table.intern("i8", TyInt(TyI8));
table.intern("i16", TyInt(TyI16));

View file

@ -1621,7 +1621,6 @@ fn basic_type_metadata(cx: &CrateContext, t: ty::t) -> DIType {
ty::ty_float(float_ty) => match float_ty {
ast::TyF32 => ("f32".to_string(), DW_ATE_float),
ast::TyF64 => ("f64".to_string(), DW_ATE_float),
ast::TyF128 => ("f128".to_string(), DW_ATE_float)
},
_ => cx.sess().bug("debuginfo::basic_type_metadata - t is invalid type")
};

View file

@ -148,7 +148,6 @@ impl<'a, 'b> Reflector<'a, 'b> {
ty::ty_uint(ast::TyU64) => self.leaf("u64"),
ty::ty_float(ast::TyF32) => self.leaf("f32"),
ty::ty_float(ast::TyF64) => self.leaf("f64"),
ty::ty_float(ast::TyF128) => self.leaf("f128"),
// Should rename to vec_*.
ty::ty_vec(ref mt, Some(sz)) => {

View file

@ -88,10 +88,6 @@ impl Type {
ty!(llvm::LLVMDoubleTypeInContext(ccx.llcx))
}
pub fn f128(ccx: &CrateContext) -> Type {
ty!(llvm::LLVMFP128TypeInContext(ccx.llcx))
}
pub fn bool(ccx: &CrateContext) -> Type {
Type::i1(ccx)
}
@ -135,7 +131,6 @@ impl Type {
match t {
ast::TyF32 => Type::f32(ccx),
ast::TyF64 => Type::f64(ccx),
ast::TyF128 => Type::f128(ccx)
}
}

View file

@ -694,7 +694,6 @@ mod primitives {
def_prim_ty!(TY_U64, super::ty_uint(ast::TyU64), 12)
def_prim_ty!(TY_F32, super::ty_float(ast::TyF32), 14)
def_prim_ty!(TY_F64, super::ty_float(ast::TyF64), 15)
def_prim_ty!(TY_F128, super::ty_float(ast::TyF128), 16)
pub static TY_BOT: t_box_ = t_box_ {
sty: super::ty_bot,
@ -1272,9 +1271,6 @@ pub fn mk_f32() -> t { mk_prim_t(&primitives::TY_F32) }
#[inline]
pub fn mk_f64() -> t { mk_prim_t(&primitives::TY_F64) }
#[inline]
pub fn mk_f128() -> t { mk_prim_t(&primitives::TY_F128) }
#[inline]
pub fn mk_uint() -> t { mk_prim_t(&primitives::TY_UINT) }
@ -1314,7 +1310,6 @@ pub fn mk_mach_float(tm: ast::FloatTy) -> t {
match tm {
ast::TyF32 => mk_f32(),
ast::TyF64 => mk_f64(),
ast::TyF128 => mk_f128()
}
}

View file

@ -355,13 +355,6 @@ pub fn ast_ty_to_prim_ty(tcx: &ty::ctxt, ast_ty: &ast::Ty) -> Option<ty::t> {
Some(ty::mk_mach_uint(uit))
}
ast::TyFloat(ft) => {
if ft == ast::TyF128 && !tcx.sess.features.quad_precision_float.get() {
tcx.sess.span_err(path.span, "quadruple precision floats are \
missing complete runtime support");
tcx.sess.span_note(path.span, "add \
#[feature(quad_precision_float)] \
to the crate attributes to enable");
}
check_path_args(tcx, path, NO_TPS | NO_REGIONS);
Some(ty::mk_mach_float(ft))
}