about summary refs log tree commit diff
path: root/src/libstd/unstable/intrinsics.rs
AgeCommit message (Collapse)AuthorLines
2014-02-23std: Move intrinsics to std::intrinsics.Brian Anderson-457/+0
Issue #1457
2014-02-13Register new snapshotsAlex Crichton-4/+0
2014-02-12Removed ty_type (previously used to represent *tydesc).Eduard Burtescu-0/+3
2014-02-09std: Move byteswap functions to memBrian Anderson-27/+0
2014-02-09std: Add init and uninit to mem. Replace direct intrinsic usageBrian Anderson-2/+1
2014-02-07rustc: Remove 'morestack_addr' intrinsic. UnusedBrian Anderson-3/+0
2014-02-04Register new snapshotsAlex Crichton-120/+0
2014-02-03Add an AtomicU64 type to std::sync::atomicsAlex Crichton-9/+101
This also generalizes all atomic intrinsics over T so we'll be able to add u8 atomics if we really feel the need to (do we really want to?)
2014-01-27Removed take_glue from tydesc, inlining the equivalent refcount increment ↵Eduard Burtescu-0/+2
code instead.
2014-01-27Demote self to an (almost) regular argument and remove the env param.Eduard Burtescu-1/+3
Fixes #10667 and closes #10259.
2014-01-17auto merge of #11585 : nikomatsakis/rust/issue-3511-rvalue-lifetimes, r=pcwaltonbors-6/+0
Major changes: - Define temporary scopes in a syntax-based way that basically defaults to the innermost statement or conditional block, except for in a `let` initializer, where we default to the innermost block. Rules are documented in the code, but not in the manual (yet). See new test run-pass/cleanup-value-scopes.rs for examples. - Refactors Datum to better define cleanup roles. - Refactor cleanup scopes to not be tied to basic blocks, permitting us to have a very large number of scopes (one per AST node). - Introduce nascent documentation in trans/doc.rs covering datums and cleanup in a more comprehensive way. r? @pcwalton
2014-01-15Issue #3511 - Rationalize temporary lifetimes.Niko Matsakis-6/+0
Major changes: - Define temporary scopes in a syntax-based way that basically defaults to the innermost statement or conditional block, except for in a `let` initializer, where we default to the innermost block. Rules are documented in the code, but not in the manual (yet). See new test run-pass/cleanup-value-scopes.rs for examples. - Refactors Datum to better define cleanup roles. - Refactor cleanup scopes to not be tied to basic blocks, permitting us to have a very large number of scopes (one per AST node). - Introduce nascent documentation in trans/doc.rs covering datums and cleanup in a more comprehensive way.
2014-01-15register snapshotsDaniel Micay-38/+1
2014-01-14remove `borrow_offset` as ~ is now free of headersDaniel Micay-7/+0
2014-01-14remove reference counting headers from ~Daniel Micay-0/+2
Unique pointers and vectors currently contain a reference counting header when containing a managed pointer. This `{ ref_count, type_desc, prev, next }` header is not necessary and not a sensible foundation for tracing. It adds needless complexity to library code and is responsible for breakage in places where the branch has been left out. The `borrow_offset` field can now be removed from `TyDesc` along with the associated handling in the compiler. Closes #9510 Closes #11533
2014-01-11Removed free_glue from tydesc (the code is still generated, but inlined in ↵Eduard Burtescu-2/+31
drop_glue).
2014-01-06Register new snapshotsAlex Crichton-2/+2
2014-01-03fixup! libstd: Always inline all byteswap functionsCarl-Anton Ingmarsson-27/+27
2014-01-02libstd: Always inline all byteswap functionsCarl-Anton Ingmarsson-27/+27
2014-01-01Add byteswap intrinsics for converting from big/little to host endianCarl-Anton Ingmarsson-0/+13
These are similar to the ntoh[s|l] functions in C and have the style of from_[be|le][16|32|64].
2013-12-31Implement volatile_load and volatile_store intrinsics.Peter Zotov-0/+12
2013-12-03Register new snapshotsAlex Crichton-4/+0
2013-11-30Wrap the return value of the type_id intrinsic in an opaque boxCorey Richardson-1/+24
Closes #10594
2013-11-28Register new snapshotsAlex Crichton-1/+0
2013-11-22add a breakpoint intrinsic for debuggingDaniel Micay-0/+4
This can be used to grab the attention of a debugger, and unlike `abort` execution can be resumed.
2013-11-11Remove #[fixed_stack_segment] and #[rust_stack]Alex Crichton-12/+0
These two attributes are no longer useful now that Rust has decided to leave segmented stacks behind. It is assumed that the rust task's stack is always large enough to make an FFI call (due to the stack being very large). There's always the case of stack overflow, however, to consider. This does not change the behavior of stack overflow in Rust. This is still normally triggered by the __morestack function and aborts the whole process. C stack overflow will continue to corrupt the stack, however (as it did before this commit as well). The future improvement of a guard page at the end of every rust stack is still unimplemented and is intended to be the mechanism through which we attempt to detect C stack overflow. Closes #8822 Closes #10155
2013-11-06Register new snapshotsAlex Crichton-39/+9
2013-11-05Rename misleading contains_managed to owns_managedNiko Matsakis-0/+5
2013-11-04auto merge of #10064 : luqmana/rust/vvv, r=nikomatsakisbors-0/+3
Fixes #2057. Example: ```Rust #[no_std]; type c_char = u8; type c_int = i32; type size_t = uint; extern { fn printf(format: *c_char, ...) -> c_int; } #[lang="fail_bounds_check"] fn fail_bounds_check(_: *c_char, _: size_t, _: size_t, _: size_t) {} #[start] #[fixed_stack_segment] fn main(_: int, _: **u8) -> int { unsafe { let msg = bytes!("Hello World!
2013-11-04libsyntax/librustc: Allow calling variadic foreign functions.Luqman Aden-0/+3
2013-11-04auto merge of #10182 : alexcrichton/rust/typeid-intrinsic, r=nikomatsakisbors-4/+10
This isn't quite as fancy as the struct in #9913, but I'm not sure we should be exposing crate names/hashes of the types. That being said, it'd be pretty easy to extend this (the deterministic hashing regardless of what crate you're in was the hard part).
2013-11-03simplify memcpy/memmove/memset intrinsicsDaniel Micay-0/+15
This moves the per-architecture difference into the compiler.
2013-11-01Register new snapshotsAlex Crichton-3/+0
Closes #2240
2013-11-01Add a type_id intrinsicAlex Crichton-4/+10
Closes #9913
2013-10-29Adjust reflection for the possibility of discriminants larger than int.Jed Davis-4/+9
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-23register snapshotsDaniel Micay-8/+0
2013-10-23Removed Unnecessary comments and white spaces #4386reedlepee-2/+1
2013-10-23Making fields in std and extra : private #4386reedlepee-5/+6
2013-10-21auto merge of #10000 : cmr/rust/snapshot, r=alexcrichtonbors-3/+0
2013-10-21Register snapshotsCorey Richardson-3/+0
2013-10-21fix the new floating point intrinsicsDaniel Micay-2/+2
2013-10-21expose new floating point intrinsicsDaniel Micay-0/+20
copysign, ring, nearbyint, round
2013-10-17Register new snapshotsAlex Crichton-1/+0
2013-10-17Removed the -Z once_fns compiler flag and added the new feature directive of ↵Chris Sainty-1/+2
the same name to replace it. Changed the frame_address intrinsic to no longer be a once fn. This removes the dependency on once_fns from std.
2013-10-14add an `abort` intrinsicDaniel Micay-0/+3
This should be preferred to the libc `abort` function.
2013-10-14Remove unused abi attributes.Steve Klabnik-1/+0
They've been replaced by putting the name on the extern block. #[abi = "foo"] goes to extern "foo" { } Closes #9483.
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-0/+1
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-18Register new snapshotsAlex Crichton-100/+1
2013-09-03add type name to the tydescDaniel Micay-0/+3
Closes #8926