about summary refs log tree commit diff
path: root/src/comp
AgeCommit message (Collapse)AuthorLines
2011-07-06rustc: Remove some unused references to std::vec from tstate::ann and ↵Patrick Walton-6/+1
tstate::auxiliary
2011-07-06rustc: Move middle::tstate::auxiliary and middle::tstate::bitvectors over to ↵Patrick Walton-123/+131
interior vectors
2011-07-06rustc: Move tstate::annotate over to interior vectorsPatrick Walton-12/+12
2011-07-06rustc: Convert bind_params_in_type() to use interior vectorsPatrick Walton-6/+9
2011-07-06rustc: Migrate tag variants to interior vectorsPatrick Walton-37/+35
2011-07-06rustc: Make object methods into interior vectorsPatrick Walton-45/+49
2011-07-06rustc: Use an interior vector for ty::count_ty_paramsPatrick Walton-6/+4
2011-07-06rustc: Move the interner over to interior vectorsPatrick Walton-7/+7
2011-07-06rustc: Make the various constraint-related types in middle::ty use interior ↵Patrick Walton-18/+56
vectors
2011-07-06rustc: Make type parameter substitutions interior vectorsPatrick Walton-35/+34
2011-07-06rustc: Change constraints in types to use interior vectorsPatrick Walton-42/+47
2011-07-06rustc: Switch tag type parameters to interior vectorsPatrick Walton-31/+19
2011-07-06rustc: Use interior vectors for tag type parametersPatrick Walton-123/+188
2011-07-06Support paren-free and lightweight-case syntaxMarijn Haverbeke-21/+10
(The old syntax is still supported as well, for now.) It is now possible to leave out the parens around if, while, and do/while conditions, and around alt expressions. Cases in an alt block can now leave off the case keyword and parens around the pattern. After the next snapshot, we can start migrating our code to use the new alt syntax, probably with a pretty-printer pass. The paren-free syntax will remain optional (you may always parenthesize expressions), but the old case syntax will no longer be supported in the future.
2011-07-06Remove temporary stdlib placeholders, use actual stdlib functionsMarijn Haverbeke-87/+53
(Possible now that a snapshot took place.)
2011-07-05Forwarding functions. Lots of progress toward #539, #540, #543.Lindsey Kuper-93/+473
2011-07-05Comments and cleanup.Lindsey Kuper-6/+13
2011-07-05Handle pattern-bound upvarsTim Chevalier-49/+162
If a closure inside a case alternative (for example, a for each loop) referenced a pattern-bound variable, this would cause an assertion failure in trans. Changed trans::collect_upvars to handle pattern-bound vars correctly. Incidentally, eliminated all direct uses of option::get in trans.
2011-07-05Change ast::meta_name_value to accept any literal, not just stringBrian Anderson-51/+80
This isn't useful for much of anything yet, since metadata::encoder doesn't know how to handle the non-string variants. Issue #611
2011-07-05Require that the meta items in a use statement have unique namesBrian Anderson-0/+2
2011-07-05Handle fail inside a for-each loop properlyTim Chevalier-1/+5
2011-07-05handle fail inside a for loopTim Chevalier-1/+4
2011-07-05Handle fail as an argumentTim Chevalier-0/+8
2011-07-05Print remaining comments at end of *crate*, not module.Graydon Hoare-1/+1
2011-07-05Make type unification failures non-fatalBrian Anderson-16/+24
Add a failure checkpoint after the typechecking pass. There are still many fatal errors in typeck, but loosening up this one makes it easier to lean on the compiler when making changes to types. Issue #440.
2011-07-05Factor the ivec code a touch.Graydon Hoare-52/+40
2011-07-05Remove unused eval function. Issue #604Brian Anderson-17/+0
2011-07-05Support conditional compilation of native items. Closes #610Brian Anderson-5/+33
2011-07-05Parse attributes for native items. Closes #609Brian Anderson-10/+36
2011-07-05Warn when compiling shared crates that don't have name/vers link attributesBrian Anderson-5/+19
Closes #614
2011-07-05Error if the link attribute has duplicate items. Issue #614Brian Anderson-6/+22
2011-07-05Don't thread the local crate number through the sessionMarijn Haverbeke-13/+7
It's a constant, anyway.
2011-07-05Move everything syntax-related to syntax/, break deps on rest of compilerMarijn Haverbeke-1200/+1213
src/comp/syntax is currently just a sub-module of rustc, but it will, in the near future, be its own crate. This includes: - The AST data structure - The parser - The pretty-printer - Visit, walk, and fold - The syntax extension system - Some utility stuff that should be in the stdlib* *) Stdlib extensions currently require a snapshot before they can be used, and the win build is very broken right now. This is temporary and will be cleaned up when one of those problems goes away. A lot of code was moved by this patch, mostly towards a more organized layout. Some package paths did get longer, and I guess the new layout will take some getting used to. Sorry about that! Please try not to re-introduce any dependencies in syntax/ on any of the other src/comp/ subdirs.
2011-07-05Move pretty-printing 'modes' into a callback hookMarijn Haverbeke-73/+85
This way, the pretty-printer does not have to know about middle::ty. (This is a preparation for separating the AST functionality into a separate crate.)
2011-07-04rustc: Remove obsolete "The second has to be authed pure" commentPatrick Walton-4/+3
2011-07-04Switch the alias checking pass to use span_err instead of span_fatalMarijn Haverbeke-12/+13
It'll now spit out all problems it finds, and only abort after the whole pass has run.
2011-07-04Move the ids of pat AST nodes into their structMarijn Haverbeke-79/+68
Just like it was done with items and exprs. Simplifies some code.
2011-07-04Use metadata to avoid always passing -Lrustllvm to the linker.Rafael Ávila de Espíndola-11/+37
2011-07-04Simplify.Rafael Ávila de Espíndola-11/+3
2011-07-04Simplify the code a bit.Rafael Ávila de Espíndola-8/+3
2011-07-03Make use of demand::simple instead of manually checking fail expr type.Josh Matthews-11/+1
2011-07-03Make non-str fail expression a type checking failure instead of a ↵Josh Matthews-4/+19
translation one.
2011-07-03Handle fail as an argument; parse fail expressions unambiguouslyTim Chevalier-9/+13
An expression like: foo(1, fail, 2) was failing to parse, because the parser was interpreting the comma as the start of an expression that was an argument to fail, rather than recognizing that the fail here has no arguments Fixed this by using can_begin_expr to determine whether the next token after a fail token suggests that this is a nullary fail or a unary fail. In addition, when translating calls, check before translating each argument that the block still isn't terminated. This has the effect that if an argument list includes fail, the back-end won't keep trying to generate code for successive arguments and trip the !*terminated assertion.
2011-07-03Add a predicate that determines whether a token can begin an expressionTim Chevalier-0/+21
2011-07-03Eliminate all direct calls to option::get() from typeckTim Chevalier-21/+55
This means fewer mysterious error messages.
2011-07-03Manipulate contexts correctly in trans_fail_exprTim Chevalier-7/+11
This fixes Issue #617
2011-07-02Generate code properly for calls with _|_ - typed argumentsTim Chevalier-19/+25
The code for translating a fail (for example) would call Unreachable(), which terminates the block; if a fail appeared as an argument, this would cause an LLVM assertion failure. Changed trans_call to handle this situation correctly.
2011-07-02Add a function that determines whether the block is terminatedTim Chevalier-0/+4
2011-07-02Fix assertion failure when syntax extension name is missing.Josh Matthews-0/+3
2011-07-02Allow any string expression to be used with fail.Josh Matthews-23/+72