Skip to content

Commit 7fa1c1f

Browse files
committed
---
yaml --- r: 64908 b: refs/heads/snap-stage3 c: 9e85745 h: refs/heads/master v: v3
1 parent d0162c9 commit 7fa1c1f

File tree

14 files changed

+32
-77
lines changed

14 files changed

+32
-77
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6a69d27a0f0c9510b982e7bec5f8a72fd1da3296
4+
refs/heads/snap-stage3: 9e857458d6ccf236361cefe33c313bc3c31d9428
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/trans/base.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2258,13 +2258,15 @@ pub fn register_fn_full(ccx: @mut CrateContext,
22582258
node_type: ty::t)
22592259
-> ValueRef {
22602260
let llfty = type_of_fn_from_ty(ccx, node_type);
2261-
register_fn_fuller(ccx, sp, sym, node_id, lib::llvm::CCallConv, llfty)
2261+
register_fn_fuller(ccx, sp, sym, node_id, node_type,
2262+
lib::llvm::CCallConv, llfty)
22622263
}
22632264

22642265
pub fn register_fn_fuller(ccx: @mut CrateContext,
22652266
sp: span,
22662267
sym: ~str,
22672268
node_id: ast::NodeId,
2269+
_node_type: ty::t,
22682270
cc: lib::llvm::CallConv,
22692271
fn_ty: Type)
22702272
-> ValueRef {

branches/snap-stage3/src/librustc/middle/trans/foreign.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,10 +1154,17 @@ pub fn register_foreign_fn(ccx: @mut CrateContext,
11541154
-> ValueRef {
11551155
let _icx = push_ctxt("foreign::register_foreign_fn");
11561156

1157+
let t = ty::node_id_to_type(ccx.tcx, node_id);
11571158
let sym = Cell::new(sym);
11581159

11591160
let tys = shim_types(ccx, node_id);
11601161
do tys.fn_ty.decl_fn |fnty| {
1161-
register_fn_fuller(ccx, sp, sym.take(), node_id, lib::llvm::CCallConv, fnty)
1162+
register_fn_fuller(ccx,
1163+
sp,
1164+
sym.take(),
1165+
node_id,
1166+
t,
1167+
lib::llvm::CCallConv,
1168+
fnty)
11621169
}
11631170
}

branches/snap-stage3/src/rt/rust_builtin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -932,12 +932,12 @@ static lock_and_signal change_dir_lock;
932932

933933
extern "C" CDECL void
934934
rust_take_change_dir_lock() {
935-
global_args_lock.lock();
935+
change_dir_lock.lock();
936936
}
937937

938938
extern "C" CDECL void
939939
rust_drop_change_dir_lock() {
940-
global_args_lock.unlock();
940+
change_dir_lock.unlock();
941941
}
942942

943943
//

branches/snap-stage3/src/rt/rust_test_helpers.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,8 @@ rust_dbg_next_port(uintptr_t base_port) {
176176
next_offset += 1;
177177
return this_port;
178178
}
179+
180+
extern "C" CDECL intptr_t
181+
rust_get_test_int() {
182+
return 1;
183+
}

branches/snap-stage3/src/rt/rustrt.def.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,3 +265,4 @@ rust_set_exit_status_newrt
265265
rust_get_exit_status_newrt
266266
rust_take_change_dir_lock
267267
rust_drop_change_dir_lock
268+
rust_get_test_int

branches/snap-stage3/src/test/auxiliary/anon-extern-mod-cross-crate-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
use std::libc;
1919

2020
extern {
21-
pub fn rust_get_argc() -> libc::c_int;
21+
pub fn rust_get_test_int() -> libc::intptr_t;
2222
}

branches/snap-stage3/src/test/auxiliary/foreign_lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ pub mod rustrt {
1414
use std::libc;
1515

1616
extern {
17-
pub fn rust_get_argc() -> libc::c_int;
17+
fn rust_get_test_int() -> libc::intptr_t;
1818
}
1919
}

branches/snap-stage3/src/test/run-pass/anon-extern-mod-cross-crate-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ use anonexternmod::*;
1616

1717
pub fn main() {
1818
unsafe {
19-
rust_get_argc();
19+
rust_get_test_int();
2020
}
2121
}

branches/snap-stage3/src/test/run-pass/anon-extern-mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ use std::libc;
1313
#[abi = "cdecl"]
1414
#[link_name = "rustrt"]
1515
extern {
16-
fn rust_get_argc() -> libc::c_int;
16+
fn rust_get_test_int() -> libc::intptr_t;
1717
}
1818

1919
pub fn main() {
2020
unsafe {
21-
let _ = rust_get_argc();
21+
let _ = rust_get_test_int();
2222
}
2323
}

branches/snap-stage3/src/test/run-pass/foreign-dupe.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ mod rustrt1 {
1717
#[abi = "cdecl"]
1818
#[link_name = "rustrt"]
1919
extern {
20-
pub fn rust_get_argc() -> libc::c_int;
20+
fn rust_get_test_int() -> libc::intptr_t;
2121
}
2222
}
2323

@@ -27,13 +27,13 @@ mod rustrt2 {
2727
#[abi = "cdecl"]
2828
#[link_name = "rustrt"]
2929
extern {
30-
pub fn rust_get_argc() -> libc::c_int;
30+
fn rust_get_test_int() -> libc::intptr_t;
3131
}
3232
}
3333

3434
pub fn main() {
3535
unsafe {
36-
rustrt1::rust_get_argc();
37-
rustrt2::rust_get_argc();
36+
rustrt1::rust_get_test_int();
37+
rustrt2::rust_get_test_int();
3838
}
3939
}

branches/snap-stage3/src/test/run-pass/foreign-no-abi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ mod rustrt {
1414
use std::libc;
1515

1616
extern {
17-
pub fn get_task_id() -> libc::intptr_t;
17+
fn rust_get_test_int() -> libc::intptr_t;
1818
}
1919
}
2020

2121
pub fn main() {
2222
unsafe {
23-
rustrt::get_task_id();
23+
rustrt::rust_get_test_int();
2424
}
2525
}

branches/snap-stage3/src/test/run-pass/invoke-external-foreign.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ extern mod foreign_lib;
1919

2020
pub fn main() {
2121
unsafe {
22-
let foo = foreign_lib::rustrt::rust_get_argc();
22+
let foo = foreign_lib::rustrt::rust_get_test_int();
2323
}
2424
}

branches/snap-stage3/src/test/run-pass/rt-sched-1.rs

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

0 commit comments

Comments
 (0)