about summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2013-11-27Freeze the AST by removing a couple of unused @mut ~[T] from token_tree.Eduard Burtescu-2/+2
2013-11-26auto merge of #10670 : eddyb/rust/node-u32, r=alexcrichtonbors-6/+6
### 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-6/+6
2013-11-26libsyntax: Remove all non-`proc` `do` syntax.Patrick Walton-40/+34
2013-11-26libsyntax: Remove the old-style borrowed closure type syntax from thePatrick Walton-1/+8
language.
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-7/+7
2013-11-25auto merge of #10628 : huonw/rust/3614, r=alexcrichtonbors-7/+17
Fixes #3614.
2013-11-25syntax: parse inner attributes on impls.Huon Wilson-7/+17
Fixes #3614.
2013-11-24Add a note for unclosed delimitersCorey Richardson-9/+7
Currently, the parser doesn't give any context when it finds an unclosed delimiter and it's not EOF. Report the most recent unclosed delimiter, to help the user along. Closes #10636
2013-11-20auto merge of #10567 : sanxiyn/rust/bytepos, r=alexcrichtonbors-7/+7
2013-11-21Fix parsing testsSeo Sanghyeon-1/+1
2013-11-20Make BytePos 32-bitSeo Sanghyeon-6/+6
2013-11-19libsyntax: Change all uses of `&fn` to `||`.Patrick Walton-65/+73
2013-11-18libsyntax: Remove `~fn()` from the languagePatrick Walton-3/+11
2013-11-18Use '..' as slice wildcard in vectorsBrian Anderson-12/+35
2013-11-18Use '..' as multi-field wildcard in enums and structs.Brian Anderson-1/+26
2013-11-16auto merge of #10420 : sanxiyn/rust/path, r=cmrbors-4/+0
Fix #10283.
2013-11-11Move std::rt::io to std::ioAlex Crichton-6/+6
2013-11-11Fix path parsingSeo Sanghyeon-4/+0
2013-11-08Generalize AST and ty::Generics to accept multiple lifetimes.Niko Matsakis-50/+25
2013-11-07auto merge of #10243 : mattcarberry/rust/master, r=brsonbors-0/+13
Associated with Issue #6563. Useful for Apollo Guidance Computer simulation, Unix file system permissions, and maybe one or two other things.
2013-11-04libsyntax/librustc: Allow calling variadic foreign functions.Luqman Aden-26/+78
2013-11-03Fill out the remaining functionality in io::fileAlex Crichton-3/+2
This adds bindings to the remaining functions provided by libuv, all of which are useful operations on files which need to get exposed somehow. Some highlights: * Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type * Moved all file-related methods to be static methods under `File` * All directory related methods are still top-level functions * Created `io::FilePermission` types (backed by u32) that are what you'd expect * Created `io::FileType` and refactored `FileStat` to use FileType and FilePermission * Removed the expanding matrix of `FileMode` operations. The mode of reading a file will not have the O_CREAT flag, but a write mode will always have the O_CREAT flag. Closes #10130 Closes #10131 Closes #10121
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-10/+6
This commit moves all thread-blocking I/O functions from the std::os module. Their replacements can be found in either std::rt::io::file or in a hidden "old_os" module inside of native::file. I didn't want to outright delete these functions because they have a lot of special casing learned over time for each OS/platform, and I imagine that these will someday get integrated into a blocking implementation of IoFactory. For now, they're moved to a private module to prevent bitrot and still have tests to ensure that they work. I've also expanded the extensions to a few more methods defined on Path, most of which were previously defined in std::os but now have non-thread-blocking implementations as part of using the current IoFactory. The api of io::file is in flux, but I plan on changing it in the next commit as well. Closes #10057
2013-11-02Added octal literal support.Matt Carberry-0/+13
2013-10-31librustc: Implement `|A| -> B` syntax for closures and make bare `fn`Patrick Walton-31/+155
work
2013-10-30syntax: Forbid non-string literals in meta items. #623Brian Anderson-0/+10
2013-10-29auto merge of #10134 : reedlepee123/rust/priv_fields, r=brsonbors-7/+4
2013-10-29librustc: Implement the `proc` type as sugar for `~once fn` and `proc`Patrick Walton-20/+78
notation for closures, and disable the feature gate for `once fn` if used with the `~` sigil.
2013-10-29removed extra linereedlepee-1/+0
2013-10-29Indentationreedlepee-1/+1
2013-10-29updated the places where the struct is created #7427reedlepee-2/+3
2013-10-29Changed name to non_copyable #7427reedlepee-1/+1
2013-10-29Added the comment #7427reedlepee-1/+1
2013-10-29Replaced empty destructors with NonCopyable #7427reedlepee-5/+2
closes #7427
2013-10-28Field identifiers now include specific spans (Closes #8263).Joshua Yanovski-1/+2
2013-10-28Remove the extension traits for Readers/WritersAlex Crichton-3/+2
These methods are all excellent candidates for default methods, so there's no need to require extra imports of various traits.
2013-10-25libsyntax: Get rid of obsolete obsolete warning.Luqman Aden-6/+0
2013-10-25libsyntax: Get rid of some logic for some obsolete syntax.Luqman Aden-14/+5
2013-10-25libsyntax/librustc: Allow mut qualifier in patterns.Luqman Aden-24/+12
2013-10-24Remove io::read_errorAlex Crichton-3/+1
The general idea is to remove conditions completely from I/O, so in the meantime remove the read_error condition to mean the same thing as the io_error condition.
2013-10-24Remove even more of std::ioAlex Crichton-17/+42
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 ~self.Luqman Aden-1/+9
2013-10-22libsyntax/librustc: Allow specifying mut on by-value self.Luqman Aden-14/+16
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-40/+40
Who doesn't like a massive renaming?
2013-10-21Add support for nested commentsGeorges Dubus-33/+41
Fixes #9468.
2013-10-16path2: Update based on more review feedbackKevin Ballard-1/+1
Standardize the is_sep() functions to be the same in both posix and windows, and re-export from path. Update extra::glob to use this. Remove the usage of either, as it's going away. Move the WindowsPath-specific methods out of WindowsPath and make them top-level functions of path::windows instead. This way you cannot accidentally write code that will fail to compile on non-windows architectures without typing ::windows anywhere. Remove GenericPath::from_c_str() and just impl BytesContainer for CString instead. Remove .join_path() and .push_path() and just implement BytesContainer for Path instead. Remove FilenameDisplay and add a boolean flag to Display instead. Remove .each_parent(). It only had one caller, so just inline its definition there.
2013-10-15path2: Remove .with_display_str and friendsKevin Ballard-2/+2
Rewrite these methods as methods on Display and FilenameDisplay. This turns do path.with_display_str |s| { ... } into do path.display().with_str |s| { ... }
2013-10-15path2: Adjust the API to remove all the _str mutation methodsKevin Ballard-5/+5
Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15path2: Replace the path module outrightKevin Ballard-22/+18
Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process.