Skip to content

Commit b19f836

Browse files
committed
---
yaml --- r: 125645 b: refs/heads/try c: fc4f6ed h: refs/heads/master i: 125643: 4ef27cf v: v3
1 parent d8ec505 commit b19f836

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+401
-1988
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: f2fa55903e378368ed9173560f03a0ef16e371c2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5-
refs/heads/try: 9c9bdfd1c5e34f6f04266f695664ef82c672c143
5+
refs/heads/try: fc4f6eda96f6a31d9417a3a25977faf2e4684ba6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libcore/ops.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -749,23 +749,19 @@ pub trait DerefMut<Result>: Deref<Result> {
749749
#[lang="fn"]
750750
pub trait Fn<Args,Result> {
751751
/// This is called when the call operator is used.
752-
#[rust_call_abi_hack]
753752
fn call(&self, args: Args) -> Result;
754753
}
755754

756755
/// A version of the call operator that takes a mutable receiver.
757756
#[lang="fn_mut"]
758757
pub trait FnMut<Args,Result> {
759758
/// This is called when the call operator is used.
760-
#[rust_call_abi_hack]
761759
fn call_mut(&mut self, args: Args) -> Result;
762760
}
763761

764762
/// A version of the call operator that takes a by-value receiver.
765763
#[lang="fn_once"]
766764
pub trait FnOnce<Args,Result> {
767765
/// This is called when the call operator is used.
768-
#[rust_call_abi_hack]
769766
fn call_once(self, args: Args) -> Result;
770767
}
771-

branches/try/src/libcore/prelude.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ pub use ops::{BitAnd, BitOr, BitXor};
3535
pub use ops::{Drop, Deref, DerefMut};
3636
pub use ops::{Shl, Shr};
3737
pub use ops::{Index, IndexMut};
38-
pub use ops::{Fn, FnMut, FnOnce};
3938
pub use option::{Option, Some, None};
4039
pub use result::{Result, Ok, Err};
4140

branches/try/src/librustc/front/feature_gate.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
6767
("quad_precision_float", Removed),
6868

6969
("rustc_diagnostic_macros", Active),
70-
("unboxed_closures", Active),
7170

7271
// A temporary feature gate used to enable parser extensions needed
7372
// to bootstrap fix for #5723.
@@ -328,12 +327,6 @@ impl<'a> Visitor<()> for Context<'a> {
328327
ast::ExprUnary(ast::UnBox, _) => {
329328
self.gate_box(e.span);
330329
}
331-
ast::ExprUnboxedFn(..) => {
332-
self.gate_feature("unboxed_closures",
333-
e.span,
334-
"unboxed closures are a work-in-progress \
335-
feature with known bugs");
336-
}
337330
_ => {}
338331
}
339332
visit::walk_expr(self, e, ());

branches/try/src/librustc/lint/builtin.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,9 +1451,6 @@ impl LintPass for Stability {
14511451
typeck::MethodStatic(def_id) => {
14521452
def_id
14531453
}
1454-
typeck::MethodStaticUnboxedClosure(def_id) => {
1455-
def_id
1456-
}
14571454
typeck::MethodParam(typeck::MethodParam {
14581455
trait_id: trait_id,
14591456
method_num: index,

branches/try/src/librustc/lint/context.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,6 @@ impl<'a> Context<'a> {
317317
&self.tcx.sess
318318
}
319319

320-
/// Get the level of `lint` at the current position of the lint
321-
/// traversal.
322-
pub fn current_level(&self, lint: &'static Lint) -> Level {
323-
self.lints.levels.find(&LintId::of(lint)).map_or(Allow, |&(lvl, _)| lvl)
324-
}
325-
326320
fn lookup_and_emit(&self, lint: &'static Lint, span: Option<Span>, msg: &str) {
327321
let (level, src) = match self.lints.levels.find(&LintId::of(lint)) {
328322
None => return,

branches/try/src/librustc/metadata/common.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,10 @@ pub enum astencode_tag { // Reserves 0x40 -- 0x5f
138138
tag_table_vtable_map = 0x50,
139139
tag_table_adjustments = 0x51,
140140
tag_table_moves_map = 0x52,
141-
tag_table_capture_map = 0x53,
142-
tag_table_unboxed_closure_type = 0x54,
141+
tag_table_capture_map = 0x53
143142
}
144143
static first_astencode_tag: uint = tag_ast as uint;
145-
static last_astencode_tag: uint = tag_table_unboxed_closure_type as uint;
144+
static last_astencode_tag: uint = tag_table_capture_map as uint;
146145
impl astencode_tag {
147146
pub fn from_uint(value : uint) -> Option<astencode_tag> {
148147
let is_a_tag = first_astencode_tag <= value && value <= last_astencode_tag;
@@ -156,10 +155,6 @@ pub static tag_item_trait_method_sort: uint = 0x60;
156155

157156
pub static tag_item_impl_type_basename: uint = 0x61;
158157

159-
pub static tag_crate_triple: uint = 0x66;
160-
161-
pub static tag_dylib_dependency_formats: uint = 0x67;
162-
163158
// Language items are a top-level directory (for speed). Hierarchy:
164159
//
165160
// tag_lang_items
@@ -204,6 +199,10 @@ pub static tag_plugin_registrar_fn: uint = 0x8b;
204199
pub static tag_exported_macros: uint = 0x8c;
205200
pub static tag_macro_def: uint = 0x8d;
206201

202+
pub static tag_crate_triple: uint = 0x66;
203+
204+
pub static tag_dylib_dependency_formats: uint = 0x67;
205+
207206
pub static tag_method_argument_names: uint = 0x8e;
208207
pub static tag_method_argument_name: uint = 0x8f;
209208

@@ -212,6 +211,7 @@ pub static tag_reachable_extern_fn_id: uint = 0x91;
212211

213212
pub static tag_items_data_item_stability: uint = 0x92;
214213

214+
215215
#[deriving(Clone, Show)]
216216
pub struct LinkMeta {
217217
pub crate_name: String,
@@ -223,7 +223,3 @@ pub static tag_region_param_def_ident: uint = 0x91;
223223
pub static tag_region_param_def_def_id: uint = 0x92;
224224
pub static tag_region_param_def_space: uint = 0x93;
225225
pub static tag_region_param_def_index: uint = 0x94;
226-
227-
pub static tag_unboxed_closures: uint = 0x95;
228-
pub static tag_unboxed_closure: uint = 0x96;
229-
pub static tag_unboxed_closure_type: uint = 0x97;

branches/try/src/librustc/metadata/encoder.rs

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -209,18 +209,6 @@ fn encode_variant_id(ebml_w: &mut Encoder, vid: DefId) {
209209
ebml_w.end_tag();
210210
}
211211

212-
pub fn write_closure_type(ecx: &EncodeContext,
213-
ebml_w: &mut Encoder,
214-
closure_type: &ty::ClosureTy) {
215-
let ty_str_ctxt = &tyencode::ctxt {
216-
diag: ecx.diag,
217-
ds: def_to_string,
218-
tcx: ecx.tcx,
219-
abbrevs: &ecx.type_abbrevs
220-
};
221-
tyencode::enc_closure_ty(ebml_w.writer, ty_str_ctxt, closure_type);
222-
}
223-
224212
pub fn write_type(ecx: &EncodeContext,
225213
ebml_w: &mut Encoder,
226214
typ: ty::t) {
@@ -1630,26 +1618,6 @@ fn encode_macro_defs(ecx: &EncodeContext,
16301618
ebml_w.end_tag();
16311619
}
16321620

1633-
fn encode_unboxed_closures<'a>(
1634-
ecx: &'a EncodeContext,
1635-
ebml_w: &'a mut Encoder) {
1636-
ebml_w.start_tag(tag_unboxed_closures);
1637-
for (unboxed_closure_id, unboxed_closure_type) in
1638-
ecx.tcx.unboxed_closure_types.borrow().iter() {
1639-
if unboxed_closure_id.krate != LOCAL_CRATE {
1640-
continue
1641-
}
1642-
1643-
ebml_w.start_tag(tag_unboxed_closure);
1644-
encode_def_id(ebml_w, *unboxed_closure_id);
1645-
ebml_w.start_tag(tag_unboxed_closure_type);
1646-
write_closure_type(ecx, ebml_w, unboxed_closure_type);
1647-
ebml_w.end_tag();
1648-
ebml_w.end_tag();
1649-
}
1650-
ebml_w.end_tag();
1651-
}
1652-
16531621
struct ImplVisitor<'a,'b,'c> {
16541622
ecx: &'a EncodeContext<'b>,
16551623
ebml_w: &'a mut Encoder<'c>,
@@ -1819,7 +1787,6 @@ fn encode_metadata_inner(wr: &mut MemWriter, parms: EncodeParams, krate: &Crate)
18191787
native_lib_bytes: u64,
18201788
plugin_registrar_fn_bytes: u64,
18211789
macro_defs_bytes: u64,
1822-
unboxed_closure_bytes: u64,
18231790
impl_bytes: u64,
18241791
misc_bytes: u64,
18251792
item_bytes: u64,
@@ -1834,7 +1801,6 @@ fn encode_metadata_inner(wr: &mut MemWriter, parms: EncodeParams, krate: &Crate)
18341801
native_lib_bytes: 0,
18351802
plugin_registrar_fn_bytes: 0,
18361803
macro_defs_bytes: 0,
1837-
unboxed_closure_bytes: 0,
18381804
impl_bytes: 0,
18391805
misc_bytes: 0,
18401806
item_bytes: 0,
@@ -1907,11 +1873,6 @@ fn encode_metadata_inner(wr: &mut MemWriter, parms: EncodeParams, krate: &Crate)
19071873
encode_macro_defs(&ecx, krate, &mut ebml_w);
19081874
stats.macro_defs_bytes = ebml_w.writer.tell().unwrap() - i;
19091875

1910-
// Encode the types of all unboxed closures in this crate.
1911-
i = ebml_w.writer.tell().unwrap();
1912-
encode_unboxed_closures(&ecx, &mut ebml_w);
1913-
stats.unboxed_closure_bytes = ebml_w.writer.tell().unwrap() - i;
1914-
19151876
// Encode the def IDs of impls, for coherence checking.
19161877
i = ebml_w.writer.tell().unwrap();
19171878
encode_impls(&ecx, krate, &mut ebml_w);
@@ -1950,7 +1911,6 @@ fn encode_metadata_inner(wr: &mut MemWriter, parms: EncodeParams, krate: &Crate)
19501911
println!(" native bytes: {}", stats.native_lib_bytes);
19511912
println!("plugin registrar bytes: {}", stats.plugin_registrar_fn_bytes);
19521913
println!(" macro def bytes: {}", stats.macro_defs_bytes);
1953-
println!(" unboxed closure bytes: {}", stats.unboxed_closure_bytes);
19541914
println!(" impl bytes: {}", stats.impl_bytes);
19551915
println!(" misc bytes: {}", stats.misc_bytes);
19561916
println!(" item bytes: {}", stats.item_bytes);

branches/try/src/librustc/metadata/tydecode.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,6 @@ fn data_log_string(data: &[u8], pos: uint) -> String {
130130
buf
131131
}
132132

133-
pub fn parse_ty_closure_data(data: &[u8],
134-
crate_num: ast::CrateNum,
135-
pos: uint,
136-
tcx: &ty::ctxt,
137-
conv: conv_did)
138-
-> ty::ClosureTy {
139-
let mut st = parse_state_from_data(data, crate_num, pos, tcx);
140-
parse_closure_ty(&mut st, conv)
141-
}
142-
143133
pub fn parse_ty_data(data: &[u8], crate_num: ast::CrateNum, pos: uint, tcx: &ty::ctxt,
144134
conv: conv_did) -> ty::t {
145135
debug!("parse_ty_data {}", data_log_string(data, pos));
@@ -430,10 +420,6 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
430420
assert_eq!(next(st), ']');
431421
return ty::mk_struct(st.tcx, did, substs);
432422
}
433-
'k' => {
434-
let did = parse_def(st, NominalType, |x,y| conv(x,y));
435-
return ty::mk_unboxed_closure(st.tcx, did);
436-
}
437423
'e' => {
438424
return ty::mk_err();
439425
}
@@ -516,14 +502,12 @@ fn parse_closure_ty(st: &mut PState, conv: conv_did) -> ty::ClosureTy {
516502
let store = parse_trait_store(st, |x,y| conv(x,y));
517503
let bounds = parse_bounds(st, |x,y| conv(x,y));
518504
let sig = parse_sig(st, |x,y| conv(x,y));
519-
let abi = parse_abi_set(st);
520505
ty::ClosureTy {
521506
fn_style: fn_style,
522507
onceness: onceness,
523508
store: store,
524509
bounds: bounds.builtin_bounds,
525-
sig: sig,
526-
abi: abi,
510+
sig: sig
527511
}
528512
}
529513

branches/try/src/librustc/metadata/tyencode.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,6 @@ fn enc_sty(w: &mut MemWriter, cx: &ctxt, st: &ty::sty) {
284284
enc_substs(w, cx, substs);
285285
mywrite!(w, "]");
286286
}
287-
ty::ty_unboxed_closure(def) => {
288-
mywrite!(w, "k{}", (cx.ds)(def));
289-
}
290287
ty::ty_err => {
291288
mywrite!(w, "e");
292289
}
@@ -319,15 +316,14 @@ pub fn enc_bare_fn_ty(w: &mut MemWriter, cx: &ctxt, ft: &ty::BareFnTy) {
319316
enc_fn_sig(w, cx, &ft.sig);
320317
}
321318

322-
pub fn enc_closure_ty(w: &mut MemWriter, cx: &ctxt, ft: &ty::ClosureTy) {
319+
fn enc_closure_ty(w: &mut MemWriter, cx: &ctxt, ft: &ty::ClosureTy) {
323320
enc_fn_style(w, ft.fn_style);
324321
enc_onceness(w, ft.onceness);
325322
enc_trait_store(w, cx, ft.store);
326323
let bounds = ty::ParamBounds {builtin_bounds: ft.bounds,
327324
trait_bounds: Vec::new()};
328325
enc_bounds(w, cx, &bounds);
329326
enc_fn_sig(w, cx, &ft.sig);
330-
enc_abi(w, ft.abi);
331327
}
332328

333329
fn enc_fn_sig(w: &mut MemWriter, cx: &ctxt, fsig: &ty::FnSig) {

0 commit comments

Comments
 (0)