about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2013-05-08Remove #[cfg(notest)] and use #[cfg(not(test))] to cooincide with #[cfg(debug)]Zack Corr-129/+129
2013-05-08auto merge of #6311 : indutny/rust/fix/handle-io-fread-errors, r=z0w0bors-2/+12
When, occasionally, trying to read directory instead of file, `fread()` returns `EISDIR` error. And, considering, absence of error handling, `read_whole_stream()` just loops indefinitely.
2013-05-08auto merge of #6307 : brson/rust/rng2, r=brsonbors-0/+9
Closes #6280
2013-05-07rt: Remove rust_call_nullary_fnBrian Anderson-6/+19
There's no need to delegate to C to call the Rust main function.
2013-05-08Move core::simd to core::unstable::simdSeo Sanghyeon-1/+2
2013-05-07Remove Durable from the languageBrian Anderson-4/+3
2013-05-07auto merge of #6301 : bjz/rust/numeric-traits, r=pcwaltonbors-76/+408
This is part of the redesign of the numeric traits tracked in issue #4819. Renamed: - `Exponential::expm1` -> `Float::exp_m1` - for consistency with underscore usage elsewhere - `Exponential::log` -> `Exponential::ln` - a less ambiguous name for the natural logarithm - `{float, f64, f32}::logarithm` -> `Exponential::log` - for arbitrary base logarithms - `Real::log_2` -> `Real::ln_2` - for consistency with `ln` - `Real::log_10` -> `Real::ln_10` - for consistency with `ln` Added: - `Signed::abs_sub` - wraps libm's `fdim` function - `Float::is_normal` - returns `true` if the number is neither zero, infinite, subnormal or NaN - `Float::classify` - returns the floating point category of the number - `Float::ln_1p` - returns the natural logarithm of the number plus one
2013-05-07core: Replace Durable with 'staticBrian Anderson-12/+12
2013-05-08io: handle fread() errorsFedor Indutny-2/+12
When, occasionally, trying to read directory instead of file, `fread()` returns `EISDIR` error. And, considering, absence of error handling, `read_whole_stream()` just loops indefinitely.
2013-05-07auto merge of #6294 : sonwow/rust/renamed-test, r=thestingerbors-2/+2
Renamed test
2013-05-07Add some tests for local data + borrowed pointersBrian Anderson-0/+9
2013-05-07auto merge of #6292 : thestinger/rust/cleanup, r=brsonbors-6/+87
2013-05-07core::rt: Add a test that rng works with new tasksBrian Anderson-0/+9
2013-05-07auto merge of #6254 : alexcrichton/rust/issues-5311-4490-better-foldl, r=graydonbors-8/+9
Closes #5311 and #4490. This doesn't change `vec.foldl` because that's still part of `old_iter`, although I could change that as well if necessary.
2013-05-07Add core::simd and define SIMD vector typesSeo Sanghyeon-0/+44
2013-05-07auto merge of #6271 : pnkfelix/rust/issue6009-condition-pub-priv-variants, ↵bors-1/+2
r=graydon @brson: r? [please ignore the other one that was accidentally based off master due to back-button-bugs in github.com] My goal is to resolve the question of whether we want to encourage (by example) consistent use of pub to make identifiers publicly-accessible, even in syntax extensions. (If people don't want that, then we can just let this pull request die.) This is part one of two. Part two, whose contents should be clear from the FIXME's in this commit, would land after this gets incorporated into a snapshot. (The eventual goal is to address issue #6009 , which was implied by my choice of branch name, but not mentioned in the pull request, so github did not notice it.)
2013-05-07Add is_normal and classify methods to Float traitBrendan Zabarauskas-17/+170
2013-05-07auto merge of #6255 : brson/rust/nobreakpoint, r=graydonbors-13/+1
These breakpoints make it difficult to debug coretest
2013-05-07Add abs_sub method to Signed traitBrendan Zabarauskas-5/+126
2013-05-07Fix order of methodsBrendan Zabarauskas-24/+26
2013-05-07Implement exp_m1 and ln_1p as methods for FloatBrendan Zabarauskas-22/+65
Both expm1 and ln1p have been renamed to exp_m1 and ln_1p in order to be consistent with the underscore usage elsewhere. The exp_m1 method is used for increased accuracy when doing floating point calculations, so this has been moved from the more general 'Exponential' trait into 'Float'.
2013-05-07Switch to using 'ln' for the natural logarithm and 'log' for arbitrary base ↵Brendan Zabarauskas-36/+49
logarithms
2013-05-07auto merge of #6251 : thestinger/rust/non_owned, r=pcwaltonbors-0/+1
Also fixed the docstring on `TC_ONCE_CLOSURE` (was accidentally the same as `TC_MUTABLE`) and shifted the `TC_EMPTY_ENUM` bit left by one since whatever previously used that bit has been removed.
2013-05-06auto merge of #6236 : alexcrichton/rust/more-map-methods, r=thestingerbors-56/+92
Closes #5392 and #5393 I implemented the pop/swap methods for TrieMap/TreeMap/SmallIntMap, and I also updated all of them such that pop isn't just a remove/insert, but rather it's all done in one operation. One thing I did notice is that with default methods it'd be really nice to define `insert` and `remove` in terms of `pop` and `swap` (or vice versa, just to have them available).
2013-05-07Add pop() and swap() to the Map traitAlex Crichton-56/+92
2013-05-07renamed testsYoungsoo Son-2/+2
2013-05-06remove borrowck workarounds from the containersDaniel Micay-6/+87
2013-05-06auto merge of #6228 : brson/rust/run-destroy, r=brsonbors-70/+0
These cause valgrind errors in subprocesses. I don't *think* these errors lead to actual test failures but they are very confusing.
2013-05-06auto merge of #6226 : alexcrichton/rust/issue-6199, r=brsonbors-23/+22
I just removed `pub mod` from `core.rc` and then got everything to compile again. One thing I'm worried about is an import like this: ```rust use a; use a::b; mod a { pub type b = int; } mod b { use a; // bad use a::b; // good } ``` I'm not sure if `use a::b` being valid is a bug or intended behavior (same question about `use a`). If it's intended behavior, then I got around these modules not being public by only importing the specific members that are necessary. Otherwise that probably needs an open issue.
2013-05-06Remove debug_mem since @graydon said it conflicted with GC changesNiko Matsakis-30/+2
2013-05-06Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-226/+281
2013-05-06Move core::run tests of process killing into standalone run-pass testsBrian Anderson-70/+0
These cause valgrind errors in subprocesses. I don't *think* these errors lead to actual test failures but they are very confusing.
2013-05-06Step one for 'proper' pub condition: support pub keyword in form.Felix S. Klock II-1/+2
2013-05-06Use rust_try_get_task for compat with new rt, and strenghten assumptions ↵Niko Matsakis-30/+32
about borrow list
2013-05-06refinement to technique used to not run regionckNiko Matsakis-1/+1
2013-05-06Add assert_approx_eq! macroBrendan Zabarauskas-223/+195
2013-05-06Move FuzzyEq trait into core::cmp and rename it to 'ApproxEq'Brendan Zabarauskas-3/+86
2013-05-06Improve lifetimes on foldl/foldr and lift the Copy requirementAlex Crichton-8/+9
2013-05-05core: Remove a call to `breakpoint` from a testBrian Anderson-13/+1
These breakpoints make it difficult to debug coretest
2013-05-05mark Cell as non-Const with #[mutable]Daniel Micay-0/+1
2013-05-05Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freezeNiko Matsakis-790/+2928
Conflicts: src/libcore/core.rc src/libcore/hashmap.rs src/libcore/num/f32.rs src/libcore/num/f64.rs src/libcore/num/float.rs src/libcore/num/int-template.rs src/libcore/num/num.rs src/libcore/num/strconv.rs src/libcore/num/uint-template.rs src/libcore/ops.rs src/libcore/os.rs src/libcore/prelude.rs src/libcore/rt/mod.rs src/libcore/unstable/lang.rs src/librustc/driver/session.rs src/librustc/middle/astencode.rs src/librustc/middle/borrowck/check_loans.rs src/librustc/middle/borrowck/gather_loans.rs src/librustc/middle/borrowck/loan.rs src/librustc/middle/borrowck/preserve.rs src/librustc/middle/liveness.rs src/librustc/middle/mem_categorization.rs src/librustc/middle/region.rs src/librustc/middle/trans/base.rs src/librustc/middle/trans/inline.rs src/librustc/middle/trans/reachable.rs src/librustc/middle/typeck/check/_match.rs src/librustc/middle/typeck/check/regionck.rs src/librustc/util/ppaux.rs src/libstd/arena.rs src/libstd/ebml.rs src/libstd/json.rs src/libstd/serialize.rs src/libstd/std.rc src/libsyntax/ast_map.rs src/libsyntax/parse/parser.rs src/test/compile-fail/borrowck-uniq-via-box.rs src/test/compile-fail/regions-infer-borrow-scope-within-loop.rs src/test/run-pass/borrowck-nested-calls.rs
2013-05-05add warning for #6248 and remove instances of itNiko Matsakis-0/+13
2013-05-05disable lang debug for perfNiko Matsakis-1/+1
2013-05-04Register snapshotsBrian Anderson-1043/+8
2013-05-04improve DEBUG_BORROW printoutsNiko Matsakis-52/+106
2013-05-04Reduce code bloat from managed allocationsBjörn Steinbrink-2/+0
In commit d7f5e43 "core::rt: Add the local heap to newsched tasks", local_malloc and local_free have become rather big and their forced inlining causes quite a bit of code bloat. Compile times for crates affected by the bloat (e.g. rustc) improve, while others (e.g. libstd) seem to be unaffected, so I guess the inlining doesn't gain us much. Sizes: | librustc | libsytax ---------------|–-----------|------------ with inlining | 18,547,824 | 7,110,848 w/o inlining | 15,092,040 | 5,518,608
2013-05-04auto merge of #6230 : thestinger/rust/whitespace, r=catamorphismbors-14/+0
I just had `git apply` fix most of them and then did a quick skim over the diff to fix a few cases where it did the wrong thing (mostly replacing tabs with 4 spaces, when someone's editor had them at 8 spaces).
2013-05-03auto merge of #6229 : catamorphism/rust/warning-police, r=catamorphismbors-1/+3
2013-05-03auto merge of #6227 : graydon/rust/issue-6112-box-annihilator, r=graydonbors-6/+25
during task annihilation, since it is easy to tread on freed memory.
2013-05-03add gitattributes and fix whitespace issuesDaniel Micay-14/+0