Skip to content

Commit 443a319

Browse files
committed
---
yaml --- r: 77263 b: refs/heads/snap-stage3 c: b29696a h: refs/heads/master i: 77261: 0fbe559 77259: 0dc5c4c 77255: eb07de1 77247: 1033844 v: v3
1 parent ecd09e0 commit 443a319

File tree

226 files changed

+3232
-3958
lines changed

Some content is hidden

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

226 files changed

+3232
-3958
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: f1132496dddbdd88f321a7919eec3d65136b3f75
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 932d7b94657dad40738886120051466a805ae60a
4+
refs/heads/snap-stage3: b29696a08ac365054611327e863d0e005d23ca03
55
refs/heads/try: ebfe63cd1c0b5d23f7ea60c69b4fde2e30cfd42a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/.gitattributes

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,3 @@ src/rt/msvc/* -whitespace
88
src/rt/vg/* -whitespace
99
src/rt/linenoise/* -whitespace
1010
src/rt/jemalloc/**/* -whitespace
11-
src/rt/jemalloc/include/jemalloc/jemalloc.h.in text eol=lf
12-
src/rt/jemalloc/include/jemalloc/jemalloc_defs.h.in text eol=lf
13-
src/rt/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in text eol=lf

branches/snap-stage3/Makefile.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ ifdef CFG_DISABLE_OPTIMIZE
9696
$(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE))
9797
CFG_RUSTC_FLAGS +=
9898
else
99-
# The rtopt cfg turns off runtime sanity checks
100-
CFG_RUSTC_FLAGS += -O --cfg rtopt
99+
CFG_RUSTC_FLAGS += -O
101100
endif
102101

103102
ifdef CFG_ENABLE_DEBUG

branches/snap-stage3/doc/tutorial.md

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,7 @@ so you could not apply `head` to a type
18641864
that does not implement `Clone`.
18651865

18661866
While most traits can be defined and implemented by user code,
1867-
three traits are automatically derived and implemented
1867+
two traits are automatically derived and implemented
18681868
for all applicable types by the compiler,
18691869
and may not be overridden:
18701870

@@ -1877,12 +1877,6 @@ These are types that do not contain anything intrinsically mutable.
18771877
Intrinsically mutable values include `@mut`
18781878
and `Cell` in the standard library.
18791879

1880-
* `'static` - Non-borrowed types.
1881-
These are types that do not contain any data whose lifetime is bound to
1882-
a particular stack frame. These are types that do not contain any
1883-
borrowed pointers, or types where the only contained borrowed pointers
1884-
have the `'static` lifetime.
1885-
18861880
> ***Note:*** These two traits were referred to as 'kinds' in earlier
18871881
> iterations of the language, and often still are.
18881882
@@ -2141,30 +2135,6 @@ select the method to call at runtime.
21412135

21422136
This usage of traits is similar to Java interfaces.
21432137

2144-
By default, each of the three storage classes for traits enforce a
2145-
particular set of built-in kinds that their contents must fulfill in
2146-
order to be packaged up in a trait object of that storage class.
2147-
2148-
* The contents of owned traits (`~Trait`) must fulfill the `Send` bound.
2149-
* The contents of managed traits (`@Trait`) must fulfill the `'static` bound.
2150-
* The contents of borrowed traits (`&Trait`) are not constrained by any bound.
2151-
2152-
Consequently, the trait objects themselves automatically fulfill their
2153-
respective kind bounds. However, this default behavior can be overridden by
2154-
specifying a list of bounds on the trait type, for example, by writing `~Trait:`
2155-
(which indicates that the contents of the owned trait need not fulfill any
2156-
bounds), or by writing `~Trait:Send+Freeze`, which indicates that in addition
2157-
to fulfilling `Send`, contents must also fulfill `Freeze`, and as a consequence,
2158-
the trait itself fulfills `Freeze`.
2159-
2160-
* `~Trait:Send` is equivalent to `~Trait`.
2161-
* `@Trait:'static` is equivalent to `@Trait`.
2162-
* `&Trait:` is equivalent to `&Trait`.
2163-
2164-
Builtin kind bounds can also be specified on closure types in the same way (for
2165-
example, by writing `fn:Freeze()`), and the default behaviours are the same as
2166-
for traits of the same storage class.
2167-
21682138
## Trait inheritance
21692139

21702140
We can write a trait declaration that _inherits_ from other traits, called _supertraits_.
@@ -2553,7 +2523,6 @@ tutorials on individual topics.
25532523
* [Macros][macros]
25542524
* [The foreign function interface][ffi]
25552525
* [Containers and iterators](tutorial-container.html)
2556-
* [Error-handling and Conditions](tutorial-conditions.html)
25572526

25582527
There is further documentation on the [wiki].
25592528

branches/snap-stage3/mk/rt.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ endif
6363
endif
6464

