Skip to content

Commit a8dc9a9

Browse files
committed
---
yaml --- r: 143904 b: refs/heads/try2 c: 4be086b h: refs/heads/master v: v3
1 parent f557c9e commit a8dc9a9

File tree

288 files changed

+9568
-6498
lines changed

Some content is hidden

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

288 files changed

+9568
-6498
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: 35040275b3f39618c3cec4a9f702b6e057309604
8+
refs/heads/try2: 4be086b7f6499fa7c0ff177eef6942b3ba1bb1b1
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/doc/rust.md

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ There are several kinds of view item:
744744
##### Extern mod declarations
745745

746746
~~~~~~~~ {.ebnf .gram}
747-
extern_mod_decl : "extern" "mod" ident [ '(' link_attrs ')' ] ? [ '=' string_lit ] ? ;
747+
extern_mod_decl : "extern" "mod" ident [ '(' link_attrs ')' ] ? ;
748748
link_attrs : link_attr [ ',' link_attrs ] + ;
749749
link_attr : ident '=' literal ;
750750
~~~~~~~~
@@ -755,34 +755,20 @@ as the `ident` provided in the `extern_mod_decl`.
755755

756756
The external crate is resolved to a specific `soname` at compile time,
757757
and a runtime linkage requirement to that `soname` is passed to the linker for
758-
loading at runtime.
759-
The `soname` is resolved at compile time by scanning the compiler's library path
760-
and matching the `link_attrs` provided in the `use_decl` against any `#link` attributes that
761-
were declared on the external crate when it was compiled.
762-
If no `link_attrs` are provided,
763-
a default `name` attribute is assumed,
764-
equal to the `ident` given in the `use_decl`.
765-
766-
Optionally, an identifier in an `extern mod` declaration may be followed by an equals sign,
767-
then a string literal denoting a relative path on the filesystem.
768-
This path should exist in one of the directories in the Rust path,
769-
which by default contains the `.rust` subdirectory of the current directory and each of its parents,
770-
as well as any directories in the colon-separated (or semicolon-separated on Windows)
771-
list of paths that is the `RUST_PATH` environment variable.
772-
The meaning of `extern mod a = "b/c/d";`, supposing that `/a` is in the RUST_PATH,
773-
is that the name `a` should be taken as a reference to the crate whose absolute location is
774-
`/a/b/c/d`.
775-
776-
Four examples of `extern mod` declarations:
758+
loading at runtime. The `soname` is resolved at compile time by scanning the
759+
compiler's library path and matching the `link_attrs` provided in the
760+
`use_decl` against any `#link` attributes that were declared on the external
761+
crate when it was compiled. If no `link_attrs` are provided, a default `name`
762+
attribute is assumed, equal to the `ident` given in the `use_decl`.
763+
764+
Three examples of `extern mod` declarations:
777765

778766
~~~~~~~~{.xfail-test}
779767
extern mod pcre (uuid = "54aba0f8-a7b1-4beb-92f1-4cf625264841");
780768
781769
extern mod extra; // equivalent to: extern mod extra ( name = "extra" );
782770
783771
extern mod rustextra (name = "extra"); // linking to 'extra' under another name
784-
785-
extern mod complicated_mod = "some-file/in/the-rust/path";
786772
~~~~~~~~
787773

788774
##### Use declarations

branches/try2/doc/rustpkg.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,6 @@ When building a package that is in a `git` repository,
103103
When building a package that is not under version control,
104104
or that has no tags, `rustpkg` assumes the intended version is 0.1.
105105

106-
> **Note:** A future version of rustpkg will support semantic versions.
107-
> Also, a future version will add the option to specify a version with a metadata
108-
> attribute like `#[link(vers = "3.1415")]` inside the crate module,
109-
> though this attribute will never be mandatory.
110-
111106
# Dependencies
112107

113108
rustpkg infers dependencies from `extern mod` directives.

