Commit Graph

30930 Commits

Author SHA1 Message Date
bors
e0d3cf6b2a auto merge of #15418 : pnkfelix/rust/fsk-revise-VecPerParamSpace, r=pcwalton
In my informal measurements, this brings the peak memory usage when
building librustc from 1662M down to 1502M.  Since 1662 - 1502 = 160,
this may not recover the entirety of the observed memory regression
(250M) from PR #14604.  (However, according to my local measurements,
the regression when building librustc was more like 209M, so perhaps
this will still recover the lions share of the lost memory.)
2014-07-05 08:31:48 +00:00
bors
b00f4ec8f1 auto merge of #15414 : zsiciarz/rust/patch-1, r=alexcrichton 2014-07-05 06:46:47 +00:00
bors
d611800a70 auto merge of #15284 : apoelstra/rust/bitv-methods, r=cmr
The types `Bitv` and `BitvSet` are badly out of date. This PR:
- cleans up the code (primarily, simplifies `Bitv` and implements `BitvSet` in terms of `Bitv`)
- implements several new traits for `Bitv`
- adds new functionality to `Bitv` and `BitvSet`
- replaces internal iterators with external ones
- updates documentation
- minor bug fixes

This is a significantly souped-up version of PR #15139 and is the result of the discussion there.
2014-07-05 05:01:49 +00:00
Felix S. Klock II
4459fe3e5e Revise VecPerParamSpace to use a one Vec rather than three.
In my informal measurements, this brings the peak memory usage when
building librustc from 1662M down to 1502M.  Since 1662 - 1502 = 160,
this may not recover the entirety of the observed memory regression
(250M) from PR #14604.  (However, according to my local measurements,
the regression when building librustc was more like 209M, so perhaps
this will still recover the lions share of the lost memory.)
2014-07-05 06:29:27 +02:00
Felix S. Klock II
952dded81a Refactored VecPerParamSpace to hide exposure of Vec representation.
This basically meant changing the interface so that no borrowed `&Vec`
is exposed, by hiding `fn get_vec` and `fn get_mut_vec` and revising
`fn all_vecs`.

Instead, clients should use one of the other methods; `get_slice`,
`pop`, `truncate`, `replace`, `push_all`, or `is_empty_in`, which
should work for any case currently used in rustc.
2014-07-05 06:29:06 +02:00
Patrick Yevsukov
4ad78680de Update RELEASES.txt
Fix Typos
2014-07-05 00:22:59 -04:00
bors
29d6a8ecc6 auto merge of #15425 : jbclements/rust/hygiene-for-3-kinds-of-args, r=cmr
This pull request adds hygiene for 3 kinds of argument bindings:
- arguments to item fns,
- arguments to `ExprFnBlock`s, and
- arguments to `ExprProc`s

It also adds a bunch of unit tests, fixes a few macro uses to be non-capturing, and has a few cleanup items.

local `make check` succeeds.
2014-07-05 03:16:50 +00:00
bors
9f2a43c1b5 auto merge of #15419 : erickt/rust/json, r=pcwalton
This speeds up json serialization by removing most of the allocations.
2014-07-05 01:31:52 +00:00
Luqman Aden
1af8663579 librustc: Make sure to run destructors in the right order when matching on moved value. 2014-07-04 18:05:09 -07:00
P1start
7926aeeca4 move lifetime suggestion note to after the error
Closes #15433.
2014-07-05 12:54:26 +12:00
Patrick Walton
aaaf7e00ec librustc: Accept type aliases for structures in structure literals and
structure patterns.

Closes #4508.
2014-07-04 17:07:31 -07:00
Erick Tryzelaar
67c8a8d5dd serialize: speed up json pretty printing by batch writing spaces 2014-07-04 16:56:23 -07:00
Björn Steinbrink
f463a19cbc Remove entry_bcx from FunctionContext
We no longer need to refer to the entry block from arbitrary places, so
we can drop it from FunctionContext.
2014-07-05 01:52:12 +02:00
bors
459f155f81 auto merge of #15415 : dgoon/rust/master, r=alexcrichton 2014-07-04 23:46:44 +00:00
Erick Tryzelaar
717de500ee serialize: escaping json strings should write in batches.
This significantly speeds up encoding json strings.
2014-07-04 16:36:49 -07:00
Luqman Aden
f48cc74001 Add tests for null pointer opt. 2014-07-04 16:06:21 -07:00
Luqman Aden
31570cb22e librustc: Don't create &[T] slices with NULL as the ptr. 2014-07-04 14:36:56 -07:00
Mike Boutin
f37e202b53 rustc: Reorder error and note message to reduce confusion.
Moved note after error to reduce confusion when the pair appears in the
middle of other errors. Closes #13279.
2014-07-04 17:28:04 -04:00
Kevin Ballard
4c1fdd065b vim: set Rust tab conventions 2014-07-04 14:09:47 -07:00
Phil Dawes
9deeaefdbb Parser: fix PatIdent span bug
Fix small bug introduced in e38cb972dc: PatIdent span was incorrect
because self.last_span was being used before the ident token was
parsed.
2014-07-04 21:54:42 +01:00
bors
9897160523 auto merge of #15412 : dotdash/rust/builder, r=alexcrichton 2014-07-04 20:46:38 +00:00
Adolfo Ochagavía
45e52a13e8 Removed unnecessary method in test 2014-07-04 22:39:50 +02:00
John Clements
cc13f9bae8 implement hygiene for ExprFnBlock and ExprProc 2014-07-04 13:20:14 -07:00
John Clements
ff9995e089 added test cases for closure arg hygiene 2014-07-04 13:20:14 -07:00
John Clements
63fb7c6f40 comments only 2014-07-04 13:20:14 -07:00
John Clements
3e99309bfc make any_pat! and u64_from_be_bytes_bench_impl! macros hygienic 2014-07-04 13:20:14 -07:00
John Clements
0ba15c99f3 hygiene for item fn args
also, introduce fn_decl_arg_bindings and expand_and_rename abstractions
2014-07-04 13:20:14 -07:00
John Clements
92708322fd comments & test cases for IdentRenamers 2014-07-04 13:20:14 -07:00
John Clements
6bee3c87c9 use PatIdentRenamer for match bindings 2014-07-04 13:20:13 -07:00
John Clements
35175f015f comments only 2014-07-04 13:20:13 -07:00
John Clements
aa91ef0cf8 new_mark -> apply_mark, new_rename -> apply_rename 2014-07-04 13:20:06 -07:00
Guillaume Pinot
00fb0df675 Relicense shootout-threadring.rs
Everyone agreed.

