about summary refs log tree commit diff
path: root/src/comp/middle/check_const.rs
AgeCommit message (Collapse)AuthorLines
2012-03-02Move src/comp to src/rustcGraydon Hoare-98/+0
2012-01-30Change all ternary ops to if/then/elsePaul Woolcock-2/+2
All the files below had at least one instance of the ternary operator present in the source. All have been changed to the equivalent if/then/else expression.
2012-01-26First stab at operator overloadingMarijn Haverbeke-4/+11
When no built-in interpretation is found for one of the operators mentioned below, the typechecker will try to turn it into a method call with the name written next to it. For binary operators, the method will be called on the LHS with the RHS as only parameter. Binary: + op_add - op_sub * op_mul / op_div % op_rem & op_and | op_or ^ op_xor << op_shift_left >> op_shift_right >>> op_ashift_right Unary: - op_neg ! op_not Overloading of the indexing ([]) operator isn't finished yet. Issue #1520
2012-01-25Rename tag to enum throughout the compilerMarijn Haverbeke-1/+1
This should reduce confusion of people trying to read the code.
2012-01-18Remove '.' after nullary tags in patternsTim Chevalier-1/+1
Does what it says on the tin. The next commit will remove support for this syntax.
2012-01-16Don't evaluate discriminator value constants when parsing.Kevin Atkinson-0/+7
Remove disr_val from ast::variant_ and always use ty::variant_info when the value is needed. Move what was done during parsing into other passes, primary typeck.rs. This move also correctly type checks the disr. value expression; thus, fixing rustc --pretty=typed when disr. values are used.
2012-01-12Make driver::session::session no longer an objectMarijn Haverbeke-2/+2
Rather, it is now a struct where properties like opts are accessed directly, and the error-reporting methods are part of a static impl (with the same name as the type).
2011-12-22Remove trivial cast checkerMarijn Haverbeke-1/+0
I consider the added complexity not justified at this point, and it interacts badly with the patches for issue #828. Feel free to discuss.
2011-12-07Check for literals that are out of range for their typeMarijn Haverbeke-1/+18
2011-12-02const_check: trans: added support for trivial castsStefan Plantikow-0/+1
Part of #1215
2011-12-02Allow literal patterns to contain arbitrary literal expressionsMarijn Haverbeke-31/+46
This removes the need for the unary minus hacks, and allows some other neat things like matching on 1 >> 4. Issue #954
2011-11-17remove compile-command from local variable blocksNiko Matsakis-1/+0
2011-11-10Cleanup unused importsHaitao Li-1/+0
2011-11-09trans: Add binops (except for logic and comparators) and unops to ↵Joshua Wise-1/+13
trans_const_expr. Working towards issue #570.
2011-11-09middle: Add a pass to reject bad const expressions earlier. Currently just ↵Joshua Wise-0/+42
rejects unimplemented const expressions, but will be needed later.