branches/try2/doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,7 @@ match crayons[0] {
13051305
A vector can be destructured using pattern matching:
13061306
13071307
~~~~
1308-
let numbers: &[int] = &[1, 2, 3];
1308+
let numbers: [int, ..3] = [1, 2, 3];
13091309
let score = match numbers {
13101310
[] => 0,
13111311
[a] => a * 10,
@@ -2195,7 +2195,7 @@ use std::float::consts::pi;
21952195
# impl Shape for CircleStruct { fn area(&self) -> float { pi * square(self.radius) } }
21962196
21972197
let concrete = @CircleStruct{center:Point{x:3f,y:4f},radius:5f};
2198-
let mycircle: @Circle = concrete as @Circle;
2198+
let mycircle: Circle = concrete as @Circle;
21992199
let nonsense = mycircle.radius() * mycircle.area();
22002200
~~~
22012201

branches/try2/mk/install.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ endef
199199
$(foreach target,$(CFG_TARGET_TRIPLES), \
200200
$(if $(findstring $(target),"arm-linux-androideabi"), \
201201
$(if $(findstring adb,$(CFG_ADB)), \
202-
$(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
202+
$(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
203203
$(info install: install-runtime-target for $(target) enabled \
204204
$(info install: android device attached) \
205205
$(eval $(call DEF_ADB_DEVICE_STATUS, true))), \

branches/try2/mk/rt.mk

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,30 @@ RUNTIME_CXXS_$(1)_$(2) := \
6666
rt/sync/timer.cpp \
6767
rt/sync/lock_and_signal.cpp \
6868
rt/sync/rust_thread.cpp \
69+
rt/rust.cpp \
6970
rt/rust_builtin.cpp \
7071
rt/rust_run_program.cpp \
7172
rt/rust_env.cpp \
7273
rt/rust_rng.cpp \
74+
rt/rust_sched_loop.cpp \
75+
rt/rust_sched_launcher.cpp \
76+
rt/rust_sched_driver.cpp \
77+
rt/rust_scheduler.cpp \
78+
rt/rust_sched_reaper.cpp \
79+
rt/rust_task.cpp \
7380
rt/rust_stack.cpp \
7481
rt/rust_upcall.cpp \
7582
rt/rust_uv.cpp \
7683
rt/rust_crate_map.cpp \
84+
rt/rust_log.cpp \
7785
rt/rust_gc_metadata.cpp \
7886
rt/rust_util.cpp \
79-
rt/rust_log.cpp \
8087
rt/rust_exchange_alloc.cpp \
8188
rt/isaac/randport.cpp \
8289
rt/miniz.cpp \
90+
rt/rust_kernel.cpp \
8391
rt/rust_abi.cpp \
92+
rt/rust_debug.cpp \
8493
rt/memory_region.cpp \
8594
rt/boxed_region.cpp \
8695
rt/arch/$$(HOST_$(1))/context.cpp \

branches/try2/mk/tests.mk

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ endef
123123
$(foreach target,$(CFG_TARGET_TRIPLES), \
124124
$(if $(findstring $(target),"arm-linux-androideabi"), \
125125
$(if $(findstring adb,$(CFG_ADB)), \
126-
$(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
126+
$(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
127127
$(info check: $(target) test enabled \
128128
$(info check: android device attached) \
129129
$(eval $(call DEF_ADB_DEVICE_STATUS, true))), \
@@ -348,9 +348,7 @@ $(3)/stage$(1)/test/rustpkgtest-$(2)$$(X_$(2)): \
348348
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \
349349
$$(SREQ$(1)_T_$(2)_H_$(3)) \
350350
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX_$(2)) \
351-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2)) \
352-
$$(TBIN$(1)_T_$(2)_H_$(3))/rustpkg$$(X_$(2)) \
353-
$$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X_$(2))
351+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
354352
@$$(call E, compile_and_link: $$@)
355353
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
356354

branches/try2/src/compiletest/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ fn parse_check_line(line: &str) -> Option<~str> {
142142
fn parse_exec_env(line: &str) -> Option<(~str, ~str)> {
143143
do parse_name_value_directive(line, ~"exec-env").map |nv| {
144144
// nv is either FOO or FOO=BAR
145-
let mut strs: ~[~str] = nv.splitn_iter('=', 1).map(|s| s.to_owned()).collect();
145+
let mut strs: ~[~str] = nv.splitn_iter('=', 1).transform(|s| s.to_owned()).collect();
146146

147147
match strs.len() {
148148
1u => (strs.pop(), ~""),

branches/try2/src/compiletest/runtest.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,13 +350,13 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
350350
fatal(~"process did not return an error status");
351351
}
352352

353-
let prefixes = expected_errors.iter().map(|ee| {
353+
let prefixes = expected_errors.iter().transform(|ee| {
354354
fmt!("%s:%u:", testfile.to_str(), ee.line)
355355
}).collect::<~[~str]>();
356356

357357
fn to_lower( s : &str ) -> ~str {
358358
let i = s.iter();
359-
let c : ~[char] = i.map( |c| {
359+
let c : ~[char] = i.transform( |c| {
360360
if c.is_ascii() {
361361
c.to_ascii().to_lower().to_char()
362362
} else {
@@ -760,7 +760,7 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
760760
let cmdline = make_cmdline("", args.prog, args.args);
761761

762762
// get bare program string
763-
let mut tvec: ~[~str] = args.prog.split_iter('/').map(|ts| ts.to_owned()).collect();
763+
let mut tvec: ~[~str] = args.prog.split_iter('/').transform(|ts| ts.to_owned()).collect();
764764
let prog_short = tvec.pop();
765765

766766
// copy to target
@@ -938,7 +938,7 @@ fn disassemble_extract(config: &config, _props: &TestProps,
938938

939939
fn count_extracted_lines(p: &Path) -> uint {
940940
let x = io::read_whole_file_str(&p.with_filetype("ll")).unwrap();
941-
x.line_iter().len()
941+
x.line_iter().len_()
942942
}
943943

944944

branches/try2/src/etc/emacs/rust-mode.el

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@
2929

3030
table))
3131

32-
(defcustom rust-indent-offset default-tab-width
33-
"*Indent Rust code by this number of spaces.
34-
35-
The initializer is `DEFAULT-TAB-WIDTH'.")
36-
3732
(defun rust-paren-level () (nth 0 (syntax-ppss)))
3833
(defun rust-in-str-or-cmnt () (nth 8 (syntax-ppss)))
3934
(defun rust-rewind-past-str-cmnt () (goto-char (nth 8 (syntax-ppss))))
@@ -54,10 +49,10 @@ The initializer is `DEFAULT-TAB-WIDTH'.")
5449
(let ((level (rust-paren-level)))
5550
(cond
5651
;; A function return type is 1 level indented
57-
((looking-at "->") (* rust-indent-offset (+ level 1)))
52+
((looking-at "->") (* default-tab-width (+ level 1)))
5853

5954
;; A closing brace is 1 level unindended
60-
((looking-at "}") (* rust-indent-offset (- level 1)))
55+
((looking-at "}") (* default-tab-width (- level 1)))
6156

6257
;; If we're in any other token-tree / sexp, then:
6358
;; - [ or ( means line up with the opening token
@@ -75,18 +70,18 @@ The initializer is `DEFAULT-TAB-WIDTH'.")
7570
(goto-char pt)
7671
(back-to-indentation)
7772
(if (looking-at "\\<else\\>")
78-
(* rust-indent-offset (+ 1 level))
73+
(* default-tab-width (+ 1 level))
7974
(progn
8075
(goto-char pt)
8176
(beginning-of-line)
8277
(rust-rewind-irrelevant)
8378
(end-of-line)
8479
(if (looking-back "[{};,]")
85-
(* rust-indent-offset level)
80+
(* default-tab-width level)
8681
(back-to-indentation)
8782
(if (looking-at "#")
88-
(* rust-indent-offset level)
89-
(* rust-indent-offset (+ 1 level))))))))))
83+
(* default-tab-width level)
84+
(* default-tab-width (+ 1 level))))))))))
9085

9186
;; Otherwise we're in a column-zero definition
9287
(t 0))))))

branches/try2/src/etc/zsh/_rust

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ _rustc_opts_switches=(
2727
--sysroot'[Override the system root]'
2828
--test'[Build a test harness]'
2929
--target'[Target triple cpu-manufacturer-kernel\[-os\] to compile]'
30-
--target-cpu'[Select target processor (llc -mcpu=help for details)]'
31-
--target-feature'[Target specific attributes (llc -mattr=help for details)]'
30+
--target-feature'[Target specific attributes (llc -mattr=help for detail)]'
3231
--android-cross-path'[The path to the Android NDK]'
3332
{-v,--version}'[Print version info and exit]'
3433
)

branches/try2/src/libextra/arc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,14 +596,14 @@ mod tests {
596596
let (c,p) = (Cell::new(c), Cell::new(p));
597597
do task::spawn || {
598598
// wait until parent gets in
599-
p.take().recv();
599+
comm::recv_one(p.take());
600600
do arc2.access_cond |state, cond| {
601601
*state = true;
602602
cond.signal();
603603
}
604604
}
605605
do arc.access_cond |state, cond| {
606-
c.take().send(());
606+
comm::send_one(c.take(), ());
607607
assert!(!*state);
608608
while !*state {
609609
cond.wait();

branches/try2/src/libextra/bitv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ impl BitvSet {
869869
let min = num::min(self.bitv.storage.len(), other.bitv.storage.len());
870870
self.bitv.storage.slice(0, min).iter().enumerate()
871871
.zip(Repeat::new(&other.bitv.storage))
872-
.map(|((i, &w), o_store)| (i * uint::bits, w, o_store[i]))
872+
.transform(|((i, &w), o_store)| (i * uint::bits, w, o_store[i]))
873873
}
874874

875875
/// Visits each word in self or other that extends beyond the other. This
@@ -888,11 +888,11 @@ impl BitvSet {
888888
if olen < slen {
889889
self.bitv.storage.slice_from(olen).iter().enumerate()
890890
.zip(Repeat::new(olen))
891-
.map(|((i, &w), min)| (true, (i + min) * uint::bits, w))
891+
.transform(|((i, &w), min)| (true, (i + min) * uint::bits, w))
892892
} else {
893893
other.bitv.storage.slice_from(slen).iter().enumerate()
894894
.zip(Repeat::new(slen))
895-
.map(|((i, &w), min)| (false, (i + min) * uint::bits, w))
895+
.transform(|((i, &w), min)| (false, (i + min) * uint::bits, w))
896896
}
897897
}
898898
}

0 commit comments

Comments
 (0)