Skip to content

Incoming #2706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Jun 22, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e7ce323
Change map::get to map::find in ppaux
catamorphism Jun 18, 2012
1b4dcbe
Comments only: typos
catamorphism Jun 18, 2012
6db7843
Monomorphize dtors correctly
catamorphism Jun 18, 2012
76d6120
Fix resolve bug that made nested classes not work
catamorphism Jun 19, 2012
0017116
Don't shadow a class name with a local
catamorphism Jun 19, 2012
b021729
Make trans give correct types to monomorphic dtors
catamorphism Jun 19, 2012
1b642bf
Change core::comm to use classes instead of resources
catamorphism Jun 18, 2012
0865170
Register snapshots
catamorphism Jun 21, 2012
419c335
Apparently an extra space in the snapshot file breaks Windows complet…
catamorphism Jun 21, 2012
f9afce3
Fix typo in Windows snapshot hash
catamorphism Jun 21, 2012
6060370
handle moves in let initializers and allow moves from unsafe ptrs
nikomatsakis Jun 21, 2012
4396ad4
Merge remote-tracking branch 'mozilla/incoming' into incoming
catamorphism Jun 21, 2012
29330b5
Comments only: annotate FIXMEs in cargo
catamorphism Jun 21, 2012
c3d384b
Comment only: annotate FIXME
catamorphism Jun 21, 2012
287f163
Issue #2657: track mutability of bindings, also prevent move from bin…
nikomatsakis Jun 21, 2012
9a2b60d
unxfail test for #2657
nikomatsakis Jun 21, 2012
393f739
Rename upcall_malloc_dyn to just upcall_malloc.
msullivan Jun 21, 2012
e9d072e
Consolidate "make sure types are the same" fns. Issue #2644.
lkuper Jun 21, 2012
c222287
A test to exercise suffix inference for unary minus a little more.
lkuper Jun 21, 2012
453e29c
core: Remove resolved FIXME around port destruction
brson Jun 21, 2012
2a53640
Test for issue 1896 (which appears to be fixed)
catamorphism Jun 21, 2012
290206b
Add test for issue 2214
catamorphism Jun 21, 2012
be8b091
Try removing code marked with "I don't think this is necessary"
catamorphism Jun 21, 2012
c814df0
Comments only: annotate FIXMEs
catamorphism Jun 21, 2012
dc11396
Remove unneeded SHAPE_VEC const
catamorphism Jun 21, 2012
f149ea0
Remove unneeded field
catamorphism Jun 21, 2012
0b1675d
Add and xfail test for 2101
catamorphism Jun 21, 2012
f8fa0a2
Generate a temporary for assign_ops. Issue #2581
eholk Jun 13, 2012
0e5cfd9
Move vector addition out of trans and into libcore.
eholk Jun 13, 2012
9bdb2c9
Library vecs are fast now.
eholk Jun 14, 2012
f21fbc2
Fixed another performance issue
eholk Jun 15, 2012
bb572b4
Updating errors in vec-add.rs
eholk Jun 15, 2012
4d1e415
Remove some commented out code so the pretty printer doesn't get conf…
eholk Jun 16, 2012
51ba351
Remove some singleton vector appends.
eholk Jun 16, 2012
f54829c
Move vector addition out of trans and into libcore.
eholk Jun 13, 2012
e4c2915
Basic functionality for new ports and chans
eholk Jun 7, 2012
3b9848b
Remove some warnings and make tests pass.
eholk Jun 15, 2012
dc3862b
This was unsafe, and will probably leak.
eholk Jun 15, 2012
40559ea
Adding a benchmark for the new message passing code
eholk Jun 15, 2012
28ab0e8
Fixing illegal moves.
eholk Jun 21, 2012
559c30a
xfailing vec-add.
eholk Jun 21, 2012
3178646
Revert "Add test for issue 2214"
catamorphism Jun 21, 2012
abfa816
Change the level of forcing in structurally_resolved_type().
lkuper Jun 21, 2012
0fe9c0a
Add tests to exercise the "pattern has N field(s), but" error patterns.
lkuper Jun 21, 2012
5710178
Adding `i` suffixes so cfail tests keep failing after suffix inference
lkuper Jun 21, 2012
312faf3
Tag all remaining FIXMEs with bugs. Install rule in tidy script to en…
graydon Jun 21, 2012
a350bea
Fix linker problem in issue 2214 test case
catamorphism Jun 21, 2012
a063982
Add test for issue 2467
catamorphism Jun 21, 2012
cc323d8
Make liveness print out a proper error message for moves out of a sel…
catamorphism Jun 22, 2012
be8a08b
Hopefully make issue 2214 test case work on Windows -- sigh
catamorphism Jun 22, 2012
b8710de
Add test cases
catamorphism Jun 22, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions src/cargo/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ fn test_is_uuid() {
assert !is_uuid("aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaป");
}

