summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2013-03-31Fix warningsBrian Anderson-20/+15
2013-03-30Correct type signature for start lang item.Luqman Aden-1/+1
2013-03-30auto merge of #5630 : erickt/rust/serial, r=ericktbors-16/+5
@nikomatsakis and I were talking about how the serializers were a bit too complicated. None of the users of With the `emit_option` and `read_option` functions, the serializers are now moving more high level. This patch series continues that trend. I've removed support for emitting specific string and vec types, and added support for emitting mapping types.
2013-03-30rustc: fix astencode testErick Tryzelaar-12/+1
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-180/+253
I believe this patch incorporates all expected syntax changes from extern function reform (#3678). You can now write things like: extern "<abi>" fn foo(s: S) -> T { ... } extern "<abi>" mod { ... } extern "<abi>" fn(S) -> T The ABI for foreign functions is taken from this syntax (rather than from an annotation). We support the full ABI specification I described on the mailing list. The correct ABI is chosen based on the target architecture. Calls by pointer to C functions are not yet supported, and the Rust type of crust fns is still *u8.
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-173/+173
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-39/+0
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-173/+173
2013-03-29Register snapshotsBrian Anderson-39/+0
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-172/+160
2013-03-29std: remove Encoder::read_rec and Decoder::emit_recErick Tryzelaar-4/+4
2013-03-29auto merge of #5570 : alexcrichton/rust/fix-unused-imports, r=sanxiynbors-171/+156
Before it wouldn't warn about unused imports in the list if something in the list was used. These commits fix that case, add a test, and remove all unused imports in lists of imports throughout the compiler.
2013-03-28auto merge of #5614 : graydon/rust/static-linkage-bug, r=catamorphismbors-1/+4
re bug that @nikomatsakis was hitting: when you define a `static` (old: `const`) containing a `&` or `&[]` expression, it will create temporaries (the underlying pointee) by creating a throwaway symbol for each temporary, each with _global_ linkage, and each named `"const"`. LLVM will helpfully rename multiple copies of this throwaway symbol to `"const1"` and `"const2"` and so forth in the _same_ library. But if you have _2 libraries_ -- say, libcore and librustc -- that both do this, the dynamic linker (at least on linux) will happily do horrible things like make the slice in one library point to the bytes of the vector from the other library. This is obviously a recipe for much hilarity and head-scratching. The solution is to change the linkage to something else, internal or (in the case of this patch) _private_. It will require a snapshot to integrate this into stage0 and thereby fix the problem / unblock patches that were hitting this in stage1.
2013-03-28Removing unused importsAlex Crichton-161/+150
2013-03-28Fix warning about unused imports in import listsAlex Crichton-10/+6
Before, if anything in a list was used, the entire list was considered to be used. This corrects this and also warns on a span of the actual unused import instead of the entire list.
2013-03-28auto merge of #5593 : luqmana/rust/inline-asm, r=catamorphismbors-115/+176
Clean things up a bit. Also, allow selecting intel syntax in addition to the default AT&T dialect.
2013-03-28rustc: fix linkage of internal static nodes.Graydon Hoare-1/+4
2013-03-28Tidy.Luqman Aden-1/+1
2013-03-28auto merge of #5609 : Kimundi/rust/incoming, r=catamorphismbors-2/+1
2013-03-28Unbreak 'rustc --help'Marvin Löbel-2/+1
2013-03-28librustc: Remove common fields and nested enums from the languagePatrick Walton-48/+2
2013-03-28auto merge of #5592 : pcwalton/rust/xc-extern-statics, r=pcwaltonbors-7/+39
2013-03-28auto merge of #5586 : pcwalton/rust/expr-repeat-vstore, r=graydonbors-5/+9
r? @graydon
2013-03-27auto merge of #5579 : dbaupp/rust/rustc-typo-limit, r=catamorphismbors-4/+5
Impose a limit so that the typo suggester only shows reasonable suggestions (i.e. don't suggest `args` when the error is `foobar`). A tiny bit of progress on #2281.
2013-03-27auto merge of #5578 : erickt/rust/incoming, r=jbclements,ericktbors-22/+44
Hey folks, This patch series does some work on the json decoder, specifically with auto decoding of enums. Previously, we would take this code: ``` enum A { B, C(~str, uint) } ``` and would encode a value of this enum to either `["B", []]` or `["C", ["D", 123]]`. I've changed this to `"B"` or `["C", "D", 123]`. This matches the style of the O'Caml json library [json-wheel](http://mjambon.com/json-wheel.html). I've added tests to make sure all this work. In order to make this change, I added passing a `&[&str]` vec to `Decode::emit_enum_variant` so the json decoder can convert the name of a variant into it's position. I also changed the impl of `Encodable` for `Option<T>` to have the right upper casing. I also did some work on the parser, which allows for `fn foo<T: ::cmp::Eq>() { ... }` statements (#5572), fixed the pretty printer properly expanding `debug!("...")` expressions, and removed `ast::expr_vstore_fixed`, which doesn't appear to be used anymore.
2013-03-27derive Eq and Clone impls where applicableAndrew Paseltiner-252/+14
2013-03-27librustc: remove already addressed XXXLuqman Aden-1/+0
2013-03-27librustc: add default per arch clobbers for asm.Luqman Aden-3/+25
2013-03-27libsyntax: Allow selecting intel style asm.Luqman Aden-1/+6
2013-03-27libsyntax: use a struct for inline asm in ast.Luqman Aden-26/+28
2013-03-27librustc: Move inline asm stuff to different mod.Luqman Aden-100/+133
2013-03-27librustc: Fix ICE with cross-crate extern statics. rs=bugfixPatrick Walton-7/+39
2013-03-27librustc: Allow expr_repeat to be used with any vstorePatrick Walton-5/+9
2013-03-27librustc: Allow expr_repeat to be used with any vstorePatrick Walton-5/+9
2013-03-27auto merge of #5558 : nikomatsakis/rust/issue-4920-autoref-index-operator, ↵bors-135/+29
r=nikomatsakis Per discussion on IRC. r? @pcwalton
2013-03-27Fix pretty-printer test failure by carrying the bound lifetime names throughNiko Matsakis-94/+117
the types. Initially I thought it would be necessary to thread this data through not only the AST but the types themselves, but then I remembered that the pretty printer only cares about the AST. Regardless, I have elected to leave the changes to the types intact since they will eventually be needed. I left a few FIXMEs where it didn't seem worth finishing up since the code wasn't crucial yet.
2013-03-27Autoref the argument to the index operator (#4920)Niko Matsakis-37/+21
2013-03-28librustc: Limit the typo suggestions to reasonable suggests.Huon Wilson-4/+5
Impose a limit so that the typo suggester only shows reasonable suggestions (i.e. don't suggest `args` when the error is `foobar`).
2013-03-27syntax: Remove deprecated expr_vstore_fixedErick Tryzelaar-17/+0
2013-03-27syntax: fix pretty printing __log stmtsErick Tryzelaar-5/+5
2013-03-27std: Decode::read_enum_variant should pass in the variant namesErick Tryzelaar-0/+39
Because the json::Decoder uses the string variant name, we need a way to correlate the string to the enum index. This passes in a static &[&str] to read_enum_variant, which allows the json::Decoder to know which branch it's trying to process.
2013-03-27Simplify and remove unnecessary use of ast_mapNiko Matsakis-38/+1
2013-03-27remove sty_by_ref, though traces still remain due to dtorsNiko Matsakis-60/+7
2013-03-26librustc: Remove obsolete syntaxPatrick Walton-3/+3
2013-03-26librustc: Enforce that `extern mod` directives come first, then `use` ↵Patrick Walton-223/+159
directives, then items. Resolve them in this order as well.
2013-03-26librustc: Modify all code to use new lifetime binder syntaxPatrick Walton-31/+34
2013-03-26librustc: Require explicit lifetime bindersPatrick Walton-63/+322
2013-03-26librustc: Fix bug with newtype structs containing dtorsPatrick Walton-2/+0
2013-03-26librustc: Stop parsing `[T * N]`.Patrick Walton-1/+1
2013-03-26librustc: Remove all uses of the old `[T * N]` fixed-length vector syntaxPatrick Walton-2/+2