summary refs log tree commit diff
path: root/src/libstd/repr.rs
AgeCommit message (Collapse)AuthorLines
2014-01-03libstd: Remove all support code related to `@mut`Patrick Walton-3/+0
2013-12-11Make 'self lifetime illegal.Erik Price-5/+5
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-11-28Register new snapshotsAlex Crichton-1/+1
2013-11-26libstd: Remove all non-`proc` uses of `do` from libstdPatrick Walton-41/+39
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-1/+1
2013-11-19libstd: Change all uses of `&fn(A)->B` over to `|A|->B` in libstdPatrick Walton-2/+2
2013-11-11Move std::rt::io to std::ioAlex Crichton-4/+4
2013-11-06Register new snapshotsAlex Crichton-12/+0
2013-11-04libsyntax/librustc: Allow calling variadic foreign functions.Luqman Aden-0/+15
2013-10-29Adjust reflection for the possibility of discriminants larger than int.Jed Davis-6/+6
Not only can discriminants be smaller than int now, but they can be larger than int on 32-bit targets. This has obvious implications for the reflection interface. Without this change, things fail with LLVM assertions when we try to "extend" i64 to i32.
2013-10-23Removed Unnecessary comments and white spaces #4386reedlepee-1/+0
2013-10-23Making fields in std and extra : private #4386reedlepee-4/+5
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-4/+4
Who doesn't like a massive renaming?
2013-10-21std: Move sys::log_str to repr::repr_to_str. Further work on #2240.Brian Anderson-0/+10
2013-10-17Register new snapshotsAlex Crichton-10/+0
2013-10-15use element count in slices, not size in bytesDaniel Micay-16/+19
This allows the indexing bounds check or other comparisons against an element length to avoid a multiplication by the size.
2013-10-04Register new snapshotsAlex Crichton-2/+0
Now that #9662 is merged, we should be much more easily bootstrappable on windows now.
2013-10-01remove the `float` typeDaniel Micay-13/+7
It is simply defined as `f64` across every platform right now. A use case hasn't been presented for a `float` type defined as the highest precision floating point type implemented in hardware on the platform. Performance-wise, using the smallest precision correct for the use case greatly saves on cache space and allows for fitting more numbers into SSE/AVX registers. If there was a use case, this could be implemented as simply a type alias or a struct thanks to `#[cfg(...)]`. Closes #6592 The mailing list thread, for reference: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-09-30std: Remove usage of fmt!Alex Crichton-4/+4
2013-09-09auto merge of #9065 : thestinger/rust/iter, r=alexcrichtonbors-1/+1
The trait will keep the `Iterator` naming, but a more concise module name makes using the free functions less verbose. The module will define iterables in addition to iterators, as it deals with iteration in general.
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-1/+1
The trait will keep the `Iterator` naming, but a more concise module name makes using the free functions less verbose. The module will define iterables in addition to iterators, as it deals with iteration in general.
2013-09-08repr: update for removal of constDaniel Micay-2/+1
2013-09-08repr: write the mutability qualifier for slicesDaniel Micay-0/+4
2013-09-07fix repr of strings/chars with quotesDaniel Micay-5/+22
Closes #8743
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-1/+1
2013-09-03repr: add very basic support for functionsDaniel Micay-5/+17
Closes #8917
2013-09-02auto merge of #8927 : thestinger/rust/repr, r=huonwbors-11/+37
2013-09-02repr: handle tuple structs sanelyDaniel Micay-9/+21
Closes #8919
2013-09-02repr: add support for trait objectsDaniel Micay-1/+6
Closes #8916
2013-09-02repr: print functions as `fn()`Daniel Micay-1/+10
2013-09-01Fix #8898novalis-2/+3
2013-08-31repr: remove trailing {} from unit-like structsDaniel Micay-5/+9
2013-08-31repr: print the name of structsDaniel Micay-7/+14
2013-08-30auto merge of #8820 : alexcrichton/rust/no-io-writer, r=brsonbors-224/+217
At the same time, this updates the TyVisitor to use a mutable self because it's probably going to be mutating state as it goes along anyway.
2013-08-28Remove @io::Writer from sys/repr/reflectAlex Crichton-224/+217
At the same time, this updates the TyVisitor to use a mutable self because it's probably going to be mutating state as it goes along anyway.
2013-08-27Remove offset_inbounds for an unsafe offset functionAlex Crichton-1/+1
2013-08-27reflect: rm unused visit_{var,var_integral,constr}Daniel Micay-5/+0
2013-08-27repr: include mutability qualifier in visit_ptrDaniel Micay-0/+15
2013-08-27repr: print integer/float suffixesDaniel Micay-25/+40
2013-08-23fix performance regression from invalid IRDaniel Micay-1/+1
Monomorphize's normalization results in a 2% decrease in non-optimized code size for libstd, so there's a negligible cost to removing it. This also fixes several visit glue bugs because normalize wasn't considering the differences in visit glue between types. Closes #8720
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