1325 Commits

Author SHA1 Message Date
Graydon Hoare
e9f5a099df Add an ignore! macro, remove support for nested block comments, re: #2755. 2012-09-07 16:58:36 -07:00
Brian Anderson
f0eae8f1c1 Convert field terminators to commas. Stop parsing semis. 2012-09-07 16:12:15 -07:00
Patrick Walton
3078830934 libcore: Make str_eq not break with coretest 2012-09-07 16:09:38 -07:00
Patrick Walton
1fcfee674a rustc: Add a str_eq lang item for pattern matching 2012-09-07 15:46:08 -07:00
Brian Anderson
2572e80355 Remove 'let' syntax for struct fields 2012-09-07 14:02:33 -07:00
Patrick Walton
feb014eb3c rustc: Add an "ne" method to the Eq trait, and implement it everywhere 2012-09-07 12:24:48 -07:00
Elliott Slaughter
cb53623341 gc: Add early abort when GC is disabled. 2012-09-07 09:21:22 -07:00
Elliott Slaughter
244b95490b gc: Refactoring. 2012-09-07 09:21:22 -07:00
Elliott Slaughter
d22b7ca39a gc: Documentation. 2012-09-07 09:21:22 -07:00
Elliott Slaughter
961bd48724 gc: Fix for GC missing stack frames across segment boundaries. 2012-09-07 09:21:22 -07:00
Elliott Slaughter
578b036f9b gc: Don't expect sentinel when core is compiled without GC. 2012-09-07 09:21:22 -07:00
Elliott Slaughter
7823ad8586 gc: Avoid walking stack above caller frame.
Mark the base GC stack frame with a sentinel value so we know when to
start collecting.
2012-09-07 09:21:21 -07:00
Elliott Slaughter
88f5ab3163 gc: Fix for deallocating resources on the shared heap while cleaning stack. 2012-09-07 09:21:21 -07:00
Elliott Slaughter
3405c548e8 gc: Avoid freeing null pointers. 2012-09-07 09:21:21 -07:00
Elliott Slaughter
9ea4afe5da gc: Avoid double free when pointer appears on stack multiple times. 2012-09-07 09:21:21 -07:00
Elliott Slaughter
3f0d207b32 gc: Add stack walker for new garbage collector.
Safe points are exported in a per-module list via the crate map. A C
runtime call walks the crate map at startup and aggregates the list of
safe points for the program.

Currently the GC doesn't actually deallocate memory on malloc and
free. Adding the GC at this stage is primarily of testing value.

The GC does attempt to clean up exchange heap and stack-allocated
resource on failure.

A result of this patch is that the user now needs to be careful about
what code they write in destructors, because the GC and/or failure
cleanup may need to call destructors. Specifically, calls to malloc
are considered unsafe and may result in infinite loops or segfaults.
2012-09-07 09:21:21 -07:00
Niko Matsakis
5e36a99794 Refactor trans to replace lvalue and friends with Datum.
Also:
- report illegal move/ref combos whether or not ref comes first
- commented out fix for #3387, too restrictive and causes an ICE
2012-09-06 06:11:12 -07:00
Patrick Walton
adc1427282 libcore: Expose glues to core 2012-09-05 21:10:22 -07:00
Patrick Walton
f6d50d866a libcore: Make to_upper() and to_lower() pure 2012-09-05 20:55:28 -07:00
Tim Chevalier
2d116cbbed Start making moves explicit in libcore
This is in preparation for issue 2633. Replaced implicit moves that
rely on last-use with explicit moves in char, float, and str.
2012-09-05 19:20:01 -07:00
Graydon Hoare
0ddae5ec7d Add str::trim{_,_left_,_right_}chars. 2012-09-05 16:53:55 -07:00
Brian Anderson
200959d7ce Remove 'with' 2012-09-04 15:47:04 -07:00
Brian Anderson
02b1c32e4d core: Remove struct ctors 2012-09-04 15:46:33 -07:00
Patrick Walton
8415515cbe libcore: Make as_bytes_slice() not include the null byte 2012-09-04 15:23:30 -07:00
Brian Anderson
f445497d6b Merge pull request #3383 from crabtw/fbsd
use native log2 function and enable freebsd tests in uv_ll
2012-09-04 12:14:09 -07:00
Andrew Paseltiner
225cdc4894 add test for eq_slice fix 2012-09-04 11:27:11 -07:00
Andrew Paseltiner
21172ee280 fix str::eq_slice off-by-one error 2012-09-04 11:27:11 -07:00
Patrick Walton
437073868e libcore: "import" -> "use" 2012-09-04 11:12:17 -07:00
Jyun-Yan You
ff4b754958 use native log2 function and enable freebsd tests in uv_ll 2012-09-05 02:03:56 +08:00
Patrick Walton
cd15eac9cf libcore: Add missing from_str.rs 2012-09-03 15:59:37 -07:00
Brian Anderson
e767011b77 core: Add missing from_str.rs 2012-09-03 14:14:17 -07:00
Patrick Walton
aefc884cf6 libcore: Add a from_str trait 2012-09-03 13:09:24 -07:00
Patrick Walton
c2f8cf9dc1 libcore: Remove as_bytes_slice 2012-09-03 12:33:43 -07:00
Brian Anderson
f393100b7c Camel case core::ops 2012-09-02 18:13:56 -07:00
Brian Anderson
49c9ac175f Silence non-implicitly-copyable-typarams in coretest 2012-09-02 16:34:36 -07:00
Brian Anderson
ffa5d76a78 core: Only warn about implicitly copying vecs 2012-09-02 16:21:57 -07:00
Brian Anderson
117aa8cfee core: warn(non_camel_case_types) everywhere, with few exceptions 2012-09-02 16:14:26 -07:00
Brian Anderson
a80b7dc709 Fix use of reinterpret_cast in to_mut_unsafe_ptr 2012-09-02 16:03:37 -07:00
Patrick Walton
f03ed73c5e libcore: Add ptr::to_mut_unsafe_ptr 2012-09-02 15:54:24 -07:00
Brian Anderson
087c5032a8 core: deny(vecs_implicity_copyable) 2012-09-02 15:38:18 -07:00
Brian Anderson
80c4f74c29 Remove the 'to' keyword 2012-09-01 18:38:18 -07:00
Brian Anderson
d777e51333 Demode reinterpret_cast 2012-09-01 18:18:29 -07:00
Tim Chevalier
4128cc4cb4 Make utility funs in core::int, core::uint, etc. not by-reference
Closes #3302
2012-08-31 16:21:47 -07:00
Erick Tryzelaar
5c6be13b29 libcore: add result::unwrap_err. 2012-08-30 21:11:28 -07:00
Erick Tryzelaar
7649860339 libcore: result::unwrap should use moves 2012-08-30 21:11:28 -07:00
Erick Tryzelaar
afeaf7d88c libcore: fix a typo 2012-08-30 21:11:27 -07:00
Erick Tryzelaar
c0f357924d libcore: vec::u8::hash is pure. 2012-08-30 20:40:52 -07:00
Erick Tryzelaar
628b946186 libcore: rewrite str::reserve in pure rust. 2012-08-30 20:40:52 -07:00
Erick Tryzelaar
9074d9b581 libcore: rewrite io::MemBuffer.write to use memcpy (#2004) 2012-08-30 20:40:52 -07:00
Erick Tryzelaar
7bb65848a1 libcore: Rewrite str::unsafe::push_byte in pure rust. 2012-08-30 20:40:52 -07:00