Related to #14248, close #15328
2014-07-04 21:39:15 +02:00
John Clements
b8cd7f7c6d add PatIdentRenamer 2014-07-04 12:08:04 -07:00
John Clements
9fdaa948c0 move RenameList to mtwt, add new_renames abstraction 2014-07-04 12:07:51 -07:00
John Clements
f126eacd11 comments, whitespace, rename NameFinderContext to PatIdentFinder 2014-07-04 12:05:43 -07:00
bors
935da0739e auto merge of #15405 : pcwalton/rust/delifetime, r=nick29581
This was parsed by the parser but completely ignored; not even stored in
the AST!

This breaks code that looks like:

    static X: &'static [u8] = &'static [1, 2, 3];

Change this code to the shorter:

    static X: &'static [u8] = &[1, 2, 3];

Closes #15312.

[breaking-change]

r? @nick29581
2014-07-04 19:01:33 +00:00
Anton Lofgren
e737440bc6 doc/guide-ffi: A few minor typo/language fixes
Signed-off-by: Anton Lofgren <alofgren@op5.com>
2014-07-04 20:09:28 +02:00
Erick Tryzelaar
83f9f07ec4 serialize: Remove allocations from escaping strs and indenting spaces 2014-07-04 11:08:38 -07:00
bors
25e8b6ed9c auto merge of #15404 : vhbit/rust/ios-ptr-fixes, r=pcwalton 2014-07-04 17:16:29 +00:00
bors
c9e2ca0dfa auto merge of #15051 : retep998/rust/master, r=alexcrichton
This implementation does have the minor issue of not handling things correctly when a codepoint is split across multiple writes or reads, but its better than not having unicode support at all.

Adds a Windows specific struct `WindowsTTY` in `libnative` and make `tty_open` create that struct on Windows. Adds needed functions and constants to `c_win32.rs`.

Libuv still needs to be updated before #15028 can be closed.
2014-07-04 15:31:27 +00:00
Peter Atashian
a34fd5a1bb windows: Unicode console support.
Adds a WindowsTTY for libnative that converts between UTF-8 and UTF-16.

Signed-off-by: Peter Atashian <retep998@gmail.com>
2014-07-04 10:45:28 -04:00
dgoon
4c9cca41a8 add a missing closing parens 2014-07-04 23:43:16 +09:00
bors
04ac2b087e auto merge of #15403 : vhbit/rust/ios-llvm-fixme, r=pcwalton
It was required to get iOS compilable but since
that time a couple of changes were introduced
which cause the same bug to re-appear and broke 
build anyway. Fixing all of them doesn’t look a 
viable alternative to me as it will pollute the 
code too much.

So it should be fixed from LLVM side and I hope 
LLVM will upstream corresponding changes in a 
month.

Meanwhile, who wants to play with Rust on iOS is 
better to use a fork which uses patched LLVM:
https://github.com/vhbit/rust/tree/ios . It may 
lag behind master a bit, but it is Travis-checked 
to compile successfully.
2014-07-04 13:46:25 +00:00
Zbigniew Siciarz
a4b1361a01 Fixed Result type parameters in doc comment. 2014-07-04 15:23:17 +02:00
Björn Steinbrink
db44468de0 trans::foreign: Simplify some code by using our builder impl 2014-07-04 14:50:36 +02:00
bors
c0b76abf91 auto merge of #15388 : jakub-/rust/issue-12285, r=pcwalton
Unit-like struct patterns are irrefutable, no need for a branch.

And some cleanup while I'm at it.
2014-07-04 12:01:22 +00:00
bors
36d7d746c8 auto merge of #15387 : huonw/rust/toc-space, r=alexcrichton
A margin for the top level list was leaking into nested ones.

before; after:

![screenshot from 2014-07-04 08 18 32](https://cloud.githubusercontent.com/assets/1203825/3476459/0b7f8ea8-0300-11e4-8b67-0c47b7931d56.png)
2014-07-04 10:16:21 +00:00
Samuel Neves
7b7d23cc3d Change Shl<T, T> for Int to Shl<uint, T> 2014-07-04 09:57:04 +01:00
Luqman Aden
e646188f66 librustc: Remove match arm since we don't allow enum to float casts. 2014-07-04 01:33:45 -07:00
Luqman Aden
7cce75f839 librustc: Apply null pointer optimization to slices, closures and trait
objects.
2014-07-04 01:33:33 -07:00