Skip to content

Commit b3a247e

Browse files
committed
---
yaml --- r: 80571 b: refs/heads/auto c: 507a7f0 h: refs/heads/master i: 80569: 055c9ae 80567: 500ecb9 v: v3
1 parent e3b9ee1 commit b3a247e

File tree

13 files changed

+140
-164
lines changed

13 files changed

+140
-164
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 010702899197b3305126746adb4278d9da370808
16+
refs/heads/auto: 507a7f093d51829ccde225542bda2a805be32ba2
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/mk/rt.mk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ else ifeq ($(OSTYPE_$(1)), apple-darwin)
102102
LIBUV_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/libuv/libuv.a
103103
JEMALLOC_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/jemalloc/lib/libjemalloc_pic.a
104104
else ifeq ($(OSTYPE_$(1)), unknown-freebsd)
105-
LIBUV_OSTYPE_$(1)_$(2) := unix/freebsd
105+
LIBUV_OSTYPE_$(1)_$(2) := freebsd
106106
LIBUV_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/libuv/libuv.a
107107
JEMALLOC_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/jemalloc/lib/libjemalloc_pic.a
108108
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
109-
LIBUV_OSTYPE_$(1)_$(2) := unix/android
109+
LIBUV_OSTYPE_$(1)_$(2) := android
110110
LIBUV_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/libuv/libuv.a
111111
JEMALLOC_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/jemalloc/lib/libjemalloc_pic.a
112112
else
113-
LIBUV_OSTYPE_$(1)_$(2) := unix/linux
113+
LIBUV_OSTYPE_$(1)_$(2) := linux
114114
LIBUV_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/libuv/libuv.a
115115
JEMALLOC_LIB_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/jemalloc/lib/libjemalloc_pic.a
116116
endif
@@ -178,6 +178,7 @@ export PYTHONPATH := $(PYTHONPATH):$$(S)src/gyp/pylib
178178
$$(LIBUV_MAKEFILE_$(1)_$(2)): $$(LIBUV_DEPS)
179179
(cd $(S)src/libuv/ && \
180180
$$(CFG_PYTHON) ./gyp_uv -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) -D ninja \
181+
-DOS=$$(LIBUV_OSTYPE_$(1)_$(2)) \
181182
-Goutput_dir=$$(@D) --generator-output $$(@D))
182183

