Skip to content

Commit fc1a630

Browse files
committed
---
yaml --- r: 139991 b: refs/heads/try2 c: 5cc6a0b h: refs/heads/master i: 139989: c1395c5 139987: 329a1bc 139983: cef7135 v: v3
1 parent 272430b commit fc1a630

File tree

291 files changed

+9512
-13542
lines changed

Some content is hidden

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

291 files changed

+9512
-13542
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: 6a31525c50fc5f2e2ad63bf30ec80c1279bf1fe4
8+
refs/heads/try2: 5cc6a0bf327e84569166d0ae7c07615e5afd5238
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,3 @@ config.stamp
8686
.DS_Store
8787
src/etc/dl
8888
.settings/
89-
build/

branches/try2/doc/rust.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,10 +1467,10 @@ A complete list of the built-in language items follows:
14671467
: Elements can be subtracted.
14681468
`mul`
14691469
: Elements can be multiplied.
1470-
`quot`
1471-
: Elements have a quotient operation.
1472-
`rem`
1473-
: Elements have a remainder operation.
1470+
`div`
1471+
: Elements can be divided.
1472+
`mod`
1473+
: Elements have a modulo operation.
14741474
`neg`
14751475
: Elements can be negated arithmetically.
14761476
`not`
@@ -1856,11 +1856,11 @@ The default meaning of the operators on standard types is given here.
18561856
: Multiplication.
18571857
Calls the `mul` method on the `core::ops::Mul` trait.
18581858
`/`
1859-
: Quotient.
1860-
Calls the `quot` method on the `core::ops::Quot` trait.
1859+
: Division.
1860+
Calls the `div` method on the `core::ops::Div` trait.
18611861
`%`
1862-
: Remainder.
1863-
Calls the `rem` method on the `core::ops::Rem` trait.
1862+
: Modulo (a.k.a. "remainder").
1863+
Calls the `modulo` method on the `core::ops::Modulo` trait.
18641864

18651865
#### Bitwise operators
18661866

