about summary refs log tree commit diff
path: root/src/libsyntax/ast_util.rs
AgeCommit message (Collapse)AuthorLines
2014-01-13librustc: Remove `@` pointer patterns from the languagePatrick Walton-1/+10
2014-01-11Remove re-exports of std::io::stdio::{print, println} in the prelude.Brendan Zabarauskas-1/+1
The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-84/+83
2014-01-06Disowned the Visitor.Eduard Burtescu-41/+14
2014-01-03librustc: Remove `@mut` support from the parserPatrick Walton-6/+6
2014-01-03libsyntax: Remove an unnecessary `@mut io::Reader`Patrick Walton-8/+10
2014-01-03libsyntax: De-`@mut` `SCTable`Patrick Walton-10/+14
2014-01-03libsyntax: De-`@mut` `SCTable::rename_memo`Patrick Walton-4/+5
2014-01-03libsyntax: De-`@mut` `SCTable::mark_memo`Patrick Walton-4/+5
2014-01-03libsyntax: De-`@mut` `SCTable::table`Patrick Walton-13/+36
2014-01-03libsyntax: De-`@mut` the resolve tablePatrick Walton-5/+8
2014-01-01Remove `extern mod foo (name="bar")` syntax, closes #9543Florian Hahn-1/+1
2013-12-12Remove fk_anonSeo Sanghyeon-1/+1
2013-12-11Make 'self lifetime illegal.Erik Price-7/+7
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-01auto merge of #10750 : Blei/rust/no-at-struct-field, r=alexcrichtonbors-1/+1
2013-12-01ast: Remove one `@` and fix the falloutPhilipp Brüschweiler-1/+1
2013-12-01Box Block, fn_decl, variant and Ty in the AST, as they were inflating ↵Eduard Burtescu-22/+11
critical enum sizes.
2013-11-28Register new snapshotsAlex Crichton-8/+8
2013-11-26auto merge of #10670 : eddyb/rust/node-u32, r=alexcrichtonbors-15/+9
### Rationale There is no reason to support more than 2³² nodes or names at this moment, as compiling something that big (even without considering the quadratic space usage of some analysis passes) would take at least **64GB**. Meanwhile, some can't (or barely can) compile rustc because it requires almost **1.5GB**. ### Potential problems Can someone confirm this doesn't affect metadata (de)serialization? I can't tell myself, I know nothing about it. ### Results Some structures have a size reduction of 25% to 50%: [before](https://gist.github.com/luqmana/3a82a51fa9c86d9191fa) - [after](https://gist.github.com/eddyb/5a75f8973d3d8018afd3). Sadly, there isn't a massive change in the memory used for compiling stage2 librustc (it doesn't go over **1.4GB** as [before](http://huonw.github.io/isrustfastyet/mem/), but I can barely see the difference). However, my own testcase (previously peaking at **1.6GB** in typeck) shows a reduction of **200**-**400MB**.
2013-11-27Shink NodeId, CrateNum, Name and Mrk down to 32 bits on x64.Eduard Burtescu-15/+9
2013-11-26libsyntax: Remove all non-`proc` `do` syntax.Patrick Walton-2/+2
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-1/+1
2013-11-26Take &Pat in visit_patSeo Sanghyeon-1/+1
2013-11-25Take &PatSeo Sanghyeon-1/+1
2013-11-19libsyntax: Change all uses of `&fn` to `||`.Patrick Walton-3/+3
2013-11-18Use '..' as slice wildcard in vectorsBrian Anderson-1/+1
2013-11-08Generalize AST and ty::Generics to accept multiple lifetimes.Niko Matsakis-3/+5
2013-10-25libsyntax/librustc: Allow mut qualifier in patterns.Luqman Aden-1/+1
2013-10-24Remove even more of std::ioAlex Crichton-2/+1
Big fish fried here: extra::json most of the compiler extra::io_util removed extra::fileinput removed Fish left to fry extra::ebml
2013-10-22libsyntax/librustc: Allow specifying mut on by-value self.Luqman Aden-1/+1
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-10/+10
Who doesn't like a massive renaming?
2013-10-09option: rewrite the API to use compositionDaniel Micay-3/+3
2013-10-07Fix existing privacy/visibility violationsAlex Crichton-1/+1
This commit fixes all of the fallout of the previous commit which is an attempt to refine privacy. There were a few unfortunate leaks which now must be plugged, and the most horrible one is the current `shouldnt_be_public` module now inside `std::rt`. I think that this either needs a slight reorganization of the runtime, or otherwise it needs to just wait for the external users of these modules to get replaced with their `rt` implementations. Other fixes involve making things pub which should be pub, and otherwise updating error messages that now reference privacy instead of referencing an "unresolved name" (yay!).
2013-10-07Extract privacy checking from name resolutionAlex Crichton-26/+0
This commit is the culmination of my recent effort to refine Rust's notion of privacy and visibility among crates. The major goals of this commit were to remove privacy checking from resolve for the sake of sane error messages, and to attempt a much more rigid and well-tested implementation of visibility throughout rust. The implemented rules for name visibility are: 1. Everything pub from the root namespace is visible to anyone 2. You may access any private item of your ancestors. "Accessing a private item" depends on what the item is, so for a function this means that you can call it, but for a module it means that you can look inside of it. Once you look inside a private module, any accessed item must be "pub from the root" where the new root is the private module that you looked into. These rules required some more analysis results to get propagated from trans to privacy in the form of a few hash tables. I added a new test in which my goal was to showcase all of the privacy nuances of the language, and I hope to place any new bugs into this file to prevent regressions. Overall, I was unable to completely remove the notion of privacy from resolve. One use of privacy is for dealing with glob imports. Essentially a glob import can only import *public* items from the destination, and because this must be done at namespace resolution time, resolve must maintain the notion of "what items are public in a module". There are some sad approximations of privacy, but I unfortunately can't see clear methods to extract them outside. The other use case of privacy in resolve now is one that must stick around regardless of glob imports. When dealing with privacy, checking a private path needs to know "what the last private thing was" when looking at a path. Resolve is the only compiler pass which knows the answer to this question, so it maintains the answer on a per-path resolution basis (works similarly to the def_map generated). Closes #8215
2013-10-03Rewrite lint passes with less visitor cruftAlex Crichton-23/+17
This purges about 500 lines of visitor cruft from lint passes. All lints are handled in a much more sane way at this point. The other huge bonus of this commit is that there are no more @-boxes in the lint passes, fixing the 500MB memory regression seen when the lint passes were refactored. Closes #8589
2013-10-02auto merge of #9665 : alexcrichton/rust/snapshot, r=brsonbors-2/+2
Uses the new snapshots to kill the old `loop` and introduce the new `continue`.
2013-10-01Migrate users of 'loop' to 'continue'Alex Crichton-2/+2
Closes #9467
2013-10-01auto merge of #9560 : pcwalton/rust/xc-tuple-structs, r=pcwaltonbors-0/+11
r? @thestinger
2013-10-01librustc: Inline cross-crate tuple struct constructorsPatrick Walton-0/+11
2013-10-01remove the `float` typeDaniel Micay-1/+1
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-09-30syntax: Remove usage of fmt!Alex Crichton-10/+10
2013-09-24renumbered due to bug shufflingJohn Clements-5/+5
2013-09-23librustc: Change the ID visitor to use traits instead of garbage-collected ↵Patrick Walton-31/+46
functions.
2013-09-23librustc: Change fold to use traits instead of `@fn`.Patrick Walton-16/+0
2013-09-18Register new snapshotsAlex Crichton-2/+2
2013-09-16auto merge of #9187 : lkuper/rust/no-simplevisitor, r=catamorphismbors-2/+2
We don't seem to be using `SimpleVisitor` anywhere in rustc. Is there any reason to keep it around? r? anyone
2013-09-14Kill off method impls made redundant by default methods.Lindsey Kuper-39/+0
2013-09-14Get rid of unused SimpleVisitor stuff.Lindsey Kuper-2/+2
2013-09-11Properly encode/decode structural variants.SiegeLord-2/+2
2013-09-10auto merge of #9088 : nikomatsakis/rust/issue-6304-AST-tree-not-DAG, ↵bors-0/+16
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