Commit Graph

19188 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
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
bors
98bd68343c auto merge of #7184 : smvv/rust/doc_css, r=brson
After reading issue #7077, all header elements had a border. In my opinion those borders are a bit too much distraction. I tried a different approach with increasing the padding and font size, and omitting the borders.

Comparison:
http://smvv.io/rust-doc/std/hashmap.html
http://static.rust-lang.org/doc/std/hashmap.html

Note: the highlighted code blocks are not caused by this commit.

I left the border of the code block / function signature as is. The reason behind that is that code blocks are really block elements, while headers are not. What do you guys think?
2013-06-16 20:16:01 -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
a4cc34fa12 auto merge of #7165 : brson/rust/releasenotes, r=thestinger 2013-06-16 15:21:55 -07:00
Brian Anderson
a6bc5dd6ef More 0.7 release notes 2013-06-16 15:19:51 -07:00
Brian Anderson
319cf6e465 Merge remote-tracking branch 'brson/io'
Conflicts:
	src/libstd/rt/comm.rs
	src/libstd/rt/mod.rs
	src/libstd/rt/sched.rs
	src/libstd/rt/task.rs
	src/libstd/rt/test.rs
	src/libstd/rt/tube.rs
	src/libstd/rt/uv/uvio.rs
	src/libstd/rt/uvio.rs
	src/libstd/task/spawn.rs
2013-06-16 15:09:25 -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
bada191309 Correct docs 2013-06-16 12:48:08 -04:00
Niko Matsakis
5fdb0cbb8c Correct tutorial tests 2013-06-16 12:47:36 -04: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
682bb4144c correct ASM_COMMENTS Makefile option 2013-06-16 12:46:51 -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
Sander Mathijs van Veen
64ccc60eee Remove h[123] border and increase their padding to better readability 2013-06-16 17:40:45 +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