Skip to content

Commit 6505e41

Browse files
committed
---
yaml --- r: 149017 b: refs/heads/try2 c: b029a18 h: refs/heads/master i: 149015: 0364bee v: v3
1 parent 6cf6385 commit 6505e41

File tree

106 files changed

+695
-683
lines changed

Some content is hidden

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

106 files changed

+695
-683
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: a2290db7971a1e14e4d15316cecaf5c33cc6b0ba
8+
refs/heads/try2: b029a188205b704fed28d4fbe0037a453ace0ea1
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/dist.mk

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,19 @@ PKG_FILES := \
2626
$(S)man \
2727
$(S)doc \
2828
$(addprefix $(S)src/, \
29-
README.md \
30-
compiletest \
29+
README.txt \
3130
driver \
31+
librustc \
32+
compiletest \
3233
etc \
33-
$(foreach crate,$(CRATES),lib$(crate)) \
34+
libextra \
35+
libstd \
36+
libsyntax \
37+
librustuv \
38+
libgreen \
39+
libnative \
3440
rt \
41+
librustdoc \
3542
rustllvm \
3643
snapshots.txt \
3744
test) \

branches/try2/src/compiletest/runtest.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,9 @@ fn check_error_patterns(props: &TestProps,
442442
testfile: &Path,
443443
ProcRes: &ProcRes) {
444444
if props.error_patterns.is_empty() {
445-
fatal(~"no error pattern specified in " + testfile.display().as_maybe_owned().as_slice());
445+
testfile.display().with_str(|s| {
446+
fatal(~"no error pattern specified in " + s);
447+
})
446448
}
447449
448450
if ProcRes.status.success() {

branches/try2/src/doc/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ li {list-style-type: none; }
5151
# Tooling
5252

5353
* [The `rustdoc` manual](rustdoc.html)
54+
* [The `rustpkg` manual](rustpkg.html)
5455

5556
# FAQs
5657

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ syn keyword rustTrait Primitive Int Float ToStrRadix ToPrimitive FromPrimitive
8787
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
8888
syn keyword rustTrait RawPtr
8989
syn keyword rustTrait Buffer Writer Reader Seek
90-
syn keyword rustTrait Str StrVector StrSlice OwnedStr IntoMaybeOwned
90+
syn keyword rustTrait SendStr SendStrOwned SendStrStatic IntoSendStr
91+
syn keyword rustTrait Str StrVector StrSlice OwnedStr
9192
syn keyword rustTrait IterBytes
9293
syn keyword rustTrait ToStr IntoStr
9394
syn keyword rustTrait CloneableTuple ImmutableTuple

branches/try2/src/libextra/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Rust extras are part of the standard Rust distribution.
2929
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
3030
html_root_url = "http://static.rust-lang.org/doc/master")];
3131

32-
#[feature(macro_rules, globs, managed_boxes)];
32+
#[feature(macro_rules, globs, managed_boxes, asm)];
3333

3434
#[deny(non_camel_case_types)];
3535
#[deny(missing_doc)];

branches/try2/src/libextra/test.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -893,8 +893,8 @@ pub fn run_test(force_ignore: bool,
893893
spawn(proc() {
894894
let mut task = task::task();
895895
task.name(match desc.name {
896-
DynTestName(ref name) => name.to_owned().into_maybe_owned(),
897-
StaticTestName(name) => name.into_maybe_owned()
896+
DynTestName(ref name) => SendStrOwned(name.clone()),
897+
StaticTestName(name) => SendStrStatic(name),
898898
});
899899
let result_future = task.future_result();
900900
task.spawn(testfn);
@@ -1091,13 +1091,25 @@ impl MetricMap {
10911091
10921092
// Benchmarking
10931093
1094+
/// A function that is opaque to the optimiser, to allow benchmarks to
1095+
/// pretend to use outputs to assist in avoiding dead-code
1096+
/// elimination.
1097+
///
1098+
/// This function is a no-op, and does not even read from `dummy`.
1099+
pub fn black_box<T>(dummy: T) {
1100+
// we need to "use" the argument in some way LLVM can't
1101+
// introspect.
1102+
unsafe {asm!("" : : "r"(&dummy))}
1103+
}
1104+
1105+
10941106
impl BenchHarness {
10951107
/// Callback for benchmark functions to run in their body.
1096-
pub fn iter(&mut self, inner: ||) {
1108+
pub fn iter<T>(&mut self, inner: || -> T) {
10971109
self.ns_start = precise_time_ns();
10981110
let k = self.iterations;
10991111
for _ in range(0u64, k) {
1100-
inner();
1112+
black_box(inner());
11011113
}
11021114
self.ns_end = precise_time_ns();
11031115
}

branches/try2/src/libgreen/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ pub fn run(main: proc()) -> int {
257257
let (port, chan) = Chan::new();
258258
let mut opts = TaskOpts::new();
259259
opts.notify_chan = Some(chan);
260-
opts.name = Some("<main>".into_maybe_owned());
260+
opts.name = Some(SendStrStatic("<main>"));
261261
pool.spawn(opts, main);
262262

263263
// Wait for the main task to return, and set the process error code

branches/try2/src/libgreen/task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ mod tests {
510510
#[test]
511511
fn smoke_opts() {
512512
let mut opts = TaskOpts::new();
513-
opts.name = Some("test".into_maybe_owned());
513+
opts.name = Some(SendStrStatic("test"));
514514
opts.stack_size = Some(20 * 4096);
515515
let (p, c) = Chan::new();
516516
opts.notify_chan = Some(c);

branches/try2/src/libnative/task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ mod tests {
294294
#[test]
295295
fn smoke_opts() {
296296
let mut opts = TaskOpts::new();
297-
opts.name = Some("test".into_maybe_owned());
297+
opts.name = Some(SendStrStatic("test"));
298298
opts.stack_size = Some(20 * 4096);
299299
let (p, c) = Chan::new();
300300
opts.notify_chan = Some(c);

0 commit comments

Comments
 (0)