Commit Graph

17049 Commits

Author SHA1 Message Date
Vadim Chugunov
51d82f572f Converted vec::map to member. 2013-06-17 08:41:25 -07:00
Vadim Chugunov
65dd6218af Fixed remaining issues to pass debug-test/* tests.
Made debugger scripts source line insensitive.
2013-06-17 08:41:25 -07:00
Vadim Chugunov
62e86e044d Fixed compile warnings.
Fixed whitespace "errors".
2013-06-17 08:41:25 -07:00
Vadim Chugunov
00bb15bf72 Removed extraneous string allocations.
Misc refactoring.
2013-06-17 08:41:24 -07:00
Vadim Chugunov
6db3302b35 Debug loc for local var declarations 2013-06-17 08:41:24 -07:00
Vadim Chugunov
1079e41143 Move "return" basic block after all other function blocks. 2013-06-17 08:41:23 -07:00
Vadim Chugunov
6cc3189787 Made the while DebugContext mutable, not just created_* hashes
Disabled create_arg
2013-06-17 08:41:23 -07:00
Vadim Chugunov
868f9a88d6 Use DIBuilder in debuginfo 2013-06-17 08:41:23 -07:00
bors
17eec6289b auto merge of #7199 : Kimundi/rust/master, r=bstrie
- Fixed tests
- Added methods
- Renamed casting methods to be shorter
- Added unsafe versions

Closes #7150
2013-06-17 08:37:18 -07:00
bors
5f0e494d9d auto merge of #7174 : SiegeLord/rust/remove_trim, r=brson
This change prevents the indentation in code blocks inside the /// doc comments
from being eaten. The indentation that is the same across the consecutive doc
comments is removed by the uindent_pass in librustdoc.

The bug can be seen, e.g., here: http://static.rust-lang.org/doc/std/iterator.html#example-12

I also altered how the block comments are treated, for consistency. There isn't much testing done on the documentation output (I added a few tests of my own for the modified function), so I don't know if anything relied on the previous behavior. I checked a number of documentation files and observed either no change in output or changes that consistent of the above bug being fixed.
2013-06-17 07:43:06 -07:00
bors
6fbd5383f9 auto merge of #7195 : brson/rust/timertest, r=bstrie 2013-06-17 06:52:14 -07:00
Young-il Choi
474bd60c1b rt: fix jemalloc android cross-compile for mac 2013-06-17 20:20:24 +09:00
Young-il Choi
b82370cec6 std: fix stat struct of android (SEGV error from run-pass/stat.rs on android) 2013-06-17 18:53:33 +09:00
Young-il Choi
c4c7e0fb66 test: adjust some test cases of run-pass for android 2013-06-17 18:50:29 +09:00
Young-il Choi
f7ee7d09dd etc: add TEST_EXEC_ENV for run-pass to adb_run_wrapper.sh 2013-06-17 18:46:04 +09:00
Young-il Choi
9e618cf954 etc: modify adb_run_wrapper.sh to avoid 'expr' unrecognization at some android devices 2013-06-17 18:44:30 +09:00
Marvin Löbel
c9e7bb7d4a Improved std::ascii
- Fixed tests
- Added methods
- Renamed casting methods to be shorter

closes #7150
2013-06-17 10:16:13 +02:00
bors
90b999aea1 auto merge of #7198 : huonw/rust/slice-zeros, r=Aatch 2013-06-17 00:16:03 -07:00
Ralph Bodenner
5acc8e5a51 Reproduce text changes from @brson PR 7176 and fix a typo therein 2013-06-17 00:07:52 -07:00
Huon Wilson
f1d971ae18 std: add Zero impls for &[] and &str. 2013-06-17 17:05:51 +10:00
Ralph Bodenner
819d07af7f Update doc references to new names for std, extra, and std::libc 2013-06-16 23:26:08 -07:00
Brian Anderson
93156ab7e1 std::rt: Reduce the delay on a timer test. Slow 2013-06-16 19:24:51 -07:00
bors
3495737291 auto merge of #7157 : sstewartgallus/rust/master, r=brson
I did a little bit of cleanup work in driver.rs. It's not much but hey little steps.
2013-06-16 17:48:58 -07:00
bors
81506a6b81 auto merge of #7186 : dotdash/rust/landing_pads, r=pcwalton
Currently, cleanup blocks are only reused when there are nested scopes, the
child scope's cleanup block will terminate with a jump to the parent
scope's cleanup block. But within a single scope, adding or revoking
any cleanup will force a fresh cleanup block. This means quadratic
growth with the number of allocations in a scope, because each
allocation needs a landing pad.

Instead of forcing a fresh cleanup block, we can keep a list chained
cleanup blocks that form a prefix of the currently required cleanups.
That way, the next cleanup block only has to handle newly added
cleanups. And by keeping the whole list instead of just the latest
block, we can also handle revocations more efficiently, by only
dropping those blocks that are no longer required, instead of all of
them.

Reduces the size of librustc by about 5% and the time required to build
it by about 10%.
2013-06-16 11:48:57 -07:00
SiegeLord
6a6ffb4c76 Do not strip leading whitespace when parsing doc comments.
This change prevents the indentation in code blocks inside the /// doc comments
from being eaten. The indentation that is the same across the consecutive doc
comments is removed by the uindent_pass in librustdoc.
2013-06-16 14:02:52 -04:00
bors
fd8aa9afbd auto merge of #7177 : huonw/rust/unfold-fix, r=thestinger 2013-06-16 10:55:02 -07:00
bors
ae23beb52f auto merge of #7167 : nikomatsakis/rust/ref-bindings-explicit-copy-in-generics, r=brson
Two changes:

1. Make type parameters move by default, even if they have a Copy bound. After all, they could be bound to `~T` or `~[]`. Also, this is a necessary step towards removing `copy` keyword and replacing with clone.

2. Make it illegal to move from `*T`. This is dangerous in a "moves-by-default" scenario, because it's very easy to move when working with a `*T` pointer. Also, it requires zeroing memory, which we hope to do away with someday.
2013-06-16 09:54:59 -07:00
Niko Matsakis
e014ab9023 Make it illegal to move from *T. This interacts poorly with moves-based-on-type,
since it creates moves that were not apparent. It also turns out to be not
widely used.
2013-06-16 12:47:36 -04:00
Niko Matsakis
a9012a2ad1 Make type parameters not implicitly copyable, even if they have the Copy bound.
Consider: T:Copy could be bound to ~T, which is not implicitly copyable.
2013-06-16 12:47:36 -04:00
Niko Matsakis
e7b0b71197 Remove moves from *T and implement in another way 2013-06-16 12:47:36 -04:00
Niko Matsakis
eb48c29681 Add copies to type params with Copy bound 2013-06-16 12:47:36 -04:00
Niko Matsakis
461a79a247 Partial fix for #7158: Save EDX in morestack on x86-32 2013-06-16 12:46:51 -04:00
bors
900de0ffad auto merge of #7171 : bstrie/rust/delbin, r=thestinger 2013-06-16 08:57:58 -07:00
Björn Steinbrink
642cd467c6 Avoid quadratic growth of cleanup blocks
Currently, cleanup blocks are only reused when there are nested scopes, the
child scope's cleanup block will terminate with a jump to the parent
scope's cleanup block. But within a single scope, adding or revoking
any cleanup will force a fresh cleanup block. This means quadratic
growth with the number of allocations in a scope, because each
allocation needs a landing pad.

Instead of forcing a fresh cleanup block, we can keep a list chained
cleanup blocks that form a prefix of the currently required cleanups.
That way, the next cleanup block only has to handle newly added
cleanups. And by keeping the whole list instead of just the latest
block, we can also handle revocations more efficiently, by only
dropping those blocks that are no longer required, instead of all of
them.

Reduces the size of librustc by about 5% and the time required to build
it by about 10%.
2013-06-16 17:52:46 +02:00
bors
0d7f8f7685 auto merge of #7166 : brson/rust/fuzzer, r=pcwalton
It is suffering from a bad case of megabitrot. #5247
2013-06-16 08:03:57 -07:00
bors
ebca26cd54 auto merge of #7163 : brson/rust/reinterpret-cast, r=thestinger 2013-06-16 06:31:00 -07:00
bors
c1548991cf auto merge of #7160 : kballard/rust/terminfo-parm-i-fix, r=thestinger
My latest terminfo work introduced a bug in the handling of %i, which was noticed by @huonw after the PR was already merged in.

r? @thestinger
2013-06-16 05:33:59 -07:00
bors
03dff61d99 auto merge of #7159 : Blei/rust/free-glue-no-destructor, r=graydon
The free glue shouldn't be called for structs, and the drop glue already
contains the destructor.
2013-06-16 04:40:01 -07:00
bors
d1a2360b36 auto merge of #7156 : Dretch/rust/float-hash, r=graydon
It can sometimes be useful to have maps/sets of floating point values.

Doing arithmetic with floats and then using them as keys is, of course, not a good idea.
2013-06-16 03:43:03 -07:00
bors
d0f88cd54e auto merge of #7155 : Blei/rust/drop-glue-alloca, r=graydon
Removes one alloca and store from the drop glue of @ boxes. This speeds
up the rustc build by 1s (might be noise, though).
2013-06-16 02:46:08 -07:00
bors
08c1155a22 auto merge of #7142 : alexcrichton/rust/deriving-zero, r=pcwalton
This allows mass-initialization of large structs without having to specify all the fields.

I'm a bit hesitant, but I wanted to get this out there. I don't really like using the `Zero` trait, because it doesn't really make sense for a type like `HashMap` to use `Zero` as the 'blank allocation' trait. In theory there'd be a new trait, but then that's adding cruft to the language which may not necessarily need to be there.

I do think that this can be useful, but I only implemented `Zero` on the basic types where I thought it made sense, so it may not be all that usable yet. (opinions?)
2013-06-16 01:52:09 -07:00
Huon Wilson
53f6a4e9fb std: fix UnfoldrIterator cross-crate. 2013-06-16 18:13:45 +10:00
bors
d1927d2950 auto merge of #7137 : erickt/rust/from-elem-fixme, r=thestinger
This is to make sure we track optimizing `vec::from_elem`.
2013-06-16 00:58:09 -07:00
bors
f74e1935aa auto merge of #7123 : huonw/rust/more-str, r=thestinger
Moves all the remaining functions that could reasonably be methods to be methods, except for some FFI ones (which I believe @erickt is working on, possibly) and `each_split_within`, since I'm not really sure the details of it (I believe @kimundi wrote the current implementation, so maybe he could convert it to an external iterator method on `StrSlice`, e.g. `word_wrap_iter(&self) -> WordWrapIterator<'self>`, where `WordWrapIterator` impls `Iterator<&'self str>`. It probably won't be too hard, since it's already a state machine.)

This also cleans up the comparison impls for the string types, except I'm not sure how the lang items `eq_str` and `eq_str_uniq` need to be handled, so they (`eq_slice` and `eq`) remain stand-alone functions.
2013-06-16 00:04:13 -07:00
bors
8482d29d9b auto merge of #7149 : thestinger/rust/vec, r=graydon 2013-06-15 23:10:12 -07:00
Daniel Micay
7f00ab3df1 fix benchmark and the tutorials 2013-06-16 01:19:43 -04:00
bors
5572023cd8 auto merge of #7162 : thestinger/rust/iterator, r=brson 2013-06-15 22:16:28 -07:00
Ben Striegel
1026fe84a4 Delete some binary files from the test suite 2013-06-16 00:37:53 -04:00
bors
b9119edc55 auto merge of #7114 : pnkfelix/rust/issue3961-fix-whitespace-detection, r=brson
r?  (yes, the review request is back, now that I got it building against incom... I mean master!)

(Attempting to port from orphaned pull-request #6764 )

Fix for #3961. Also includes a test case to illustrate the issues. (All of the entries that say "should align" should align with each other, and the four lines near the end that say "compare _" for _ in {A,B,C,D} should line up with each other.)

Before applying this change set:
-- the "(should align)"'s are all over the place, and the form/line feeding spaces are not cut out as one might or might not expect.
-- compare B and D do not match A and C.

(To be honest, its hard to really say what the right behavior is here, and people who are expecting a particular behavior out of a pretty printer in these cases may well get burned.)
2013-06-15 20:40:14 -07:00
Huon Wilson
bbcff95ac5 remove unused imports 2013-06-16 12:20:12 +10:00
Daniel Micay
845465ee24 old_iter: rm the min/max free functions 2013-06-15 22:16:22 -04:00
Daniel Micay
52a38b8097 fix test 2013-06-15 22:16:22 -04:00
Daniel Micay
e097d5eaba rm CopyableOrderedIter
replaced with OrdIterator
2013-06-15 22:16:21 -04:00
Daniel Micay
6c547e42c8 rm vec::uniq_len 2013-06-15 22:16:21 -04:00
Huon Wilson
30973ccb90 std: allow any sort of string to be Added with +. 2013-06-16 10:50:28 +10:00
Huon Wilson
ee25cf8d75 std: test-fixes, remove warnings, syntax highlighting for code examples. 2013-06-16 10:50:28 +10:00
Huon Wilson
4686ed1a1d std: continue improving the comparison trait impls for str.
This moves them all into the traits submodule, and delegates Ord
to the TotalOrd instance. It also deletes the stand-alone lt, gt,
ge and le functions.
2013-06-16 10:50:28 +10:00
Huon Wilson
42974d3bc4 std: simplify the string comparison implementations, using iterators. 2013-06-16 10:50:28 +10:00
Huon Wilson
f1886680e0 std: convert str::to_utf16 to a method. 2013-06-16 10:50:28 +10:00
Huon Wilson
4b18fff2be std: convert str::{map,levdistance,subslice_offset} to methods.
The first two become map_chars and lev_distance. Also, remove a few
allocations in rustdoc.
2013-06-16 10:50:28 +10:00
bors
c989b79127 auto merge of #7132 : thestinger/rust/rpath, r=brson
This is a bad default, because the binaries will point at an absolute
path regardless of where they are moved. This opens up a security issue
for packages, because they will attempt to load libraries from a path
that's often owned by a regular user.

Every Rust binary is currently flagged by Debian, Fedora and Arch lint
checkers as having dangerous rpaths. They don't meet the requirements to
be placed in the repositories without manually stripping this from each
binary.

The relative rpath is still enough to keep the binaries working until
they are moved relative to the crates they're linked against.

http://wiki.debian.org/RpathIssue
https://fedoraproject.org/wiki/Packaging:Guidelines#Beware_of_Rpath
2013-06-15 16:13:09 -07:00
Brian Anderson
069086cdb4 Remove the fuzzer
It is suffering from a bad case of megabitrot.
2013-06-15 16:12:56 -07:00
Brian Anderson
0f9c191d8f std: Remove doc references to reinterpret_cast 2013-06-15 15:22:22 -07:00
Daniel Micay
708395d65d stop using an absolute rpath
This is a bad default, because the binaries will point at an absolute
path regardless of where they are moved. This opens up a security issue
for packages, because they will attempt to load libraries from a path
that's often owned by a regular user.

Every Rust binary is currently flagged by Debian, Fedora and Arch lint
checkers as having dangerous rpaths. They don't meet the requirements to
be placed in the repositories without manually stripping this from each
binary.

The relative rpath is still enough to keep the binaries working until
they are moved relative to the crates they're linked against.

http://wiki.debian.org/RpathIssue
https://fedoraproject.org/wiki/Packaging:Guidelines#Beware_of_Rpath
2013-06-15 18:17:24 -04:00
Daniel Micay
79cd2dbe72 iterator: work around method resolve bug 2013-06-15 18:02:05 -04:00
Daniel Micay
2df66a84cd iterator: add a position adaptor 2013-06-15 17:56:54 -04:00
Daniel Micay
eb5ac84c8e iterator: add a find adaptor 2013-06-15 17:53:12 -04:00
James Miller
f2a7fc69da Fix Merge Fallout 2013-06-16 09:20:40 +12:00
James Miller
cc908b772c Remove @-fields from CrateContext
Remove all the explicit @mut-fields from CrateContext, though many
fields are still @-ptrs.
This required changing every single function call that explicitly
took a @CrateContext, so I took advantage and changed as many as I
could get away with to &-ptrs or &mut ptrs.
2013-06-16 09:20:40 +12:00
Kevin Ballard
9c4f9bb71b Fix terminfo::param %i op 2013-06-15 14:20:34 -07:00
James Miller
01e098aa05 Make CrateContext::new() fn.
Move construction of a CrateContext into a static method on
CrateContext.
2013-06-16 09:17:50 +12:00
James Miller
b1f39ce403 Move CrateContext into it's own file 2013-06-16 09:17:50 +12:00
James Miller
98b1c9e207 Move trans mod items into trans/mod.rs 2013-06-16 09:17:50 +12:00
bors
998e41a11a auto merge of #7154 : dotdash/rust/glue, r=graydon
Currently, when calling glue functions, we cast the function to match
the argument type. This interacts very badly with LLVM and breaks
inlining of the glue code.

It's more efficient to use a unified function type for the glue
functions and always cast the function argument instead of the function.

The resulting code for rustc is about 13% faster (measured up to and
including the "trans" pass) and the resulting librustc is about 5%
smaller.
2013-06-15 12:58:06 -07:00
Steven Stewart-Gallus
f22580dd29 Fix up mingw32 case 2013-06-15 11:26:02 -07:00
Philipp Brüschweiler
4ee99a1c0c trans::glue: don't generate struct destructors in the free glue
The free glue shouldn't be called for structs, and the drop glue already
contains the destructor.
2013-06-15 20:13:23 +02:00
gareth
d22f417c74 Add IterBytes impls for float/f32/f64. This allows creating
HashMaps with floats as keys.
2013-06-15 17:58:38 +01:00
Björn Steinbrink
a08d768cd8 Fix inlining of glue code
Currently, when calling glue functions, we cast the function to match
the argument type. This interacts very badly with LLVM and breaks
inlining of the glue code.

It's more efficient to use a unified function type for the glue
functions and always cast the function argument instead of the function.

The resulting code for rustc is about 13% faster (measured up to and
including the "trans" pass) and the resulting librustc is about 5%
smaller.
2013-06-15 18:29:19 +02:00
Philipp Brüschweiler
3f69e20043 trans::glue: don't allocate a pointer variable if it already exists
Removes one alloca and store from the drop glue of @ boxes. This speeds
up the rustc build by 1s (might be noise, though).
2013-06-15 18:21:47 +02:00
bors
eac0200f18 auto merge of #7148 : catamorphism/rust/rustpkg_tests, r=graydon
r? @graydon Automate more tests described in the commands.txt file,
and add infrastructure for running them. Right now, tests shell
out to call rustpkg. This is not ideal.

Goes part of the way towards addressing #5683
2013-06-15 08:12:57 -07:00
bors
82f2e4dc9f auto merge of #7147 : huonw/rust/vec-connect, r=Aatch
This is caused by StrVector having a generic implementation for &[S]
and so #5898 means that method resolution of ~[~[1]].concat() sees that
both StrVector and VectorVector have methods that (superficially) match.

They are now connect_vec and concat_vec, which means that they can actually be
called.
2013-06-15 06:54:59 -07:00
bors
ac6f15417d auto merge of #7130 : huonw/rust/rustdoc-highlight, r=thestinger
This means that type definitions and function signatures have
pretty colours.
2013-06-15 05:49:02 -07:00
bors
6df66c194d auto merge of #7109 : bblum/rust/rwlocks, r=brson
r? @brson

links to issues: #7065 the race that's fixed; #7066 the perf improvement I added. There are also some minor cleanup commits here.

To measure the performance improvement from replacing the exclusive with an atomic uint, I edited the ```msgsend-ring-rw-arcs``` bench test to do a ```write_downgrade``` instead of just a ```write```, so that it stressed the code paths that accessed ```read_count```. (At first I was still using ```write``` and saw no performance difference whatsoever, whoooops.)

The bench test measures how long it takes to send 1,000,000 messages by using rwarcs to emulate pipes. I also measured the performance difference imposed by the fix to the ```access_lock``` race (which involves taking an extra semaphore in the ```cond.wait()``` path). The net result is that fixing the race imposes a 4% to 5% slowdown, but doing the atomic uint optimization gives a 6% to 8% speedup.

Note that this speedup will be most visible in read- or downgrade-heavy workloads. If an RWARC's only users are writers, the optimization doesn't matter. All the same, I think this more than justifies the extra complexity I mentioned in #7066.

The raw numbers are:
```
with xadd read count
        before write_cond fix
                4.18 to 4.26 us/message
        with write_cond fix
                4.35 to 4.39 us/message
                
with exclusive read count
        before write_cond fix
                4.41 to 4.47 us/message
        with write_cond fix
                4.65 to 4.76 us/message
```
2013-06-15 04:07:03 -07:00
bors
da42e6b7a0 auto merge of #7133 : kballard/rust/terminfo-parm, r=thestinger
Implement conditional support in terminfo, along with a few other related operators.

Fix implementation of non-commutative arithmetic operators.

Remove all known cases of task failure from `terminfo::parm::expand`, and change the method signature.

Fix some other miscellaneous issues.
2013-06-15 03:07:05 -07:00
Philipp Brueschweiler
c7013ba1fc std::dynamic_lib: start fixing windows implementation
The code compiles and runs under windows now, but I couldn't look up any
symbol from the current executable (dlopen(NULL)), and calling looked
up external function handles doesn't seem to work correctly under windows.
2013-06-15 10:10:49 +02:00
bors
83d44f87e5 auto merge of #7125 : alexcrichton/rust/rusti-issues, r=brson
This un-reverts the reverts of the rusti commits made awhile back. These were reverted for an LLVM failure in rustpkg. I believe that this is not a problem with these commits, but rather that rustc is being used in parallel for rustpkg tests (in-process). This is not working yet (almost! see #7011), so I serialized all the tests to run one after another.

@brson, I'm mainly just guessing as to the cause of the LLVM failures in rustpkg tests. I'm confident that running tests in parallel is more likely to be the problem than those commits I made.

Additionally, this fixes two recently reported issues with rusti.
2013-06-15 01:04:05 -07:00
Steven Stewart-Gallus
5de67f9cc9 Cleaned up driver.rs 2013-06-15 00:43:19 -07:00
bors
7d1065e913 auto merge of #7122 : thestinger/rust/std, r=luqmana 2013-06-14 23:37:08 -07:00
Tim Chevalier
e3c4104d74 rustpkg: Write more automated tests
Automate more tests described in the commands.txt file,
and add infrastructure for running them. Right now, tests shell
out to call rustpkg. This is not ideal.
2013-06-14 22:46:01 -07:00
Tim Chevalier
1adbb4520b rustc: Don't continue to resolve if there's an error in lang_items
This confused me when it happened.
2013-06-14 22:45:43 -07:00
bors
c83bceddbb auto merge of #7121 : huonw/rust/rand-call, r=pnkfelix
r? @pnkfelix
2013-06-14 22:37:13 -07:00
bors
1ba6fa4777 auto merge of #7110 : thestinger/rust/iterator, r=brson 2013-06-14 21:37:27 -07:00
Huon Wilson
18542568a8 std: rename .connect/.concat in VectorVector to avoid conflicting with StrVector.
This is caused by StrVector having a generic implementation for &[S]
and so #5898 means that method resolution of ~[~[1]].concat() sees that
both StrVector and VectorVector have methods that (superficially) match.

They are now connect_vec and concat_vec, which means that they can actually be
called.
2013-06-15 14:15:56 +10:00
bors
1104e659d5 auto merge of #7144 : dotdash/rust/caches, r=graydon
The lookups for these items in external crates currently cause repeated
decoding of the EBML metadata, which is pretty slow. Adding caches to
avoid the repeated decoding reduces the time required for the type
checking of librustc by about 25%.
2013-06-14 20:28:09 -07:00
Daniel Micay
824a6277af rm CopyableNonstrictIter
copies can just be done explicitly: `xs.transform(|x|x.clone())`
2013-06-14 23:15:42 -04:00
Daniel Micay
d68be89e69 rm MutableIter
replaced with mutable implementations of Iterator
2013-06-14 23:15:42 -04:00
Daniel Micay
8111701604 rm ExtendedMutableIter
replaced with `xs.mut_iter().enumerate()`
2013-06-14 23:15:42 -04:00
Daniel Micay
585f5f7f79 add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
Björn Steinbrink
a710e61903 Add caches for method and impl metadata
The lookups for these items in external crates currently cause repeated
decoding of the EBML metadata, which is pretty slow. Adding caches to
avoid the repeated decoding reduces the time required for the type
checking of librustc by about 25%.
2013-06-15 04:28:19 +02:00
bors
104e6120b1 auto merge of #7116 : thestinger/rust/whitespace, r=luqmana 2013-06-14 19:25:05 -07:00
Alex Crichton
893c70d7bc Add Zero impls for lots of common types 2013-06-14 19:12:37 -07:00
Alex Crichton
07f5ab1009 Implement a deriving(Zero) attribute 2013-06-14 19:12:37 -07:00
Erick Tryzelaar
ac83f4b732 std: add a fixme to note performance issues in vec::from_elem. 2013-06-14 16:58:55 -07:00
Brian Anderson
38e05747b5 xfail run-pass/auto-encode.rs 2013-06-14 16:50:53 -07:00
Kevin Ballard
da4e614742 Fix line lengths in terminfo 2013-06-14 13:03:42 -07:00
Kevin Ballard
f31767df66 Implement terminfo param conditionals
Implement the %?, %t, %e, and %; operators. Also implement the %<, %=,
%> operators, without which conditionals aren't very useful.

Fix the order of parameters for the arithmetic operators.

Implement the missing %^ operator.
2013-06-14 12:37:54 -07:00
Kevin Ballard
6423548818 Fix a bunch of failure cases in terminfo
Replace all potentially-failing operations with Err returns and add
tests.

Remove the Char parameter type; characters are represented as Numbers.

Fix integer constants to work properly when there are multiple constants
in the same capability string.

Tweak loop to use iterators instead of indexing into cap.
2013-06-14 12:37:54 -07:00
Kevin Ballard
e990239a3a Don't require &mut [Param] with terminfo::parm::expand() 2013-06-14 12:37:53 -07:00
Kevin Ballard
c9e234a1ae Tweak terminfo::parm::expand function signature
Take a new struct Variables instead of two &mut [] vectors for static
and dynamic variables.
2013-06-14 12:37:53 -07:00
Kevin Ballard
9f9e505405 Tweak new terminfo logical operator support 2013-06-14 12:37:53 -07:00
Corey Richardson
821a962feb Various terminfo parameterization changes 2013-06-14 12:37:53 -07:00
Huon Wilson
d361802540 rustdoc: add syntax highlighting to item signatures.
This means that type definitions and function signatures have
pretty colours.

It uses the following template:

~~~ {.rust}
<code>
~~~
2013-06-15 02:19:19 +10:00
Erick Tryzelaar
f7e1daa8e3 std: get std::path tests to work again 2013-06-14 07:13:32 -07:00
Felix S. Klock II
876f6deb4a fixed code to placate new restrictions on form of function/method invocations. 2013-06-14 09:36:03 +02:00
Alex Crichton
9c3b1cbc19 Resolve LLVM crashing in rustpkg tests 2013-06-13 22:53:30 -07:00
Alex Crichton
dc18321ef5 Don't run passes again on JIT code
These passes are already run beforehand, no need to do them twice.
2013-06-13 22:53:10 -07:00
Alex Crichton
079ffa362f Correctly parse commands for rusti
Closes #7120
2013-06-13 21:48:16 -07:00
Alex Crichton
a90fffe367 Revert "Revert "Have JIT execution take ownership of the LLVMContextRef""
This reverts commit 19adece68b.
2013-06-13 21:25:18 -07:00
Alex Crichton
1a3edecbf2 Revert "Revert "Remove all usage of the global LLVMContextRef""
This reverts commit 541c657a73.
2013-06-13 21:25:12 -07:00
Brian Anderson
7755018074 Revert "std: convert {vec,str}::to_owned to methods."
This fixes the strange random crashes in compile-fail tests.

This reverts commit 96cd61ad03.

Conflicts:
	src/librustc/driver/driver.rs
	src/libstd/str.rs
	src/libsyntax/ext/quote.rs
2013-06-13 19:06:47 -07:00
Daniel Micay
2b13606d9f update the libstd docstring for the rename 2013-06-13 21:41:11 -04:00
Huon Wilson
8431e609ea xfail test on windows, because extern mod doesn't work there 2013-06-14 11:12:06 +10:00
Huon Wilson
e6c3e4a000 syntax: revert the uint -> u32 "fix"; make the names/comment match. 2013-06-14 11:12:06 +10:00
Huon Wilson
f93a974558 syntax: correct the Rand::rand call to select enum variants in #[deriving(Rand)].
Previously, this was not a global call, and so when `#[deriving(Rand)]`
was in any module other than the top-level one, it failed (unless there
was a `use std;` in scope).

Also, fix a minor inconsistency between uints and u32s for this piece
of code.
2013-06-14 11:12:06 +10:00
Daniel Micay
ec27644870 automated whitespace fixes 2013-06-13 18:03:08 -04:00
Felix S. Klock II
b03a0b27aa make pp file conform to actual output, noting some oddities along the way. 2013-06-13 23:40:24 +02:00
Felix S. Klock II
0f4d5c2134 checkpoint block-comment-wchar state. 2013-06-13 23:40:24 +02:00
Felix S. Klock II
1deebeef7d Fix #3961 : use char range methods instead of byte offsets to detect whitespace. 2013-06-13 23:40:24 +02:00
Brian Anderson
541c657a73 Revert "Remove all usage of the global LLVMContextRef"
This reverts commit 779191cd4b.

Conflicts:
	src/librustc/middle/trans/base.rs
	src/librustc/middle/trans/common.rs
2013-06-13 13:08:57 -07:00
Brian Anderson
19adece68b Revert "Have JIT execution take ownership of the LLVMContextRef"
This reverts commit 5c5095d25e.

Conflicts:
	src/librusti/rusti.rc
2013-06-13 13:08:57 -07:00
Ben Blum
2ef8774ac5 Improve comments in sync and arc a bit more. 2013-06-13 15:20:38 -04:00
bors
5bff471dde auto merge of #7105 : sstewartgallus/rust/removed_unused_imports, r=sanxiyn
I was able to remove unused imports, and fix the following warnings

src/libstd/hashmap.rs:23:15: 23:23 warning: unused import [-W unused-imports (default)]
src/libstd/task/spawn.rs:95:15: 95:23 warning: unused import [-W unused-imports (default)]
src/libstd/rt/uv/mod.rs:42:0: 42:9 warning: unused import [-W unused-imports (default)]
src/libstd/rt/uv/mod.rs:45:0: 45:9 warning: unused import [-W unused-imports (default)]
src/librustc/middle/trans/meth.rs:26:0: 26:26 warning: unused import [-W unused-imports (default)]
src/librustc/back/link.rs:210:20: 210:25 warning: unused import [-W unused-imports (default)]

I was unable to fix the following unused import warnings. The code
here was weird.

src/libextra/std.rc:40:11: 40:14 warning: unused import [-W unused-imports (default)]
src/libextra/std.rc:40:16: 40:24 warning: unused import [-W unused-imports (default)]
2013-06-13 12:08:05 -07:00
Ben Blum
57cb44dbeb Change sync::RWlock implementation to use atomic uint instead of exclusive, for performance. Close #7066. 2013-06-13 14:45:14 -04:00
Ben Blum
68e8fe9b6e Add a test case for #7065. 2013-06-13 14:41:22 -04:00
Ben Blum
bd019c4c26 Thread order_lock through rwlock condvars for reacquiring access_lock. Fixes #7065. 2013-06-13 14:41:20 -04:00
Steven Stewart-Gallus
d9d50a5bd4 Remove unused imports
I was able to remove unused imports, and fix the following warnings

src/libstd/hashmap.rs:23:15: 23:23 warning: unused import [-W unused-imports (default)]
src/libstd/task/spawn.rs:95:15: 95:23 warning: unused import [-W unused-imports (default)]
src/libstd/rt/uv/mod.rs:42:0: 42:9 warning: unused import [-W unused-imports (default)]
src/libstd/rt/uv/mod.rs:45:0: 45:9 warning: unused import [-W unused-imports (default)]
src/librustc/middle/trans/meth.rs:26:0: 26:26 warning: unused import [-W unused-imports (default)]
src/librustc/back/link.rs:210:20: 210:25 warning: unused import [-W unused-imports (default)]

I was unable to fix the following unused import warnings. The code
here was weird.

src/libextra/std.rc:40:11: 40:14 warning: unused import [-W unused-imports (default)]
src/libextra/std.rc:40:16: 40:24 warning: unused import [-W unused-imports (default)]
2013-06-13 10:46:17 -07:00
bors
a198aad8f3 auto merge of #7100 : thestinger/rust/hashmap, r=pnkfelix
Not much point in leaving these around. They just get in the way when you actually want to log something else.
2013-06-13 03:25:11 -07:00
Daniel Micay
ed7892ac00 hashmap: remove leftover debug!() logging 2013-06-13 03:25:28 -04:00
bors
e6503995ab auto merge of #7096 : huonw/rust/invalid-null-str, r=thestinger
A slice of a 'static str is still 'static, but doesn't necessarily
have the null terminator.
2013-06-12 23:10:15 -07:00
bors
4ec08d8e12 auto merge of #7070 : alexcrichton/rust/rusti++, r=graydon
More descriptive comments can be found throughout the code, but the bulk of this is that it addresses a vast number of issues with the old rusti model.

Closes #6772, #5675, #5469, and #6617
2013-06-12 21:22:11 -07:00
Huon Wilson
abadece3ba std: remove the invalid NullTerminatedStr instance for &'static str.
A slice of a 'static str is still 'static, but doesn't necessarily
have the null terminator.
2013-06-13 14:12:08 +10:00
Alex Crichton
0c47632898 Rewrite rusti 2013-06-12 21:03:17 -07:00
bors
996301331e auto merge of #7079 : thestinger/rust/jemalloc, r=graydon
Minor release, the ChangeLog is included in the update.
2013-06-12 20:25:17 -07:00
bors
6c45160f19 auto merge of #7027 : sstewartgallus/rust/dynamic_lib, r=graydon
I would appreciate if someone could help out with the Windows code on this pull request. I tried to test it using WINE but I couldn't figure out a way to set that up.
2013-06-12 19:07:30 -07:00
Ben Blum
0ca2056e46 Document unstable::atomics fetch_* return values 2013-06-12 20:53:40 -04:00
Ben Blum
d809f54a7c remove bitrotted cant_nest field from RWARC (the #[mutable] tag suffices) 2013-06-12 20:53:40 -04:00
Ben Blum
6b22c090a5 make util::NonCopyable a unit struct instead of a struct with a unit 2013-06-12 20:53:40 -04:00
Huon Wilson
5ebffd46d5 rustc: fix test failures after rebase. 2013-06-13 10:47:33 +10:00
Steven Stewart-Gallus
786ea3ffe6 Prototyped a dynamic library facility interface 2013-06-12 17:32:13 -07:00
Huon Wilson
a30ee0dee1 rustdoc: fix tests for @~str -> @str change. 2013-06-13 10:20:52 +10:00