Skip to content

Commit 13f39c4

Browse files
committed
---
yaml --- r: 95658 b: refs/heads/dist-snap c: d53159a h: refs/heads/master v: v3
1 parent 0d83b90 commit 13f39c4

File tree

28 files changed

+671
-169
lines changed

28 files changed

+671
-169
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: e4c6523c65c45d0fc4485b9e691043c7b5c61a94
9+
refs/heads/dist-snap: d53159a643e1f4a7e1275e9a318b8505526d96ac
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
branch = master
99
[submodule "src/gyp"]
1010
path = src/gyp
11-
url = https://git.chromium.org/external/gyp.git
11+
url = https://github.com/brson/gyp.git

branches/dist-snap/src/libextra/arc.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,12 @@ pub struct Arc<T> { priv x: UnsafeArc<T> }
117117
*/
118118
impl<T:Freeze+Send> Arc<T> {
119119
/// Create an atomically reference counted wrapper.
120+
#[inline]
120121
pub fn new(data: T) -> Arc<T> {
121122
Arc { x: UnsafeArc::new(data) }
122123
}
123124

125+
#[inline]
124126
pub fn get<'a>(&'a self) -> &'a T {
125127
unsafe { &*self.x.get_immut() }
126128
}
@@ -148,6 +150,7 @@ impl<T:Freeze + Send> Clone for Arc<T> {
148150
* object. However, one of the `arc` objects can be sent to another task,
149151
* allowing them to share the underlying data.
150152
*/
153+
#[inline]
151154
fn clone(&self) -> Arc<T> {
152155
Arc { x: self.x.clone() }
153156
}
@@ -167,6 +170,7 @@ pub struct MutexArc<T> { priv x: UnsafeArc<MutexArcInner<T>> }
167170

168171
impl<T:Send> Clone for MutexArc<T> {
169172
/// Duplicate a mutex-protected Arc. See arc::clone for more details.
173+
#[inline]
170174
fn clone(&self) -> MutexArc<T> {
171175
// NB: Cloning the underlying mutex is not necessary. Its reference
172176
// count would be exactly the same as the shared state's.
@@ -349,6 +353,7 @@ pub struct RWArc<T> {
349353

350354
impl<T:Freeze + Send> Clone for RWArc<T> {
351355
/// Duplicate a rwlock-protected Arc. See arc::clone for more details.
356+
#[inline]
352357
fn clone(&self) -> RWArc<T> {
353358
RWArc { x: self.x.clone() }
354359
}

branches/dist-snap/src/libextra/comm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub fn rendezvous<T: Send>() -> (SyncPort<T>, SyncChan<T>) {
136136
#[cfg(test)]
137137
mod test {
138138
use comm::{DuplexStream, rendezvous};
139-
use std::rt::test::run_in_newsched_task;
139+
use std::rt::test::run_in_uv_task;
140140
use std::task::spawn_unlinked;
141141

142142

@@ -165,7 +165,7 @@ mod test {
165165
#[test]
166166
fn recv_a_lot() {
167167
// Rendezvous streams should be able to handle any number of messages being sent
168-
do run_in_newsched_task {
168+
do run_in_uv_task {
169169
let (port, chan) = rendezvous();
170170
do spawn {
171171
do 1000000.times { chan.send(()) }

branches/dist-snap/src/librustc/middle/borrowck/gather_loans/mod.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,15 @@ fn gather_loans_in_expr(this: &mut GatherLoanCtxt,
230230

231231
// make sure that the thing we are pointing out stays valid
232232
// for the lifetime `scope_r` of the resulting ptr:
233-
let scope_r = ty_region(tcx, ex.span, ty::expr_ty(tcx, ex));
234-
this.guarantee_valid(ex.id,
235-
ex.span,
236-
base_cmt,
237-
LoanMutability::from_ast_mutability(mutbl),
238-
scope_r);
233+
let expr_ty = ty::expr_ty(tcx, ex);
234+
if !ty::type_is_bot(expr_ty) {
235+
let scope_r = ty_region(tcx, ex.span, expr_ty);
236+
this.guarantee_valid(ex.id,
237+
ex.span,
238+
base_cmt,
239+
LoanMutability::from_ast_mutability(mutbl),
240+
scope_r);
241+
}
239242
visit::walk_expr(this, ex, ());
240243
}
241244

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

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -288,37 +288,6 @@ pub fn get_extern_const(externs: &mut ExternMap, llmod: ModuleRef,
288288
return c;
289289
}
290290
}
291-
pub fn umax(cx: @mut Block, a: ValueRef, b: ValueRef) -> ValueRef {
292-
let _icx = push_ctxt("umax");
293-
let cond = ICmp(cx, lib::llvm::IntULT, a, b);
294-
return Select(cx, cond, b, a);
295-
}
296-
297-
pub fn umin(cx: @mut Block, a: ValueRef, b: ValueRef) -> ValueRef {
298-
let _icx = push_ctxt("umin");
299-
let cond = ICmp(cx, lib::llvm::IntULT, a, b);
300-
return Select(cx, cond, a, b);
301-
}
302-
303-
// Given a pointer p, returns a pointer sz(p) (i.e., inc'd by sz bytes).
304-
// The type of the returned pointer is always i8*. If you care about the
305-
// return type, use bump_ptr().
306-
pub fn ptr_offs(bcx: @mut Block, base: ValueRef, sz: ValueRef) -> ValueRef {
307-
let _icx = push_ctxt("ptr_offs");
308-
let raw = PointerCast(bcx, base, Type::i8p());
309-
InBoundsGEP(bcx, raw, [sz])
310-
}
311-
312-
// Increment a pointer by a given amount and then cast it to be a pointer
313-
// to a given type.
314-
pub fn bump_ptr(bcx: @mut Block, t: ty::t, base: ValueRef, sz: ValueRef) ->
315-
ValueRef {
316-
let _icx = push_ctxt("bump_ptr");
317-
let ccx = bcx.ccx();
318-
let bumped = ptr_offs(bcx, base, sz);
319-
let typ = type_of(ccx, t).ptr_to();
320-
PointerCast(bcx, bumped, typ)
321-
}
322291

323292
// Returns a pointer to the body for the box. The box may be an opaque
324293
// box. The result will be casted to the type of body_t, if it is statically
@@ -434,10 +403,6 @@ pub fn malloc_general(bcx: @mut Block, t: ty::t, heap: heap) -> MallocResult {
434403
assert!(heap != heap_exchange);
435404
malloc_general_dyn(bcx, t, heap, llsize_of(bcx.ccx(), ty))
436405
}
437-
pub fn malloc_boxed(bcx: @mut Block, t: ty::t)
438-
-> MallocResult {
439-
malloc_general(bcx, t, heap_managed)
440-
}
441406

442407
pub fn heap_for_unique(bcx: @mut Block, t: ty::t) -> heap {
443408
if ty::type_contents(bcx.tcx(), t).contains_managed() {
@@ -534,12 +499,6 @@ pub fn set_no_split_stack(f: ValueRef) {
534499
}
535500
}
536501

537-
pub fn set_glue_inlining(f: ValueRef, t: ty::t) {
538-
if ty::type_is_structural(t) {
539-
set_optimize_for_size(f);
540-
} else { set_always_inline(f); }
541-
}
542-
543502
// Double-check that we never ask LLVM to declare the same symbol twice. It
544503
// silently mangles such symbols, breaking our linkage model.
545504
pub fn note_unique_llvm_symbol(ccx: &mut CrateContext, sym: @str) {

branches/dist-snap/src/librustc/middle/trans/glue.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,6 @@ pub fn declare_generic_glue(ccx: &mut CrateContext, t: ty::t, llfnty: Type,
674674
debug!("{} is for type {}", fn_nm, ppaux::ty_to_str(ccx.tcx, t));
675675
note_unique_llvm_symbol(ccx, fn_nm);
676676
let llfn = decl_cdecl_fn(ccx.llmod, fn_nm, llfnty);
677-
set_glue_inlining(llfn, t);
678677
return llfn;
679678
}
680679

branches/dist-snap/src/libstd/ptr.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ impl<T> Clone for *T {
4747
}
4848
}
4949

50+
impl<T> Clone for *mut T {
51+
#[inline]
52+
fn clone(&self) -> *mut T {
53+
*self
54+
}
55+
}
56+
5057
/// Return the first offset `i` such that `f(buf[i]) == true`.
5158
#[inline]
5259
pub unsafe fn position<T>(buf: *T, f: &fn(&T) -> bool) -> uint {

0 commit comments

Comments
 (0)