Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
090b247
Spawn new tasks onto the primary scheduler by default. #3760
brson Jan 9, 2013
ac435af
Add at_exit function #4450
brson Jan 11, 2013
db1abbe
core: Add private global data interface. #3915
brson Jan 13, 2013
1bf8e57
Add `finally` method for deferred execution
brson Jan 16, 2013
8852279
core: Add new weak task API
brson Jan 16, 2013
fb92993
core: Convert getenv/setenv to use a mutex
brson Jan 20, 2013
b9608fe
std: Convert uv_global_loop to use pipes
brson Jan 20, 2013
a3e087c
core: Remove private::chan_from_global_ptr. #3915
brson Jan 22, 2013
cc9ab2c
Remove old comm-based weak task interface
brson Jan 22, 2013
bc0c5bb
core: Stop using oldcomm
brson Jan 22, 2013
19aa88c
Stop using oldcomm in uv_global_loop tests
brson Jan 25, 2013
1ef8394
Merge remote-tracking branch 'brson/nocommupstream'
brson Jan 26, 2013
83ca034
Merge remote-tracking branch 'brson/nocommupstream2'
brson Jan 26, 2013
d4fd30c
Link the lifetimes of regions resulting from borrows of the
nikomatsakis Jan 25, 2013
2e10ea5
Integrate vec patterns into borrow checker.
nikomatsakis Jan 25, 2013
0004be9
Detect "// WARN" in tidy and print out, well, a warning! Useful
nikomatsakis Jan 25, 2013
8f14d43
Make tidy actually work
nikomatsakis Jan 25, 2013
a4ba111
Extend region guarantor logic to handle autoref, which will
nikomatsakis Jan 25, 2013
08bc19c
Remove bounds from type decl of smallintmap
nikomatsakis Jan 22, 2013
19e015c
Add to_str() definitions for some AST types
nikomatsakis Jan 22, 2013
923b315
Do not try to encode/decode inference types, should not be necessary
nikomatsakis Jan 22, 2013
05b6df4
Refactor to make inference code around unification more readable
nikomatsakis Jan 22, 2013
c07ae16
rename assign to coerce, remove some bad copies
nikomatsakis Jan 22, 2013
2b67d88
Rewrite the coercion code to be more readable, more sound, and to reb…
nikomatsakis Jan 23, 2013
e6cadc4
remove hacks now that #3148 is fixed
nikomatsakis Jan 25, 2013
b4acde3
remove unused variable
nikomatsakis Jan 26, 2013
4b15bfd
loan: Track whether or not the current path owns the data being
nikomatsakis Jan 26, 2013
ef4c060
Address @catamorphism's comments regarding docs
nikomatsakis Jan 28, 2013
e8f3690
Change "// WARN" in tidy to "// NOTE" as requested by @catamorphism
nikomatsakis Jan 28, 2013
62d27b0
libstd: Remove "dual impls" from the language and enforce coherence r…
pcwalton Jan 26, 2013
2c31c78
librustc: Disallow trait bounds in types, enumerations, and structure…
pcwalton Jan 28, 2013
c8e9d06
librustc: De-implicit-self the visitor
pcwalton Jan 29, 2013
2195f75
librustc: Speed up byte copy operations
pcwalton Jan 29, 2013
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
8 changes: 8 additions & 0 deletions src/etc/tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ def report_error_name_no(name, no, s):
def report_err(s):
report_error_name_no(fileinput.filename(), fileinput.filelineno(), s)

def report_warn(s):
print("%s:%d: %s" % (fileinput.filename(),
fileinput.filelineno(),
s))

def do_license_check(name, contents):
if not check_license(name, contents):
report_error_name_no(name, 1, "incorrect license")
Expand All @@ -44,6 +49,9 @@ def do_license_check(name, contents):
report_err("FIXME without issue number")
if line.find("TODO") != -1:
report_err("TODO is deprecated; use FIXME")
idx = line.find("// NOTE")
if idx != -1:
report_warn("NOTE:" + line[idx + len("// NOTE"):])
if (line.find('\t') != -1 and
fileinput.filename().find("Makefile") == -1):
report_err("tab character")
Expand Down
1 change: 1 addition & 0 deletions src/libcargo/cargo.rc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#[allow(non_camel_case_types)];
#[allow(deprecated_mode)];
#[allow(deprecated_pattern)];
#[allow(deprecated_self)];

extern mod core(vers = "0.6");
extern mod std(vers = "0.6");
Expand Down
1 change: 1 addition & 0 deletions src/libcore/core.rc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Implicitly, all crates behave as if they included the following prologue:
#[warn(deprecated_pattern)];
#[warn(vecs_implicitly_copyable)];
#[deny(non_camel_case_types)];
#[allow(deprecated_self)];

