Skip to content

Commit 57b4dca

Browse files
committed
---
yaml --- r: 50387 b: refs/heads/auto c: dd088af h: refs/heads/master i: 50385: 3255fcd 50383: cc6451b v: v3
1 parent 7f3118c commit 57b4dca

File tree

20 files changed

+166
-267
lines changed

20 files changed

+166
-267
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: 777ad8b20452d94111f9c834d0f277575a564ca3
17+
refs/heads/auto: dd088afd4323cbaad3c6e3692e7d52658d1f2de6
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167

branches/auto/configure

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,10 @@ do
881881
;;
882882
esac
883883
need_ok "LLVM configure failed"
884+
885+
# Hack the tools Makefile to turn off the clang build
886+
sed -i 's/clang//g' tools/Makefile
887+
884888
cd $CFG_BUILD_DIR
885889
fi
886890

branches/auto/doc/tutorial.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,8 @@ the compiler that unsafety does not leak outside of the unsafe block, and is
875875
used to create safe concepts on top of low-level code.
876876

877877
~~~~
878-
use core::libc::{calloc, free, size_t};
878+
use core::libc::funcs::c95::stdlib::{calloc, free};
879+
use core::libc::types::os::arch::c95::size_t;
879880
880881
fn main() {
881882
unsafe {
@@ -908,7 +909,9 @@ The unsafe code from above can be contained behind a safe API that prevents
908909
memory leaks or use-after-free:
909910

910911
~~~~
911-
use core::libc::{calloc, free, c_void, size_t};
912+
use core::libc::funcs::c95::stdlib::{calloc, free};
913+
use core::libc::types::common::c95::c_void;
914+
use core::libc::types::os::arch::c95::size_t;
912915
913916
struct Blob { priv ptr: *c_void }
914917
@@ -982,9 +985,7 @@ when it is collected.
982985

983986
If an object doesn't contain garbage-collected boxes, it consists of a single
984987
ownership tree and is given the `Owned` trait which allows it to be sent
985-
between tasks. Custom destructors can only be implemented directly on types
986-
that are `Owned`, but garbage-collected boxes can still *contain* types with
987-
custom destructors.
988+
between tasks.
988989

989990
# Boxes
990991

@@ -1035,10 +1036,10 @@ let z = x; // no new memory allocated, x can no longer be used
10351036
# Borrowed pointers
10361037

10371038
Rust's borrowed pointers are a general purpose reference type. In contrast with
1038-
owned boxes, where the holder of an owned box is the owner of the pointed-to
1039-
memory, borrowed pointers never imply ownership. A pointer can be borrowed to
1040-
any object, and the compiler verifies that it cannot outlive the lifetime of
1041-
the object.
1039+
owned pointers, where the holder of an owned pointer is the owner of the
1040+
pointed-to memory, borrowed pointers never imply ownership. A pointer can be
1041+
borrowed to any object, and the compiler verifies that it cannot outlive the
1042+
lifetime of the object.
10421043

10431044
As an example, consider a simple struct type, `Point`:
10441045

branches/auto/src/libcore/unstable/lang.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ pub unsafe fn fail_borrowed() {
6464

6565
// FIXME #4942: Make these signatures agree with exchange_alloc's signatures
6666
#[lang="exchange_malloc"]
67-
#[inline(always)]
6867
pub unsafe fn exchange_malloc(td: *c_char, size: uintptr_t) -> *c_char {
6968
transmute(exchange_alloc::malloc(transmute(td), transmute(size)))
7069
}
@@ -73,13 +72,11 @@ pub unsafe fn exchange_malloc(td: *c_char, size: uintptr_t) -> *c_char {
7372
// inside a landing pad may corrupt the state of the exception handler. If a
7473
// problem occurs, call exit instead.
7574
#[lang="exchange_free"]
76-
#[inline(always)]
7775
pub unsafe fn exchange_free(ptr: *c_char) {
7876
exchange_alloc::free(transmute(ptr))
7977
}
8078

8179
#[lang="malloc"]
82-
#[inline(always)]
8380
pub unsafe fn local_malloc(td: *c_char, size: uintptr_t) -> *c_char {
8481
return rustrt::rust_upcall_malloc(td, size);
8582
}
@@ -88,7 +85,6 @@ pub unsafe fn local_malloc(td: *c_char, size: uintptr_t) -> *c_char {
8885
// inside a landing pad may corrupt the state of the exception handler. If a
8986
// problem occurs, call exit instead.
9087
#[lang="free"]
91-
#[inline(always)]
9288
pub unsafe fn local_free(ptr: *c_char) {
9389
rustrt::rust_upcall_free(ptr);
9490
}
@@ -121,7 +117,6 @@ pub unsafe fn check_not_borrowed(a: *u8) {
121117
}
122118

123119
#[lang="strdup_uniq"]
124-
#[inline(always)]
125120
pub unsafe fn strdup_uniq(ptr: *c_uchar, len: uint) -> ~str {
126121
str::raw::from_buf_len(ptr, len)
127122
}

branches/auto/src/librustc/middle/liveness.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,11 +1306,11 @@ pub impl Liveness {
13061306
self.propagate_through_expr(e, succ)
13071307
}
13081308

1309-
expr_inline_asm(ref ia) =>{
1310-
let succ = do ia.inputs.foldr(succ) |&(_, expr), succ| {
1309+
expr_inline_asm(_, ref ins, ref outs, _, _, _) =>{
1310+
let succ = do ins.foldr(succ) |&(_, expr), succ| {
13111311
self.propagate_through_expr(expr, succ)
13121312
};
1313-
do ia.outputs.foldr(succ) |&(_, expr), succ| {
1313+
do outs.foldr(succ) |&(_, expr), succ| {
13141314
self.propagate_through_expr(expr, succ)
13151315
}
13161316
}
@@ -1580,19 +1580,14 @@ fn check_expr(expr: @expr, &&self: @Liveness, vt: vt<@Liveness>) {
15801580
visit::visit_expr(expr, self, vt);
15811581
}
15821582

1583-
expr_inline_asm(ref ia) => {
1584-
for ia.inputs.each |&(_, in)| {
1583+
expr_inline_asm(_, ref ins, ref outs, _, _, _) => {
1584+
for ins.each |&(_, in)| {
15851585
(vt.visit_expr)(in, self, vt);
15861586
}
15871587

15881588
// Output operands must be lvalues
1589-
for ia.outputs.each |&(_, out)| {
1590-
match out.node {
1591-
expr_addr_of(_, inner) => {
1592-
self.check_lvalue(inner, vt);
1593-
}
1594-
_ => {}
1595-
}
1589+
for outs.each |&(_, out)| {
1590+
self.check_lvalue(out, vt);
15961591
(vt.visit_expr)(out, self, vt);
15971592
}
15981593

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

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

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
use core::prelude::*;
1212

1313
use back::abi;
14-
use lib::llvm::{llvm, SetLinkage, InternalLinkage, PrivateLinkage,
15-
ValueRef, TypeRef, Bool, True, False};
14+
use lib::llvm::{llvm, ValueRef, TypeRef, Bool, True, False};
1615
use metadata::csearch;
1716
use middle::const_eval;
1817
use middle::trans::adt;
@@ -105,7 +104,6 @@ fn const_addr_of(cx: @CrateContext, cv: ValueRef) -> ValueRef {
105104
};
106105
llvm::LLVMSetInitializer(gv, cv);
107106
llvm::LLVMSetGlobalConstant(gv, True);
108-
SetLinkage(gv, PrivateLinkage);
109107
gv
110108
}
111109
}
@@ -485,7 +483,6 @@ fn const_expr_unadjusted(cx: @CrateContext, e: @ast::expr) -> ValueRef {
485483
};
486484
llvm::LLVMSetInitializer(gv, cv);
487485
llvm::LLVMSetGlobalConstant(gv, True);
488-
SetLinkage(gv, PrivateLinkage);
489486
let p = const_ptrcast(cx, gv, llunitty);
490487
C_struct(~[p, sz])
491488
}

0 commit comments

Comments
 (0)