// FIXME: implement url/URL parsing so we don't have to resort to weak checks
// FIXME (#2661): implement url/URL parsing so we don't have to resort
// to weak checks

fn has_archive_extension(p: str) -> bool {
str::ends_with(p, ".tar") ||
Expand All @@ -188,8 +189,8 @@ fn is_archive_path(u: str) -> bool {
}

fn is_archive_url(u: str) -> bool {
// FIXME: this requires the protocol bit - if we had proper url parsing,
// we wouldn't need it
// FIXME (#2661): this requires the protocol bit - if we had proper
// url parsing, we wouldn't need it

alt str::find_str(u, "://") {
option::some(i) { has_archive_extension(u) }
Expand Down Expand Up @@ -315,7 +316,7 @@ fn load_crate(filename: str) -> option<crate> {

alt *attr_name {
"std" | "core" { }
_ { e.deps += [query]; }
_ { vec::push(e.deps, query); }
}
}
_ { }
Expand Down Expand Up @@ -774,7 +775,7 @@ fn install_source(c: cargo, path: str) {
let mut cratefiles = [];
for os::walk_dir(".") {|p|
if str::ends_with(p, ".rc") {
cratefiles += [p];
vec::push(cratefiles, p);
}
}

Expand Down Expand Up @@ -956,9 +957,10 @@ fn cmd_uninstall(c: cargo) {
let bin = c.bindir;
let target = c.opts.free[2u];

// FIXME: needs stronger pattern matching
// FIXME: needs to uninstall from a specified location in a cache instead
// of looking for it (binaries can be uninstalled by name only)
// FIXME (#2662): needs stronger pattern matching
// FIXME (#2662): needs to uninstall from a specified location in a
// cache instead of looking for it (binaries can be uninstalled by
// name only)
if is_uuid(target) {
for os::list_dir(lib).each { |file|
alt str::find_str(file, "-" + target + "-") {
Expand Down Expand Up @@ -1059,8 +1061,8 @@ fn install_query(c: cargo, wd: str, target: str) {
}
}

// FIXME: This whole dep_cache and current_install
// thing is a bit of a hack. It should be cleaned up in the future.
// FIXME (#2662): This whole dep_cache and current_install thing is
// a bit of a hack. It should be cleaned up in the future.

if target == c.current_install {
for c.dep_cache.each { |k, _v|
Expand Down Expand Up @@ -1894,7 +1896,7 @@ fn main(argv: [str]) {
if !first_time && o.free[1] != "init" {
cmd_init(c);

// FIXME: shouldn't need to reconfigure
// FIXME (#2662): shouldn't need to reconfigure
c = configure(o);
}

Expand Down
2 changes: 1 addition & 1 deletion src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ fn make_tests(config: config) -> [test::test_desc] {
let file = file;
#debug("inspecting file %s", file);
if is_test(config, file) {
tests += [make_test(config, file)]
vec::push(tests, make_test(config, file))
}
}
ret tests;
Expand Down
6 changes: 3 additions & 3 deletions src/compiletest/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn load_props(testfile: str) -> test_props {
let mut pp_exact = option::none;
for iter_header(testfile) {|ln|
alt parse_error_pattern(ln) {
option::some(ep) { error_patterns += [ep]; }
option::some(ep) { vec::push(error_patterns, ep) }
option::none { }
};

Expand All @@ -44,11 +44,11 @@ fn load_props(testfile: str) -> test_props {
}

option::iter(parse_aux_build(ln)) {|ab|
aux_builds += [ab];
vec::push(aux_builds, ab);
}

option::iter(parse_exec_env(ln)) {|ee|
exec_env += [ee];
vec::push(exec_env, ee);
}
};
ret {
Expand Down
4 changes: 2 additions & 2 deletions src/compiletest/procsrv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn target_env(lib_path: str, prog: str) -> [(str,str)] {
else { (k,v) }
};
if str::ends_with(prog, "rustc.exe") {
env += [("RUST_THREADS", "1")]
vec::push(env, ("RUST_THREADS", "1"));
}
ret env;
}
Expand All @@ -32,7 +32,7 @@ fn target_env(_lib_path: str, _prog: str) -> [(str,str)] {
}


// FIXME: This code is duplicated in core::run::program_output
// FIXME (#2659): This code is duplicated in core::run::program_output
fn run(lib_path: str,
prog: str,
args: [str],
Expand Down
2 changes: 1 addition & 1 deletion src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ fn run_pretty_test(config: config, props: test_props, testfile: str) {
procres);
}

srcs += [procres.stdout];
vec::push(srcs, procres.stdout);
round += 1;
}

Expand Down
6 changes: 1 addition & 5 deletions src/etc/get-snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ def unpack_snapshot(triple, dl_path):
tar = tarfile.open(dl_path)
kernel = get_kernel(triple)
for p in tar.getnames():

# FIXME: Fix this once win32 snapshot globs are fixed.
name = p.replace("rust-stage0/stage3/", "", 1);
name = name.replace("rust-stage0/", "", 1);

name = p.replace("rust-stage0/", "", 1);
stagep = os.path.join(triple, "stage0")
fp = os.path.join(stagep, name)
print("extracting " + p)
Expand Down
2 changes: 1 addition & 1 deletion src/etc/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def in_tar_name(fn):
shutil.move(file0, file1)

if flag == "install":
# FIXME this is an ugly quick hack; pls make it better
# FIXME (#2664): this is an ugly quick hack; pls make it better
path = file1
comps = path.split("-")
parts = { 'year': comps[2], \
Expand Down
7 changes: 6 additions & 1 deletion src/etc/tidy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python

import sys, fileinput, subprocess
import sys, fileinput, subprocess, re

err=0
cols=78
Expand All @@ -23,6 +23,11 @@ def report_err(s):
try:
for line in fileinput.input(file_names,
openhook=fileinput.hook_encoded("utf-8")):

if fileinput.filename().find("tidy.py") == -1:
if line.find("FIXME") != -1:
if re.search("FIXME.*#\d+", line) == None:
report_err("FIXME without issue number")
if (line.find('\t') != -1 and
fileinput.filename().find("Makefile") == -1):
report_err("tab character")
Expand Down
4 changes: 2 additions & 2 deletions src/fuzzer/cycles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn test_cycles(r : rand::rng, k: uint, n: uint)

// Create a graph with no edges
range(0u, vlen) {|_i|
v += [mut empty_pointy()];
vec::push(v, empty_pointy());
}

// Fill in the graph with random edges, with density k/n
Expand All @@ -77,7 +77,7 @@ fn test_cycles(r : rand::rng, k: uint, n: uint)
// https://github.com/mozilla/rust/issues/1899

if (likelihood(r, k, n)) { v[i].m = [p(choice(r, v))]; }
if (likelihood(r, k, n)) { v[i].n += [mut p(choice(r, v))]; }
if (likelihood(r, k, n)) { vec::push(v[i].n, mut p(choice(r, v))); }
if (likelihood(r, k, n)) { v[i].o = {x: 0, y: p(choice(r, v))}; }
}

Expand Down
2 changes: 1 addition & 1 deletion src/fuzzer/fuzzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ fn stash_ty_if(c: fn@(@ast::ty, test_mode)->bool,
e: @ast::ty,
tm: test_mode) {
if c(e, tm) {
*es += [*e];
vec::push(*es,*e);
} else {/* now my indices are wrong :( */ }
}

Expand Down
8 changes: 4 additions & 4 deletions src/fuzzer/ivec_fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ fn vec_edits<T: copy>(v: [T], xs: [T]) -> [[T]] {

if Lv != 1u {
// When Lv == 1u, this is redundant with omit.
edits += [[]];
vec::push(edits, []);
}
if Lv >= 3u {
// When Lv == 2u, this is redundant with swap.
edits += [vec::reversed(v)];
vec::push(edits, vec::reversed(v));
}
ix(0u, 1u, Lv) {|i| edits += [vec_omit(v, i)]; }
ix(0u, 1u, Lv) {|i| edits += [vec_dup(v, i)]; }
Expand All @@ -71,10 +71,10 @@ fn vec_edits<T: copy>(v: [T], xs: [T]) -> [[T]] {

ix(0u, 1u, len(xs)) {|j|
ix(0u, 1u, Lv) {|i|
edits += [vec_poke(v, i, xs[j])];
vec::push(edits, vec_poke(v, i, xs[j]));
}
ix(0u, 0u, Lv) {|i|
edits += [vec_insert(v, i, xs[j])];
vec::push(edits, vec_insert(v, i, xs[j]));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/fuzzer/rand_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn weighted_vec<T: copy>(v : [weighted<T>]) -> [T] {
for {weight: weight, item: item} in v {
let i = 0u;
while i < weight {
r += [item];
vec::push(r, item);
i += 1u;
}
}
Expand Down
14 changes: 8 additions & 6 deletions src/libcore/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,18 @@ allowing them to share the underlying data."]
fn clone<T: const>(rc: &arc<T>) -> arc<T> {
unsafe {
let ptr: ~arc_data<T> = unsafe::reinterpret_cast(**rc);
rustrt::rust_atomic_increment(&mut ptr.count);
let new_count = rustrt::rust_atomic_increment(&mut ptr.count);
assert new_count >= 2;
unsafe::forget(ptr);
}
arc_destruct(**rc)
}

// An arc over mutable data that is protected by a lock.
type ex_data<T> = {lock: sys::lock_and_signal, data: T};
type exclusive<T> = arc_destruct<ex_data<T>>;
type ex_data<T: send> = {lock: sys::lock_and_signal, data: T};
type exclusive<T: send> = arc_destruct<ex_data<T>>;

fn exclusive<T>(-data: T) -> exclusive<T> {
fn exclusive<T:send >(-data: T) -> exclusive<T> {
let data = ~{mut count: 1, data: {lock: sys::create_lock(),
data: data}};
unsafe {
Expand All @@ -88,12 +89,13 @@ fn exclusive<T>(-data: T) -> exclusive<T> {
}
}

impl methods<T> for exclusive<T> {
impl methods<T: send> for exclusive<T> {
fn clone() -> exclusive<T> {
unsafe {
// this makes me nervous...
let ptr: ~arc_data<ex_data<T>> = unsafe::reinterpret_cast(*self);
rustrt::rust_atomic_increment(&mut ptr.count);
let new_count = rustrt::rust_atomic_increment(&mut ptr.count);
assert new_count > 1;
unsafe::forget(ptr);
}
arc_destruct(*self)
Expand Down
18 changes: 8 additions & 10 deletions src/libcore/cmath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ export c_float;
export c_double;

// uncomment once #1433 is fixed
// FIXME export c_float_math_consts;
// FIXME export c_double_math_consts;
// FIXME (#1433): export c_float_math_consts;
// FIXME (#1433): export c_double_math_consts;

export c_float_targ_consts;
export c_double_targ_consts;
Expand Down Expand Up @@ -68,8 +68,7 @@ native mod c_double {
#[link_name="ilogb"] pure fn ilog_radix(n: c_double) -> c_int;
pure fn modf(n: c_double, &iptr: c_double) -> c_double;
pure fn pow(n: c_double, e: c_double) -> c_double;
// FIXME enable when rounding modes become available
// (See Issue #1379)
// FIXME (#1379): enable when rounding modes become available
// pure fn rint(n: c_double) -> c_double;
pure fn round(n: c_double) -> c_double;
// rename: for consistency with logradix
Expand Down Expand Up @@ -149,8 +148,7 @@ native mod c_float {
#[link_name="modff"] pure fn modf(n: c_float,
&iptr: c_float) -> c_float;
#[link_name="powf"] pure fn pow(n: c_float, e: c_float) -> c_float;
// FIXME enable when rounding modes become available
// (See Issue #1379)
// FIXME (#1379): enable when rounding modes become available
// #[link_name="rintf"] pure fn rint(n: c_float) -> c_float;
#[link_name="roundf"] pure fn round(n: c_float) -> c_float;
#[link_name="scalbnf"] pure fn ldexp_radix(n: c_float, i: c_int)
Expand All @@ -176,8 +174,8 @@ mod c_float_targ_consts {
const max_exp: uint = 128u;
const min_10_exp: int = -37;
const max_10_exp: int = 38;
// FIXME this is wrong! replace with hexadecimal (%a) constants below
// (see Issue #1433)
// FIXME (#1433): this is wrong, replace with hexadecimal (%a) constants
// below.
const min_value: f32 = 1.175494e-38_f32;
const max_value: f32 = 3.402823e+38_f32;
const epsilon: f32 = 0.000000_f32;
Expand All @@ -191,8 +189,8 @@ mod c_double_targ_consts {
const max_exp: uint = 1024u;
const min_10_exp: int = -307;
const max_10_exp: int = 308;
// FIXME this is wrong! replace with hexadecimal (%a) constants below
// (see Issue #1433)
// FIXME (#1433): this is wrong, replace with hexadecimal (%a) constants
// below.
const min_value: f64 = 2.225074e-308_f64;
const max_value: f64 = 1.797693e+308_f64;
const epsilon: f64 = 2.220446e-16_f64;
Expand Down
Loading