about summary refs log tree commit diff
path: root/src/comp/middle
AgeCommit message (Collapse)AuthorLines
2011-05-17rustc: Make return value checking warnings a little prettier. Also introduce ↵Patrick Walton-3/+5
a new "note" diagnostic level.
2011-05-17rustc: Flatten annotationsPatrick Walton-563/+298
2011-05-17Finally rename std::_xxx to std::xxxMarijn Haverbeke-421/+421
Except for _task, which is still a keyword.
2011-05-17Return a better result from blocks. Closes issue #377Brian Anderson-0/+3
Blocks return in a copy of the result of their ending expression, not the direct result of the ending expression, as that may be a local variable which gets zeroed by drop_slot.
2011-05-16Rename aux.rs to auxiliary.rs since win32 doesn't like files named "aux". ↵Graydon Hoare-0/+0
Really.
2011-05-16Merge remote branch 'origin/master' into HEADGraydon Hoare-93/+3319
Conflicts: src/comp/middle/trans.rs
2011-05-16Rewrite everything to use [] instead of vec() in value position.Graydon Hoare-681/+681
2011-05-16Started adding support for return checking and non-returning function ↵Tim Chevalier-32/+3304
annotations * Reorganized typestate into several modules. * Made typestate check that any function with a non-nil return type returns a value. For now, the check is a warning and not an error (see next item). * Added a "bot" type (prettyprinted as _|_), for constructs like be, ret, break, cont, and fail that don't locally return a value that can be inspected. "bot" is distinct from "nil". There is no concrete syntax for _|_, while the concrete syntax for the nil type is (). * Added support to the parser for a ! annotation on functions whose result type is _|_. Such a function is required to have either a fail or a call to another ! function that is reached in all control flow paths. The point of this annotation is to mark functions like unimpl() and span_err(), so that an alt with a call to err() in one case isn't a false positive for the return-value checker. I haven't actually annotated anything with it yet. * Random bugfixes: * * Fixed bug in trans::trans_binary that was throwing away the cleanups for nested subexpressions of an and or or (tests: box-inside-if and box-inside-if2). ** In typeck, unify the expected type arguments of a tag with the actual specified arguments.
2011-05-16Noticed that metadata::Encode::enc_sty didn't have a case for ty_task, so I ↵Tim Chevalier-0/+1
added one (though this wasn't causing the problem I was seeing...
2011-05-16rustc: Fix indentation in typeck::check_lit()Patrick Walton-10/+9
2011-05-16rustc: Don't rebuild the call expression in typeck::replace_expr_type()Patrick Walton-39/+3
2011-05-16rustc: Don't unpack annotations in trans::lval_generic_fn()Patrick Walton-12/+2
2011-05-16rustc: Factor out the code that interns types into an "interner" data structurePatrick Walton-36/+18
2011-05-16rustc: Don't rebuild AST patterns during typecheckingPatrick Walton-44/+13
2011-05-16rustc: Replace the redundant typeck::node_ann_ty_params() with ↵Patrick Walton-20/+4
ty::ann_to_type_params()
2011-05-16rustc: Make the type collection pass no longer rebuild the ASTPatrick Walton-213/+129
2011-05-16rustc: Fix indentation in ty_param_count_and_ty_for_def()Patrick Walton-5/+5
2011-05-16rustc: Add an item_ann() accessor functionPatrick Walton-0/+20
2011-05-15rustc: Wait until generic glue is actually emitted to define it as internalBrian Anderson-1/+6
The verifier was not liking this when generating unoptimized bitcode. Per LLVM docs it is not valid for function declarations to be marked internal, but their implementations may be.
2011-05-14rustc: Rename 'Unify' modules to 'unify'Brian Anderson-17/+17
2011-05-14rustc: Use walk instead of fold for the first item collection passPatrick Walton-15/+10
2011-05-14rustc: Change "Collect" to "collect"Patrick Walton-4/+3
2011-05-13rustc: Look types up in the side tablePatrick Walton-8/+11
2011-05-13rustc: Write nil types into the node type table wherever plain_ann() is usedPatrick Walton-39/+101
2011-05-13'with' no longer a token; whitespace police.Lindsey Kuper-9/+9
Plus renaming the anonymous objects test to a more descriptive name, and XFAILing it because it doesn't work yet.
2011-05-13More anon obj work; whitespace police in middle::foldLindsey Kuper-32/+52
Passing args to middle::fold::fold_expr_anon_obj by reference to be consistent with the other folds; adding a dummy fold_expr_anon_obj to typeck to be filled in later.
2011-05-13Use new module namespace syntax.Lindsey Kuper-31/+31
2011-05-13More work toward anonymous objects.Lindsey Kuper-8/+10
2011-05-13Bug fixes.Lindsey Kuper-0/+2
Fixed infinite loop on anonymous objects in parser; added expr_anon_obj to walk.rs; fixed syntax of test case.
2011-05-13More progress on anonymous objects.Lindsey Kuper-4/+83
Still segfaulting on the method-overriding.rs test, though.
2011-05-13rustc: Move replace_expr_type() from ty to typeck, as it's only used in the ↵Patrick Walton-45/+52
latter
2011-05-13rustc: Fix long lines in typeck.rsBrian Anderson-1/+2
2011-05-13rustc: Get ann_to_type_params() on board the ↵Patrick Walton-7/+7
ann_to_ty_param_substs_opt_and_ty() train
2011-05-13rustc: Make all type lookups go through the one ↵Patrick Walton-44/+22
ty::ann_to_ty_param_substs_opt_and_ty() function
2011-05-13rustc: Write types contained in "trivial annotations" to the tablePatrick Walton-45/+135
2011-05-13rustc: Change ty::triv_ann() to take a node ID instead of a full annotationPatrick Walton-85/+118
2011-05-13rustc: lowercase the link and link::write modulesBrian Anderson-2/+2
2011-05-13Slight adjustments to shape, rename to type_glue.rs.Graydon Hoare-98/+104
2011-05-13rustc: Add write_type() wherever ann_types are written, except for triv_ann()Patrick Walton-15/+56
2011-05-13rustc: Fix the type of node_types; stub the write_type functionPatrick Walton-7/+16
2011-05-13rustc: Remove a minor rustboot workaround in ↵Patrick Walton-9/+4
typeck::resolve_local_types_in_block()
2011-05-13rustc: Make typeck::instantiate_path() not return an annotationPatrick Walton-9/+16
2011-05-13Implement module namespacesMarijn Haverbeke-70/+72
Module names no longer clash with type and value names. The tokenizer/parser still needs to be taught to be more careful in identifying keywords, so that we can use 'str' and 'vec' and so as module names.
2011-05-13Extend crate format to allow multiple definitions for a single nameMarijn Haverbeke-31/+34
The type/value namespace distinction pretty much works now. Module namespace is up next.
2011-05-13Make module indices hold a list of itemsMarijn Haverbeke-42/+87
This way, they can support having both a type and a value of the same name.
2011-05-13Move capture checking into resolve.rsMarijn Haverbeke-134/+49
Drops capture.rs. The new algorithm also checks for captures function arguments and obj fields.
2011-05-13Change resolve to use walk instead of foldMarijn Haverbeke-100/+162
Possibly, at some point, we should add a state-passing variant of walk, or a wrapper that makes it easier to thread state. (See the repetetive pop_state_for_* functions in this commit.)
2011-05-13Ensure visit_ty is called on type parameters during walkMarijn Haverbeke-2/+25
2011-05-13Add visit_arm and visit_method to walk.rsMarijn Haverbeke-3/+16
The resolver needs to update its state for individual arms and methods.
2011-05-12rustc: Flatten recursive vectors in trans::simplify_type(). Prevents an ↵Patrick Walton-0/+8
infinite loop.