183184
# XXX: Shouldn't need platform-specific conditions here

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ pub struct EncodeParams<'self> {
6060
reexports2: middle::resolve::ExportMap2,
6161
item_symbols: &'self HashMap<ast::NodeId, ~str>,
6262
discrim_symbols: &'self HashMap<ast::NodeId, @str>,
63-
non_inlineable_statics: &'self HashSet<ast::NodeId>,
6463
link_meta: &'self LinkMeta,
6564
cstore: @mut cstore::CStore,
6665
encode_inlined_item: encode_inlined_item<'self>,
@@ -90,7 +89,6 @@ pub struct EncodeContext<'self> {
9089
reexports2: middle::resolve::ExportMap2,
9190
item_symbols: &'self HashMap<ast::NodeId, ~str>,
9291
discrim_symbols: &'self HashMap<ast::NodeId, @str>,
93-
non_inlineable_statics: &'self HashSet<ast::NodeId>,
9492
link_meta: &'self LinkMeta,
9593
cstore: &'self cstore::CStore,
9694
encode_inlined_item: encode_inlined_item<'self>,
@@ -909,9 +907,7 @@ fn encode_info_for_item(ecx: &EncodeContext,
909907
encode_name(ecx, ebml_w, item.ident);
910908
let elt = ast_map::path_pretty_name(item.ident, item.id as u64);
911909
encode_path(ecx, ebml_w, path, elt);
912-
if !ecx.non_inlineable_statics.contains(&item.id) {
913-
(ecx.encode_inlined_item)(ecx, ebml_w, path, ii_item(item));
914-
}
910+
(ecx.encode_inlined_item)(ecx, ebml_w, path, ii_item(item));
915911
ebml_w.end_tag();
916912
}
917913
item_fn(_, purity, _, ref generics, _) => {
@@ -1732,7 +1728,6 @@ pub fn encode_metadata(parms: EncodeParams, crate: &Crate) -> ~[u8] {
17321728
encode_inlined_item,
17331729
link_meta,
17341730
reachable,
1735-
non_inlineable_statics,
17361731
_
17371732
} = parms;
17381733
let type_abbrevs = @mut HashMap::new();
@@ -1744,7 +1739,6 @@ pub fn encode_metadata(parms: EncodeParams, crate: &Crate) -> ~[u8] {
17441739
reexports2: reexports2,
17451740
item_symbols: item_symbols,
17461741
discrim_symbols: discrim_symbols,
1747-
non_inlineable_statics: non_inlineable_statics,
17481742
link_meta: link_meta,
17491743
cstore: cstore,
17501744
encode_inlined_item: encode_inlined_item,

branches/auto/src/librustc/middle/trans/_match.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,16 +324,15 @@ fn trans_opt(bcx: @mut Block, o: &Opt) -> opt_result {
324324
return single_result(datumblock.to_result(bcx));
325325
}
326326
lit(ConstLit(lit_id)) => {
327-
let (llval, _) = consts::get_const_val(bcx.ccx(), lit_id);
327+
let llval = consts::get_const_val(bcx.ccx(), lit_id);
328328
return single_result(rslt(bcx, llval));
329329
}
330330
var(disr_val, repr) => {
331331
return adt::trans_case(bcx, repr, disr_val);
332332
}
333333
range(l1, l2) => {
334-
let (l1, _) = consts::const_expr(ccx, l1);
335-
let (l2, _) = consts::const_expr(ccx, l2);
336-
return range_result(rslt(bcx, l1), rslt(bcx, l2));
334+
return range_result(rslt(bcx, consts::const_expr(ccx, l1)),
335+
rslt(bcx, consts::const_expr(ccx, l2)));
337336
}
338337
vec_len(n, vec_len_eq, _) => {
339338
return single_result(rslt(bcx, C_int(ccx, n as int)));

branches/auto/src/librustc/middle/trans/base.rs

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,29 +2494,12 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
24942494
let sym = exported_name(ccx, my_path, ty, i.attrs);
24952495

24962496
let v = match i.node {
2497-
ast::item_static(_, _, expr) => {
2498-
// If this static came from an external crate, then
2499-
// we need to get the symbol from csearch instead of
2500-
// using the current crate's name/version
2501-
// information in the hash of the symbol
2502-
debug!("making %s", sym);
2503-
let sym = match ccx.external_srcs.find(&i.id) {
2504-
Some(&did) => {
2505-
debug!("but found in other crate...");
2506-
csearch::get_symbol(ccx.sess.cstore, did)
2507-
}
2508-
None => sym
2509-
};
2510-
2497+
ast::item_static(_, m, expr) => {
25112498
// We need the translated value here, because for enums the
25122499
// LLVM type is not fully determined by the Rust type.
2513-
let (v, inlineable) = consts::const_expr(ccx, expr);
2500+
let v = consts::const_expr(ccx, expr);
25142501
ccx.const_values.insert(id, v);
2515-
if !inlineable {
2516-
debug!("%s not inlined", sym);
2517-
ccx.non_inlineable_statics.insert(id);
2518-
}
2519-
exprt = true;
2502+
exprt = (m == ast::MutMutable || i.vis == ast::public);
25202503

25212504
unsafe {
25222505
let llty = llvm::LLVMTypeOf(v);
@@ -2967,7 +2950,6 @@ pub fn crate_ctxt_to_encode_parms<'r>(cx: &'r CrateContext, ie: encoder::encode_
29672950
reexports2: cx.exp_map2,
29682951
item_symbols: item_symbols,
29692952
discrim_symbols: discrim_symbols,
2970-
non_inlineable_statics: &cx.non_inlineable_statics,
29712953
link_meta: link_meta,
29722954
cstore: cx.sess.cstore,
29732955
encode_inlined_item: ie,

0 commit comments

Comments
 (0)