about summary refs log tree commit diff
path: root/src/libstd/repr.rs
AgeCommit message (Collapse)AuthorLines
2013-08-12fix build with the new snapshot compilerDaniel Micay-24/+0
2013-08-11Update type visitor to use &Visitor and not @VisitorNiko Matsakis-0/+24
2013-08-03remove obsolete `foreach` keywordDaniel Micay-1/+1
this has been replaced by `for`
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-2/+3
2013-07-30implement pointer arithmetic with GEPDaniel Micay-1/+1
Closes #8118, #7136 ~~~rust extern mod extra; use std::vec; use std::ptr; fn bench_from_elem(b: &mut extra::test::BenchHarness) { do b.iter { let v: ~[u8] = vec::from_elem(1024, 0u8); } } fn bench_set_memory(b: &mut extra::test::BenchHarness) { do b.iter { let mut v: ~[u8] = vec::with_capacity(1024); unsafe { let vp = vec::raw::to_mut_ptr(v); ptr::set_memory(vp, 0, 1024); vec::raw::set_len(&mut v, 1024); } } } fn bench_vec_repeat(b: &mut extra::test::BenchHarness) { do b.iter { let v: ~[u8] = ~[0u8, ..1024]; } } ~~~ Before: test bench_from_elem ... bench: 415 ns/iter (+/- 17) test bench_set_memory ... bench: 85 ns/iter (+/- 4) test bench_vec_repeat ... bench: 83 ns/iter (+/- 3) After: test bench_from_elem ... bench: 84 ns/iter (+/- 2) test bench_set_memory ... bench: 84 ns/iter (+/- 5) test bench_vec_repeat ... bench: 84 ns/iter (+/- 3)
2013-07-26Consolidate raw representations of rust valuesAlex Crichton-21/+17
This moves the raw struct layout of closures, vectors, boxes, and strings into a new `unstable::raw` module. This is meant to be a centralized location to find information for the layout of these values. As safe method, `repr`, is provided to convert a rust value to its raw representation. Unsafe methods to convert back are not provided because they are rarely used and too numerous to write an implementation for each (not much of a common pattern).
2013-07-22new snapshotDaniel Micay-29/+0
2013-07-18repr: add a test case for @mut inside another typeDaniel Micay-2/+2
2013-07-18fix repr of @mut vectorsDaniel Micay-6/+5
2013-07-17fix repr of unique vectors with stage0 libstdDaniel Micay-0/+9
Closes #7860
2013-07-17rm unused visit_str method from TyVisitorDaniel Micay-0/+1
2013-07-15remove headers from unique vectorsDaniel Micay-0/+8
2013-07-10Don't loop infinitely on 0-size structs in reprAlex Crichton-2/+8
Closes #7625
2013-07-08remove headers from exchange allocationsDaniel Micay-0/+9
2013-06-30Specialize to_str_common for floats/integers in strconvAlex Crichton-54/+24
This allows the integral paths to avoid allocations on the heap Closes #4424, #4423
2013-06-30Change char::escape_{default,unicode} to take callbacks instead of allocatingAlex Crichton-3/+3
strings
2013-06-23Remove intrinsic modulePhilipp Brüschweiler-4/+16
To achieve this, the following changes were made: * Move TyDesc, TyVisitor and Opaque to std::unstable::intrinsics * Convert TyDesc, TyVisitor and Opaque to lang items instead of specially handling the intrinsics module * Removed TypeDesc, FreeGlue and get_type_desc() from sys Fixes #3475.
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-5/+5
2013-06-15rm vec::uniq_lenDaniel Micay-2/+3
2013-06-09std: remove each_char* fns and methods from str, replaced by iterators.Huon Wilson-1/+2
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-14/+18
2013-05-30Require documentation by default for libstdAlex Crichton-0/+2
Adds documentation for various things that I understand. Adds #[allow(missing_doc)] for lots of things that I don't understand.
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+639
This only changes the directory names; it does not change the "real" metadata names.