| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2013-08-18 | auto merge of #8551 : huonw/rust/speling, r=alexcrichton | bors | -1/+1 | |
| (This doesn't add/remove `u`s or change `ize` to `ise`, or anything like that.) | ||||
| 2013-08-17 | Fix warnings in tests | Erick Tryzelaar | -1/+1 | |
| 2013-08-16 | auto merge of #8532 : kballard/rust/cstr-cleanup, r=erickt | bors | -4/+4 | |
| Implement interior null checking in `.to_c_str()`, among other changes. | ||||
| 2013-08-16 | doc: correct spelling in documentation. | Huon Wilson | -1/+1 | |
| 2013-08-15 | ptr: inline the Clone implementation | Daniel Micay | -0/+1 | |
| 2013-08-15 | Add ToCStr method .with_c_str() | Kevin Ballard | -4/+4 | |
| .with_c_str() is a replacement for the old .as_c_str(), to avoid unnecessary boilerplate. Replace all usages of .to_c_str().with_ref() with .with_c_str(). | ||||
| 2013-08-12 | Forbid pub/priv where it has no effect | Alex Crichton | -4/+4 | |
| Closes #5495 | ||||
| 2013-08-12 | fix build with the new snapshot compiler | Daniel Micay | -22/+0 | |
| 2013-08-07 | Merge remote-tracking branch 'remotes/origin/master' into ↵ | Erick Tryzelaar | -0/+41 | |
| remove-str-trailing-nulls | ||||
| 2013-08-06 | vec: use `offset_inbounds` for iterators | Daniel Micay | -1/+20 | |
| This allows LLVM to optimize vector iterators to an `getelementptr` and `icmp` pair, instead of `getelementptr` and *two* comparisons. Code snippet: ~~~ fn foo(xs: &mut [f64]) { for x in xs.mut_iter() { *x += 10.0; } } ~~~ LLVM IR at stage0: ~~~ ; Function Attrs: noinline uwtable define void @"_ZN3foo17_68e1b25bca131dba7_0$x2e0E"({ i64, %tydesc*, i8*, i8*, i8 }* nocapture, { double*, i64 }* nocapture) #1 { "function top level": %2 = getelementptr inbounds { double*, i64 }* %1, i64 0, i32 0 %3 = load double** %2, align 8 %4 = getelementptr inbounds { double*, i64 }* %1, i64 0, i32 1 %5 = load i64* %4, align 8 %6 = ptrtoint double* %3 to i64 %7 = and i64 %5, -8 %8 = add i64 %7, %6 %9 = inttoptr i64 %8 to double* %10 = icmp eq double* %3, %9 %11 = icmp eq double* %3, null %or.cond6 = or i1 %10, %11 br i1 %or.cond6, label %match_case, label %match_else match_else: ; preds = %"function top level", %match_else %12 = phi double* [ %13, %match_else ], [ %3, %"function top level" ] %13 = getelementptr double* %12, i64 1 %14 = load double* %12, align 8 %15 = fadd double %14, 1.000000e+01 store double %15, double* %12, align 8 %16 = icmp eq double* %13, %9 %17 = icmp eq double* %13, null %or.cond = or i1 %16, %17 br i1 %or.cond, label %match_case, label %match_else match_case: ; preds = %match_else, %"function top level" ret void } ~~~ Optimized LLVM IR at stage1/stage2: ~~~ ; Function Attrs: noinline uwtable define void @"_ZN3foo17_68e1b25bca131dba7_0$x2e0E"({ i64, %tydesc*, i8*, i8*, i8 }* nocapture, { double*, i64 }* nocapture) #1 { "function top level": %2 = getelementptr inbounds { double*, i64 }* %1, i64 0, i32 0 %3 = load double** %2, align 8 %4 = getelementptr inbounds { double*, i64 }* %1, i64 0, i32 1 %5 = load i64* %4, align 8 %6 = lshr i64 %5, 3 %7 = getelementptr inbounds double* %3, i64 %6 %8 = icmp eq i64 %6, 0 %9 = icmp eq double* %3, null %or.cond6 = or i1 %8, %9 br i1 %or.cond6, label %match_case, label %match_else match_else: ; preds = %"function top level", %match_else %.sroa.0.0.in7 = phi double* [ %10, %match_else ], [ %3, %"function top level" ] %10 = getelementptr inbounds double* %.sroa.0.0.in7, i64 1 %11 = load double* %.sroa.0.0.in7, align 8 %12 = fadd double %11, 1.000000e+01 store double %12, double* %.sroa.0.0.in7, align 8 %13 = icmp eq double* %10, %7 br i1 %13, label %match_case, label %match_else match_case: ; preds = %match_else, %"function top level" ret void } ~~~ | ||||
| 2013-08-06 | add an intrinsic for inbounds GEP | Daniel Micay | -0/+22 | |
| 2013-08-06 | Merge remote-tracking branch 'remotes/origin/master' into ↵ | Erick Tryzelaar | -4/+3 | |
| remove-str-trailing-nulls | ||||
| 2013-08-06 | std: Remove uint::iterate, replaced by `range` | blake2-ppc | -4/+3 | |
| 2013-08-04 | Merge remote-tracking branch 'remotes/origin/master' into str-remove-null | Erick Tryzelaar | -26/+0 | |
| 2013-08-04 | std and rustc: explicitly pass c strings to c functions | Erick Tryzelaar | -47/+54 | |
| When strings lose their trailing null, this pattern will become dangerous: let foo = "bar"; let foo_ptr: *u8 = &foo[0]; Instead we should use c_strs to handle this correctly. | ||||
| 2013-08-04 | std: replace str::as_c_str with std::c_str | Erick Tryzelaar | -11/+12 | |
| 2013-08-03 | register snapshots | Daniel Micay | -26/+0 | |
| 2013-07-30 | implement pointer arithmetic with GEP | Daniel Micay | -21/+46 | |
| 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-23 | std: move StrUtil::as_c_str into StrSlice | Erick Tryzelaar | -10/+6 | |
| 2013-07-18 | auto merge of #7857 : blake2-ppc/rust/fix-test-warnings, r=alexcrichton | bors | -3/+4 | |
| Fix warnings that only show up when compiling the tests for libstd, libextra and one in librusti. Only trivial changes. | ||||
| 2013-07-18 | auto merge of #7842 : thestinger/rust/closure, r=huonw | bors | -28/+6 | |
| 2013-07-18 | Fix warnings in libstd and librusti tests | blake2-ppc | -3/+4 | |
| 2013-07-17 | librustc: Remove all uses of "copy". | Patrick Walton | -2/+9 | |
| 2013-07-17 | rm unnecessary stage0 `zero_memory` fn | Daniel Micay | -28/+6 | |
| 2013-07-10 | Added overloaded Add and Sub traits for pointer arithmetic | =Mark Sinclair | -0/+96 | |
| Implemented ptr arithmetic for *T and *mut T. Tests passing | ||||
| 2013-07-09 | ptr: optimize {swap,replace,read}_ptr | Daniel Micay | -6/+6 | |
| 2013-07-08 | Address nits by @catamorphism | Niko Matsakis | -1/+1 | |
| 2013-07-08 | update ptr intrinsics and rewrite vec routines to be more correct. | Niko Matsakis | -0/+50 | |
| In particular, it is not valid to go around passing uninitialized or zero'd memory as arguments. Rust should generally be free to assume that the arguments it gets are valid input values, but the output of intrinsics::uninit() and intrinsics::init() are not (e.g., an @T is just null, leading to an error if we should try to increment the ref count). | ||||
| 2013-07-04 | Convert vec::{as_imm_buf, as_mut_buf} to methods. | Huon Wilson | -1/+1 | |
| 2013-06-29 | Removing a lot of usage of '&const' | Alex Crichton | -9/+9 | |
| 2013-06-21 | Remove all #[cfg(stage0)]-protected code | James Miller | -63/+6 | |
| New snapshot means this can all go. Also removes places that have comments that say they are workarounds for stage0 errors. | ||||
| 2013-06-18 | replace #[inline(always)] with #[inline]. r=burningtree. | Graydon Hoare | -37/+37 | |
| 2013-06-11 | fix the docstring for copy_nonoverlapping_memory | Daniel Micay | -9/+25 | |
| 2013-06-11 | fix the ptr::set_memory docstring | Daniel Micay | -4/+4 | |
| 2013-06-09 | remove unused import warnings | Huon Wilson | -2/+0 | |
| 2013-06-06 | libc: omit memcpy, memmove and memset | Daniel Micay | -23/+1 | |
| LLVM provides these functions as intrinsics, and will generate calls to libc when appropriate. They are exposed in the `ptr` module as `copy_nonoverlapping_memory`, `copy_memory` and `set_memory`. | ||||
| 2013-06-03 | rename the Ptr trait to RawPtr | Daniel Micay | -3/+3 | |
| Closes #6607 | ||||
| 2013-06-02 | ptr: split out borrowed pointer utilities | Daniel Micay | -46/+0 | |
| The ptr module is intended to be for raw pointers. Closes #3111 | ||||
| 2013-05-31 | ptr: replace unnecessary unsafe code | Daniel Micay | -58/+18 | |
| 2013-05-31 | mv the raw pointer {swap,replace}_ptr to std::ptr | Daniel Micay | -0/+31 | |
| 2013-05-30 | Require documentation by default for libstd | Alex Crichton | -0/+29 | |
| Adds documentation for various things that I understand. Adds #[allow(missing_doc)] for lots of things that I don't understand. | ||||
| 2013-05-29 | librustc: Stop reexporting the standard modules from prelude. | Patrick Walton | -9/+15 | |
| 2013-05-28 | Silence various warnings throughout test modules | Alex Crichton | -2/+2 | |
| 2013-05-27 | fix casts on 32-bit | Daniel Micay | -1/+1 | |
| 2013-05-26 | add memset32/memset64 | Daniel Micay | -0/+24 | |
| 2013-05-26 | make the memcpy/memmove intrinsics higher-level | Daniel Micay | -19/+41 | |
| This allows them to make use of the type's alignment, instead of being pessimistic and assuming it is only 1. | ||||
| 2013-05-23 | optimize util::swap, &mut pointers never alias | Daniel Micay | -0/+22 | |
| 2013-05-23 | swap_ptr: rm equality check | Daniel Micay | -0/+1 | |
| This isn't needed semantically, and it's the wrong case to optimize for. | ||||
| 2013-05-22 | libstd: Rename libcore to libstd and libstd to libextra; update makefiles. | Patrick Walton | -0/+561 | |
| This only changes the directory names; it does not change the "real" metadata names. | ||||
| 2011-12-14 | Remove some duplicated unused parts of std now that they're present in core. | Graydon Hoare | -52/+0 | |