/* The Prelude. */

Expand Down
1 change: 1 addition & 0 deletions src/libcore/gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ with destructors.
#[forbid(deprecated_pattern)];

use cast;
use container::{Container, Mutable, Map, Set};
use io;
use libc::{size_t, uintptr_t};
use option::{None, Option, Some};
Expand Down
8 changes: 4 additions & 4 deletions src/libcore/hashmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use cmp::Eq;
use hash::Hash;
use prelude::*;
use to_bytes::IterBytes;

/// Open addressing with linear probing.
Expand All @@ -36,13 +35,13 @@ pub mod linear {

const INITIAL_CAPACITY: uint = 32u; // 2^5

struct Bucket<K: Eq Hash, V> {
struct Bucket<K,V> {
hash: uint,
key: K,
value: V,
}

pub struct LinearMap<K: Eq Hash, V> {
pub struct LinearMap<K,V> {
k0: u64,
k1: u64,
resize_at: uint,
Expand Down Expand Up @@ -424,7 +423,7 @@ pub mod linear {
pure fn ne(&self, other: &LinearMap<K, V>) -> bool { !self.eq(other) }
}

pub struct LinearSet<T: Hash IterBytes Eq> {
pub struct LinearSet<T> {
priv map: LinearMap<T, ()>
}

Expand Down Expand Up @@ -479,6 +478,7 @@ pub mod linear {

#[test]
pub mod test {
use container::{Container, Mutable, Map, Set};
use option::{None, Some};
use hashmap::linear::LinearMap;
use hashmap::linear;
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ pub mod fsync {


// Artifacts that need to fsync on destruction
pub struct Res<t: Copy> {
pub struct Res<t> {
arg: Arg<t>,
}

Expand Down
13 changes: 13 additions & 0 deletions src/libcore/libc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1123,10 +1123,23 @@ pub mod funcs {
unsafe fn strerror(n: c_int) -> *c_char;
unsafe fn strtok(s: *c_char, t: *c_char) -> *c_char;
unsafe fn strxfrm(s: *c_char, ct: *c_char, n: size_t) -> size_t;

// These are fine to execute on the Rust stack. They must be, in
// fact, because LLVM generates calls to them!
#[rust_stack]
#[inline(always)]
unsafe fn memcpy(s: *c_void, ct: *c_void, n: size_t) -> *c_void;
#[rust_stack]
#[inline(always)]
unsafe fn memmove(s: *c_void, ct: *c_void, n: size_t) -> *c_void;
#[rust_stack]
#[inline(always)]
unsafe fn memcmp(cx: *c_void, ct: *c_void, n: size_t) -> c_int;
#[rust_stack]
#[inline(always)]
unsafe fn memchr(cx: *c_void, c: c_int, n: size_t) -> *c_void;
#[rust_stack]
#[inline(always)]
unsafe fn memset(s: *c_void, c: c_int, n: size_t) -> *c_void;
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/libcore/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ pub trait Num {
static pure fn from_int(n: int) -> self;
}

pub trait IntConvertible {
pure fn to_int(&self) -> int;
static pure fn from_int(n: int) -> self;
}

pub trait Zero {
static pure fn zero() -> self;
}
Expand Down
8 changes: 4 additions & 4 deletions src/libcore/oldcomm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ use vec;
* transmitted. If a port value is copied, both copies refer to the same
* port. Ports may be associated with multiple `chan`s.
*/
pub enum Port<T: Owned> {
pub enum Port<T> {
Port_(@PortPtr<T>)
}

Expand All @@ -84,7 +84,7 @@ pub enum Port<T: Owned> {
* data will be silently dropped. Channels may be duplicated and
* themselves transmitted over other channels.
*/
pub enum Chan<T: Owned> {
pub enum Chan<T> {
Chan_(port_id)
}

Expand Down Expand Up @@ -120,7 +120,7 @@ pub fn listen<T: Owned, U>(f: fn(Chan<T>) -> U) -> U {
f(po.chan())
}

struct PortPtr<T:Owned> {
struct PortPtr<T> {
po: *rust_port,
drop {
unsafe {
Expand Down Expand Up @@ -238,7 +238,7 @@ fn peek_chan<T: Owned>(ch: Chan<T>) -> bool {
}

/// Receive on a raw port pointer
fn recv_<T: Owned>(p: *rust_port) -> T {
fn recv_<T>(p: *rust_port) -> T {
unsafe {
let yield = 0;
let yieldp = ptr::addr_of(&yield);
Expand Down
Loading