Skip to content

Commit 72769eb

Browse files
committed
---
yaml --- r: 145245 b: refs/heads/try2 c: 817576e h: refs/heads/master i: 145243: 2a05ff3 v: v3
1 parent a3380b4 commit 72769eb

35 files changed

+62
-1807
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: b43ee6cd2eab723e4d3fd4f851c2929087e430b3
8+
refs/heads/try2: 817576ee7001244da68a4ee315ebdc1163d4e648
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/platform.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ CFG_PATH_MUNGE_mips-unknown-linux-gnu := true
343343
CFG_LDPATH_mips-unknown-linux-gnu :=
344344
CFG_RUN_mips-unknown-linux-gnu=
345345
CFG_RUN_TARG_mips-unknown-linux-gnu=
346-
RUSTC_FLAGS_mips-unknown-linux-gnu := --linker=$(CXX_mips-unknown-linux-gnu) --target-cpu mips32r2 --target-feature +mips32r2,+o32
347346

348347
# i686-pc-mingw32 configuration
349348
CC_i686-pc-mingw32=$(CC)
@@ -481,7 +480,7 @@ define CFG_MAKE_TOOLCHAIN
481480
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
482481
$$(call CFG_INSTALL_NAME_$(1),$$(4))
483482

484-
ifeq ($$(findstring $(HOST_$(1)),arm mips),)
483+
ifneq ($(HOST_$(1)),arm)
485484

486485
# We're using llvm-mc as our assembler because it supports
487486
# .cfi pseudo-ops on mac
@@ -493,7 +492,7 @@ define CFG_MAKE_TOOLCHAIN
493492
-o=$$(1)
494493
else
495494

496-
# For the ARM and MIPS crosses, use the toolchain assembler
495+
# For the ARM crosses, use the toolchain assembler
497496
# XXX: We should be able to use the LLVM assembler
498497
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
499498

