diff options
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/cmath.rs | 18 | ||||
| -rw-r--r-- | src/libcore/core.rc | 6 | ||||
| -rw-r--r-- | src/libcore/extfmt.rs | 4 | ||||
| -rw-r--r-- | src/libcore/f32.rs | 17 | ||||
| -rw-r--r-- | src/libcore/f64.rs | 15 | ||||
| -rw-r--r-- | src/libcore/float.rs | 4 | ||||
| -rw-r--r-- | src/libcore/io.rs | 35 | ||||
| -rw-r--r-- | src/libcore/iter.rs | 8 | ||||
| -rw-r--r-- | src/libcore/libc.rs | 10 | ||||
| -rw-r--r-- | src/libcore/os.rs | 12 | ||||
| -rw-r--r-- | src/libcore/run.rs | 4 | ||||
| -rw-r--r-- | src/libcore/str.rs | 4 | ||||
| -rw-r--r-- | src/libcore/task.rs | 16 | ||||
| -rw-r--r-- | src/libcore/uint-template.rs | 7 | ||||
| -rw-r--r-- | src/libcore/vec.rs | 2 |
15 files changed, 74 insertions, 88 deletions
diff --git a/src/libcore/cmath.rs b/src/libcore/cmath.rs index f0b346e32a3..fbb434d8e4b 100644 --- a/src/libcore/cmath.rs +++ b/src/libcore/cmath.rs @@ -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; @@ -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 @@ -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) @@ -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; @@ -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; diff --git a/src/libcore/core.rc b/src/libcore/core.rc index 3185d8e30c0..8f4b301adaf 100644 --- a/src/libcore/core.rc +++ b/src/libcore/core.rc @@ -50,9 +50,9 @@ export num; // NDM seems to be necessary for resolve to work export option_iter; -// FIXME: This creates some APIs that I do not want to commit to. It is -// currently exported for the uv code in std, but when that code moves into -// core this should become unexported +// FIXME (#2648): This creates some APIs that I do not want to commit +// to. It is currently exported for the uv code in std, but when that +// code moves into core this should become unexported export priv; diff --git a/src/libcore/extfmt.rs b/src/libcore/extfmt.rs index 1ae69046715..144ea571d7c 100644 --- a/src/libcore/extfmt.rs +++ b/src/libcore/extfmt.rs @@ -274,8 +274,8 @@ mod rt { enum count { count_is(int), count_implied, } enum ty { ty_default, ty_bits, ty_hex_upper, ty_hex_lower, ty_octal, } - // FIXME: May not want to use a vector here for flags; - // instead just use a bool per flag (see Issue #1993) + // FIXME (#1993): May not want to use a vector here for flags; instead + // just use a bool per flag. type conv = {flags: [flag], width: count, precision: count, ty: ty}; fn conv_int(cv: conv, i: int) -> str { diff --git a/src/libcore/f32.rs b/src/libcore/f32.rs index e1d30081966..821fa68f55c 100644 --- a/src/libcore/f32.rs +++ b/src/libcore/f32.rs @@ -6,8 +6,6 @@ import cmath::c_float::*; import cmath::c_float_targ_consts::*; import num::num; -// FIXME find out why these have to be exported explicitly - export add, sub, mul, div, rem, lt, le, gt, eq, eq, ne; export is_positive, is_negative, is_nonpositive, is_nonnegative; export is_zero, is_infinite, is_finite; @@ -55,9 +53,8 @@ pure fn ge(x: f32, y: f32) -> bool { ret x >= y; } pure fn gt(x: f32, y: f32) -> bool { ret x > y; } -// FIXME replace the predicates below with llvm intrinsics or calls -// to the libmath macros in the rust runtime for performance -// See Issue #1999 +// FIXME (#1999): replace the predicates below with llvm intrinsics or +// calls to the libmath macros in the rust runtime for performance. #[doc = " Returns true if `x` is a positive number, including +0.0f320 and +Infinity @@ -106,14 +103,13 @@ pure fn is_finite(x: f32) -> bool { ret !(is_NaN(x) || is_infinite(x)); } -// FIXME add is_normal, is_subnormal, and fpclassify -// also see Issue #1999 +// FIXME (#1999): add is_normal, is_subnormal, and fpclassify. /* Module: consts */ mod consts { - // FIXME replace with mathematical constants from cmath - // (requires Issue #1433 to fix) + // FIXME (requires Issue #1433 to fix): replace with mathematical + // constants from cmath. #[doc = "Archimedes' constant"] const pi: f32 = 3.14159265358979323846264338327950288_f32; @@ -167,9 +163,8 @@ pure fn logarithm(n: f32, b: f32) -> f32 { #[cfg(target_os="freebsd")] pure fn logarithm(n: f32, b: f32) -> f32 { - // FIXME check if it is good to use log2 instead of ln here; + // FIXME (#2000): check if it is good to use log2 instead of ln here; // in theory should be faster since the radix is 2 - // See Issue #2000 ret ln(n) / ln(b); } diff --git a/src/libcore/f64.rs b/src/libcore/f64.rs index af83a0829e1..066b1b818c7 100644 --- a/src/libcore/f64.rs +++ b/src/libcore/f64.rs @@ -29,8 +29,7 @@ export num; // PORT check per architecture -// FIXME obtain these in a different way -// (perhaps related to Issue #1433) +// FIXME (#1433): obtain these in a different way const radix: uint = 2u; @@ -127,14 +126,13 @@ pure fn is_finite(x: f64) -> bool { ret !(is_NaN(x) || is_infinite(x)); } -// FIXME add is_normal, is_subnormal, and fpclassify -// also see Issue #1999 +// FIXME (#1999): add is_normal, is_subnormal, and fpclassify /* Module: consts */ mod consts { - // FIXME replace with mathematical constants from cmath - // (requires Issue #1433 to fix) + // FIXME (requires Issue #1433 to fix): replace with mathematical + // constants from cmath. #[doc = "Archimedes' constant"] const pi: f64 = 3.14159265358979323846264338327950288_f64; @@ -188,9 +186,8 @@ pure fn logarithm(n: f64, b: f64) -> f64 { #[cfg(target_os="freebsd")] pure fn logarithm(n: f64, b: f64) -> f64 { - // FIXME check if it is good to use log2 instead of ln here; - // in theory should be faster since the radix is 2 - // See Issue #2000 + // FIXME (#2000): check if it is good to use log2 instead of ln here; in + // theory should be faster since the radix is 2 ret ln(n) / ln(b); } diff --git a/src/libcore/float.rs b/src/libcore/float.rs index f50719408d0..9c995100273 100644 --- a/src/libcore/float.rs +++ b/src/libcore/float.rs @@ -38,8 +38,8 @@ const neg_infinity: float = -1.0/0.0; /* Module: consts */ mod consts { - // FIXME replace with mathematical constants from cmath - // (requires Issue #1433 to fix) + // FIXME (requires Issue #1433 to fix): replace with mathematical + // constants from cmath. #[doc = "Archimedes' constant"] const pi: float = 3.14159265358979323846264338327950288; diff --git a/src/libcore/io.rs b/src/libcore/io.rs index 077a178546e..635b3f9ebf4 100644 --- a/src/libcore/io.rs +++ b/src/libcore/io.rs @@ -22,14 +22,14 @@ native mod rustrt { // Reading -// FIXME This is all buffered. We might need an unbuffered variant as well -// #2004 +// FIXME (#2004): This is all buffered. We might need an unbuffered variant +// as well enum seek_style { seek_set, seek_end, seek_cur, } // The raw underlying reader iface. All readers must implement this. iface reader { - // FIXME: Seekable really should be orthogonal. // #2004 + // FIXME (#2004): Seekable really should be orthogonal. fn read_bytes(uint) -> [u8]; fn read_byte() -> int; fn unread_byte(int); @@ -82,8 +82,8 @@ impl reader_util for reader { while nbread > 0u { let data = self.read_bytes(nbread); if vec::len(data) == 0u { - // eof - FIXME should we do something if - // we're split in a unicode char? // #2004 + // eof - FIXME (#2004): should we do something if + // we're split in a unicode char? break; } buf += data; @@ -234,9 +234,9 @@ fn FILE_reader(f: *libc::FILE, cleanup: bool) -> reader { } } -// FIXME: this should either be an iface-less impl, a set of top-level -// functions that take a reader, or a set of default methods on reader -// (which can then be called reader) // #2004 +// FIXME (#2004): this should either be an iface-less impl, a set of +// top-level functions that take a reader, or a set of default methods on +// reader (which can then be called reader) fn stdin() -> reader { rustrt::rust_get_stdin() as reader } @@ -312,9 +312,8 @@ fn with_str_reader<T>(s: str, f: fn(reader) -> T) -> T { // Writing enum fileflag { append, create, truncate, no_flag, } -// FIXME: Seekable really should be orthogonal. -// FIXME: eventually u64 -// #2004 +// FIXME (#2004): Seekable really should be orthogonal. +// FIXME (#2004): eventually u64 iface writer { fn write([const u8]/&); fn seek(int, seek_style); @@ -586,9 +585,9 @@ fn buffered_file_writer(path: str) -> result<writer, str> { else { result::ok(FILE_writer(f, true)) } } -// FIXME it would be great if this could be a const -// FIXME why are these different from the way stdin() is implemented? -// #2004 +// FIXME (#2004) it would be great if this could be a const +// FIXME (#2004) why are these different from the way stdin() is +// implemented? fn stdout() -> writer { fd_writer(libc::STDOUT_FILENO as c_int, false) } fn stderr() -> writer { fd_writer(libc::STDERR_FILENO as c_int, false) } @@ -670,8 +669,8 @@ fn read_whole_file_str(file: str) -> result<str, str> { }) } -// FIXME implement this in a low-level way. Going through the abstractions is -// pointless. // #2004 +// FIXME (#2004): implement this in a low-level way. Going through the +// abstractions is pointless. fn read_whole_file(file: str) -> result<[u8], str> { result::chain(file_reader(file), { |rdr| result::ok(rdr.read_whole_stream()) @@ -714,8 +713,8 @@ mod fsync { }; // fsync file after executing blk - // FIXME find better way to create resources within lifetime of outer res - // #2004 + // FIXME (#2004) find better way to create resources within lifetime of + // outer res fn FILE_res_sync(&&file: FILE_res, opt_level: option<level>, blk: fn(&&res<*libc::FILE>)) { blk(res({ diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index cf903c3bebe..070e909c626 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -97,8 +97,8 @@ fn min<A:copy,IA:base_iter<A>>(self: IA) -> A { alt foldl::<A,option<A>,IA>(self, none) {|a, b| alt a { some(a_) if a_ < b { - // FIXME: Not sure if this is successfully optimized to a move - // #2005 + // FIXME (#2005): Not sure if this is successfully optimized to + // a move a } _ { some(b) } @@ -113,8 +113,8 @@ fn max<A:copy,IA:base_iter<A>>(self: IA) -> A { alt foldl::<A,option<A>,IA>(self, none) {|a, b| alt a { some(a_) if a_ > b { - // FIXME: Not sure if this is successfully optimized to a move - // #2005 + // FIXME (#2005): Not sure if this is successfully optimized to + // a move. a } _ { some(b) } diff --git a/src/libcore/libc.rs b/src/libcore/libc.rs index b6861b42eb7..c2679c6956e 100644 --- a/src/libcore/libc.rs +++ b/src/libcore/libc.rs @@ -37,8 +37,7 @@ dissolved. // Initial glob-exports mean that all the contents of all the modules // wind up exported, if you're interested in writing platform-specific code. -// FIXME: change these to glob-exports when sufficiently supported. -// Issue #2006 +// FIXME (#2006): change these to glob-exports when sufficiently supported. import types::common::c95::*; import types::common::c99::*; @@ -79,10 +78,9 @@ import funcs::posix08::unistd::*; import funcs::bsd44::*; import funcs::extra::*; -// FIXME: remove these 3 exports (and their uses next door in os::) when -// export globs work. They provide access (for now) for os:: to dig around in -// the rest of the platform-specific definitions. -// Issue #2006 +// FIXME (#2006): remove these 3 exports (and their uses next door in os::) +// when export globs work. They provide access (for now) for os:: to dig +// around in the rest of the platform-specific definitions. export types, funcs, consts; diff --git a/src/libcore/os.rs b/src/libcore/os.rs index 34c38321f47..9ee7a80fcda 100644 --- a/src/libcore/os.rs +++ b/src/libcore/os.rs @@ -166,8 +166,8 @@ mod global_env { task::set_opts(builder, { sched: some({ mode: task::single_threaded, - // FIXME: This would be a good place to use - // a very small native stack (#2621) + // FIXME (#2621): This would be a good place to use a + // very small native stack native_stack_size: none }) with task::get_opts(builder) @@ -499,8 +499,8 @@ fn path_exists(p: path) -> bool { } } -// FIXME: under Windows, we should prepend the current drive letter to paths -// that start with a slash. #2622 +// FIXME (#2622): under Windows, we should prepend the current drive letter +// to paths that start with a slash. #[doc = " Convert a relative path to an absolute path @@ -696,8 +696,8 @@ fn remove_file(p: path) -> bool { #[cfg(windows)] fn unlink(p: path) -> bool { - // FIXME: remove imports when export globs work properly. - // (similar to Issue #2006) + // FIXME (similar to Issue #2006): remove imports when export globs + // work properly. import libc::funcs::extra::kernel32::*; import libc::types::os::arch::extra::*; import win32::*; diff --git a/src/libcore/run.rs b/src/libcore/run.rs index d8905730dc2..401454c40df 100644 --- a/src/libcore/run.rs +++ b/src/libcore/run.rs @@ -286,8 +286,8 @@ fn program_output(prog: str, args: [str]) -> // Spawn two entire schedulers to read both stdout and sterr // in parallel so we don't deadlock while blocking on one - // or the other. FIXME: Surely there's a much more clever way - // to do this. (#2625) + // or the other. FIXME (#2625): Surely there's a much more + // clever way to do this. let p = comm::port(); let ch = comm::chan(p); task::spawn_sched(task::single_threaded) {|| diff --git a/src/libcore/str.rs b/src/libcore/str.rs index 078243dfaee..dbdd798033c 100644 --- a/src/libcore/str.rs +++ b/src/libcore/str.rs @@ -593,8 +593,8 @@ Section: Comparing strings #[doc = "Bytewise string equality"] pure fn eq(&&a: str, &&b: str) -> bool { - // FIXME: This should just be "a == b" but that calls into the shape code - // :( (#2627) + // FIXME (#2627): This should just be "a == b" but that calls into the + // shape code. let a_len = a.len(); let b_len = b.len(); if a_len != b_len { ret false; } diff --git a/src/libcore/task.rs b/src/libcore/task.rs index 5f31b5090f0..ab9b4f7d3d7 100644 --- a/src/libcore/task.rs +++ b/src/libcore/task.rs @@ -64,8 +64,8 @@ Indicates the manner in which a task exited. A task that completes without failing and whose supervised children complete without failing is considered to exit successfully. -FIXME: This description does not indicate the current behavior for linked -failure. (See #1868) +FIXME (See #1868): This description does not indicate the current behavior +for linked failure. "] enum task_result { success, @@ -275,7 +275,7 @@ fn future_result(builder: builder) -> future::future<task_result> { task. "]; - // FIXME (1087, 1857): Once linked failure and notification are + // FIXME (#1087, #1857): Once linked failure and notification are // handled in the library, I can imagine implementing this by just // registering an arbitrary number of task::on_exit handlers and // sending out messages. @@ -506,10 +506,10 @@ fn spawn_raw(opts: task_opts, +f: fn~()) unsafe { let mut f = if opts.supervise { f } else { - // FIXME: The runtime supervision API is weird here because it - // was designed to let the child unsupervise itself, when what - // we actually want is for parents to unsupervise new - // children. (#1868, #1789) + // FIXME (#1868, #1789): The runtime supervision API is weird here + // because it was designed to let the child unsupervise itself, + // when what we actually want is for parents to unsupervise new + // children. fn~() { rustrt::unsupervise(); f(); @@ -529,7 +529,7 @@ fn spawn_raw(opts: task_opts, +f: fn~()) unsafe { }; option::iter(opts.notify_chan) {|c| - // FIXME (1087): Would like to do notification in Rust + // FIXME (#1087): Would like to do notification in Rust rustrt::rust_task_config_notify(new_task, c); } diff --git a/src/libcore/uint-template.rs b/src/libcore/uint-template.rs index f58a85c3618..be491433cd0 100644 --- a/src/libcore/uint-template.rs +++ b/src/libcore/uint-template.rs @@ -173,10 +173,9 @@ fn to_str_bytes<U>(neg: bool, num: T, radix: uint, 0u8,0u8,0u8,0u8,0u8 ]/65; - // FIXME: post-snapshot, you can do this without - // the raw pointers and unsafe bits, and the - // codegen will prove it's all in-bounds, no - // extra cost. + // FIXME (#2649): post-snapshot, you can do this without the raw + // pointers and unsafe bits, and the codegen will prove it's all + // in-bounds, no extra cost. vec::unpack_slice(buf) {|p, len| let mp = p as *mut u8; diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs index a80acc67e42..494470e32e4 100644 --- a/src/libcore/vec.rs +++ b/src/libcore/vec.rs @@ -385,7 +385,7 @@ fn shift<T>(&v: [T]) -> T { let mut r <- *vv; for uint::range(1u, ln) {|i| - // FIXME: this isn't legal, per se... + // FIXME (#2703): this isn't legal, per se... let r <- *ptr::offset(vv, i); push(v, r); } |
