Skip to content

Commit 36258dd

Browse files
committed
---
yaml --- r: 146290 b: refs/heads/try2 c: 24a69dd h: refs/heads/master v: v3
1 parent 8ff9ddf commit 36258dd

File tree

25 files changed

+6855
-151
lines changed

25 files changed

+6855
-151
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: e4938aabbbf0f7c8e248611c3c7251b7af24e7b7
8+
refs/heads/try2: 24a69ddbbccda30eaf9f4dfc0106fda80faa1397
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/stage0.mk

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,17 @@ $$(HLIB0_H_$(1))/$(CFG_EXTRALIB_$(1)): \
9898
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(EXTRALIB_GLOB_$(1)) $$@
9999
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(EXTRALIB_GLOB_$(4)),$$(notdir $$@))
100100

101-
$$(HLIB0_H_$(1))/$(CFG_LIBRUSTUV_$(1)): \
102-
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_LIBRUSTUV_$(1)) \
103-
| $(HLIB0_H_$(1))/
104-
@$$(call E, cp: $$@)
105-
$$(call CHECK_FOR_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTUV_GLOB_$(4)),$$(notdir $$@))
106-
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(LIBRUSTUV_GLOB_$(1)) $$@
107-
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTUV_GLOB_$(4)),$$(notdir $$@))
101+
$$(HLIB0_H_$(1))/$(CFG_LIBRUSTUV_$(1)):
102+
touch $$@
103+
# NOTE: this should get uncommented after a snapshot and the rule above this can
104+
# get deleted, right now we're not expecting a librustuv in a snapshot.
105+
# $$(HLIB0_H_$(1))/$(CFG_LIBRUSTUV_$(1)): \
106+
# $$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_LIBRUSTUV_$(1)) \
107+
# | $(HLIB0_H_$(1))/
108+
# @$$(call E, cp: $$@)
109+
# $$(call CHECK_FOR_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTUV_GLOB_$(4)),$$(notdir $$@))
110+
# $$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(LIBRUSTUV_GLOB_$(1)) $$@
111+
# $$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTUV_GLOB_$(4)),$$(notdir $$@))
108112

109113
$$(HLIB0_H_$(1))/$(CFG_LIBRUSTC_$(1)): \
110114
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_LIBRUSTC_$(1)) \

branches/try2/src/etc/vim/indent/rust.vim

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim indent file
22
" Language: Rust
33
" Author: Chris Morgan <[email protected]>
4-
" Last Change: 2013 Oct 29
4+
" Last Change: 2013 Jul 10
55

66
" Only load this indent file when no other was loaded.
77
if exists("b:did_indent")
@@ -104,23 +104,8 @@ function GetRustIndent(lnum)
104104
let prevline = s:get_line_trimmed(prevnonblank(a:lnum - 1))
105105
if prevline[len(prevline) - 1] == ","
106106
\ && s:get_line_trimmed(a:lnum) !~ "^\\s*[\\[\\]{}]"
107-
\ && prevline !~ "^\\s*fn\\s"
108107
" Oh ho! The previous line ended in a comma! I bet cindent will try to
109-
" take this too far... For now, let's normally use the previous line's
110-
" indent.
111-
112-
" One case where this doesn't work out is where *this* line contains
113-
" square or curly brackets; then we normally *do* want to be indenting
114-
" further.
115-
"
116-
" Another case where we don't want to is one like a function
117-
" definition with arguments spread over multiple lines:
118-
"
119-
" fn foo(baz: Baz,
120-
" baz: Baz) // <-- cindent gets this right by itself
121-
"
122-
" There are probably other cases where we don't want to do this as
123-
" well. Add them as needed.
108+
" take this too far... For now, let's use the previous line's indent
124109
return GetRustIndent(a:lnum - 1)
125110
endif
126111

branches/try2/src/etc/vim/syntax/rust.vim

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: Patrick Walton <[email protected]>
44
" Maintainer: Ben Blum <[email protected]>
55
" Maintainer: Chris Morgan <[email protected]>
6-
" Last Change: 2013 Oct 29
6+
" Last Change: 2013 Oct 19
77

88
if version < 600
99
syntax clear
@@ -64,45 +64,47 @@ syn keyword rustEnumVariant Ok Err
6464
"syn keyword rustFunction from_str
6565

