CFG_INFO := $(info cfg: *** stage2 and later will not be built ***)
CFG_INFO := $(info cfg:)
-#XXX This is surely busted
+#FIXME This is surely busted
all: $(SREQ1$(CFG_BUILD)) $(GENERATED) docs
else
scope with corresponding `use` statements.
~~~ {.ignore}
-# // XXX: Allow unused import in doc test
+# // FIXME: Allow unused import in doc test
use farm::cow;
// ...
# mod farm { pub fn cow() { println!("Hidden ninja cow is hidden.") } }
else
# For the ARM and MIPS crosses, use the toolchain assembler
- # XXX: We should be able to use the LLVM assembler
+ # FIXME: We should be able to use the LLVM assembler
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
#[inline]
pub fn alloc<'a, T>(&'a self, op: || -> T) -> &'a T {
unsafe {
- // XXX: Borrow check
+ // FIXME: Borrow check
let this = transmute_mut(self);
if intrinsics::needs_drop::<T>() {
this.alloc_nonpod(op)
// FIXME (#2741): Provide a function to write the standard ebml header.
impl<'a> Encoder<'a> {
- /// XXX(pcwalton): Workaround for badness in trans. DO NOT USE ME.
+ /// FIXME(pcwalton): Workaround for badness in trans. DO NOT USE ME.
pub unsafe fn unsafe_clone(&self) -> Encoder<'a> {
Encoder {
writer: cast::transmute_copy(&self.writer),
let pat_root = Path::new(pattern).root_path();
if pat_root.is_some() {
if check_windows_verbatim(pat_root.get_ref()) {
- // XXX: How do we want to handle verbatim paths? I'm inclined to return nothing,
+ // FIXME: How do we want to handle verbatim paths? I'm inclined to return nothing,
// since we can't very well find all UNC shares with a 1-letter server name.
return Paths { root: root, dir_patterns: ~[], options: options, todo: ~[] };
}
let mut bytes = [0, 0];
match rdr.read(bytes) {
Some(2) => {}
- _ => fail!() // XXX: malformed url?
+ _ => fail!() // FIXME: malformed url?
}
let ch = uint::parse_bytes(bytes, 16u).unwrap() as u8 as char;
let mut bytes = [0, 0];
match rdr.read(bytes) {
Some(2) => {}
- _ => fail!() // XXX: malformed?
+ _ => fail!() // FIXME: malformed?
}
uint::parse_bytes(bytes, 16u).unwrap() as u8 as char
}
let (port, chan) = Chan::new();
let blk = bo.take_unwrap();
- // XXX: What happens if the task fails?
+ // FIXME: What happens if the task fails?
do spawn {
let mut exe = Exec {
discovered_inputs: WorkMap::new(),
self.work.push(f);
}
- // XXX: Seems like a really weird requirement to have an event loop provide.
+ // FIXME: Seems like a really weird requirement to have an event loop provide.
fn pausable_idle_callback(&mut self, cb: ~Callback) -> ~PausableIdleCallback {
let callback = ~BasicPausable::new(self, cb);
rtassert!(self.idle.is_none());
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// XXX: this file probably shouldn't exist
+// FIXME: this file probably shouldn't exist
#[macro_escape];
use std::fmt;
// Indicates whether we should perform expensive sanity checks, including rtassert!
-// XXX: Once the runtime matures remove the `true` below to turn off rtassert, etc.
+// FIXME: Once the runtime matures remove the `true` below to turn off rtassert, etc.
pub static ENFORCE_SANITY: bool = true || !cfg!(rtopt) || cfg!(rtdebug) || cfg!(rtassert);
macro_rules! rterrln (
/// struct. The scheduler struct acts like a baton, all scheduling
/// actions are transfers of the baton.
///
-/// XXX: This creates too many callbacks to run_sched_once, resulting
+/// FIXME: This creates too many callbacks to run_sched_once, resulting
/// in too much allocation and too many events.
pub struct Scheduler {
/// ID number of the pool that this scheduler is a member of. When
return sched;
}
- // XXX: This may eventually need to be refactored so that
+ // FIXME: This may eventually need to be refactored so that
// the scheduler itself doesn't have to call event_loop.run.
// That will be important for embedding the runtime into external
// event loops.
}
}
-// XXX: Some hacks to put a || closure in Scheduler without borrowck
+// FIXME: Some hacks to put a || closure in Scheduler without borrowck
// complaining
type UnsafeTaskReceiver = raw::Closure;
trait ClosureConverter {
valgrind_id: 0
};
- // XXX: Using the FFI to call a C macro. Slow
+ // FIXME: Using the FFI to call a C macro. Slow
stk.valgrind_id = unsafe {
rust_valgrind_stack_register(stk.start(), stk.end())
};
impl Drop for Stack {
fn drop(&mut self) {
unsafe {
- // XXX: Using the FFI to call a C macro. Slow
+ // FIXME: Using the FFI to call a C macro. Slow
rust_valgrind_stack_deregister(self.valgrind_id);
}
}
pub fn readlink(p: &CString) -> IoResult<Path> {
return os_readlink(p);
- // XXX: I have a feeling that this reads intermediate symlinks as well.
+ // FIXME: I have a feeling that this reads intermediate symlinks as well.
#[cfg(windows)]
fn os_readlink(p: &CString) -> IoResult<Path> {
let handle = unsafe {
let p = p.with_ref(|p| p);
let mut len = unsafe { libc::pathconf(p, libc::_PC_NAME_MAX) };
if len == -1 {
- len = 1024; // XXX: read PATH_MAX from C ffi?
+ len = 1024; // FIXME: read PATH_MAX from C ffi?
}
let mut buf = vec::with_capacity::<u8>(len as uint);
match retry(|| unsafe {
pub fn lstat(p: &CString) -> IoResult<io::FileStat> {
return os_lstat(p);
- // XXX: windows implementation is missing
+ // FIXME: windows implementation is missing
#[cfg(windows)]
fn os_lstat(_p: &CString) -> IoResult<io::FileStat> {
Err(super::unimpl())
#[cfg(not(windows))]
fn get_err(errno: i32) -> (io::IoErrorKind, &'static str) {
- // XXX: this should probably be a bit more descriptive...
+ // FIXME: this should probably be a bit more descriptive...
match errno {
libc::EOF => (io::EndOfFile, "end of file"),
libc::ECONNREFUSED => (io::ConnectionRefused, "connection refused"),
let mut bits = [0, ..8];
// drain the timerfd of how many times its fired
//
- // XXX: should this perform a send() this number of
+ // FIXME: should this perform a send() this number of
// times?
FileDesc::new(fd, false).inner_read(bits);
let remove = {
/// The diagnostic emitter yielded to the procedure should be used for reporting
/// errors of the compiler.
pub fn monitor(f: proc(@diagnostic::Emitter)) {
- // XXX: This is a hack for newsched since it doesn't support split stacks.
+ // FIXME: This is a hack for newsched since it doesn't support split stacks.
// rustc needs a lot of stack! When optimizations are disabled, it needs
// even *more* stack than usual as well.
#[cfg(rtopt)]
let mut task_builder = task::task();
task_builder.name("rustc");
- // XXX: Hacks on hacks. If the env is trying to override the stack size
+ // FIXME: Hacks on hacks. If the env is trying to override the stack size
// then *don't* set it explicitly.
if os::getenv("RUST_MIN_STACK").is_none() {
task_builder.opts.stack_size = Some(STACK_SIZE);
// If this is a static method, we've already encoded
// this.
if method_ty.explicit_self != SelfStatic {
- // XXX: I feel like there is something funny going on.
+ // FIXME: I feel like there is something funny going on.
let tpt = ty::lookup_item_type(tcx, method_def_id);
encode_bounds_and_type(ebml_w, ecx, &tpt);
}
for lib in libs.mut_iter() {
match lib.dylib {
Some(ref p) if p.filename_str() == Some(file.as_slice()) => {
- assert!(lib.rlib.is_none()); // XXX: legit compiler error
+ assert!(lib.rlib.is_none()); // FIXME: legit compiler error
lib.rlib = Some(path.clone());
return true;
}
for lib in libs.mut_iter() {
match lib.rlib {
Some(ref p) if p.filename_str() == Some(file.as_slice()) => {
- assert!(lib.dylib.is_none()); // XXX: legit compiler error
+ assert!(lib.dylib.is_none()); // FIXME: legit compiler error
lib.dylib = Some(path.clone());
return true;
}
// it is mutable. But I believe it's harmless since we generate
// balanced EBML.
//
- // XXX(pcwalton): Don't copy this way.
+ // FIXME(pcwalton): Don't copy this way.
let mut new_ebml_w = unsafe {
self.new_ebml_w.unsafe_clone()
};
}
ty::AutoObject(..) => {
- // XXX: Handle @Trait to &Trait casts here?
+ // FIXME: Handle @Trait to &Trait casts here?
}
}
}
pub struct LoanDataFlowOperator;
-/// XXX(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
+/// FIXME(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
/// yet on unit structs.
impl Clone for LoanDataFlowOperator {
fn clone(&self) -> LoanDataFlowOperator {
pub struct MoveDataFlowOperator;
-/// XXX(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
+/// FIXME(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
/// yet on unit structs.
impl Clone for MoveDataFlowOperator {
fn clone(&self) -> MoveDataFlowOperator {
pub struct AssignDataFlowOperator;
-/// XXX(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
+/// FIXME(pcwalton): Should just be #[deriving(Clone)], but that doesn't work
/// yet on unit structs.
impl Clone for AssignDataFlowOperator {
fn clone(&self) -> AssignDataFlowOperator {
// Step 3: Mark all destructors as reachable.
//
- // XXX(pcwalton): This is a conservative overapproximation, but fixing
+ // FIXME(pcwalton): This is a conservative overapproximation, but fixing
// this properly would result in the necessity of computing *type*
// reachability, which might result in a compile time loss.
fn mark_destructors_reachable(&self) {
// not contain any entries from local crates.
pub type ExternalExports = HashSet<DefId>;
-// XXX: dox
+// FIXME: dox
pub type LastPrivateMap = HashMap<NodeId, LastPrivate>;
pub enum LastPrivate {
parent: ReducedGraphParent,
parent_public: bool) {
let ident = variant.node.name;
- // XXX: this is unfortunate to have to do this privacy calculation
+ // FIXME: this is unfortunate to have to do this privacy calculation
// here. This should be living in middle::privacy, but it's
// necessary to keep around in some form becaues of glob imports...
let is_public = parent_public && variant.node.vis != ast::Private;
`{}`",
interner_get(label))),
Some(DlDef(def @ DefLabel(_))) => {
- // XXX: is AllPublic correct?
+ // FIXME: is AllPublic correct?
self.record_def(expr.id, (def, AllPublic))
}
Some(_) => {
}
ast::PatEnum(_, ref subpats) => {
if opt_eq(tcx, &variant_opt(bcx, p.id), opt) {
- // XXX: Must we clone?
+ // FIXME: Must we clone?
match *subpats {
None => Some(vec::from_elem(variant_size, dummy)),
_ => (*subpats).clone(),
C_undef(Type::array(&Type::i8(), size))
}
-// XXX this utility routine should be somewhere more general
+// FIXME this utility routine should be somewhere more general
#[inline]
fn roundup(x: u64, a: u64) -> u64 { ((x + (a - 1)) / a) * a }
let sub_path = vec::append_one(bcx.fcx.path.clone(),
PathName(special_idents::anon));
- // XXX: Bad copy.
+ // FIXME: Bad copy.
let s = mangle_internal_name_by_path_and_seq(ccx,
sub_path.clone(),
"expr_fn");
let tsize = machine::llsize_of_alloc(cx, llty);
if csize != tsize {
unsafe {
- // XXX these values could use some context
+ // FIXME these values could use some context
llvm::LLVMDumpValue(llconst);
llvm::LLVMDumpValue(C_undef(llty));
}
RetVoid(bcx);
}
"morestack_addr" => {
- // XXX This is a hack to grab the address of this particular
+ // FIXME This is a hack to grab the address of this particular
// native function. There should be a general in-language
// way to do this
let llfty = type_of_rust_fn(bcx.ccx(), None, [], ty::mk_nil());
/// * `llfn`: a closure returning the LLVM ValueRef for the method
/// * `impl_id`: the node ID of the impl this method is inside
///
-/// XXX(pcwalton) Can we take `path` by reference?
+/// FIXME(pcwalton) Can we take `path` by reference?
pub fn trans_method(ccx: @CrateContext,
path: Path,
method: &ast::Method,
ty_enum(did, ref substs) => {
let variants = enum_variants(cx, did);
for variant in (*variants).iter() {
- // XXX(pcwalton): This is an inefficient way to do this. Don't
+ // FIXME(pcwalton): This is an inefficient way to do this. Don't
// synthesize a tuple!
//
// Perform any type parameter substitutions.
}
}
-// XXX(pcwalton): Makes a copy, bleh. Probably better to not do that.
+// FIXME(pcwalton): Makes a copy, bleh. Probably better to not do that.
pub fn node_id_to_type_params(cx: ctxt, id: ast::NodeId) -> ~[t] {
let node_type_substs = cx.node_type_substs.borrow();
match node_type_substs.get().find(&id) {
rcvr_ty: ty::t,
candidates: &mut ~[Candidate])
-> Option<method_map_entry> {
- // XXX(pcwalton): Do we need to clone here?
+ // FIXME(pcwalton): Do we need to clone here?
let relevant_candidates: ~[Candidate] =
candidates.iter().map(|c| (*c).clone()).
filter(|c| self.is_relevant(rcvr_ty, c)).collect();
let destructors = self.tcx().destructors.borrow();
bad = destructors.get().contains(&method_id);
}
- // XXX: does this properly enforce this on everything now
+ // FIXME: does this properly enforce this on everything now
// that self has been merged in? -sully
method_param(method_param { trait_id: trait_id, .. }) |
method_object(method_object { trait_id: trait_id, .. }) => {
let mut checked = false;
match place.node {
ast::ExprPath(ref path) => {
- // XXX(pcwalton): For now we hardcode the two permissible
+ // FIXME(pcwalton): For now we hardcode the two permissible
// places: the exchange heap and the managed heap.
let definition = lookup_def(fcx, path.span, place.id);
let def_id = ast_util::def_id_of_def(definition);
ty::populate_implementations_for_trait_if_necessary(tcx,
trait_ref.def_id);
- // XXX: this is a bad way to do this, since we do
+ // FIXME: this is a bad way to do this, since we do
// pointless allocations.
let impls = {
let trait_impls = tcx.trait_impls.borrow();
// we're trying to cast to some_trait. If not, then we try
// the next impl.
//
- // XXX: document a bit more what this means
+ // FIXME: document a bit more what this means
//
// FIXME(#5781) this should be mk_eqty not mk_subty
let ty::ty_param_substs_and_ty {
// Nothing to do.
}
Some(base_type_def_id) => {
- // XXX: Gather up default methods?
+ // FIXME: Gather up default methods?
if associated_traits.len() == 0 {
self.add_inherent_impl(base_type_def_id, implementation);
}
},
arrow = match decl.decl.output { clean::Unit => "no", _ => "yes" },
ret = decl.decl.output);
- // XXX: where are bounds and lifetimes printed?!
+ // FIXME: where are bounds and lifetimes printed?!
}
clean::BareFunction(ref decl) => {
write!(f.buf, "{}{}fn{}{}",
impl fmt::Default for clean::ImportSource {
fn fmt(v: &clean::ImportSource, f: &mut fmt::Formatter) {
match v.did {
- // XXX: shouldn't be restricted to just local imports
+ // FIXME: shouldn't be restricted to just local imports
Some(did) if ast_util::is_local(did) => {
resolved_path(f.buf, did.node, &v.path, true);
}
impl fmt::Default for clean::ViewListIdent {
fn fmt(v: &clean::ViewListIdent, f: &mut fmt::Formatter) {
match v.source {
- // XXX: shouldn't be limited to just local imports
+ // FIXME: shouldn't be limited to just local imports
Some(did) if ast_util::is_local(did) => {
let path = clean::Path {
global: false,
}
None => return Err(~"malformed json"),
};
- // XXX: this should read from the "plugins" field, but currently
+ // FIXME: this should read from the "plugins" field, but currently
// Json doesn't implement decodable...
let plugin_output = ~[];
Ok((crate, plugin_output))
subcfgs,
opt,
what);
- // XXX: result is an Option<Path>. The following code did not take that
+ // FIXME: result is an Option<Path>. The following code did not take that
// into account. I'm not sure if the workcache really likes seeing the
// output as "Some(\"path\")". But I don't know what to do about it.
// FIXME (#9639): This needs to handle non-utf8 paths
}
}
-/// XXX: Loop(*handle) is buggy with destructors. Normal structs
+/// FIXME: Loop(*handle) is buggy with destructors. Normal structs
/// with dtors may not be destructured, but tuple structs can,
/// but the results are not correct.
pub struct Loop {
}
}
-// XXX: Need to define the error constants like EOF so they can be
+// FIXME: Need to define the error constants like EOF so they can be
// compared to the UvError type
pub struct UvError(c_int);
uvll::EADDRNOTAVAIL => io::ConnectionRefused,
err => {
uvdebug!("uverr.code {}", err as int);
- // XXX: Need to map remaining uv error types
+ // FIXME: Need to map remaining uv error types
io::OtherIoError
}
};
let mut acceptor = ~TcpAcceptor { listener: self };
let _m = acceptor.fire_homing_missile();
- // XXX: the 128 backlog should be configurable
+ // FIXME: the 128 backlog should be configurable
match unsafe { uvll::uv_listen(acceptor.listener.handle, 128, listen_cb) } {
0 => Ok(acceptor as ~rtio::RtioTcpAcceptor),
n => Err(uv_error_to_io_error(UvError(n))),
let mut acceptor = ~PipeAcceptor { listener: self };
let _m = acceptor.fire_homing_missile();
- // XXX: the 128 backlog should be configurable
+ // FIXME: the 128 backlog should be configurable
match unsafe { uvll::uv_listen(acceptor.listener.pipe, 128, listen_cb) } {
0 => Ok(acceptor as ~RtioUnixAcceptor),
n => Err(uv_error_to_io_error(UvError(n))),
};
// Stop reading so that no read callbacks are
// triggered before the user calls `read` again.
- // XXX: Is there a performance impact to calling
+ // FIXME: Is there a performance impact to calling
// stop here?
unsafe { assert_eq!(uvll::uv_read_stop(handle), 0); }
rcx.result = nread;
}
}
-// XXX Event loops ignore SIGPIPE by default.
+// FIXME Event loops ignore SIGPIPE by default.
pub unsafe fn loop_new() -> *c_void {
return rust_uv_loop_new();
}
#[cfg(unix)]
fn debug_mem() -> bool {
- // XXX: Need to port the environment struct to newsched
+ // FIXME: Need to port the environment struct to newsched
false
}
rt::Keyword(parse::One) => value == 1,
rt::Keyword(parse::Two) => value == 2,
- // XXX: Few/Many should have a user-specified boundary
+ // FIXME: Few/Many should have a user-specified boundary
// One possible option would be in the function
// pointer of the 'arg: Argument' struct.
rt::Keyword(parse::Few) => value < 8,
macro_rules! floating(($ty:ident) => {
impl Float for $ty {
fn fmt(f: &$ty, fmt: &mut Formatter) {
- // XXX: this shouldn't perform an allocation
+ // FIXME: this shouldn't perform an allocation
let s = match fmt.precision {
Some(i) => ::$ty::to_str_exact(f.abs(), i),
None => ::$ty::to_str_digits(f.abs(), 6)
impl LowerExp for $ty {
fn fmt(f: &$ty, fmt: &mut Formatter) {
- // XXX: this shouldn't perform an allocation
+ // FIXME: this shouldn't perform an allocation
let s = match fmt.precision {
Some(i) => ::$ty::to_str_exp_exact(f.abs(), i, false),
None => ::$ty::to_str_exp_digits(f.abs(), 6, false)
impl UpperExp for $ty {
fn fmt(f: &$ty, fmt: &mut Formatter) {
- // XXX: this shouldn't perform an allocation
+ // FIXME: this shouldn't perform an allocation
let s = match fmt.precision {
Some(i) => ::$ty::to_str_exp_exact(f.abs(), i, true),
None => ::$ty::to_str_exp_digits(f.abs(), 6, true)
//! Utility mixins that apply to all Readers and Writers
-// XXX: Not sure how this should be structured
-// XXX: Iteration should probably be considered separately
+// FIXME: Not sure how this should be structured
+// FIXME: Iteration should probably be considered separately
use container::Container;
use iter::Iterator;
```
* Make an simple HTTP request
- XXX This needs more improvement: TcpStream constructor taking &str,
+ FIXME This needs more improvement: TcpStream constructor taking &str,
`write_str` and `write_line` methods.
```rust,should_fail
* Connect based on URL? Requires thinking about where the URL type lives
and how to make protocol handlers extensible, e.g. the "tcp" protocol
yields a `TcpStream`.
- XXX this is not implemented now.
+ FIXME this is not implemented now.
```rust
// connect("tcp://localhost:8080");
# ::std::io::fs::unlink(&Path::new("diary.txt"));
```
-XXX: Need better condition handling syntax
+FIXME: Need better condition handling syntax
In this case the condition handler will have the opportunity to
inspect the IoError raised by either the call to `new` or the call to
In particular code written to ignore errors and expect conditions to be unhandled
will start passing around null or zero objects when wrapped in a condition handler.
-* XXX: How should we use condition handlers that return values?
-* XXX: Should EOF raise default conditions when EOF is not an error?
+* FIXME: How should we use condition handlers that return values?
+* FIXME: Should EOF raise default conditions when EOF is not an error?
# Issues with i/o scheduler affinity, work stealing, task pinning
* Async I/O. We'll probably want it eventually
-# XXX Questions and issues
+# FIXME Questions and issues
* Should default constructors take `Path` or `&str`? `Path` makes simple cases verbose.
Overloading would be nice.
/// The type passed to I/O condition handlers to indicate error
///
-/// # XXX
+/// # FIXME
///
/// Is something like this sufficient? It's kind of archaic
pub struct IoError {
}
}
-// XXX: Can't put doc comments on macros
+// FIXME: Can't put doc comments on macros
// Raised by `I/O` operations on error.
condition! {
pub io_error: IoError -> ();
/// Raises the `io_error` condition on error. If the condition
/// is handled then no guarantee is made about the number of bytes
/// read and the contents of `buf`. If the condition is handled
- /// returns `None` (XXX see below).
+ /// returns `None` (FIXME see below).
///
- /// # XXX
+ /// # FIXME
///
/// * Should raise_default error on eof?
/// * If the condition is handled it should still return the bytes read,
SeekCur,
}
-/// # XXX
+/// # FIXME
/// * Are `u64` and `i64` the right choices?
pub trait Seek {
/// Return position of file cursor in the stream
///
/// A successful seek clears the EOF indicator.
///
- /// # XXX
+ /// # FIXME
///
/// * What is the behavior when seeking past the end of a stream?
fn seek(&mut self, pos: i64, style: SeekStyle);
///
/// On failure, this will raise on the `io_error` condition.
///
-/// XXX: this is not public because the `Hint` structure is not ready for public
+/// FIXME: this is not public because the `Hint` structure is not ready for public
/// consumption just yet.
fn lookup(hostname: Option<&str>, servname: Option<&str>, hint: Option<Hint>)
-> Option<~[Info]> {
})
iotest!(fn socket_and_peer_name_ip6() {
- // XXX: peer name is not consistent
+ // FIXME: peer name is not consistent
//peer_name(next_test_ip6());
socket_name(next_test_ip6());
})
/// Since no state is recorded, each sample is (statistically)
/// independent of all others, assuming the `Rng` used has this
/// property.
-// XXX maybe having this separate is overkill (the only reason is to
+// FIXME maybe having this separate is overkill (the only reason is to
// take &self rather than &mut self)? or maybe this should be the
// trait called `Sample` and the other should be `DependentSample`.
pub trait IndependentSample<Support>: Sample<Support> {
/// Iterates recursively over `crate_map` and all child crate maps
pub fn iter_crate_map<'a>(crate_map: &'a CrateMap<'a>, f: |&ModEntry|) {
- // XXX: use random numbers as keys from the OS-level RNG when there is a nice
+ // FIXME: use random numbers as keys from the OS-level RNG when there is a nice
// way to do this
let mut v: HashSet<*CrateMap<'a>> = HashSet::with_capacity_and_keys(0, 0, 32);
do_iter_crate_map(crate_map, f, &mut v);
#[inline]
pub unsafe fn local_malloc(td: *u8, size: uint) -> *u8 {
- // XXX: Unsafe borrow for speed. Lame.
+ // FIXME: Unsafe borrow for speed. Lame.
let task: Option<*mut Task> = Local::try_unsafe_borrow();
match task {
Some(task) => {
// A little compatibility function
#[inline]
pub unsafe fn local_free(ptr: *u8) {
- // XXX: Unsafe borrow for speed. Lame.
+ // FIXME: Unsafe borrow for speed. Lame.
let task_ptr: Option<*mut Task> = Local::try_unsafe_borrow();
match task_ptr {
Some(task) => {
*/
-// XXX: this should not be here.
+// FIXME: this should not be here.
#[allow(missing_doc)];
use any::Any;
// Export unwinding facilities used by the failure macros
pub use self::unwind::{begin_unwind, begin_unwind_raw};
-// XXX: these probably shouldn't be public...
+// FIXME: these probably shouldn't be public...
#[doc(hidden)]
pub mod shouldnt_be_public {
pub use super::local_ptr::native::maybe_tls_key;
/// The (low, high) edges of the current stack.
fn stack_bounds(&self) -> (uint, uint); // (lo, hi)
- // XXX: This is a serious code smell and this should not exist at all.
+ // FIXME: This is a serious code smell and this should not exist at all.
fn wrap(~self) -> ~Any;
}
/// the crate's logging flags, registering GC
/// metadata, and storing the process arguments.
pub fn init(argc: int, argv: **u8) {
- // XXX: Derefing these pointers is not safe.
+ // FIXME: Derefing these pointers is not safe.
// Need to propagate the unsafety to `start`.
unsafe {
args::init(argc, argv);
#[unsafe_destructor]
impl<'a> Drop for LocalIo<'a> {
fn drop(&mut self) {
- // XXX(pcwalton): Do nothing here for now, but eventually we may want
+ // FIXME(pcwalton): Do nothing here for now, but eventually we may want
// something. For now this serves to make `LocalIo` noncopyable.
}
}
/// Returns the underlying I/O factory as a trait reference.
#[inline]
pub fn get<'a>(&'a mut self) -> &'a mut IoFactory {
- // XXX(pcwalton): I think this is actually sound? Could borrow check
+ // FIXME(pcwalton): I think this is actually sound? Could borrow check
// allow this safely?
unsafe {
cast::transmute_copy(&self.factory)
// pretty sketchy and involves shuffling vtables of trait objects
// around, but it gets the job done.
//
- // XXX: This function is a serious code smell and should be avoided at
+ // FIXME: This function is a serious code smell and should be avoided at
// all costs. I have yet to think of a method to avoid this
// function, and I would be saddened if more usage of the function
// crops up.
use vec::ImmutableVector;
// Indicates whether we should perform expensive sanity checks, including rtassert!
-// XXX: Once the runtime matures remove the `true` below to turn off rtassert, etc.
+// FIXME: Once the runtime matures remove the `true` below to turn off rtassert, etc.
pub static ENFORCE_SANITY: bool = true || !cfg!(rtopt) || cfg!(rtdebug) || cfg!(rtassert);
/// Get the number of cores available
fn as_slice<'r>(&'r self) -> &'r str {
match *self {
SendStrOwned(ref s) => s.as_slice(),
- // XXX: Borrowchecker doesn't recognize lifetime as static unless prompted
+ // FIXME: Borrowchecker doesn't recognize lifetime as static unless prompted
// SendStrStatic(s) => s.as_slice()
SendStrStatic(s) => {let tmp: &'static str = s; tmp}
}
// NB: the "buffer pool" strategy is not done for speed, but rather for
// correctness. For more info, see the comment on `swap_buffer`
-// XXX: all atomic operations in this module use a SeqCst ordering. That is
+// FIXME: all atomic operations in this module use a SeqCst ordering. That is
// probably overkill
use cast;
// Node within the linked list queue of messages to send
struct Node<T> {
- // XXX: this could be an uninitialized T if we're careful enough, and
+ // FIXME: this could be an uninitialized T if we're careful enough, and
// that would reduce memory usage (and be a bit faster).
// is it worth it?
value: Option<T>, // nullable for re-use of nodes
if self.cache_bound == 0 {
self.tail_prev.store(tail, Release);
} else {
- // XXX: this is dubious with overflow.
+ // FIXME: this is dubious with overflow.
let additions = self.cache_additions.load(Relaxed);
let subtractions = self.cache_subtractions.load(Relaxed);
let size = additions - subtractions;
/// from, even if it's hard to read (previously they would all just be
/// listed as `__extensions__::method_name::hash`, with no indication
/// of the type).
-// XXX: these dollar signs and the names in general are actually a
+// FIXME: these dollar signs and the names in general are actually a
// relic of $ being one of the very few valid symbol names on
// unix. These kinds of details shouldn't be exposed way up here
// in the ast.
#[deriving(Eq,IterBytes, Ord)]
pub struct CharPos(uint);
-// XXX: Lots of boilerplate in these impls, but so far my attempts to fix
+// FIXME: Lots of boilerplate in these impls, but so far my attempts to fix
// have been unsuccessful
impl Pos for BytePos {
name: Ident, attrs: ~[ast::Attribute], node: ast::Item_) -> @ast::Item;
fn arg(&self, span: Span, name: Ident, ty: P<ast::Ty>) -> ast::Arg;
- // XXX unused self
+ // FIXME unused self
fn fn_decl(&self, inputs: ~[ast::Arg], output: P<ast::Ty>) -> P<ast::FnDecl>;
fn item_fn_poly(&self,
}
}
- // XXX unused self
+ // FIXME unused self
fn fn_decl(&self, inputs: ~[ast::Arg], output: P<ast::Ty>) -> P<ast::FnDecl> {
P(ast::FnDecl {
inputs: inputs,
fn item(&self, span: Span,
name: Ident, attrs: ~[ast::Attribute], node: ast::Item_) -> @ast::Item {
- // XXX: Would be nice if our generated code didn't violate
+ // FIXME: Would be nice if our generated code didn't violate
// Rust coding conventions
@ast::Item { ident: name,
attrs: attrs,
// Keep going, outside-in.
//
- // XXX(pcwalton): Is it necessary to clone the
+ // FIXME(pcwalton): Is it necessary to clone the
// node here?
let fully_expanded =
fld.fold_expr(marked_after).node.clone();
// return the next token from the TtReader.
// EFFECT: advances the reader's token field
pub fn tt_next_token(r: &TtReader) -> TokenAndSpan {
- // XXX(pcwalton): Bad copy?
+ // FIXME(pcwalton): Bad copy?
let ret_val = TokenAndSpan {
tok: r.cur_tok.get(),
sp: r.cur_span.get(),
}
loop { /* because it's easiest, this handles `TTDelim` not starting
with a `TTTok`, even though it won't happen */
- // XXX(pcwalton): Bad copy.
+ // FIXME(pcwalton): Bad copy.
match r.stack.get().forest[r.stack.get().idx.get()].clone() {
TTDelim(tts) => {
r.stack.set(@TtFrame {
return ret_val;
}
TTSeq(sp, tts, sep, zerok) => {
- // XXX(pcwalton): Bad copy.
+ // FIXME(pcwalton): Bad copy.
let t = TTSeq(sp, tts, sep.clone(), zerok);
match lockstep_iter_size(&t, r) {
LisUnconstrained => {
return ret_val;
}
MatchedNonterminal(ref other_whole_nt) => {
- // XXX(pcwalton): Bad copy.
+ // FIXME(pcwalton): Bad copy.
r.cur_span.set(sp);
r.cur_tok.set(INTERPOLATED((*other_whole_nt).clone()));
r.stack.get().idx.set(r.stack.get().idx.get() + 1u);
}
fn span_diag(@self) -> @SpanHandler { self.span_diagnostic }
fn peek(@self) -> TokenAndSpan {
- // XXX(pcwalton): Bad copy!
+ // FIXME(pcwalton): Bad copy!
TokenAndSpan {
tok: self.peek_tok.get(),
sp: self.peek_span.get(),
Parser::token_is_lifetime(&self.token) {
// CLOSURE
//
- // XXX(pcwalton): Eventually `token::LT` will not unambiguously
+ // FIXME(pcwalton): Eventually `token::LT` will not unambiguously
// introduce a closure, once procs can have lifetime bounds. We
// will need to refactor the grammar a little bit at that point.
let generics = self.parse_generics();
// This is a new-style impl declaration.
- // XXX: clownshoes
+ // FIXME: clownshoes
let ident = special_idents::clownshoes_extensions;
// Special case: if the next identifier that follows is '(', don't
token_str))
}
- let _ = ast::DUMMY_NODE_ID; // XXX: Workaround for crazy bug.
+ let _ = ast::DUMMY_NODE_ID; // FIXME: Workaround for crazy bug.
let new_id = ast::DUMMY_NODE_ID;
(class_name,
ItemStruct(@ast::StructDef {
word(&mut s.s, st);
}
-// XXX(pcwalton): A nasty function to extract the string from an `io::Writer`
+// FIXME(pcwalton): A nasty function to extract the string from an `io::Writer`
// that we "know" to be a `MemWriter` that works around the lack of checked
// downcasts.
unsafe fn get_mem_writer(writer: &mut ~io::Writer) -> ~str {
void*
rust_uv_loop_new() {
-// XXX libuv doesn't always ignore SIGPIPE even though we don't need it.
+// FIXME libuv doesn't always ignore SIGPIPE even though we don't need it.
#ifndef __WIN32__
signal(SIGPIPE, SIG_IGN);
#endif
AminoAcid { c: 't' as u8, p: 0.3015094502008 },
];
-// XXX: Use map().
+// FIXME: Use map().
fn sum_and_scale(a: &'static [AminoAcid]) -> ~[AminoAcid] {
let mut result = ~[];
let mut p = 0f32;
code
}
- // XXX: Inefficient.
+ // FIXME: Inefficient.
fn unpack(&self, frame: i32) -> ~str {
let mut key = **self;
let mut result = ~[];
use self::lint_stability::*;
fn test() {
- // XXX: attributes on methods are not encoded cross crate.
+ // FIXME: attributes on methods are not encoded cross crate.
let foo = MethodTester;
deprecated(); //~ ERROR use of deprecated item
(@"test").test_imm();
(&"test").test_imm();
- // XXX: Other types of mutable vecs don't currently exist
+ // FIXME: Other types of mutable vecs don't currently exist
// NB: We don't do this double autoreffing for &mut self because that would
// allow creating a mutable pointer to a temporary, which would be a source