Björn Steinbrink
bdc182cc41
Use static string with fail!() and remove fail!(fmt!())
...
fail!() used to require owned strings but can handle static strings
now. Also, it can pass its arguments to fmt!() on its own, no need for
the caller to call fmt!() itself.
2013-05-14 16:36:23 +02:00
Alex Crichton
66e1e51701
Remove re-exports from libcore/core.rc
...
Also fix up all the fallout elsewhere throughout core. It's really nice being
able to have the prelude.
2013-05-13 18:51:40 -04:00
bors
ad5bfd600d
auto merge of #6387 : brson/rust/unstable, r=brson
...
r? @pcwalton
* Move `SharedMutableState`, `LittleLock`, and `Exclusive` from `core::unstable` to `core::unstable::sync`
* Modernize the `SharedMutableState` interface with methods
* Rename `SharedMutableState` to `UnsafeAtomicRcBox` to match `RcBox`.
2013-05-13 14:49:48 -07:00
bors
3abc5b3ffb
auto merge of #6417 : pcwalton/rust/exprs-in-patterns, r=pcwalton
...
r? @graydon
2013-05-13 13:25:42 -07:00
Brian Anderson
369231beb4
core: Rename SharedMutableState to UnsafeAtomicRcBox
2013-05-13 12:13:56 -07:00
Brian Anderson
fa1d0477ed
core: Move locks, atomic rc to unstable::sync
2013-05-13 12:13:56 -07:00
Brian Anderson
4f44624415
core: Move unstable to unstable/mod.rs
2013-05-13 12:13:33 -07:00
Matthijs Hofstra
852af346d3
Tidy
2013-05-13 13:33:34 +02:00
Patrick Walton
db0693ac8d
libsyntax: Tighten up expressions in patterns to only allow identifiers or literals (possibly with a minus).
...
This had very minimal fallout.
2013-05-12 16:35:19 -07:00
Matthijs Hofstra
a9f2132606
Adds atomic_load, atomic_load_acq, atomic_store, and atomic_store_rel intrinsics.
...
The default versions (atomic_load and atomic_store) are sequentially consistent.
The atomic_load_acq intrinsic acquires as described in [1].
The atomic_store_rel intrinsic releases as described in [1].
[1]: http://llvm.org/docs/Atomics.html
2013-05-12 23:23:40 +02:00
Tim Chevalier
cd235d4230
core: Make intrinsics::forget unsafe, too
2013-05-09 15:28:28 -07:00
Tim Chevalier
646f16d7e4
core: Make intrinsics::init unsafe
...
as per #3920
2013-05-09 15:27:38 -07:00
James Miller
050c744c23
Add uninit intrinsic
2013-05-09 22:23:38 +12:00
Patrick Walton
16a0125e41
libcore: Fix tests.
2013-05-08 17:04:01 -07:00
Patrick Walton
49a66a5c5a
librustc: Stop parsing modes and remove them entirely from the language
2013-05-08 17:04:01 -07:00
Patrick Walton
803a4f45fa
libcore: Remove mutable fields from the task builder API
2013-05-08 17:03:59 -07:00
Patrick Walton
b2d1ac100f
libcore: Remove mutable fields from rand.
2013-05-08 17:03:58 -07:00
Seo Sanghyeon
eb5fa06113
Move core::simd to core::unstable::simd
2013-05-08 14:37:18 +09:00
Niko Matsakis
ce45f390dd
Remove debug_mem since @graydon said it conflicted with GC changes
2013-05-06 20:14:54 -04:00
Niko Matsakis
c50a9d5b66
Use rust_try_get_task for compat with new rt, and strenghten assumptions about borrow list
2013-05-06 11:18:59 -04:00
Niko Matsakis
4300d4d2fa
Merge remote-tracking branch 'mozilla/incoming' into issue-5910-dyna-freeze
...
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-05 15:11:04 -04:00
Niko Matsakis
6806900a7c
disable lang debug for perf
2013-05-05 07:43:43 -04:00
Brian Anderson
8081e8debf
Register snapshots
2013-05-04 15:43:51 -07:00
Niko Matsakis
bf2d3c71e3
improve DEBUG_BORROW printouts
2013-05-04 14:25:15 -04:00
Björn Steinbrink
e5ca35d567
Reduce code bloat from managed allocations
...
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-04 18:21:27 +02:00
bors
1f65e4a1d5
auto merge of #6230 : thestinger/rust/whitespace, r=catamorphism
...
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-04 00:48:37 -07:00
Daniel Micay
86efd97a10
add gitattributes and fix whitespace issues
2013-05-03 20:01:42 -04:00
Tim Chevalier
5fb5a94118
core: Warning police
2013-05-03 16:56:33 -07:00
Niko Matsakis
f3a6ea2643
lang: um, actually set locking bits! this code got lost.
2013-05-03 15:12:04 -04:00
Niko Matsakis
34024353e8
Change borrow debugging so it is disabled by -O
2013-05-03 05:42:00 -04:00
Brian Anderson
6c478c7de8
Merge remote-tracking branch 'brson/io' into incoming
...
Conflicts:
mk/rt.mk
src/libcore/run.rs
2013-05-02 20:51:56 -07:00
Niko Matsakis
cc62680cc9
free the borrow list propertly instead of crashing
2013-05-02 17:08:04 -04:00
Niko Matsakis
88ec89d3fe
fix numerous dynamic borrow failures
2013-05-02 14:32:37 -04:00
Brendan Zabarauskas
e596128bd8
Remove 'Local Variable' comments
2013-05-02 13:22:04 +10:00
Niko Matsakis
6210de9529
lang: fix code for maintaining borrow list
2013-05-01 21:47:09 -04:00
Niko Matsakis
d231c427e6
core: add more debugging printouts to borrowing
2013-05-01 20:23:07 -04:00
Niko Matsakis
38f93f2121
wip---work on making rooting work properly
2013-05-01 13:48:00 -04:00
Niko Matsakis
4af2d90af5
add an option to debug borrows (RUST_DEBUG_BORROW) so you can
...
find out where the offending borrow occurred. This ... still needs
some work.
2013-05-01 10:30:54 -04:00
Niko Matsakis
84861101ec
rustc: print out filename/line-number when a borrow fails
2013-05-01 09:14:47 -04:00
Brian Anderson
4a4646fd54
Merge remote-tracking branch 'brson/io'
...
Conflicts:
src/libcore/task/local_data_priv.rs
2013-04-30 17:01:27 -07:00
Niko Matsakis
418f991118
allover: numerous unused muts etc
2013-04-30 14:10:21 -04:00
Niko Matsakis
a896440ca1
new borrow checker (mass squash)
2013-04-30 06:59:32 -04:00
Niko Matsakis
202b8dcdc4
adapt to snapshot
2013-04-30 06:43:02 -04:00
Brian Anderson
6818e241b4
core: Turn off the local heap in newsched in stage0 to work around windows bustage
...
core won't compile in stage0 without.
2013-04-29 16:44:21 -07:00
Patrick Walton
c6a9e28842
librustc: Rename reinterpret_cast to transmute_copy and remove the intrinsic
2013-04-29 14:30:53 -07:00
Patrick Walton
b0522a497c
librustc: Remove ptr::addr_of.
2013-04-29 14:30:53 -07:00
Brian Anderson
28ab152832
Merge remote-tracking branch 'brson/io'
...
Conflicts:
src/libcore/rt/uvio.rs
2013-04-24 19:06:05 -07:00
Marvin Löbel
3759b5711d
Fixed typo... And a billion other things.
2013-04-24 22:28:02 +02:00
Marvin Löbel
dd74807957
Removed ascii functions from other modules
...
Replaced str::to_lowercase and str::to_uppercase
2013-04-24 22:26:09 +02:00
Huon Wilson
6c0a7c7b7d
libcore: remove @Rng from rand, and use traits instead.
...
Also, rename RandRes -> IsaacRng, and make the constructors static
methods.
2013-04-24 22:34:10 +10:00