about summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2013-12-01auto merge of #10750 : Blei/rust/no-at-struct-field, r=alexcrichtonbors-7/+7
2013-12-01auto merge of #10676 : eddyb/rust/ast-box-in-enums, r=cmrbors-78/+92
**Note**: I only tested on top of my #10670 PR, size reductions come from both change sets. With this, [more enums are shrinked](https://gist.github.com/eddyb/08fef0dfc6ff54e890bc), the most significant one being `ast_node`, from 104 bytes (master) to 96 (#10670) and now to 32 bytes. My own testcase requires **200MB** less when compiling (not including the other **200MB** gained in #10670), and rustc-stage2 is down by about **130MB**. I believe there is more to gain by fiddling with the enums' layouts.
2013-12-01ast: Remove one `@` and fix the falloutPhilipp Brüschweiler-7/+7
2013-12-01Box Block, fn_decl, variant and Ty in the AST, as they were inflating ↵Eduard Burtescu-78/+92
critical enum sizes.
2013-11-30auto merge of #10727 : erickt/rust/json, r=huonwbors-4/+5
This PR does some small modernizations to the json library. First is to remove the `@` boxes, second is to rename the constructors to `new`.
2013-11-29extra: missed a couple `@` in jsonErick Tryzelaar-1/+1
2013-11-29extra: json::Encoder should take a &mut io::WriterErick Tryzelaar-3/+4
2013-11-29extra: Rename json constructors into *::initErick Tryzelaar-1/+1
2013-11-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-2/+2
2013-11-28Register new snapshotsAlex Crichton-69/+66
2013-11-27Be more strict about doc commentsCorey Richardson-4/+2
Previously, `//// foo` and `/*** foo ***/` were accepted as doc comments. This changes that, so that only `/// foo` and `/** foo ***/` are accepted. This confuses many newcomers and it seems weird. Also update the manual for these changes, and modernify the EBNF for comments. Closes #10638
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