Skip to content

Commit 61ac6c8

Browse files
committed
---
yaml --- r: 57635 b: refs/heads/incoming c: f93b3cd h: refs/heads/master i: 57633: 3a60fa0 57631: ccb03b5 v: v3
1 parent d38e484 commit 61ac6c8

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: bf67eb2362b7d0f37012f2d6dac604c3bbacd2c6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/incoming: af4ea11d09618b800ebec477333a373a75a46d96
9+
refs/heads/incoming: f93b3cd5c3783eabd527607adda891d8a84dab4f
1010
refs/heads/dist-snap: 00dbbd01c2aee72982b3e0f9511ae1d4428c3ba9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/librustc/middle/trans/cabi.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use middle::trans::base::*;
1313
use middle::trans::build::*;
1414
use middle::trans::common::*;
1515

16-
use core::io::println;
1716
use core::libc::c_uint;
1817
use core::option;
1918
use core::vec;

branches/incoming/src/librustc/middle/trans/foreign.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,19 @@ fn build_wrap_fn_(ccx: @CrateContext,
185185
llshimfn: ValueRef,
186186
llwrapfn: ValueRef,
187187
shim_upcall: ValueRef,
188+
needs_c_return: bool,
188189
arg_builder: wrap_arg_builder,
189190
ret_builder: wrap_ret_builder) {
190191
let _icx = ccx.insn_ctxt("foreign::build_wrap_fn_");
191192
let fcx = new_fn_ctxt(ccx, ~[], llwrapfn, tys.fn_sig.output, None);
192193

193-
// Patch up the return type if it's not immediate.
194-
/*if !ty::type_is_immediate(tys.fn_sig.output) {
194+
// Patch up the return type if it's not immediate and we're returning via
195+
// the C ABI.
196+
if needs_c_return && !ty::type_is_immediate(tys.fn_sig.output) {
195197
let lloutputtype = type_of::type_of(*fcx.ccx, tys.fn_sig.output);
196198
fcx.llretptr = Some(alloca(raw_block(fcx, false, fcx.llstaticallocas),
197199
lloutputtype));
198-
}*/
200+
}
199201

200202
let bcx = top_scope_block(fcx, None);
201203
let lltop = bcx.llbb;
@@ -499,6 +501,7 @@ pub fn trans_foreign_mod(ccx: @CrateContext,
499501
llshimfn,
500502
llwrapfn,
501503
ccx.upcalls.call_shim_on_c_stack,
504+
false,
502505
build_args,
503506
build_ret);
504507

@@ -1229,6 +1232,7 @@ pub fn trans_foreign_fn(ccx: @CrateContext,
12291232
llshimfn,
12301233
llwrapfn,
12311234
ccx.upcalls.call_shim_on_rust_stack,
1235+
true,
12321236
build_args,
12331237
build_ret);
12341238

branches/incoming/src/test/bench/shootout-reverse-complement.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// xfail-pretty
2+
13
use core::cast::transmute;
24
use core::libc::{STDOUT_FILENO, c_int, fdopen, fgets, fopen, fputc, fwrite};
35
use core::libc::{size_t};

0 commit comments

Comments
 (0)