6666
" Types and traits {{{3
67-
syn keyword rustTrait Any AnyOwnExt AnyRefExt AnyMutRefExt
68-
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr ToBytesConsume
69-
syn keyword rustTrait Bool
7067
syn keyword rustTrait ToCStr
71-
syn keyword rustTrait Char
7268
syn keyword rustTrait Clone DeepClone
7369
syn keyword rustTrait Eq ApproxEq Ord TotalEq TotalOrd Ordering Equiv
7470
syn keyword rustEnumVariant Less Equal Greater
71+
syn keyword rustTrait Char
7572
syn keyword rustTrait Container Mutable Map MutableMap Set MutableSet
76-
syn keyword rustTrait Default
7773
syn keyword rustTrait Hash
78-
syn keyword rustTrait FromStr
74+
syn keyword rustTrait Times
7975
syn keyword rustTrait FromIterator Extendable
8076
syn keyword rustTrait Iterator DoubleEndedIterator RandomAccessIterator ClonableIterator
8177
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator ExactSize
82-
syn keyword rustTrait Times
83-
84-
syn keyword rustTrait Algebraic Trigonometric Exponential Hyperbolic
85-
syn keyword rustTrait Bitwise BitCount Bounded
86-
syn keyword rustTrait Integer Fractional Real RealExt
8778
syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul
8879
syn keyword rustTrait Orderable Signed Unsigned Round
80+
syn keyword rustTrait Algebraic Trigonometric Exponential Hyperbolic
81+
syn keyword rustTrait Integer Fractional Real RealExt
82+
syn keyword rustTrait Bitwise BitCount Bounded
8983
syn keyword rustTrait Primitive Int Float ToStrRadix ToPrimitive FromPrimitive
90-
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
84+
syn keyword rustTrait GenericPath
85+
syn keyword rustTrait Path
86+
syn keyword rustTrait PosixPath
87+
syn keyword rustTrait WindowsPath
9188
syn keyword rustTrait RawPtr
89+
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr ToBytesConsume
9290
syn keyword rustTrait SendStr SendStrOwned SendStrStatic IntoSendStr
9391
syn keyword rustTrait Str StrVector StrSlice OwnedStr
92+
syn keyword rustTrait FromStr
9493
syn keyword rustTrait IterBytes
9594
syn keyword rustTrait ToStr ToStrConsume
9695
syn keyword rustTrait CopyableTuple ImmutableTuple
97-
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
98-
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
99-
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12
100-
syn keyword rustTrait ImmutableTuple1 ImmutableTuple2 ImmutableTuple3 ImmutableTuple4
101-
syn keyword rustTrait ImmutableTuple5 ImmutableTuple6 ImmutableTuple7 ImmutableTuple8
102-
syn keyword rustTrait ImmutableTuple9 ImmutableTuple10 ImmutableTuple11 ImmutableTuple12
96+
syn keyword rustTrait Tuple1 ImmutableTuple1
97+
syn keyword rustTrait Tuple2 Tuple3 Tuple4 Tuple5
98+
syn keyword rustTrait Tuple6 Tuple7 Tuple8 Tuple9
99+
syn keyword rustTrait Tuple10 Tuple11 Tuple12
100+
syn keyword rustTrait ImmutableTuple2 ImmutableTuple3 ImmutableTuple4 ImmutableTuple5
101+
syn keyword rustTrait ImmutableTuple6 ImmutableTuple7 ImmutableTuple8 ImmutableTuple9
102+
syn keyword rustTrait ImmutableTuple10 ImmutableTuple11 ImmutableTuple12
103+
syn keyword rustTrait Vector VectorVector CopyableVector ImmutableVector
103104
syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector ImmutableCopyableVector
104105
syn keyword rustTrait OwnedVector OwnedCopyableVector OwnedEqVector MutableVector
105-
syn keyword rustTrait Vector VectorVector CopyableVector ImmutableVector
106+
syn keyword rustTrait Reader ReaderUtil Writer WriterUtil
107+
syn keyword rustTrait Default
106108

107109
"syn keyword rustFunction stream
108110
syn keyword rustTrait Port Chan GenericChan GenericSmartChan GenericPort Peekable

