Skip to content

Commit bec1e39

Browse files
committed
---
yaml --- r: 105087 b: refs/heads/snap-stage3 c: cda3334 h: refs/heads/master i: 105085: b0cfdfb 105083: 363d663 105079: 2a2eceb 105071: 7f73f6b 105055: 5ccb340 105023: 77318ae 104959: e1f0ef3 v: v3
1 parent 01439d0 commit bec1e39

File tree

681 files changed

+13424
-13645
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

681 files changed

+13424
-13645
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 11d9483d5881e5ab6963e5ddab2f2e9b91f045c8
4+
refs/heads/snap-stage3: cda33346d0e9e4d1ff26163583831f96d42a4bc0
55
refs/heads/try: db814977d07bd798feb24f6b74c00800ef458a13
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ script: |
4141
fi &&
4242
make tidy &&
4343
make -j4 rustc-stage1 &&
44-
make check-stage1-std check-stage1-rpass check-stage1-cfail check-stage1-rfail check-stage1-doc
44+
make check-stage1-std check-stage1-rpass check-stage1-cfail check-stage1-rfail
4545
4646
env:
4747
global:

branches/snap-stage3/mk/dist.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ $(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
6565
dist-prepare-win: PREPARE_HOST=$(CFG_BUILD)
6666
dist-prepare-win: PREPARE_TARGETS=$(CFG_BUILD)
6767
dist-prepare-win: PREPARE_DEST_DIR=tmp/dist/win
68+
# On windows we're using stage3, unlike Unix...
69+
dist-prepare-win: PREPARE_STAGE=3
6870
dist-prepare-win: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
6971
dist-prepare-win: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
7072
dist-prepare-win: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
@@ -133,6 +135,7 @@ ifeq ($(CFG_OSTYPE), apple-darwin)
133135
dist-prepare-osx: PREPARE_HOST=$(CFG_BUILD)
134136
dist-prepare-osx: PREPARE_TARGETS=$(CFG_BUILD)
135137
dist-prepare-osx: PREPARE_DEST_DIR=tmp/dist/pkgroot
138+
dist-prepare-osx: PREPARE_STAGE=2
136139
dist-prepare-osx: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
137140
dist-prepare-osx: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
138141
dist-prepare-osx: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
@@ -162,6 +165,7 @@ dist-tar-bins: $(foreach host,$(CFG_HOST),dist/$(PKG_DIR)-$(host).tar.gz)
162165
define DEF_INSTALLER
163166
dist-install-dir-$(1): PREPARE_HOST=$(1)
164167
dist-install-dir-$(1): PREPARE_TARGETS=$(1)
168+
dist-install-dir-$(1): PREPARE_STAGE=2
165169
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_DIR)-$(1)
166170
dist-install-dir-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
167171
dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)

branches/snap-stage3/mk/install.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
# mirror of the installation directory structure.
1414

1515
# The stage we install from
16-
ISTAGE = $(PREPARE_STAGE)
16+
ISTAGE = 2
1717

1818
install: PREPARE_HOST=$(CFG_BUILD)
1919
install: PREPARE_TARGETS=$(CFG_TARGET)
20+
install: PREPARE_STAGE=$(ISTAGE)
2021
install: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
2122
install: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
2223
install: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)

branches/snap-stage3/mk/prepare.mk

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,7 @@
2020
# PREPARE_TARGETS - the target triples, space separated
2121
# PREPARE_DEST_DIR - the directory to put the image
2222

23-
24-
# On windows we install from stage3, but on unix only stage2
25-
ifdef CFG_WINDOWSY_$(CFG_BUILD)
26-
PREPARE_STAGE=3
27-
else
28-
PREPARE_STAGE=2
29-
endif
30-
23+
prepare: PREPARE_STAGE=2
3124
prepare: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
3225
prepare: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
3326
prepare: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
@@ -50,6 +43,15 @@ DEFAULT_PREPARE_BIN_CMD = install -m755
5043
DEFAULT_PREPARE_LIB_CMD = install -m644
5144
DEFAULT_PREPARE_MAN_CMD = install -m644
5245

