Commit Graph

17806 Commits

Author SHA1 Message Date
Daniel Micay
58c0df2af6 add #[non_owned] and #[mutable] attributes 2013-05-05 15:36:26 -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
bors
6e6a4be19d auto merge of #6208 : sanxiyn/rust/accurate-span, r=sanxiyn 2013-05-05 11:12:37 -07:00
Seo Sanghyeon
aca2a00fb4 Fix span tests 2013-05-06 03:09:19 +09:00
Niko Matsakis
6cb273ed4e Address all FIXMEs from #5562 2013-05-05 13:50:10 -04:00
Niko Matsakis
0b0b8018a6 add warning for #6248 and remove instances of it 2013-05-05 12:17:59 -04:00
bors
063851ffa1 auto merge of #6235 : pnkfelix/rust/issue-3326-play-with-directory-orderonly-prereqs, r=z0w0
r? (for #3326)
2013-05-05 05:09:36 -07:00
Niko Matsakis
6806900a7c disable lang debug for perf 2013-05-05 07:43:43 -04:00
bors
3b299e8140 auto merge of #6244 : thestinger/rust/ffi, r=z0w0
The previous example was erroneously attempting to destroy
uninitialized memory, which was often zeroed (masking the bug).
2013-05-05 04:09:36 -07:00
bors
29a2a1ecd1 auto merge of #6234 : yichoi/rust/glob-dummy-pull, r=thestinger
transitional patch to resolve compile/link failure on android

after #6161 landed, I've encountered below errors since android does not support glob in libc.

/opt/ndk_standalone/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/yichoi/rust_work/build/x86_64-unknown-linux-gnu/stage1/lib/rustc/arm-linux-androideabi/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so: error: undefined reference to 'glob'

/opt/ndk_standalone/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/yichoi/rust_work/build/x86_64-unknown-linux-gnu/stage1/lib/rustc/arm-linux-androideabi/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so: error: undefined reference to 'globfre

Since android does not have `glob.h`, `glob_t` definition comes from
https://groups.google.com/forum/?fromgroups=#!topic/android-ndk/vSH6MWPD0Vk

#6100 should be resolved.
2013-05-04 22:09:36 -07:00
Young-il Choi
987ad9c878 rt: rust_android_dummy.cpp fix for make tidy 2013-05-05 14:00:53 +09:00
Jeong YunWon
cb918e1a83 Allow non-literal static range pattern for match arms
Fix unintended error problem of:

static s: int = 1;
static e: int = 42;

fn main() {
    match 7 {
        s..e => (),
         ^~                 error: expected `=>` but found `..`
        _ => (),
    }
}
2013-05-05 11:05:06 +09:00
Daniel Micay
8f2d71ac00 small fix to the tutorial-ffi destructor example
The previous example was erroneously attempting to destroy
uninitialized memory, which was often zeroed (masking the bug).
2013-05-04 21:57:10 -04:00
bors
d74ac9ea03 auto merge of #6240 : brson/rust/snapshots, r=brson 2013-05-04 15:48:36 -07:00
Brian Anderson
8081e8debf Register snapshots 2013-05-04 15:43:51 -07:00
bors
b872900a5b auto merge of #6237 : dotdash/rust/reduce_bloat, r=brson
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 13:33:37 -07:00
Niko Matsakis
989d008124 separate out write_guard code into its own module 2013-05-04 14:29:32 -04:00
Niko Matsakis
ccf2f7b979 make asm_comments something that you opt in to 2013-05-04 14:29:08 -04: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
Felix S. Klock II
175a5eea42 Fix another goof: consistently use parent directory of target for rule.
(I wonder if there's a better way to write this in the rule itself;
i.e. something like `$$(dirname $$@)`.  But for now this will do.)
2013-05-04 12:46:11 +02:00
Felix S. Klock II
495bceb9b0 Fix syntax: had to use escaped $$ to have an effect after first expansion. 2013-05-04 10:57:56 +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
Young-il Choi
7ac6571163 rt: glob, globfree dummy function for android 2013-05-04 16:00:11 +09:00
bors
a47e4cb22f auto merge of #6229 : catamorphism/rust/warning-police, r=catamorphism 2013-05-03 23:48:36 -07:00
bors
c3ab74b8b9 auto merge of #6227 : graydon/rust/issue-6112-box-annihilator, r=graydon
during task annihilation, since it is easy to tread on freed memory.
2013-05-03 22:06:37 -07:00
bors
821979f928 auto merge of #6219 : dotdash/rust/fmt, r=graydon
Only the first portion has to be owned, as it acts as the buffer for the
constructed string. The remaining strings can be static.
2013-05-03 20:48:37 -07:00
Niko Matsakis
0ff8200671 factor code for write guards into its own module; add neglected resolve_stage0 2013-05-03 22:07:33 -04:00
bors
5bf7e8bb50 auto merge of #6198 : luqmana/rust/linker-arg, r=graydon 2013-05-03 18:48:37 -07:00
Young-il Choi
5681571f6c compiletest: remove --host and cleanup 2013-05-04 10:35:07 +09:00
bors
7d9c638226 auto merge of #6124 : catamorphism/rust/rustpkg, r=catamorphism
r? @graydon
2013-05-03 17:42:37 -07:00
Tim Chevalier
9f76ca6508 rustpkg: Make code actually compile
oops.
2013-05-03 17:25:13 -07:00
Daniel Micay
86efd97a10 add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
Tim Chevalier
2df8799f76 rustc: Warning police 2013-05-03 16:56:34 -07:00
Tim Chevalier
1a5f11a11b syntax: Warning police 2013-05-03 16:56:34 -07:00
Tim Chevalier
18bf9bd55a std: Warning police 2013-05-03 16:56:33 -07:00
Tim Chevalier
5fb5a94118 core: Warning police 2013-05-03 16:56:33 -07:00
Tim Chevalier
c42f1218a0 rustpkg: Handle sysroot more correctly
In rustpkg, pass around sysroot; in rustpkg tests, set the sysroot
manually so that tests can find libcore and such.

With bonus metadata::filesearch refactoring to avoid copies.
2013-05-03 16:48:44 -07:00
Tim Chevalier
376a5526a7 tidy 2013-05-03 16:06:07 -07:00
Tim Chevalier
4d4cabff9e rustpkg: Implement install command
The install command should work now, though it only installs
    in-place (anything else has to wait until I implement RUST_PATH).

Also including:
    core: Add remove_directory_recursive, change copy_file

    Make copy_file preserve permissions, and add a remove_directory_recursive
    function.
2013-05-03 16:06:07 -07:00
bors
517bfc91d1 auto merge of #6200 : catamorphism/rust/issue-5358, r=catamorphism
r? @nikomatsakis Previously, rustc would ICE if you matched on an enum-typed thing
with a structure pattern. Error out correctly. This will close #5358
2013-05-03 14:27:36 -07:00
Alex Crichton
24cda9fbc2 Remove pub from core::{unicode,cmath,stackwalk,rt} 2013-05-03 17:10:32 -04:00
Niko Matsakis
be08c3e514 rustc: add rooting, write-guards to slices etc 2013-05-03 16:27:16 -04:00
Niko Matsakis
c15fa3a02a Be more careful about the order in which we read the next field
during task annihilation, since it is easy to tread on freed memory.
2013-05-03 13:07:28 -07:00
Tim Chevalier
32b3d3e9eb tidy 2013-05-03 13:03:53 -07:00
Tim Chevalier
13df2ea69c rustc: Handle struct patterns where the expected type is an enum
Previously, rustc would ICE if you matched on an enum-typed thing
with a structure pattern. Error out correctly.
2013-05-03 13:03:53 -07:00
bors
bfd3cd8171 auto merge of #6217 : Sodel-the-Vociferous/rust/export-ToBytes, r=graydon 2013-05-03 13:00:47 -07:00
Luqman Aden
832f7b758f librustc: Add argument to allow choosing "linker" 2013-05-03 12:53:01 -07:00
Niko Matsakis
f3a6ea2643 lang: um, actually set locking bits! this code got lost. 2013-05-03 15:12:04 -04:00
bors
4332f8188b auto merge of #6216 : Sodel-the-Vociferous/rust/dralston-6146, r=graydon
cc #6146
2013-05-03 11:33:38 -07:00