6565
RUNTIME_CXXS_$(1)_$(2) := \
66+
rt/sync/timer.cpp \
6667
rt/sync/lock_and_signal.cpp \
6768
rt/sync/rust_thread.cpp \
6869
rt/rust_builtin.cpp \
@@ -71,9 +72,13 @@ RUNTIME_CXXS_$(1)_$(2) := \
7172
rt/rust_upcall.cpp \
7273
rt/rust_uv.cpp \
7374
rt/rust_crate_map.cpp \
75+
rt/rust_gc_metadata.cpp \
76+
rt/rust_util.cpp \
7477
rt/rust_log.cpp \
78+
rt/rust_exchange_alloc.cpp \
7579
rt/isaac/randport.cpp \
7680
rt/miniz.cpp \
81+
rt/rust_abi.cpp \
7782
rt/memory_region.cpp \
7883
rt/boxed_region.cpp \
7984
rt/arch/$$(HOST_$(1))/context.cpp \

branches/snap-stage3/mk/tests.mk

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,24 +73,16 @@ TEST_RATCHET_NOISE_PERCENT=10.0
7373

7474
# Whether to ratchet or merely save benchmarks
7575
ifdef CFG_RATCHET_BENCH
76-
CRATE_TEST_EXTRA_ARGS=\
76+
CRATE_TEST_BENCH_ARGS=\
7777
--test $(TEST_BENCH) \
7878
--ratchet-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) \
7979
--ratchet-noise-percent $(TEST_RATCHET_NOISE_PERCENT)
8080
else
81-
CRATE_TEST_EXTRA_ARGS=\
81+
CRATE_TEST_BENCH_ARGS=\
8282
--test $(TEST_BENCH) \
8383
--save-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4))
8484
endif
8585

86-
# If we're sharding the testsuite between parallel testers,
87-
# pass this argument along to the compiletest and crate test
88-
# invocations.
89-
ifdef TEST_SHARD
90-
CTEST_TESTARGS += --test-shard=$(TEST_SHARD)
91-
CRATE_TEST_EXTRA_ARGS += --test-shard=$(TEST_SHARD)
92-
endif
93-
9486
define DEF_TARGET_COMMANDS
9587

9688
ifdef CFG_UNIXY_$(1)
@@ -409,7 +401,7 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
409401
@$$(call E, run: $$<)
410402
$$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(2),$(3)) $$(TESTARGS) \
411403
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
412-
$$(call CRATE_TEST_EXTRA_ARGS,$(1),$(2),$(3),$(4)) \
404+
$$(call CRATE_TEST_BENCH_ARGS,$(1),$(2),$(3),$(4)) \
413405
&& touch $$@
414406
endef
415407

@@ -423,7 +415,7 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
423415
@$(CFG_ADB) shell '(cd $(CFG_ADB_TEST_DIR); LD_LIBRARY_PATH=. \
424416
./$$(notdir $$<) \
425417
--logfile $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log \
426-
$$(call CRATE_TEST_EXTRA_ARGS,$(1),$(2),$(3),$(4)))' \
418+
$$(call CRATE_TEST_BENCH_ARGS,$(1),$(2),$(3),$(4)))' \
427419
> tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp
428420
@cat tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp
429421
@touch tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ pub struct config {
6868
// Percent change in metrics to consider noise
6969
ratchet_noise_percent: Option<f64>,
7070

71-
// "Shard" of the testsuite to run: this has the form of
72-
// two numbers (a,b), and causes only those tests with
73-
// positional order equal to a mod b to run.
74-
test_shard: Option<(uint,uint)>,
75-
7671
// A command line to prefix program execution with,
7772
// for running under valgrind
7873
runtool: Option<~str>,

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ pub fn parse_config(args: ~[~str]) -> config {
7575
optopt("", "target", "the target to build for", "TARGET"),
7676
optopt("", "adb-path", "path to the android debugger", "PATH"),
7777
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
78-
optopt("", "test-shard", "run shard A, of B shards, worth of the testsuite", "A.B"),
7978
optflag("h", "help", "show this message"),
8079
];
8180

@@ -149,7 +148,6 @@ pub fn parse_config(args: ~[~str]) -> config {
149148
~"") { true }
150149
else { false }
151150
} else { false },
152-
test_shard: test::opt_shard(getopts::opt_maybe_str(matches, "test-shard")),
153151
verbose: getopts::opt_present(matches, "verbose")
154152
}
155153
}
@@ -174,10 +172,6 @@ pub fn log_config(config: &config) {
174172
logv(c, fmt!("adb_path: %s", config.adb_path));
175173
logv(c, fmt!("adb_test_dir: %s", config.adb_test_dir));
176174
logv(c, fmt!("adb_device_status: %b", config.adb_device_status));
177-
match config.test_shard {
178-
None => logv(c, ~"test_shard: (all)"),
179-
Some((a,b)) => logv(c, fmt!("test_shard: %u.%u", a, b))
180-
}
181175
logv(c, fmt!("verbose: %b", config.verbose));
182176
logv(c, fmt!("\n"));
183177
}
@@ -240,7 +234,6 @@ pub fn test_opts(config: &config) -> test::TestOpts {
240234
ratchet_metrics: config.ratchet_metrics.clone(),
241235
ratchet_noise_percent: config.ratchet_noise_percent.clone(),
242236
save_metrics: config.save_metrics.clone(),
243-
test_shard: config.test_shard.clone()
244237
}
245238
}
246239

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
282282
}
283283
284284
// write debugger script
285-
let script_str = [~"set charset UTF-8",
286-
cmds,
287-
~"quit\n"].connect("\n");
285+
let script_str = cmds.append("\nquit\n");
288286
debug!("script_str = %s", script_str);
289287
dump_output_file(config, testfile, script_str, "debugger.script");
290288