46+
# On windows we install from stage3, but on unix only stage2
47+
# Because of the way these rules are organized, preparing from any
48+
# stage requires all these stages to be built
49+
ifdef CFG_WINDOWSY_$(CFG_BUILD)
50+
PREPARE_STAGES=3
51+
else
52+
PREPARE_STAGES=2
53+
endif
54+
5355
# Create a directory
5456
# $(1) is the directory
5557
define PREPARE_DIR
@@ -100,8 +102,9 @@ prepare-host: prepare-host-tools
100102

101103
prepare-host-tools: \
102104
$(foreach tool, $(PREPARE_TOOLS),\
103-
$(foreach host,$(CFG_HOST),\
104-
prepare-host-tool-$(tool)-$(PREPARE_STAGE)-$(host)))
105+
$(foreach stage,$(PREPARE_STAGES),\
106+
$(foreach host,$(CFG_HOST),\
107+
prepare-host-tool-$(tool)-$(stage)-$(host))))
105108

106109
prepare-host-dirs: prepare-maybe-clean
107110
$(call PREPARE_DIR,$(PREPARE_DEST_BIN_DIR))
@@ -125,8 +128,9 @@ prepare-host-tool-$(1)-$(2)-$(3): prepare-maybe-clean \
125128
endef
126129

127130
$(foreach tool,$(PREPARE_TOOLS),\
128-
$(foreach host,$(CFG_HOST),\
129-
$(eval $(call DEF_PREPARE_HOST_TOOL,$(tool),$(PREPARE_STAGE),$(host)))))
131+
$(foreach stage,$(PREPARE_STAGES),\
132+
$(foreach host,$(CFG_HOST),\
133+
$(eval $(call DEF_PREPARE_HOST_TOOL,$(tool),$(stage),$(host))))))
130134

131135
# For host libraries only install dylibs, not rlibs since the host libs are only
132136
# used to support rustc and rustc uses dynamic linking
@@ -147,13 +151,15 @@ prepare-host-lib-$(1)-$(2)-$(3): prepare-maybe-clean \
147151
endef
148152

149153
$(foreach lib,$(CRATES),\
150-
$(foreach host,$(CFG_HOST),\
151-
$(eval $(call DEF_PREPARE_HOST_LIB,$(lib),$(PREPARE_STAGE),$(host)))))
154+
$(foreach stage,$(PREPARE_STAGES),\
155+
$(foreach host,$(CFG_HOST),\
156+
$(eval $(call DEF_PREPARE_HOST_LIB,$(lib),$(stage),$(host))))))
152157

153158
prepare-targets:\
154159
$(foreach host,$(CFG_HOST),\
155160
$(foreach target,$(CFG_TARGET),\
156-
prepare-target-$(target)-host-$(host)-$(PREPARE_STAGE)))
161+
$(foreach stage,$(PREPARE_STAGES),\
162+
prepare-target-$(target)-host-$(host)-$(stage))))
157163

158164
# $(1) is stage
159165
# $(2) is target
@@ -188,7 +194,8 @@ endef
188194

189195
$(foreach host,$(CFG_HOST),\
190196
$(foreach target,$(CFG_TARGET), \
191-
$(eval $(call DEF_PREPARE_TARGET_N,$(PREPARE_STAGE),$(target),$(host)))))
197+
$(foreach stage,$(PREPARE_STAGES),\
198+
$(eval $(call DEF_PREPARE_TARGET_N,$(stage),$(target),$(host))))))
192199