branches/try2/src/librustuv/rustuv.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,15 @@ impl<H, W: Watcher + NativeHandle<*H>> WatcherInterop for W {
232232
}
233233
}
234234

235-
fn close(mut self, cb: NullCallback) {
235+
fn close(self, cb: NullCallback) {
236+
let mut this = self;
236237
{
237-
let data = self.get_watcher_data();
238+
let data = this.get_watcher_data();
238239
assert!(data.close_cb.is_none());
239240
data.close_cb = Some(cb);
240241
}
241242

242-
unsafe { uvll::close(self.native_handle(), close_cb); }
243+
unsafe { uvll::close(this.native_handle(), close_cb); }
243244

244245
extern fn close_cb(handle: *uvll::uv_handle_t) {
245246
let mut h: Handle = NativeHandle::from_native_handle(handle);

branches/try2/src/librustuv/uvio.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ trait HomingIO {
122122
a // return the result of the IO
123123
}
124124

125-
fn home_for_io_consume<A>(mut self, io: &fn(Self) -> A) -> A {
126-
let home = self.go_to_IO_home();
127-
let a = io(self); // do IO
125+
fn home_for_io_consume<A>(self, io: &fn(Self) -> A) -> A {
126+
let mut this = self;
127+
let home = this.go_to_IO_home();
128+
let a = io(this); // do IO
128129
HomingIO::restore_original_home(None::<Self>, home);
129130
a // return the result of the IO
130131
}
@@ -238,7 +239,7 @@ impl EventLoop for UvEventLoop {
238239
}
239240
}
240241

241-
#[cfg(not(test))]
242+
#[cfg(not(stage0), not(test))]
242243
#[lang = "event_loop_factory"]
243244
pub extern "C" fn new_loop() -> ~EventLoop {
244245
~UvEventLoop::new() as ~EventLoop

branches/try2/src/libstd/rt/crate_map.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use container::MutableSet;
1212
use hashmap::HashSet;
1313
use option::{Some, None, Option};
1414
use vec::ImmutableVector;
15+
#[cfg(not(stage0))]
1516
use rt::rtio::EventLoop;
1617

1718
// Need to tell the linker on OS X to not barf on undefined symbols
@@ -26,6 +27,14 @@ pub struct ModEntry<'self> {
2627
log_level: *mut u32
2728
}
2829

30+
#[cfg(stage0)]
31+
pub struct CrateMap<'self> {
32+
version: i32,
33+
entries: &'self [ModEntry<'self>],
34+
children: &'self [&'self CrateMap<'self>]
35+
}
36+
37+
#[cfg(not(stage0))]
2938
pub struct CrateMap<'self> {
3039
version: i32,
3140
entries: &'self [ModEntry<'self>],
@@ -36,6 +45,12 @@ pub struct CrateMap<'self> {
3645
#[cfg(not(windows))]
3746
pub fn get_crate_map() -> Option<&'static CrateMap<'static>> {
3847
extern {
48+
#[cfg(stage0)]
49+
#[weak_linkage]
50+
#[link_name = "_rust_crate_map_toplevel"]
51+
static CRATE_MAP: CrateMap<'static>;
52+
53+
#[cfg(not(stage0))]
3954
#[crate_map]
4055
static CRATE_MAP: CrateMap<'static>;
4156
}

branches/try2/src/libstd/rt/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ pub mod io;
121121
/// The EventLoop and internal synchronous I/O interface.
122122
pub mod rtio;
123123

124+
/// libuv and default rtio implementation.
125+
#[cfg(stage0)]
126+
pub mod uv;
127+
124128
/// The Local trait for types that are accessible via thread-local
125129
/// or task-local storage.
126130
pub mod local;
@@ -459,6 +463,13 @@ pub fn in_green_task_context() -> bool {
459463
}
460464
}
461465

466+
#[cfg(stage0)]
467+
pub fn new_event_loop() -> ~rtio::EventLoop {
468+
use rt::uv::uvio::UvEventLoop;
469+
~UvEventLoop::new() as ~rtio::EventLoop
470+
}
471+
472+
#[cfg(not(stage0))]
462473
pub fn new_event_loop() -> ~rtio::EventLoop {
463474
#[fixed_stack_segment]; #[allow(cstack)];
464475

0 commit comments

Comments
 (0)