about summary refs log tree commit diff
path: root/src/comp
AgeCommit message (Collapse)AuthorLines
2011-04-20rustc: Precompute type hashesPatrick Walton-39/+56
2011-04-20rustc: Remove all manual type construction outside ty.rsPatrick Walton-101/+107
2011-04-20rustc: Remove all uses of plain_ty() and friends from outside of ty.rsPatrick Walton-165/+136
2011-04-20rustc: Introduce preferred type constructors, which will eventually ↵Patrick Walton-1/+47
precompute hashes and intern
2011-04-20Remove last uses of fold from trans.rsMarijn Haverbeke-39/+34
2011-04-20Change trans.collect_items to use walk, not foldMarijn Haverbeke-127/+112
2011-04-20Change collect_upvars from using fold to using walkMarijn Haverbeke-0/+1
2011-04-20Integrate walk.rsMarijn Haverbeke-23/+29
2011-04-20Fix #335, log context needs to be a scope to capture cleanups.Graydon Hoare-1/+1
2011-04-19Small fast-path hack to ty.hash_ty and eq_ty.Graydon Hoare-0/+45
2011-04-19rustc: Add a -noverify optionPatrick Walton-11/+20
2011-04-19Add testcase for bootstrap blocker and fix for each result type to nil.Graydon Hoare-3/+4
2011-04-19rustc: Cache the results of type_of()Patrick Walton-16/+25
2011-04-19rustc: Use marijnh's stringifier for type hash and equality, since it's not ↵Patrick Walton-2/+9
sensitive to cnames
2011-04-19rustc: Make structured comparison glue instead of emitting it inlinePatrick Walton-196/+340
2011-04-19Handle nested items correctly in typestate_checkTim Chevalier-94/+812
Summary says it all. Actually, only nested objects and functions are handled, but that's better than before. The fold that I was using before to traverse a crate wasn't working correctly, because annotations have to reflect the number of local variables of the nearest enclosing function (in turn, because annotations are represented as bit vectors). The fold was traversing the AST in the wrong order, first filling in the annotations correctly, but then re-traversing them with the bit vector length for any outer nested functions, and so on. Remedying this required writing a lot of tedious boilerplate code because I scrapped the idea of using a fold altogether. I also made typestate_check handle unary, field, alt, and fail. Also, some miscellaneous changes: * added annotations to blocks in typeck * fix pprust so it can handle spawn * added more logging functions in util.common * fixed _vec.or * added maybe and from_maybe in option * removed fold_block field from ast_fold, since it was never used
2011-04-19Remove half-baked 'opacity' layer qualifier.Graydon Hoare-27/+0
2011-04-19Remove effect system from src.Graydon Hoare-348/+285
2011-04-19rustc: Allow glue to be emitted even for scalar types; this is necessary to ↵Patrick Walton-38/+33
support compare glue
2011-04-19rustc: Don't return "result" types from glue helper functions. This allows ↵Patrick Walton-46/+46
glue to fail.
2011-04-19rustc: Assert that each basic block isn't terminated before adding ↵Patrick Walton-2/+101
instructions to it
2011-04-19replace error logging with log_err in stdlib and rustcMarijn Haverbeke-113/+111
2011-04-19add log_err to rustcMarijn Haverbeke-26/+40
2011-04-19Add log_err to rustbootMarijn Haverbeke-1/+1
2011-04-18Support 0 flag in #fmtBrian Anderson-7/+14
2011-04-18Boilerplate city, for anyone who wants it.Graydon Hoare-0/+471
2011-04-18rustc: Add an operation field to compare glue with ==, <=, and < modesPatrick Walton-9/+17
2011-04-18rustc: Create stub glue for structural comparisonPatrick Walton-23/+80
2011-04-18Update foregoing patches to leave rust_crate alone.Marijn Haverbeke-11/+11
Apparently it can't live in the main binary, since on non-Linux platforms, dynamics libs won't find symbols in the binary. This removes the crate_map pointer from rust_crate again, and instead passes it as an extra argument to rust_start. Rustboot doesn't pass this argument, but supposedly that's okay as long as we don't actually use it on that platform.
2011-04-18Add a -c option.Rafael Ávila de Espíndola-6/+32
2011-04-18Make log the log level configurable per moduleMarijn Haverbeke-27/+111
This overloads the meaning of RUST_LOG to also allow 'module.submodule' or 'module.somethingelse=2' forms. The first turn on all logging for a module (loglevel 3), the second sets its loglevel to 2. Log levels are: 0: Show only errors 1: Errors and warnings 2: Errors, warnings, and notes 3: Everything, including debug logging Right now, since we only have one 'log' operation, everything happens at level 1 (warning), so the only meaningful thing that can be done with the new RUST_LOG support is disable logging (=0) for some modules. TODOS: * Language support for logging at a specific level * Also add a log level field to tasks, query the current task as well as the current module before logging (log if one of them allows it) * Revise the C logging API to conform to this set-up (globals for per-module log level, query the task level before logging, stop using a global mask) Implementation notes: Crates now contain two extra data structures. A 'module map' that contains names and pointers to the module-log-level globals for each module in the crate that logs, and a 'crate map' that points at the crate's module map, as well as at the crate maps of all external crates it depends on. These are walked by the runtime (in rust_crate.cpp) to set the currect log levels based on RUST_LOG. These module log globals are allocated as-needed whenever a log expression is encountered, and their location is hard-coded into the logging code, which compares the current level to the log statement's level, and skips over all logging code when it is lower.
2011-04-18collect crate meta info and ext crate namesMarijn Haverbeke-11/+24
2011-04-18move rust_crate structure into the actual crate codeMarijn Haverbeke-4/+2
2011-04-18introduce local_ctxt in trans.rs to keep crate_ctxt globalMarijn Haverbeke-318/+333
This reduces crate_ctxt copying (which unfortunately did not result in a noticeable speedup), and makes the role of that type a bit more clear.
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-15rustc: Capture type parameters into for-each blocks. Add a test case.Patrick Walton-2/+33
2011-04-15rustc: Use a regular vector instead of a hash table for type descriptorsPatrick Walton-14/+13
2011-04-15rustc: Remove the "boxed" check, and make the static_size_of_tag ↵Patrick Walton-33/+32
recursion-eliminating transformation deep
2011-04-15Add a -S option for producing assembly. I will move more of it toRafael Ávila de Espíndola-20/+38
rust once the necessary APIs are available in C.
2011-04-15rustc: Make fold_ty no longer use an object; introduce walk_tyPatrick Walton-115/+160
2011-04-14Work on destructors, not entirely functional yet (no tydesc integration).Graydon Hoare-13/+82
2011-04-14rustc: Use the unified result for the type of assignment expressionsPatrick Walton-1/+1
2011-04-14rustc: Perform type substitutions when recording localsPatrick Walton-1/+11
2011-04-14rustc: Remove generalize_ty. Instead, maintain an explicit type parameter ↵Patrick Walton-358/+531
substitution list.
2011-04-14rustc: Use union-find for variable substitutionPatrick Walton-48/+103
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.