branches/try2/src/libextra/glob.rs

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,6 @@ fn list_dir_sorted(path: &Path) -> ~[Path] {
137137
/**
138138
* A compiled Unix shell style pattern.
139139
*/
140-
#[cfg(stage0)]
141-
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes)]
142-
pub struct Pattern {
143-
priv tokens: ~[PatternToken]
144-
}
145-
146-
/**
147-
* A compiled Unix shell style pattern.
148-
*/
149-
#[cfg(not(stage0))]
150140
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes, Default)]
151141
pub struct Pattern {
152142
priv tokens: ~[PatternToken]
@@ -465,39 +455,10 @@ fn is_sep(c: char) -> bool {
465455
}
466456
}
467457
468-
/**
469-
* Configuration options to modify the behaviour of `Pattern::matches_with(..)`
470-
*/
471-
#[cfg(stage0)]
472-
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes)]
473-
pub struct MatchOptions {
474-
475-
/**
476-
* Whether or not patterns should be matched in a case-sensitive manner. This
477-
* currently only considers upper/lower case relationships between ASCII characters,
478-
* but in future this might be extended to work with Unicode.
479-
*/
480-
case_sensitive: bool,
481-
482-
/**
483-
* If this is true then path-component separator characters (e.g. `/` on Posix)
484-
* must be matched by a literal `/`, rather than by `*` or `?` or `[...]`
485-
*/
486-
require_literal_separator: bool,
487-
488-
/**
489-
* If this is true then paths that contain components that start with a `.` will
490-
* not match unless the `.` appears literally in the pattern: `*`, `?` or `[...]`
491-
* will not match. This is useful because such files are conventionally considered
492-
* hidden on Unix systems and it might be desirable to skip them when listing files.
493-
*/
494-
require_literal_leading_dot: bool
495-
}
496458
497459
/**
498460
* Configuration options to modify the behaviour of `Pattern::matches_with(..)`
499461
*/
500-
#[cfg(not(stage0))]
501462
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes, Default)]
502463
pub struct MatchOptions {
503464

branches/try2/src/libextra/rl.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,6 @@ use std::libc::{c_char, c_int};
1313
use std::{local_data, str, rt};
1414
use std::unstable::finally::Finally;
1515

16-
#[cfg(stage0)]
17-
pub mod rustrt {
18-
use std::libc::{c_char, c_int};
19-
20-
extern {
21-
fn linenoise(prompt: *c_char) -> *c_char;
22-
fn linenoiseHistoryAdd(line: *c_char) -> c_int;
23-
fn linenoiseHistorySetMaxLen(len: c_int) -> c_int;
24-
fn linenoiseHistorySave(file: *c_char) -> c_int;
25-
fn linenoiseHistoryLoad(file: *c_char) -> c_int;
26-
fn linenoiseSetCompletionCallback(callback: *u8);
27-
fn linenoiseAddCompletion(completions: *(), line: *c_char);
28-
29-
fn rust_take_linenoise_lock();
30-
fn rust_drop_linenoise_lock();
31-
}
32-
}
33-
34-
#[cfg(not(stage0))]
3516
pub mod rustrt {
3617
use std::libc::{c_char, c_int};
3718

@@ -109,7 +90,7 @@ pub fn read(prompt: &str) -> Option<~str> {
10990

11091
pub type CompletionCb = @fn(~str, @fn(~str));
11192

112-
static complete_key: local_data::Key<CompletionCb> = &local_data::Key;
93+
local_data_key!(complete_key: CompletionCb)
11394

11495
/// Bind to the main completion callback in the current task.
11596
///

branches/try2/src/librustc/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ pub mod jit {
190190

191191
// The stage1 compiler won't work, but that doesn't really matter. TLS
192192
// changed only very recently to allow storage of owned values.
193-
static engine_key: local_data::Key<~Engine> = &local_data::Key;
193+
local_data_key!(engine_key: ~Engine)
194194

195195
fn set_engine(engine: ~Engine) {
196196
local_data::set(engine_key, engine)

branches/try2/src/librustc/front/test.rs

Lines changed: 0 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -293,50 +293,6 @@ fn mk_std(cx: &TestCtxt) -> ast::view_item {
293293
}
294294
}
295295

296-
#[cfg(stage0)]
297-
fn mk_test_module(cx: &TestCtxt) -> @ast::item {
298-
299-
// Link to extra
300-
let view_items = ~[mk_std(cx)];
301-
302-
// A constant vector of test descriptors.
303-
let tests = mk_tests(cx);
304-
305-
// The synthesized main function which will call the console test runner
306-
// with our list of tests
307-
let ext_cx = cx.ext_cx;
308-
let mainfn = (quote_item!(
309-
pub fn main() {
310-
#[main];
311-
extra::test::test_main_static(::std::os::args(), TESTS);
312-
}
313-
)).unwrap();
314-
315-
let testmod = ast::_mod {
316-
view_items: view_items,
317-
items: ~[mainfn, tests],
318-
};
319-
let item_ = ast::item_mod(testmod);
320-
321-
// This attribute tells resolve to let us call unexported functions
322-
let resolve_unexported_attr =
323-
attr::mk_attr(attr::mk_word_item(@"!resolve_unexported"));
324-
325-
let item = ast::item {
326-
ident: cx.sess.ident_of("__test"),
327-
attrs: ~[resolve_unexported_attr],
328-
id: ast::DUMMY_NODE_ID,
329-
node: item_,
330-
vis: ast::public,
331-
span: dummy_sp(),
332-
};
333-
334-
debug!("Synthetic test module:\n%s\n",
335-
pprust::item_to_str(@item.clone(), cx.sess.intr()));
336-
337-
return @item;
338-
}
339-
#[cfg(not(stage0))]
340296
fn mk_test_module(cx: &TestCtxt) -> @ast::item {
341297

342298
// Link to extra
@@ -407,21 +363,6 @@ fn path_node_global(ids: ~[ast::Ident]) -> ast::Path {
407363
}
408364
}
409365

410-
#[cfg(stage0)]
411-
fn mk_tests(cx: &TestCtxt) -> @ast::item {
412-
413-
let ext_cx = cx.ext_cx;
414-
415-
// The vector of test_descs for this crate
416-
let test_descs = mk_test_descs(cx);
417-
418-
(quote_item!(
419-
pub static TESTS : &'static [self::extra::test::TestDescAndFn] =
420-
$test_descs
421-
;
422-
)).unwrap()
423-
}
424-
#[cfg(not(stage0))]
425366
fn mk_tests(cx: &TestCtxt) -> @ast::item {
426367
// The vector of test_descs for this crate
427368
let test_descs = mk_test_descs(cx);
@@ -461,63 +402,6 @@ fn mk_test_descs(cx: &TestCtxt) -> @ast::Expr {
461402
}
462403
}
463404

464-
#[cfg(stage0)]
465-
fn mk_test_desc_and_fn_rec(cx: &TestCtxt, test: &Test) -> @ast::Expr {
466-
let span = test.span;
467-
let path = test.path.clone();
468-
469-
let ext_cx = cx.ext_cx;
470-
471-
debug!("encoding %s", ast_util::path_name_i(path));
472-
473-
let name_lit: ast::lit =
474-
nospan(ast::lit_str(ast_util::path_name_i(path).to_managed()));
475-
476-
let name_expr = @ast::Expr {
477-
id: ast::DUMMY_NODE_ID,
478-
node: ast::ExprLit(@name_lit),
479-
span: span
480-
};
481-
482-
let fn_path = path_node_global(path);
483-
484-
let fn_expr = @ast::Expr {
485-
id: ast::DUMMY_NODE_ID,
486-
node: ast::ExprPath(fn_path),
487-
span: span,
488-
};
489-
490-
let t_expr = if test.bench {
491-
quote_expr!( self::extra::test::StaticBenchFn($fn_expr) )
492-
} else {
493-
quote_expr!( self::extra::test::StaticTestFn($fn_expr) )
494-
};
495-
496-
let ignore_expr = if test.ignore {
497-
quote_expr!( true )
498-
} else {
499-
quote_expr!( false )
500-
};
501-
502-
let fail_expr = if test.should_fail {
503-
quote_expr!( true )
504-
} else {
505-
quote_expr!( false )
506-
};
507-
508-
let e = quote_expr!(
509-
self::extra::test::TestDescAndFn {
510-
desc: self::extra::test::TestDesc {
511-
name: self::extra::test::StaticTestName($name_expr),
512-
ignore: $ignore_expr,
513-
should_fail: $fail_expr
514-
},
515-
testfn: $t_expr,
516-
}
517-
);
518-
e
519-
}
520-
#[cfg(not(stage0))]
521405
fn mk_test_desc_and_fn_rec(cx: &TestCtxt, test: &Test) -> @ast::Expr {
522406
let span = test.span;
523407
let path = test.path.clone();

branches/try2/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ use syntax::visit::Visitor;
9292

9393
pub use middle::trans::context::task_llcx;
9494

95-
static task_local_insn_key: local_data::Key<@~[&'static str]> = &local_data::Key;
95+
local_data_key!(task_local_insn_key: @~[&'static str])
9696

9797
pub fn with_insn_ctxt(blk: &fn(&[&'static str])) {
9898
let opt = local_data::get(task_local_insn_key, |k| k.map_move(|k| *k));

branches/try2/src/librustc/middle/trans/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ impl Drop for CrateContext {
287287
}
288288
}
289289

290-
static task_local_llcx_key: local_data::Key<@ContextRef> = &local_data::Key;
290+
local_data_key!(task_local_llcx_key: @ContextRef)
291291

292292
pub fn task_llcx() -> ContextRef {
293293
let opt = local_data::get(task_local_llcx_key, |k| k.map_move(|k| *k));

branches/try2/src/librusti/program.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct LocalVariable {
6060
}
6161

6262
type LocalCache = @mut HashMap<~str, @~[u8]>;
63-
static tls_key: local_data::Key<LocalCache> = &local_data::Key;
63+
local_data_key!(tls_key: LocalCache)
6464

6565
impl Program {
6666
pub fn new() -> Program {

branches/try2/src/libstd/c_str.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ pub enum NullByteResolution {
3030

3131
condition! {
3232
// This should be &[u8] but there's a lifetime issue (#5370).
33-
// NOTE: this super::NullByteResolution should be NullByteResolution
34-
// Change this next time the snapshot is updated.
35-
pub null_byte: (~[u8]) -> super::NullByteResolution;
33+
pub null_byte: (~[u8]) -> NullByteResolution;
3634
}
3735

3836
/// The representation of a C String.

0 commit comments

Comments
 (0)