Skip to content

Commit 59ac411

Browse files
committed
---
yaml --- r: 81663 b: refs/heads/master c: 133200a h: refs/heads/master i: 81661: a59e8d9 81659: d888a6c 81655: 4583071 81647: ab3836b 81631: fdc760d 81599: c5d02f1 81535: e477cbc 81407: 67f0ced v: v3
1 parent b164398 commit 59ac411

File tree

18 files changed

+153
-1094
lines changed

18 files changed

+153
-1094
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: cb7756a81d3cbc48e79ffaa1a1f9d4934b581166
2+
refs/heads/master: 133200a6e293f6e74b14ddb6334fab11b13e0f46
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
55
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729

trunk/src/librustc/middle/trans/base.rs

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2442,11 +2442,6 @@ pub fn create_entry_wrapper(ccx: @mut CrateContext,
24422442
unsafe {
24432443
llvm::LLVMPositionBuilderAtEnd(bld, llbb);
24442444

2445-
let crate_map = ccx.crate_map;
2446-
let opaque_crate_map = do "crate_map".with_c_str |buf| {
2447-
llvm::LLVMBuildPointerCast(bld, crate_map, Type::i8p().to_ref(), buf)
2448-
};
2449-
24502445
let (start_fn, args) = if use_start_lang_item {
24512446
let start_def_id = match ccx.tcx.lang_items.require(StartFnLangItem) {
24522447
Ok(id) => id,
@@ -2469,8 +2464,7 @@ pub fn create_entry_wrapper(ccx: @mut CrateContext,
24692464
C_null(Type::opaque_box(ccx).ptr_to()),
24702465
opaque_rust_main,
24712466
llvm::LLVMGetParam(llfn, 0),
2472-
llvm::LLVMGetParam(llfn, 1),
2473-
opaque_crate_map
2467+
llvm::LLVMGetParam(llfn, 1)
24742468
]
24752469
};
24762470
(start_fn, args)
@@ -2479,8 +2473,7 @@ pub fn create_entry_wrapper(ccx: @mut CrateContext,
24792473
let args = ~[
24802474
C_null(Type::opaque_box(ccx).ptr_to()),
24812475
llvm::LLVMGetParam(llfn, 0 as c_uint),
2482-
llvm::LLVMGetParam(llfn, 1 as c_uint),
2483-
opaque_crate_map
2476+
llvm::LLVMGetParam(llfn, 1 as c_uint)
24842477
];
24852478

24862479
(rust_main, args)
@@ -2661,13 +2654,16 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
26612654
}
26622655
ast::foreign_item_static(*) => {
26632656
let ident = foreign::link_name(ccx, ni);
2664-
let g = do ident.with_c_str |buf| {
2665-
unsafe {
2657+
unsafe {
2658+
let g = do ident.with_c_str |buf| {
26662659
let ty = type_of(ccx, ty);
26672660
llvm::LLVMAddGlobal(ccx.llmod, ty.to_ref(), buf)
2661+
};
2662+
if attr::contains_name(ni.attrs, "weak_linkage") {
2663+
lib::llvm::SetLinkage(g, lib::llvm::ExternalWeakLinkage);
26682664
}
2669-
};
2670-
g
2665+
g
2666+
}
26712667
}
26722668
}
26732669
}

trunk/src/librustc/middle/typeck/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,7 @@ fn check_start_fn_ty(ccx: &CrateCtxt,
402402
bound_lifetime_names: opt_vec::Empty,
403403
inputs: ~[
404404
ty::mk_int(),
405-
ty::mk_imm_ptr(tcx, ty::mk_imm_ptr(tcx, ty::mk_u8())),
406-
ty::mk_imm_ptr(tcx, ty::mk_u8())
405+
ty::mk_imm_ptr(tcx, ty::mk_imm_ptr(tcx, ty::mk_u8()))
407406
],
408407
output: ty::mk_int()
409408
}

trunk/src/libstd/rt/crate_map.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,14 @@ use vec;
1616
use hashmap::HashSet;
1717
use container::MutableSet;
1818

19-
pub struct ModEntry{
19+
extern {
20+
#[cfg(not(stage0))]
21+
#[weak_linkage]
22+
#[link_name = "_rust_crate_map_toplevel"]
23+
static CRATE_MAP: CrateMap;
24+
}
25+
26+
pub struct ModEntry {
2027
name: *c_char,
2128
log_level: *mut u32
2229
}
@@ -34,6 +41,11 @@ struct CrateMap {
3441
children: [*CrateMap, ..1]
3542
}
3643

44+
#[cfg(not(stage0))]
45+
pub fn get_crate_map() -> *CrateMap {
46+
&'static CRATE_MAP as *CrateMap
47+
}
48+
3749
unsafe fn version(crate_map: *CrateMap) -> i32 {
3850
match (*crate_map).version {
3951
1 => return 1,

trunk/src/libstd/rt/io/mod.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,6 @@ pub use self::net::ip::IpAddr;
260260
pub use self::net::tcp::TcpListener;
261261
pub use self::net::tcp::TcpStream;
262262
pub use self::net::udp::UdpStream;
263-
pub use self::pipe::PipeStream;
264-
pub use self::pipe::UnboundPipeStream;
265-
pub use self::process::Process;
266263

267264
// Some extension traits that all Readers and Writers get.
268265
pub use self::extensions::ReaderUtil;
@@ -272,12 +269,6 @@ pub use self::extensions::WriterByteConversions;
272269
/// Synchronous, non-blocking file I/O.
273270
pub mod file;
274271

275-
/// Synchronous, in-memory I/O.
276-
pub mod pipe;
277-
278-
/// Child process management.
279-
pub mod process;
280-
281272
/// Synchronous, non-blocking network I/O.
282273
pub mod net;
283274

trunk/src/libstd/rt/io/pipe.rs

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)