193200
prepare-maybe-clean:
194201
$(if $(findstring true,$(PREPARE_CLEAN)),\

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@
1212
#[feature(phase)];
1313

1414
#[allow(non_camel_case_types)];
15-
#[allow(deprecated_owned_vector)]; // NOTE: remove after stage0
1615
#[deny(warnings)];
16+
#[allow(deprecated_owned_vector)];
1717

1818
extern crate test;
1919
extern crate getopts;
2020
#[phase(link, syntax)]
2121
extern crate log;
22-
extern crate green;
23-
extern crate rustuv;
2422

2523
use std::os;
2624
use std::io;
@@ -43,20 +41,17 @@ pub mod runtest;
4341
pub mod common;
4442
pub mod errors;
4543

46-
#[start]
47-
fn start(argc: int, argv: **u8) -> int { green::start(argc, argv, main) }
48-
4944
pub fn main() {
5045
let args = os::args();
51-
let config = parse_config(args.move_iter().collect());
46+
let config = parse_config(args);
5247
log_config(&config);
5348
run_tests(&config);
5449
}
5550

56-
pub fn parse_config(args: Vec<~str> ) -> config {
51+
pub fn parse_config(args: ~[~str]) -> config {
5752

58-
let groups : Vec<getopts::OptGroup> =
59-
vec!(reqopt("", "compile-lib-path", "path to host shared libraries", "PATH"),
53+
let groups : ~[getopts::OptGroup] =
54+
~[reqopt("", "compile-lib-path", "path to host shared libraries", "PATH"),
6055
reqopt("", "run-lib-path", "path to target shared libraries", "PATH"),
6156
reqopt("", "rustc-path", "path to rustc to use for compiling", "PATH"),
6257
optopt("", "clang-path", "path to executable for codegen tests", "PATH"),
@@ -84,27 +79,28 @@ pub fn parse_config(args: Vec<~str> ) -> config {
8479
optopt("", "adb-path", "path to the android debugger", "PATH"),
8580
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
8681
optopt("", "test-shard", "run shard A, of B shards, worth of the testsuite", "A.B"),
87-
optflag("h", "help", "show this message"));
82+
optflag("h", "help", "show this message"),
83+
];
8884

8985
assert!(!args.is_empty());
90-
let argv0 = (*args.get(0)).clone();
86+
let argv0 = args[0].clone();
9187
let args_ = args.tail();
92-
if *args.get(1) == ~"-h" || *args.get(1) == ~"--help" {
88+
if args[1] == ~"-h" || args[1] == ~"--help" {
9389
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
94-
println!("{}", getopts::usage(message, groups.as_slice()));
90+
println!("{}", getopts::usage(message, groups));
9591
println!("");
9692
fail!()
9793
}
9894

9995
let matches =
100-
&match getopts::getopts(args_, groups.as_slice()) {
96+
&match getopts::getopts(args_, groups) {
10197
Ok(m) => m,
10298
Err(f) => fail!("{}", f.to_err_msg())
10399
};
104100

105101
if matches.opt_present("h") || matches.opt_present("help") {
106102
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
107-
println!("{}", getopts::usage(message, groups.as_slice()));
103+
println!("{}", getopts::usage(message, groups));
108104
println!("");
109105
fail!()
110106
}
@@ -127,7 +123,7 @@ pub fn parse_config(args: Vec<~str> ) -> config {
127123
run_ignored: matches.opt_present("ignored"),
128124
filter:
129125
if !matches.free.is_empty() {
130-
Some((*matches.free.get(0)).clone())
126+
Some(matches.free[0].clone())
131127
} else {
132128
None
133129
},
@@ -243,7 +239,7 @@ pub fn run_tests(config: &config) {
243239
// parallel (especially when we have lots and lots of child processes).
244240
// For context, see #8904
245241
io::test::raise_fd_limit();
246-
let res = test::run_tests_console(&opts, tests.move_iter().collect());
242+
let res = test::run_tests_console(&opts, tests);
247243
match res {
248244
Ok(true) => {}
249245
Ok(false) => fail!("Some tests failed"),
@@ -267,10 +263,10 @@ pub fn test_opts(config: &config) -> test::TestOpts {
267263
}
268264
}
269265

270-
pub fn make_tests(config: &config) -> Vec<test::TestDescAndFn> {
266+
pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] {
271267
debug!("making tests from {}",
272268
config.src_base.display());
273-
let mut tests = Vec::new();
269+
let mut tests = ~[];
274270
let dirs = fs::readdir(&config.src_base).unwrap();
275271
for file in dirs.iter() {
276272
let file = file.clone();
@@ -292,10 +288,10 @@ pub fn is_test(config: &config, testfile: &Path) -> bool {
292288
// Pretty-printer does not work with .rc files yet
293289
let valid_extensions =
294290
match config.mode {
295-
mode_pretty => vec!(~".rs"),
296-
_ => vec!(~".rc", ~".rs")
291+
mode_pretty => ~[~".rs"],
292+
_ => ~[~".rc", ~".rs"]
297293
};
298-
let invalid_prefixes = vec!(~".", ~"#", ~"~");
294+
let invalid_prefixes = ~[~".", ~"#", ~"~"];
299295
let name = testfile.filename_str().unwrap();
300296

301297
let mut valid = false;

branches/snap-stage3/src/compiletest/errors.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ use std::io::{BufferedReader, File};
1313
pub struct ExpectedError { line: uint, kind: ~str, msg: ~str }
1414

1515
// Load any test directives embedded in the file
16-
pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
16+
pub fn load_errors(testfile: &Path) -> ~[ExpectedError] {
1717

18-
let mut error_patterns = Vec::new();
18+
let mut error_patterns = ~[];
1919
let mut rdr = BufferedReader::new(File::open(testfile).unwrap());
2020
let mut line_num = 1u;
2121
for ln in rdr.lines() {
@@ -25,12 +25,12 @@ pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
2525
return error_patterns;
2626
}
2727

28-
fn parse_expected(line_num: uint, line: ~str) -> Vec<ExpectedError> {
28+
fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
2929
let line = line.trim();
3030
let error_tag = ~"//~";
3131
let mut idx;
3232
match line.find_str(error_tag) {
33-
None => return Vec::new(),
33+
None => return ~[],
3434
Some(nn) => { idx = (nn as uint) + error_tag.len(); }
3535
}
3636

@@ -57,6 +57,6 @@ fn parse_expected(line_num: uint, line: ~str) -> Vec<ExpectedError> {
5757

5858
debug!("line={} kind={} msg={}", line_num - adjust_line, kind, msg);
5959

60-
return vec!(ExpectedError{line: line_num - adjust_line, kind: kind,
61-
msg: msg});
60+
return ~[ExpectedError{line: line_num - adjust_line, kind: kind,
61+
msg: msg}];
6262
}

branches/snap-stage3/src/compiletest/header.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ use util;
1414

1515
pub struct TestProps {
1616
// Lines that should be expected, in order, on standard out
17-
error_patterns: Vec<~str> ,
17+
error_patterns: ~[~str],
1818
// Extra flags to pass to the compiler
1919
compile_flags: Option<~str>,
2020
// If present, the name of a file that this test should match when
2121
// pretty-printed
2222
pp_exact: Option<Path>,
2323
// Modules from aux directory that should be compiled
24-
aux_builds: Vec<~str> ,
24+
aux_builds: ~[~str],
2525
// Environment settings to use during execution
26-
exec_env: Vec<(~str,~str)> ,
26+
exec_env: ~[(~str,~str)],
2727
// Commands to be given to the debugger, when testing debug info
28-
debugger_cmds: Vec<~str> ,
28+
debugger_cmds: ~[~str],
2929
// Lines to check if they appear in the expected debugger output
30-
check_lines: Vec<~str> ,
30+
check_lines: ~[~str],
3131
// Flag to force a crate to be built with the host architecture
3232
force_host: bool,
3333
// Check stdout for error-pattern output as well as stderr
@@ -38,13 +38,13 @@ pub struct TestProps {
3838

3939
// Load any test directives embedded in the file
4040
pub fn load_props(testfile: &Path) -> TestProps {
41-
let mut error_patterns = Vec::new();
42-
let mut aux_builds = Vec::new();
43-
let mut exec_env = Vec::new();
41+
let mut error_patterns = ~[];
42+
let mut aux_builds = ~[];
43+
let mut exec_env = ~[];
4444
let mut compile_flags = None;
4545
let mut pp_exact = None;
46-
let mut debugger_cmds = Vec::new();
47-
let mut check_lines = Vec::new();
46+
let mut debugger_cmds = ~[];
47+
let mut check_lines = ~[];
4848
let mut force_host = false;
4949
let mut check_stdout = false;
5050
let mut no_prefer_dynamic = false;
@@ -183,7 +183,7 @@ fn parse_no_prefer_dynamic(line: &str) -> bool {
183183
fn parse_exec_env(line: &str) -> Option<(~str, ~str)> {
184184
parse_name_value_directive(line, ~"exec-env").map(|nv| {
185185
// nv is either FOO or FOO=BAR
186-
let mut strs: Vec<~str> = nv.splitn('=', 1).map(|s| s.to_owned()).collect();
186+
let mut strs: ~[~str] = nv.splitn('=', 1).map(|s| s.to_owned()).collect();
187187

188188
match strs.len() {
189189
1u => (strs.pop().unwrap(), ~""),

0 commit comments

Comments
 (0)