about summary refs log tree commit diff
path: root/src/libstd/intrinsics.rs
AgeCommit message (Collapse)AuthorLines
2014-05-07core: Inherit the intrinsics moduleAlex Crichton-485/+0
2014-05-04Register new snapshotsAlex Crichton-4/+0
2014-04-23auto merge of #13693 : thestinger/rust/mem, r=alexcrichtonbors-4/+27
This exposes volatile versions of the memset/memmove/memcpy intrinsics. The volatile parameter must be constant, so this can't simply be a parameter to our intrinsics.
2014-04-22add support for quadruple precision floating pointDaniel Micay-0/+2
This currently requires linking against a library like libquadmath (or libgcc), because compiler-rt barely has any support for this and most hardware does not yet have 128-bit precision floating point. For this reason, it's currently hidden behind a feature gate. When compiler-rt is updated to trunk, some tests can be added for constant evaluation since there will be support for the comparison operators. Closes #13381
2014-04-22add volatile copy/copy_nonoverlapping/setDaniel Micay-4/+27
This exposes volatile versions of the memset/memmove/memcpy intrinsics. The volatile parameter must be constant, so this can't simply be a parameter to our intrinsics.
2014-04-16Register new snapshotsAlex Crichton-25/+1
2014-04-15Use the unsigned integer types for bitwise intrinsics.Huon Wilson-18/+42
Exposing ctpop, ctlz, cttz and bswap as taking signed i8/i16/... is just exposing the internal LLVM names pointlessly (LLVM doesn't have "signed integers" or "unsigned integers", it just has sized integer types with (un)signed *operations*). These operations are semantically working with raw bytes, which the unsigned types model better.
2014-04-06rustc: remove ty_unboxed_vec.Eduard Burtescu-2/+0
2014-03-31std: Switch field privacy as necessaryAlex Crichton-6/+6
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-1/+1
Closes #2569
2014-03-28auto merge of #13160 : FlaPer87/rust/rename-pod, r=thestingerbors-1/+1
So far, we've used the term POD "Plain Old Data" to refer to types that can be safely copied. However, this term is not consistent with the other built-in bounds that use verbs instead. This patch renames the `Pod` kind into `Copy`. RFC: 0003-opt-in-builtin-traits r? @nikomatsakis
2014-03-28Rename Pod into CopyFlavio Percoco-1/+1
Summary: So far, we've used the term POD "Plain Old Data" to refer to types that can be safely copied. However, this term is not consistent with the other built-in bounds that use verbs instead. This patch renames the Pod kind into Copy. RFC: 0003-opt-in-builtin-traits Test Plan: make check Reviewers: cmr Differential Revision: http://phabricator.octayn.net/D3
2014-03-26Derive TotalEq for std::intrinsics::TypeIdTomas Sedovic-1/+1
HashMap and HashSet require keys to implement TotalEq. This makes it possible to use TypeId as a HashMap key again.
2014-03-23Snapshot cleanupAlex Crichton-1/+0
2014-03-23Register new snapshotsFlavio Percoco-83/+0
2014-03-20std: Make the generic atomics take unsafe pointersBrian Anderson-79/+82
These mutate values behind references that are Freeze, which is not allowed.
2014-03-20std: Make atomics immutable. #11583Brian Anderson-0/+88
In Rust, the strongest guarantee that `&mut` provides is that the memory pointed to is *not aliased*, whereas `&`'s guarantees are much weaker: that the value can be aliased, and may be mutated under proper precautions (interior mutability). Our atomics though use `&mut` for mutation even while creating multiple aliases, so this changes them to use 'interior mutability', mutating through immutable references.
2014-02-28std: Change assert_eq!() to use {} instead of {:?}Alex Crichton-1/+1
Formatting via reflection has been a little questionable for some time now, and it's a little unfortunate that one of the standard macros will silently use reflection when you weren't expecting it. This adds small bits of code bloat to libraries, as well as not always being necessary. In light of this information, this commit switches assert_eq!() to using {} in the error message instead of {:?}. In updating existing code, there were a few error cases that I encountered: * It's impossible to define Show for [T, ..N]. I think DST will alleviate this because we can define Show for [T]. * A few types here and there just needed a #[deriving(Show)] * Type parameters needed a Show bound, I often moved this to `assert!(a == b)` * `Path` doesn't implement `Show`, so assert_eq!() cannot be used on two paths. I don't think this is much of a regression though because {:?} on paths looks awful (it's a byte array). Concretely speaking, this shaved 10K off a 656K binary. Not a lot, but sometime significant for smaller binaries.
2014-02-24Transition to new `Hash`, removing IterBytes and std::to_bytes.Huon Wilson-1/+1
2014-02-23std: Move intrinsics to std::intrinsics.Brian Anderson-0/+459
Issue #1457