Commit Graph

453 Commits

Author SHA1 Message Date
Daniel Micay
197fe67e11 register snapshots 2014-01-15 08:22:56 -05:00
bors
9075025c7b auto merge of #11485 : eddyb/rust/sweep-old-rust, r=nikomatsakis 2014-01-14 12:32:11 -08:00
Patrick Walton
119c6141f5 librustc: Remove @ pointer patterns from the language 2014-01-13 14:45:21 -08:00
Eduard Burtescu
509fc92a9b Removed remnants of @mut and ~mut from comments and the type system. 2014-01-12 02:26:04 +02:00
bors
ff3d5d4603 auto merge of #11055 : pcwalton/rust/placement-box, r=pcwalton
r? @nikomatsakis
2014-01-09 16:11:18 -08:00
Patrick Walton
e12711540a librustc: Implement placement box for GC and unique pointers. 2014-01-09 16:05:34 -08:00
Eduard Burtescu
6b221768cf libsyntax: Renamed types, traits and enum variants to CamelCase. 2014-01-09 22:25:28 +02:00
Brian Anderson
d323632669 'borrowed pointer' -> 'reference' 2014-01-07 18:49:13 -08:00
Patrick Walton
82a09b9a04 librustc: Remove @mut support from the parser 2014-01-03 14:02:01 -08:00
Patrick Walton
b476d979d2 libsyntax: De-@mut SCTable::rename_memo 2014-01-03 14:01:59 -08:00
Patrick Walton
4d6dde7f49 libsyntax: De-@mut SCTable::mark_memo 2014-01-03 14:01:59 -08:00
Patrick Walton
be17a1b08c libsyntax: De-@mut SCTable::table 2014-01-03 14:01:59 -08:00
Florian Hahn
f42a36cded Remove extern mod foo (name="bar") syntax, closes #9543 2014-01-01 23:36:57 +01:00
Seo Sanghyeon
4a13364010 Remove obsolete mutability from ast::Ty 2013-12-17 03:01:40 +09:00
Kiet Tran
1f80ec4fec Fix comment on ast::DefStruct 2013-12-08 21:21:15 -05:00
bors
df41115213 auto merge of #10750 : Blei/rust/no-at-struct-field, r=alexcrichton 2013-12-01 05:42:06 -08:00
Philipp Brüschweiler
47ce981903 ast: Remove one @ and fix the fallout 2013-12-01 11:24:58 +01:00
Eduard Burtescu
a9c4b18b18 Box Block, fn_decl, variant and Ty in the AST, as they were inflating critical enum sizes. 2013-12-01 00:00:39 +02:00
Alex Crichton
ab387a6838 Register new snapshots 2013-11-28 20:27:56 -08:00
Eduard Burtescu
f09b7b0ecd Freeze the AST by removing a couple of unused @mut ~[T] from token_tree. 2013-11-27 17:48:58 +02:00
Eduard Burtescu
7ed27b5531 Shink NodeId, CrateNum, Name and Mrk down to 32 bits on x64. 2013-11-27 07:02:25 +02:00
Kiet Tran
9a4c8da501 Add comments to ast, ast_map, ty, and pat_util 2013-11-24 18:38:41 -05:00
Seo Sanghyeon
8470639319 Remove ty_mac 2013-11-21 22:59:56 +09:00
Brian Anderson
85f107d8cb Use '..' as slice wildcard in vectors 2013-11-18 16:19:48 -08:00
Niko Matsakis
f36a891fe2 Address comments from @pnkfelix (thanks for the detailed review) 2013-11-08 19:47:57 -05:00
Niko Matsakis
195f1d77bd Rename and modernize region enum names 2013-11-08 19:47:57 -05:00
Niko Matsakis
1f4faaee40 Generalize AST and ty::Generics to accept multiple lifetimes. 2013-11-08 19:42:46 -05:00
Niko Matsakis
8e1de17757 Create a new pass to resolve named lifetimes; rscope is not only
used to indicate when anonymous regions (i.e., &T) are permitted
2013-11-08 16:52:36 -05:00
bors
92065ceb63 auto merge of #10285 : sfackler/rust/weird-derivings, r=huonw
They seem to have been added by accident.
2013-11-05 01:47:43 -08:00
Steven Fackler
6184e844fb Remove #[deriving]s on impls
They seem to have been added by accident.
2013-11-04 22:46:51 -08:00
Luqman Aden
c669ccf3d3 libsyntax/librustc: Allow calling variadic foreign functions. 2013-11-04 23:53:11 -05:00
Patrick Walton
7e77bf1769 librustc: Implement the proc type as sugar for ~once fn and proc
notation for closures, and disable the feature gate for `once fn` if
used with the `~` sigil.
2013-10-29 10:34:17 -07:00
Joshua Yanovski
01ab8542fb Field identifiers now include specific spans (Closes #8263). 2013-10-28 22:57:34 -07:00
Luqman Aden
12308db3d2 libsyntax/librustc: Allow mut qualifier in patterns. 2013-10-25 01:21:07 -04:00
Luqman Aden
af163579ed libsyntax/librustc: Allow specifying mut on ~self. 2013-10-22 21:22:19 -04:00
Luqman Aden
5754848f8c libsyntax/librustc: Allow specifying mut on by-value self. 2013-10-22 21:21:21 -04:00
Alex Crichton
daf5f5a4d1 Drop the '2' suffix from logging macros
Who doesn't like a massive renaming?
2013-10-22 08:09:56 -07:00
Alex Crichton
273784e9bf Optimize include_bin! for large inputs
Previously an ExprLit was created *per byte* causing a huge increase in memory
bloat. This adds a new `lit_binary` to contain a literal of binary data, which
is currently only used by the include_bin! syntax extension. This massively
speeds up compilation times of the shootout-k-nucleotide-pipes test

    before:
        time: 469s
        memory: 6GB
        assertion failure in LLVM (section too large)

    after:
        time: 2.50s
        memory: 124MB

Closes #2598
2013-10-18 09:20:08 -07:00
Alex Crichton
b70306158f Remove named extern blocks from the AST
There's currently a fair amount of code which is being ignored on unnamed blocks
(which are the default now), and I opted to leave it commented out for now. I
intend on very soon revisiting on how we perform linking with extern crates in
an effort to support static linking.
2013-10-10 18:04:58 -07:00
Benjamin Herr
9d7b130041 add new enum ast::StrStyle as field to ast::lit_str
For the benefit of the pretty printer we want to keep track of how
string literals in the ast were originally represented in the source
code.

This commit changes parser functions so they don't extract strings from
the token stream without at least also returning what style of string
literal it was. This is stored in the resulting ast node for string
literals, obviously, for the package id in `extern mod = r"package id"`
view items, for the inline asm in `asm!()` invocations.

For `asm!()`'s other arguments or for `extern "Rust" fn()` items, I just
the style of string, because it seemed disproportionally cumbersome to
thread that information through the string processing that happens with
those string literals, given the limited advantage raw string literals
would provide in these positions.

The other syntax extensions don't seem to store passed string literals
in the ast, so they also discard the style of strings they parse.
2013-10-08 03:43:28 +02:00
Benjamin Herr
fa411500f9 Remove specific errors for very old obsolete syntax
Replaces existing tests for removed obsolete-syntax errors with tests
for the resulting regular errors, adds a test for each of the removed
parser errors to make sure that obsolete forms don't start working
again, removes some obsolete/superfluous tests that were now failing.

Deletes some amount of dead code in the parser, also includes some small
changes to parser error messages to accomodate new tests.
2013-10-04 07:09:28 +02:00
Daniel Micay
c9d4ad07c4 remove the float type
It is simply defined as `f64` across every platform right now.

A use case hasn't been presented for a `float` type defined as the
highest precision floating point type implemented in hardware on the
platform. Performance-wise, using the smallest precision correct for the
use case greatly saves on cache space and allows for fitting more
numbers into SSE/AVX registers.

If there was a use case, this could be implemented as simply a type
alias or a struct thanks to `#[cfg(...)]`.

Closes #6592

The mailing list thread, for reference:

https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-10-01 14:54:10 -04:00
Alex Crichton
af3b132285 syntax: Remove usage of fmt! 2013-09-30 23:21:19 -07:00
John Clements
b9a8b3700b more helpful error message for ident comparison failure 2013-09-11 22:18:45 -07:00
SiegeLord
8c5402fd36 Properly encode/decode structural variants. 2013-09-11 14:49:09 -04:00
Alex Crichton
11e9c48353 Flag unsafe blocks from format! as compiler-generated 2013-09-11 00:13:41 -07:00
Alex Crichton
19a6fabad8 Implement the notion of a "generated unsafe block"
This way syntax extensions can generate unsafe blocks without worrying about
them generating unnecessary unsafe warnings. Perhaps a special keyword could be
added to be used in macros, but I don't think that's the best solution.
2013-09-11 00:13:22 -07:00
John Clements
422cf1adc5 change type of ExprLoop and ExprBreak elts from ident->name.
Lots of downstream changes in librustc, should be infinitesimally faster.
2013-09-10 14:12:54 -07:00
bors
753d8c226c auto merge of #9088 : nikomatsakis/rust/issue-6304-AST-tree-not-DAG, r=catamorphism
Ensures that each AST node has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two
representative tests.

Fixes #7971
Fixes #6304
Fixes #8367
Fixes #8754
Fixes #8852
Fixes #2543
Fixes #7654
2013-09-10 03:10:59 -07:00
Niko Matsakis
a5ad4c3794 Delay assignment of node ids until after expansion. Ensures that each AST node
has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two
representative tests.

Fixes #7971
Fixes #6304
Fixes #8367
Fixes #8754
Fixes #8852
Fixes #2543
Fixes #7654
2013-09-10 05:45:12 -04:00