Skip to content

Commit 4dce034

Browse files
committed
---
yaml --- r: 50029 b: refs/heads/auto c: 049e1f9 h: refs/heads/master i: 50027: 8020449 v: v3
1 parent df5f18e commit 4dce034

File tree

25 files changed

+343
-171
lines changed

25 files changed

+343
-171
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: b9fc773649215c8cb47f0e71fd6d2e7f291240da
17+
refs/heads/auto: 049e1f9a1f60cfbc4136bd8496737e707ca05a42
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167

branches/auto/src/libcore/rt/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ pub fn get() -> &Environment {
4444

4545
extern {
4646
fn rust_get_rt_env() -> &Environment;
47-
}
47+
}

branches/auto/src/libcore/rt/stack.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ pub impl StackSegment {
3737
pub struct StackPool(());
3838

3939
impl StackPool {
40-
41-
static fn new() -> StackPool { StackPool(()) }
40+
static pub fn new() -> StackPool { StackPool(()) }
4241

4342
fn take_segment(&self, min_size: uint) -> StackSegment {
4443
StackSegment::new(min_size)

branches/auto/src/libcore/task/rt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub type rust_task = libc::c_void;
3030
#[allow(non_camel_case_types)] // runtime type
3131
pub type rust_closure = libc::c_void;
3232

33-
extern {
33+
pub extern {
3434
#[rust_stack]
3535
fn rust_task_yield(task: *rust_task) -> bool;
3636

branches/auto/src/librustc/front/config.rs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -185,19 +185,18 @@ pub fn metas_in_cfg(cfg: ast::crate_cfg,
185185
// Pull the inner meta_items from the #[cfg(meta_item, ...)] attributes,
186186
// so we can match against them. This is the list of configurations for
187187
// which the item is valid
188-
let cfg_metas = vec::filter_map(cfg_metas, |i| attr::get_meta_item_list(i));
189-
190-
if cfg_metas.all(|c| c.is_empty()) { return true; }
191-
192-
cfg_metas.any(|cfg_meta| {
193-
cfg_meta.all(|cfg_mi| {
194-
match cfg_mi.node {
195-
ast::meta_list(s, ref it) if *s == ~"not"
196-
=> it.all(|mi| !attr::contains(cfg, *mi)),
197-
_ => attr::contains(cfg, *cfg_mi)
198-
}
199-
})
200-
})
188+
let cfg_metas =
189+
vec::concat(
190+
vec::filter_map(cfg_metas, |i| attr::get_meta_item_list(i)));
191+
192+
let has_cfg_metas = vec::len(cfg_metas) > 0u;
193+
if !has_cfg_metas { return true; }
194+
195+
for cfg_metas.each |cfg_mi| {
196+
if attr::contains(cfg, *cfg_mi) { return true; }
197+
}
198+
199+
return false;
201200
}
202201

203202

branches/auto/src/librustc/metadata/decoder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ fn item_family(item: ebml::Doc) -> Family {
146146

147147
fn item_visibility(item: ebml::Doc) -> ast::visibility {
148148
let visibility = reader::get_doc(item, tag_items_data_item_visibility);
149+
debug!("item visibility for %?", item_family(item));
149150
match reader::doc_as_u8(visibility) as char {
150151
'y' => ast::public,
151152
'n' => ast::private,

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,7 @@ fn encode_info_for_item(ecx: @EncodeContext, ebml_w: writer::Encoder,
881881
encode_family(ebml_w, purity_fn_family(mty.fty.purity));
882882
encode_self_type(ebml_w, mty.self_ty);
883883
encode_method_sort(ebml_w, 'r');
884+
encode_visibility(ebml_w, ast::public);
884885
ebml_w.end_tag();
885886
}
886887
provided(m) => {
@@ -896,6 +897,7 @@ fn encode_info_for_item(ecx: @EncodeContext, ebml_w: writer::Encoder,
896897
encode_family(ebml_w, purity_fn_family(mty.fty.purity));
897898
encode_self_type(ebml_w, mty.self_ty);
898899
encode_method_sort(ebml_w, 'p');
900+
encode_visibility(ebml_w, m.vis);
899901
ebml_w.end_tag();
900902
}
901903
}
@@ -930,6 +932,11 @@ fn encode_info_for_item(ecx: @EncodeContext, ebml_w: writer::Encoder,
930932
let mut m_path = vec::append(~[], path); // :-(
931933
m_path += [ast_map::path_name(item.ident)];
932934
encode_path(ecx, ebml_w, m_path, ast_map::path_name(ty_m.ident));
935+
936+
// For now, use the item visibility until trait methods can have
937+
// real visibility in the AST.
938+
encode_visibility(ebml_w, item.vis);
939+
933940
ebml_w.end_tag();
934941
}
935942
@@ -1018,7 +1025,7 @@ fn encode_info_for_items(ecx: @EncodeContext, ebml_w: writer::Encoder,
10181025
|ni, cx, v| {
10191026
visit::visit_foreign_item(ni, cx, v);
10201027
match ecx.tcx.items.get(&ni.id) {
1021-
ast_map::node_foreign_item(_, abi, pt) => {
1028+
ast_map::node_foreign_item(_, abi, _, pt) => {
10221029
encode_info_for_foreign_item(ecx, ebml_w, ni,
10231030
index, /*bad*/copy *pt,
10241031
abi);

0 commit comments

Comments
 (0)