branches/try2/doc/tutorial-tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Instead we can use a `SharedChan`, a type that allows a single
236236
use core::comm::{stream, SharedChan};
237237
238238
let (port, chan) = stream();
239-
let chan = SharedChan::new(chan);
239+
let chan = SharedChan(chan);
240240
241241
for uint::range(0, 3) |init_val| {
242242
// Create a new channel handle to distribute to the child task

branches/try2/doc/tutorial.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ The nil type, written `()`, has a single value, also written `()`.
362362
## Operators
363363

364364
Rust's set of operators contains very few surprises. Arithmetic is done with
365-
`*`, `/`, `%`, `+`, and `-` (multiply, quotient, remainder, add, and subtract). `-` is
365+
`*`, `/`, `%`, `+`, and `-` (multiply, divide, take remainder, add, and subtract). `-` is
366366
also a unary prefix operator that negates numbers. As in C, the bitwise operators
367367
`>>`, `<<`, `&`, `|`, and `^` are also supported.
368368

@@ -1669,9 +1669,6 @@ do spawn {
16691669
}
16701670
~~~~
16711671

1672-
If you want to see the output of `debug!` statements, you will need to turn on `debug!` logging.
1673-
To enable `debug!` logging, set the RUST_LOG environment variable to the name of your crate, which, for a file named `foo.rs`, will be `foo` (e.g., with bash, `export RUST_LOG=foo`).
1674-
16751672
## For loops
16761673

16771674
The most common way to express iteration in Rust is with a `for`

branches/try2/mk/rt.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ RUNTIME_CXXS_$(1) := \
7676
rt/boxed_region.cpp \
7777
rt/arch/$$(HOST_$(1))/context.cpp \
7878
rt/arch/$$(HOST_$(1))/gpr.cpp \
79-
rt/rust_android_dummy.cpp \
80-
rt/rust_test_helpers.cpp
79+
rt/rust_android_dummy.cpp
8180

8281
RUNTIME_CS_$(1) := rt/linenoise/linenoise.c rt/linenoise/utf8.c
8382

branches/try2/src/compiletest/procsrv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub fn run(lib_path: ~str,
7373
7474
7575
writeclose(pipe_in.out, input);
76-
let p = comm::PortSet::new();
76+
let p = comm::PortSet();
7777
let ch = p.chan();
7878
do task::spawn_sched(task::SingleThreaded) || {
7979
let errput = readclose(pipe_err.in);

branches/try2/src/etc/kate/rust.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
<item> Add </item>
5858
<item> Sub </item>
5959
<item> Mul </item>
60-
<item> Quot </item>
61-
<item> Rem </item>
60+
<item> Div </item>
61+
<item> Modulo </item>
6262
<item> Neg </item>
6363
<item> BitAnd </item>
6464
<item> BitOr </item>

branches/try2/src/etc/unicode.py

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -112,49 +112,7 @@ def escape_char(c):
112112
return "'\\u%4.4x'" % c
113113
return "'\\U%8.8x'" % c
114114

115-
def ch_prefix(ix):
116-
if ix == 0:
117-
return " "
118-
if ix % 2 == 0:
119-
return ",\n "
120-
else:
121-
return ", "
122-
123-
def emit_bsearch_range_table(f):
124-
f.write("""
125-
pure fn bsearch_range_table(c: char, r: &[(char,char)]) -> bool {
126-
use cmp::{EQ, LT, GT};
127-
use vec::bsearch;
128-
use option::None;
129-
(do bsearch(r) |&(lo,hi)| {
130-
if lo <= c && c <= hi { EQ }
131-
else if hi < c { LT }
132-
else { GT }
133-
}) != None
134-
}\n\n
135-
""");
136-
137115
def emit_property_module(f, mod, tbl):
138-
f.write("pub mod %s {\n" % mod)
139-
keys = tbl.keys()
140-
keys.sort()
141-
emit_bsearch_range_table(f);
142-
for cat in keys:
143-
f.write(" const %s_table : &[(char,char)] = &[\n" % cat)
144-
ix = 0
145-
for pair in tbl[cat]:
146-
f.write(ch_prefix(ix))
147-
f.write("(%s, %s)" % (escape_char(pair[0]), escape_char(pair[1])))
148-
ix += 1
149-
f.write("\n ];\n\n")
150-
151-
f.write(" pub pure fn %s(c: char) -> bool {\n" % cat)
152-
f.write(" bsearch_range_table(c, %s_table)\n" % cat)
153-
f.write(" }\n\n")
154-
f.write("}\n")
155-
156-
157-
def emit_property_module_old(f, mod, tbl):
158116
f.write("mod %s {\n" % mod)
159117
keys = tbl.keys()
160118
keys.sort()
@@ -235,9 +193,8 @@ def emit_decomp_module(f, canon, compat):
235193
rf = open(r, "w")
236194

237195
(canon_decomp, compat_decomp, gencats) = load_unicode_data("UnicodeData.txt")
196+
emit_decomp_module(rf, canon_decomp, compat_decomp)
238197
emit_property_module(rf, "general_category", gencats)
239198

240-
#emit_decomp_module(rf, canon_decomp, compat_decomp)
241-
242199
derived = load_derived_core_properties("DerivedCoreProperties.txt")
243200
emit_property_module(rf, "derived_property", derived)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ syn keyword rustType off_t dev_t ino_t pid_t mode_t ssize_t
4646

4747
syn keyword rustTrait Const Copy Send Owned " inherent traits
4848
syn keyword rustTrait Eq Ord Num Ptr
49-
syn keyword rustTrait Drop Add Sub Mul Quot Rem Neg BitAnd BitOr
49+
syn keyword rustTrait Drop Add Sub Mul Div Modulo Neg BitAnd BitOr
5050
syn keyword rustTrait BitXor Shl Shr Index
5151

5252
syn keyword rustSelf self

branches/try2/src/etc/x86.supp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@
583583
{
584584
llvm-optimization-reads-uninitialized-memory-3
585585
Memcheck:Cond
586-
fun:_ZN4test9run_tests*
586+
fun:_ZN4test9run_tests4anon13expr_fn_*
587587
...
588588
}
589589

@@ -654,11 +654,3 @@
654654
fun:_ZN5visit30visit_struct_dtor_helper_*
655655
...
656656
}
657-
658-
{
659-
llvm-optimization-reads-uninitialized-memory-16
660-
Memcheck:Cond
661-
fun:_ZN7ast_map6map_fn*
662-
fun:_ZN5visit30visit_struct_dtor_helper*
663-
...
664-
}

branches/try2/src/libcore/at_vec.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub mod rustrt {
4141
pub fn capacity<T>(v: @[T]) -> uint {
4242
unsafe {
4343
let repr: **raw::VecRepr =
44-
::cast::transmute(addr_of(&v));
44+
::cast::reinterpret_cast(&addr_of(&v));
4545
(**repr).unboxed.alloc / sys::size_of::<T>()
4646
}
4747
}
@@ -208,7 +208,7 @@ pub mod raw {
208208
*/
209209
#[inline(always)]
210210
pub unsafe fn set_len<T>(v: @[T], new_len: uint) {
211-
let repr: **mut VecRepr = ::cast::transmute(addr_of(&v));
211+
let repr: **mut VecRepr = ::cast::reinterpret_cast(&addr_of(&v));
212212
(**repr).unboxed.fill = new_len * sys::size_of::<T>();
213213
}
214214

@@ -226,7 +226,7 @@ pub mod raw {
226226

227227
#[inline(always)] // really pretty please
228228
pub unsafe fn push_fast<T>(v: &mut @[T], initval: T) {
229-
let repr: **mut VecRepr = ::cast::transmute(v);
229+
let repr: **mut VecRepr = ::cast::reinterpret_cast(&v);
230230
let fill = (**repr).unboxed.fill;
231231
(**repr).unboxed.fill += sys::size_of::<T>();
232232
let p = addr_of(&((**repr).unboxed.data));
@@ -322,4 +322,4 @@ mod test {
322322
assert!(from_slice([@"abc", @"123"]) == @[@"abc", @"123"]);
323323
assert!(from_slice([@[42]]) == @[@[42]]);
324324
}
325-
}
325+
}

0 commit comments

Comments
 (0)