about summary refs log tree commit diff
path: root/src/comp/front
AgeCommit message (Collapse)AuthorLines
2011-04-19Remove effect system from src.Graydon Hoare-193/+168
2011-04-19replace error logging with log_err in stdlib and rustcMarijn Haverbeke-33/+30
2011-04-19add log_err to rustcMarijn Haverbeke-3/+13
2011-04-18Support 0 flag in #fmtBrian Anderson-7/+14
2011-04-18collect crate meta info and ext crate namesMarijn Haverbeke-6/+9
2011-04-17Support the space flag in #fmtBrian Anderson-19/+35
2011-04-17Support + flag in #fmtBrian Anderson-3/+27
2011-04-17Support #fmt precision for string typesBrian Anderson-2/+8
2011-04-16Support left-justification in #fmt conversionsBrian Anderson-9/+56
2011-04-16Make #fmt support explicit conversion widthsBrian Anderson-4/+36
2011-04-14Work on destructors, not entirely functional yet (no tydesc integration).Graydon Hoare-4/+22
2011-04-13Add support for upper-case hex and binary output to #fmt.Brian Anderson-0/+3
Only works for uints at present. Necessitated the addition of _str.to_upper.
2011-04-13Add more commentary about ExtFmtBrian Anderson-14/+7
2011-04-13Add support for printing uints as lower-case hex to ExtFmt.Brian Anderson-13/+78
Begin passing an ExtFmt.RT.conv parsed format description to each of the ExtFmt.RT.conv* functions.
2011-04-13Move #fmt conversion model into ExtFmt.CT namespaceBrian Anderson-29/+28
2011-04-13Lex numeric escapes, needed for lib-str.rs (which now passes).Graydon Hoare-13/+77
2011-04-12typestate_check can now handle expr_block, expr_if, and expr_binaryTim Chevalier-2/+3
(caveat for the latter: it assumes that binary operations are strict; a TODO is to detect or and and and correctly reflect that they're lazy in the second argument). I had to add an ann field to ast.block, resulting in the usual boilerplate changes. Test cases that currently work (if you uncomment the typestate pass in the driver) (all these are under test/compile-fail): fru-typestate ret-uninit use-uninit use-uninit-2 use-uninit-3
2011-04-12rustc: Switch to indices for type parametersPatrick Walton-18/+16
2011-04-12Further work on typestate. Handles expr_rec and expr_assign now.Tim Chevalier-9/+13
Also changed the ts_ann field on statements to be an ann instead, which explains most of the changes. As well, got rid of the "warning: no type for expression" error by filling in annotations for local decls in typeck (not sure whether this was my fault or not). Finally, in bitv, added a clone() function to copy a bit vector, and fixed is_true, is_false, and to_str to not be nonsense.
2011-04-11Factor out creation of calls into ExtFmt.RTBrian Anderson-12/+12
2011-04-11Add support for bool, char to extfmt.Brian Anderson-0/+10
XFAIL syntax-extension-fmt in rustboot.
2011-04-11Move ExtFmt compile-time functions into their own moduleBrian Anderson-1/+1
2011-04-11Make ExtFmt call its own functions instead of others defined in stdBrian Anderson-6/+4
2011-04-11Move extfmt parsing into standard libraryBrian Anderson-210/+1
2011-04-11Move the extfmt data model into the standard library.Brian Anderson-48/+30
2011-04-09Fix codemap.lookup_posMarijn Haverbeke-15/+12
Previously, it would place every single location in the first file of the crate that was parsed.
2011-04-09Move to single-uint file-position representation.Marijn Haverbeke-319/+374
This makes passing them around cheaper. There is now a table (see front/codemap.rs) that is needed to transform such an uint into an actual filename/line/col location. Also cleans up the span building in the parser a bit.
2011-04-09Make lexer buffer the whole fileMarijn Haverbeke-59/+66
This way, it won't have to go through a bunch of calls for each byte fetched.
2011-04-07Support for self-calls that take arguments.Lindsey Kuper-4/+11
Nicer parsing of self-calls (expr_self_method nodes inside expr_call nodes, rather than a separate expr_call_self) makes typechecking tractable. We can now write self-calls that take arguments and return values (see: test/run-pass/obj-self-*.rs).
2011-04-07Add a very basic crate-dump utilityMarijn Haverbeke-0/+66
'rustc -ls [cratelib]' will now dump out a list of symbols defined by the crate, as well as a short description of what they are.
2011-04-07Revise EBML reader APIMarijn Haverbeke-191/+122
New one is less stateful, easier to work with.
2011-04-06Continued sketching out code for checking states against preconditions.Tim Chevalier-10/+11
It's still sketchy. I added a typestate annotation field to statements tagged stmt_decl or stmt_expr, because a stmt_decl statement has a typestate that's different from that of its child node. This necessitated trivial changes to a bunch of other files all over to the compiler. I also added a few small standard library functions, some of which I didn't actually end up using but which I thought might be useful anyway.
2011-04-05Last pieces of self-call support.Lindsey Kuper-1/+1
The last few pieces of the hack that lets us use trans.trans_call() to translate self-calls, plus a fix for the parser buy that was preventing self-call expressions from getting past parsing. test/run-pass/obj-self.rs works now (as in it actually prints "hi!" twice!).
2011-04-05Further on the path toward self-awareness.Lindsey Kuper-2/+6
Mostly: * Merciless refactoring of trans.rs so that trans_call can work for self-calls as well as other kinds of calls Also: * Various changes to go with having idents, rather than exprs, in expr_call_self AST nodes * Added missing case for SELF token to token.to_str()
2011-04-04Make box prefix operator and box type carry mutability flag.Graydon Hoare-3/+7
2011-04-01Support for passing native types through metadata/creader.Graydon Hoare-0/+2
2011-04-01rustc: Get tag variants from the crate metadataPatrick Walton-6/+49
2011-04-01Started adding support for typestate checking.Tim Chevalier-28/+31
I added a new field to the ast "ann" type for typestate information. Currently, the field contains a record of a precondition bit vector and postcondition vector, but I tried to structure things so as to make it easy to change the representation of the typestate annotation type. I also had to add annotations to some syntactic forms that didn't have them before (fail, ret, be...), with all the boilerplate changes that that would imply. The main call to the typestate_check entry point is commented out and the actual pre-postcondition algorithm only has a few cases implemented, though the overall AST traversal is there. The rest of the typestate algorithm isn't implemented yet.
2011-03-31rustc: Add a type annotation to tag itemsPatrick Walton-4/+5
2011-03-31rustc: Use the path index. Speeds up compilation a lot.Patrick Walton-91/+48
2011-03-31rustc: Write out a path index as wellPatrick Walton-8/+7
2011-03-31Couple minor bug fixes in creader, lib-bitv, int, rand, sort, sha1, uint and ↵Graydon Hoare-0/+8
vec all work.
2011-03-31rustc: Use the crate index to look up defsPatrick Walton-29/+26
2011-03-31rustc: Write out an index of definition info in crate metadataPatrick Walton-10/+9
2011-03-31Remove redundant parser logic.Brian Anderson-33/+0
These cases are all dealt with in parse_expr_inner.
2011-03-31handle unterminated block comments and line comment at eofMarijn Haverbeke-4/+9
2011-03-31Improve line comment positioningMarijn Haverbeke-6/+11
This involved making ast.variant spanned.
2011-03-31Support break and cont in pretty-printerMarijn Haverbeke-0/+2
2011-03-31Add effect field to ast.ty_fn.Marijn Haverbeke-15/+13
Still not used, except by the pretty-printer.
2011-03-31Preserve comments when pretty-printing.Marijn Haverbeke-1/+83
The patch also includes a number of smaller fixes to the pretty-printer that were encountered on the way.