Deduplicate words in code comments
This commit is contained in:
@@ -96,7 +96,7 @@ impl<'self> Condvar<'self> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Wake up all blocked tasks on a specified condvar (as
|
* Wake up all blocked tasks on a specified condvar (as
|
||||||
* sync::cond.broadcast_on). Returns Returns the number of tasks woken.
|
* sync::cond.broadcast_on). Returns the number of tasks woken.
|
||||||
*/
|
*/
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn broadcast_on(&self, condvar_id: uint) -> uint {
|
pub fn broadcast_on(&self, condvar_id: uint) -> uint {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ use core::uint;
|
|||||||
use core::util::{swap, replace};
|
use core::util::{swap, replace};
|
||||||
|
|
||||||
// This is implemented as an AA tree, which is a simplified variation of
|
// This is implemented as an AA tree, which is a simplified variation of
|
||||||
// a red-black tree where where red (horizontal) nodes can only be added
|
// a red-black tree where red (horizontal) nodes can only be added
|
||||||
// as a right child. The time complexity is the same, and re-balancing
|
// as a right child. The time complexity is the same, and re-balancing
|
||||||
// operations are more frequent but also cheaper.
|
// operations are more frequent but also cheaper.
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ impl<'self> CheckLoanCtxt<'self> {
|
|||||||
scope_id: ast::node_id,
|
scope_id: ast::node_id,
|
||||||
op: &fn(&Loan) -> bool)
|
op: &fn(&Loan) -> bool)
|
||||||
-> bool {
|
-> bool {
|
||||||
//! Iterates over each loan that that has been issued
|
//! Iterates over each loan that has been issued
|
||||||
//! on entrance to `scope_id`, regardless of whether it is
|
//! on entrance to `scope_id`, regardless of whether it is
|
||||||
//! actually *in scope* at that point. Sometimes loans
|
//! actually *in scope* at that point. Sometimes loans
|
||||||
//! are issued for future scopes and thus they may have been
|
//! are issued for future scopes and thus they may have been
|
||||||
@@ -219,7 +219,7 @@ impl<'self> CheckLoanCtxt<'self> {
|
|||||||
self.bccx.span_err(
|
self.bccx.span_err(
|
||||||
new_loan.span,
|
new_loan.span,
|
||||||
fmt!("cannot borrow `%s` as mutable \
|
fmt!("cannot borrow `%s` as mutable \
|
||||||
more than once at at a time",
|
more than once at a time",
|
||||||
self.bccx.loan_path_to_str(new_loan.loan_path)));
|
self.bccx.loan_path_to_str(new_loan.loan_path)));
|
||||||
self.bccx.span_note(
|
self.bccx.span_note(
|
||||||
old_loan.span,
|
old_loan.span,
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ mod gather_moves;
|
|||||||
|
|
||||||
/// Context used while gathering loans:
|
/// Context used while gathering loans:
|
||||||
///
|
///
|
||||||
/// - `bccx`: the the borrow check context
|
/// - `bccx`: the borrow check context
|
||||||
/// - `item_ub`: the id of the block for the enclosing fn/method item
|
/// - `item_ub`: the id of the block for the enclosing fn/method item
|
||||||
/// - `root_ub`: the id of the outermost block for which we can root
|
/// - `root_ub`: the id of the outermost block for which we can root
|
||||||
/// an `@T`. This is the id of the innermost enclosing
|
/// an `@T`. This is the id of the innermost enclosing
|
||||||
|
|||||||
@@ -1113,7 +1113,7 @@ impl Liveness {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expr_again(opt_label) => {
|
expr_again(opt_label) => {
|
||||||
// Find which label this expr continues to to
|
// Find which label this expr continues to
|
||||||
let sc = self.find_loop_scope(opt_label, expr.id, expr.span);
|
let sc = self.find_loop_scope(opt_label, expr.id, expr.span);
|
||||||
|
|
||||||
// Now that we know the label we're going to,
|
// Now that we know the label we're going to,
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ pub enum RibKind {
|
|||||||
FunctionRibKind(node_id /* func id */, node_id /* body id */),
|
FunctionRibKind(node_id /* func id */, node_id /* body id */),
|
||||||
|
|
||||||
// We passed through an impl or trait and are now in one of its
|
// We passed through an impl or trait and are now in one of its
|
||||||
// methods. Allow references to ty params that that impl or trait
|
// methods. Allow references to ty params that impl or trait
|
||||||
// binds. Disallow any other upvars (including other ty params that are
|
// binds. Disallow any other upvars (including other ty params that are
|
||||||
// upvars).
|
// upvars).
|
||||||
// parent; method itself
|
// parent; method itself
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ pub fn trans_expr_fn(bcx: block,
|
|||||||
* - `decl`
|
* - `decl`
|
||||||
* - `body`
|
* - `body`
|
||||||
* - `outer_id`: The id of the closure expression with the correct
|
* - `outer_id`: The id of the closure expression with the correct
|
||||||
* type. This is usually the same as as `user_id`, but in the
|
* type. This is usually the same as `user_id`, but in the
|
||||||
* case of a `for` loop, the `outer_id` will have the return
|
* case of a `for` loop, the `outer_id` will have the return
|
||||||
* type of boolean, and the `user_id` will have the return type
|
* type of boolean, and the `user_id` will have the return type
|
||||||
* of `nil`.
|
* of `nil`.
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ pub enum AutoRef {
|
|||||||
// implementations.
|
// implementations.
|
||||||
//
|
//
|
||||||
// This is a map from ID of each implementation to the method info and trait
|
// This is a map from ID of each implementation to the method info and trait
|
||||||
// method ID of each of the default methods belonging to the trait that that
|
// method ID of each of the default methods belonging to the trait that
|
||||||
// implementation implements.
|
// implementation implements.
|
||||||
pub type ProvidedMethodsMap = @mut HashMap<def_id,@mut ~[@ProvidedMethodInfo]>;
|
pub type ProvidedMethodsMap = @mut HashMap<def_id,@mut ~[@ProvidedMethodInfo]>;
|
||||||
|
|
||||||
|
|||||||
@@ -369,8 +369,7 @@ impl Coerce {
|
|||||||
|
|
||||||
// although borrowed ptrs and unsafe ptrs have the same
|
// although borrowed ptrs and unsafe ptrs have the same
|
||||||
// representation, we still register an AutoDerefRef so that
|
// representation, we still register an AutoDerefRef so that
|
||||||
// regionck knows that that the region for `a` must be valid
|
// regionck knows that the region for `a` must be valid here
|
||||||
// here
|
|
||||||
Ok(Some(@AutoDerefRef(AutoDerefRef {
|
Ok(Some(@AutoDerefRef(AutoDerefRef {
|
||||||
autoderefs: 1,
|
autoderefs: 1,
|
||||||
autoref: Some(ty::AutoUnsafe(mt_b.mutbl))
|
autoref: Some(ty::AutoUnsafe(mt_b.mutbl))
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ if the first line of each crate was
|
|||||||
|
|
||||||
extern mod core;
|
extern mod core;
|
||||||
|
|
||||||
This means that the contents of core can be accessed from from any context
|
This means that the contents of core can be accessed from any context
|
||||||
with the `core::` path prefix, as in `use core::vec`, `use core::task::spawn`,
|
with the `core::` path prefix, as in `use core::vec`, `use core::task::spawn`,
|
||||||
etc.
|
etc.
|
||||||
|
|
||||||
|
|||||||
@@ -1411,7 +1411,7 @@ pub fn zip_slice<T:Copy,U:Copy>(v: &const [T], u: &const [U])
|
|||||||
/**
|
/**
|
||||||
* Convert two vectors to a vector of pairs.
|
* Convert two vectors to a vector of pairs.
|
||||||
*
|
*
|
||||||
* Returns a vector of tuples, where the i-th tuple contains contains the
|
* Returns a vector of tuples, where the i-th tuple contains the
|
||||||
* i-th elements from each of the input vectors.
|
* i-th elements from each of the input vectors.
|
||||||
*/
|
*/
|
||||||
pub fn zip<T, U>(mut v: ~[T], mut u: ~[U]) -> ~[(T, U)] {
|
pub fn zip<T, U>(mut v: ~[T], mut u: ~[U]) -> ~[(T, U)] {
|
||||||
|
|||||||
@@ -3093,7 +3093,7 @@ impl Parser {
|
|||||||
|
|
||||||
self.expect(&token::LPAREN);
|
self.expect(&token::LPAREN);
|
||||||
|
|
||||||
// A bit of complexity and lookahead is needed here in order to to be
|
// A bit of complexity and lookahead is needed here in order to be
|
||||||
// backwards compatible.
|
// backwards compatible.
|
||||||
let lo = self.span.lo;
|
let lo = self.span.lo;
|
||||||
let explicit_self = match *self.token {
|
let explicit_self = match *self.token {
|
||||||
|
|||||||
@@ -1672,7 +1672,7 @@ pub fn print_fn(s: @ps,
|
|||||||
|
|
||||||
pub fn print_fn_args(s: @ps, decl: &ast::fn_decl,
|
pub fn print_fn_args(s: @ps, decl: &ast::fn_decl,
|
||||||
opt_explicit_self: Option<ast::explicit_self_>) {
|
opt_explicit_self: Option<ast::explicit_self_>) {
|
||||||
// It is unfortunate to duplicate the commasep logic, but we we want the
|
// It is unfortunate to duplicate the commasep logic, but we want the
|
||||||
// self type and the args all in the same box.
|
// self type and the args all in the same box.
|
||||||
box(s, 0u, inconsistent);
|
box(s, 0u, inconsistent);
|
||||||
let mut first = true;
|
let mut first = true;
|
||||||
@@ -1919,7 +1919,7 @@ pub fn print_ty_fn(s: @ps,
|
|||||||
zerobreak(s.s);
|
zerobreak(s.s);
|
||||||
|
|
||||||
popen(s);
|
popen(s);
|
||||||
// It is unfortunate to duplicate the commasep logic, but we we want the
|
// It is unfortunate to duplicate the commasep logic, but we want the
|
||||||
// self type and the args all in the same box.
|
// self type and the args all in the same box.
|
||||||
box(s, 0u, inconsistent);
|
box(s, 0u, inconsistent);
|
||||||
let mut first = true;
|
let mut first = true;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
Each Rust function contains an LLVM-generated prologue that
|
Each Rust function contains an LLVM-generated prologue that
|
||||||
compares the stack space required for the current function to
|
compares the stack space required for the current function to
|
||||||
the space space remaining in the current stack segment,
|
the space remaining in the current stack segment,
|
||||||
maintained in a platform-specific TLS slot. The stack limit
|
maintained in a platform-specific TLS slot. The stack limit
|
||||||
is strategically maintained by the Rust runtime so that it is
|
is strategically maintained by the Rust runtime so that it is
|
||||||
always in place whenever a Rust function is running.
|
always in place whenever a Rust function is running.
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
tiny fraction of a frame (containing just a return pointer
|
tiny fraction of a frame (containing just a return pointer
|
||||||
and, on 32-bit, the arguments to __morestack).
|
and, on 32-bit, the arguments to __morestack).
|
||||||
|
|
||||||
We deal with this by claiming that that little bit of stack
|
We deal with this by claiming that little bit of stack
|
||||||
is actually part of the __morestack frame, encoded as
|
is actually part of the __morestack frame, encoded as
|
||||||
DWARF call frame instructions (CFI) by .cfi assembler
|
DWARF call frame instructions (CFI) by .cfi assembler
|
||||||
pseudo-ops.
|
pseudo-ops.
|
||||||
@@ -119,7 +119,7 @@ MORESTACK:
|
|||||||
// telling the unwinder to consider the Canonical Frame
|
// telling the unwinder to consider the Canonical Frame
|
||||||
// Address (CFA) for this frame to be the value of the stack
|
// Address (CFA) for this frame to be the value of the stack
|
||||||
// pointer prior to entry to the original function, whereas
|
// pointer prior to entry to the original function, whereas
|
||||||
// the CFA would typically be the the value of the stack
|
// the CFA would typically be the value of the stack
|
||||||
// pointer prior to entry to this function. This will allow
|
// pointer prior to entry to this function. This will allow
|
||||||
// the unwinder to understand how to skip the tiny partial
|
// the unwinder to understand how to skip the tiny partial
|
||||||
// frame that the original function created by calling
|
// frame that the original function created by calling
|
||||||
@@ -167,7 +167,7 @@ MORESTACK:
|
|||||||
// The arguments to upcall_new_stack
|
// The arguments to upcall_new_stack
|
||||||
|
|
||||||
// The size of the stack arguments to copy to the new stack,
|
// The size of the stack arguments to copy to the new stack,
|
||||||
// ane of the the arguments to __morestack
|
// and of the arguments to __morestack
|
||||||
movl 40(%esp),%eax
|
movl 40(%esp),%eax
|
||||||
movl %eax,8(%esp)
|
movl %eax,8(%esp)
|
||||||
// The address of the stack arguments to the original function
|
// The address of the stack arguments to the original function
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ rust_kernel::release_scheduler_id(rust_sched_id id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Called by rust_sched_reaper to join every every terminating scheduler thread,
|
Called by rust_sched_reaper to join every terminating scheduler thread,
|
||||||
so that we can be sure they have completely exited before the process exits.
|
so that we can be sure they have completely exited before the process exits.
|
||||||
If we don't join them then we can see valgrind errors due to un-freed pthread
|
If we don't join them then we can see valgrind errors due to un-freed pthread
|
||||||
memory.
|
memory.
|
||||||
|
|||||||
@@ -614,7 +614,7 @@ rust_task::prev_stack() {
|
|||||||
// The LLVM-generated segmented-stack function prolog compares the amount of
|
// The LLVM-generated segmented-stack function prolog compares the amount of
|
||||||
// stack needed for each frame to the end-of-stack pointer stored in the
|
// stack needed for each frame to the end-of-stack pointer stored in the
|
||||||
// TCB. As an optimization, when the frame size is less than 256 bytes, it
|
// TCB. As an optimization, when the frame size is less than 256 bytes, it
|
||||||
// will simply compare %esp to to the stack limit instead of subtracting the
|
// will simply compare %esp to the stack limit instead of subtracting the
|
||||||
// frame size. As a result we need our stack limit to account for those 256
|
// frame size. As a result we need our stack limit to account for those 256
|
||||||
// bytes.
|
// bytes.
|
||||||
const unsigned LIMIT_OFFSET = 256;
|
const unsigned LIMIT_OFFSET = 256;
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ upcall_malloc(type_desc *td, uintptr_t size) {
|
|||||||
|
|
||||||
// FIXME (#2861): Alias used by libcore/rt.rs to avoid naming conflicts with
|
// FIXME (#2861): Alias used by libcore/rt.rs to avoid naming conflicts with
|
||||||
// autogenerated wrappers for upcall_malloc. Remove this when we fully move
|
// autogenerated wrappers for upcall_malloc. Remove this when we fully move
|
||||||
// away away from the C upcall path.
|
// away from the C upcall path.
|
||||||
extern "C" CDECL uintptr_t
|
extern "C" CDECL uintptr_t
|
||||||
rust_upcall_malloc(type_desc *td, uintptr_t size) {
|
rust_upcall_malloc(type_desc *td, uintptr_t size) {
|
||||||
return upcall_malloc(td, size);
|
return upcall_malloc(td, size);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
|
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
|
||||||
url = "http://rust-lang.org/src/extra")];
|
url = "http://rust-lang.org/src/extra")];
|
||||||
|
|
||||||
// These are are attributes of the following mod
|
// These are attributes of the following mod
|
||||||
#[attr1 = "val"]
|
#[attr1 = "val"]
|
||||||
#[attr2 = "val"]
|
#[attr2 = "val"]
|
||||||
mod test_first_item_in_file_mod {}
|
mod test_first_item_in_file_mod {}
|
||||||
|
|||||||
Reference in New Issue
Block a user