branches/snap-stage3/src/etc/emacs/rust-mode.el

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -225,27 +225,4 @@ The initializer is `DEFAULT-TAB-WIDTH'.")
225225

226226
(provide 'rust-mode)
227227

228-
;; Issue #6887: Rather than inheriting the 'gnu compilation error
229-
;; regexp (which is broken on a few edge cases), add our own 'rust
230-
;; compilation error regexp and use it instead.
231-
(defvar rustc-compilation-regexps
232-
(let ((file "^\\([^\n]+\\)")
233-
(start-line "\\([0-9]+\\)")
234-
(start-col "\\([0-9]+\\)")
235-
(end-line "\\([0-9]+\\)")
236-
(end-col "\\([0-9]+\\)")
237-
(error-or-warning "\\(?:[Ee]rror\\|\\([Ww]arning\\)\\)"))
238-
(let ((re (concat "^" file ":" start-line ":" start-col
239-
": " end-line ":" end-col
240-
" \\(?:[Ee]rror\\|\\([Ww]arning\\)\\):")))
241-
(cons re '(1 (2 . 4) (3 . 5) (6)))))
242-
"Specifications for matching errors in rustc invocations.
243-
See `compilation-error-regexp-alist for help on their format.")
244-
245-
(eval-after-load 'compile
246-
'(progn
247-
(add-to-list 'compilation-error-regexp-alist-alist
248-
(cons 'rustc rustc-compilation-regexps))
249-
(add-to-list 'compilation-error-regexp-alist 'rustc)))
250-
251228
;;; rust-mode.el ends here

branches/snap-stage3/src/etc/generate-keyword-tests.py

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

branches/snap-stage3/src/etc/x86.supp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,5 +512,6 @@
512512
fun:uv__platform_loop_init
513513
fun:uv__loop_init
514514
fun:uv_loop_new
515+
fun:rust_uv_loop_new__c_stack_shim
515516
...
516517
}

branches/snap-stage3/src/libextra/getopts.rs

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -689,9 +689,9 @@ pub mod groups {
689689
}
690690
}
691691

692-
// FIXME: #5516 should be graphemes not codepoints
692+
// FIXME: #5516
693693
// here we just need to indent the start of the description
694-
let rowlen = row.char_len();
694+
let rowlen = row.len();
695695
if rowlen < 24 {
696696
do (24 - rowlen).times {
697697
row.push_char(' ')
@@ -707,14 +707,14 @@ pub mod groups {
707707
desc_normalized_whitespace.push_char(' ');
708708
}
709709

710-
// FIXME: #5516 should be graphemes not codepoints
710+
// FIXME: #5516
711711
let mut desc_rows = ~[];
712712
do each_split_within(desc_normalized_whitespace, 54) |substr| {
713713
desc_rows.push(substr.to_owned());
714714
true
715715
};
716716

717-
// FIXME: #5516 should be graphemes not codepoints
717+
// FIXME: #5516
718718
// wrapped description
719719
row.push_str(desc_rows.connect(desc_sep));
720720

@@ -798,7 +798,7 @@ pub mod groups {
798798
cont
799799
};
800800

801-
ss.char_offset_iter().advance(|x| machine(x));
801+
ss.iter().enumerate().advance(|x| machine(x));
802802

803803
// Let the automaton 'run out' by supplying trailing whitespace
804804
while cont && match state { B | C => true, A => false } {
@@ -1580,31 +1580,4 @@ Options:
15801580
debug!("generated: <<%s>>", usage);
15811581
assert!(usage == expected)
15821582
}
1583-
1584-
#[test]
1585-
fn test_groups_usage_description_multibyte_handling() {
1586-
let optgroups = ~[
1587-
groups::optflag("k", "k\u2013w\u2013",
1588-
"The word kiwi is normally spelled with two i's"),
1589-
groups::optflag("a", "apple",
1590-
"This \u201Cdescription\u201D has some characters that could \
1591-
confuse the line wrapping; an apple costs 0.51€ in some parts of Europe."),
1592-
];
1593-
1594-
let expected =
1595-
~"Usage: fruits
1596-
1597-
Options:
1598-
-k --k–w– The word kiwi is normally spelled with two i's
1599-
-a --apple This “description” has some characters that could
1600-
confuse the line wrapping; an apple costs 0.51in
1601-
some parts of Europe.
1602-
";
1603-
1604-
let usage = groups::usage("Usage: fruits", optgroups);
1605-
1606-
debug!("expected: <<%s>>", expected);
1607-
debug!("generated: <<%s>>", usage);
1608-
assert!(usage == expected)
1609-
}
16101583
}

0 commit comments

Comments
 (0)