about summary refs log tree commit diff
path: root/src/comp/middle/debuginfo.rs
AgeCommit message (Collapse)AuthorLines
2012-02-17Move debuginfo into transMarijn Haverbeke-885/+0
2012-02-17Clean up some of trans using block combinatorsMarijn Haverbeke-4/+4
`with_scope` and `with_cond` can be used to wrap a piece of code in a scope block, or conditionalize it on a value, without doing all the context-creation and jumping by hand. Also renames @block_ctxt to block to reduce noise.
2012-02-15make mut a keyword synonymous with mutableNiko Matsakis-4/+4
first step towards issue #1273
2012-02-15Replace some explicit fails with 'alt check' invocationsMarijn Haverbeke-6/+3
2012-02-12(core::str) rename byte_len -> len_bytes and rename char_len -> lenKevin Cantu-3/+3
2012-02-09Fix various bugs in monomorphizationMarijn Haverbeke-1/+1
Enough to be able to compile librustc with --monomorphize. Issue #1736
2012-02-09Remove some pointless importsMarijn Haverbeke-1/+0
2012-02-09Monomorphize methods and bounded parametersMarijn Haverbeke-1/+1
Issue #1736
2012-02-06Handle built-in typenames in the resolve pass, rather than in parserMarijn Haverbeke-37/+69
Closes #1728 Comments out a section of debuginfo.rs. This code was already broken (only being called when --xg was passed, and only working on trivial programs).
2012-02-06Make ty::t type self-sufficientMarijn Haverbeke-9/+9
It is now no longer needed to have a ty::ctxt to get at the contents of a ty::t. The straight-forward approach of doing this, simply making ty::t a box type, unfortunately killed our compiler performance (~15% slower) through refcounting cost. Thus, this patch now represents ty::t as an unsafe pointer, assuming that the ty::ctxt, which holds these boxes alive, outlives any uses of the ty::t values. In the current compiler this trivially holds, but it is does of course add a new potential pitfall. ty::get takes a ty::t and returns a boxed representation of the type. I've changed calls to ty::struct(X) to do ty::get(X).struct. Type structs are full of vectors, and copying them every time we wanted to access them was a bit of a cost.
2012-02-03Don't rely on filename to get a file from the filemapKevin Atkinson-6/+6
as there may be more than one filemap with the same filename (in the case of stdin for instance). This involved storing a pointer to the filemap rather than the filename in location info such as codemap::pos.
2012-02-03Start on in-crate monomorphizingMarijn Haverbeke-2/+2
Adds a --monomorpize flag to rustc to turn it on. You probably don't want to use it yet, since it's broken in a whole bunch of ways, but it successfully monomorphizes simple generic functions called from within the crate. Issue #1736
2012-02-03Store item paths in ast_map, get rid of trans::local_ctxtMarijn Haverbeke-3/+3
The direct motivation for this was that the monomorphizer needs to be able to generate sane symbols for random items. The typechecker can probably also use this in the future to provide more useful error messages.
2012-02-01Rename (again) str::unsafe::slice -> str::unsafe::slice_bytes andKevin Cantu-1/+1
str::unsafe::safe_slice -> str::unsafe::slice_bytes_safe_range
2012-02-01Propagating unsafe::slice 2Kevin Cantu-2/+2
2012-02-01Get rid of native types in LLVM moduleMarijn Haverbeke-1/+1
Code is still somewhat kludgy because we don't have 32-bit enums. Issue #1673
2012-01-31Change option::t to optionTim Chevalier-3/+3
Now that core exports "option" as a synonym for option::t, search-and- replace option::t with option. The only place that still refers to option::t are the modules in libcore that use option, because fixing this requires a new snapshot (forthcoming).
2012-01-31Require alts to be exhaustiveTim Chevalier-13/+44
middle::check_alt does the work. Lots of changes to add default cases into alts that were previously inexhaustive.
2012-01-30Change all ternary ops to if/then/elsePaul Woolcock-5/+11
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-30Remove trailing whitespace in debuginfo.rsMarijn Haverbeke-1/+1
2012-01-30Only build debuginfo blocks for blocks that appear in the program textMarijn Haverbeke-22/+32
I.e. a set of curly braces, not everything that creates a block context in the trans pass. Issue #1694
2012-01-28Disable lexical block and function debug info caches to improve compilation ↵Josh Matthews-19/+18
time while #1694 is unfixed, and fix stack-exhaustion bug in block parent generation.
2012-01-27Move various trans_ modules under a trans:: umbrella moduleMarijn Haverbeke-14/+15
Closes #1304
2012-01-27Stop passing spans to middle::trans functions that don't need themMarijn Haverbeke-22/+23
Removes a bunch of (eventually) unused arguments. Makes span passing to debuginfo explicit, instead of relying on the (usually incorrect) spans held in the contexts. Closes #1439
2012-01-23s/block()/fn()/gNiko Matsakis-1/+1
2012-01-19rustc: ";" to "," in enumsPatrick Walton-8/+8
2012-01-19rustc: "tag" -> "enum"Patrick Walton-1/+1
2012-01-19Remove support for the '.' after a nullary tag in a patternTim Chevalier-1/+1
(Commit also includes lots of changes to remove '.'s that a git merge messed up, or else it was monkeys.)
2012-01-18Remove '.' after nullary tags in patternsTim Chevalier-46/+46
Does what it says on the tin. The next commit will remove support for this syntax.
2012-01-19rustc: Use integer from ctypes consistentlyHaitao Li-2/+2
2012-01-19Use ctypes in native function declarationsHaitao Li-2/+2
2012-01-17Allow omission of the '.' after nullary tag patternsTim Chevalier-3/+5
This commit allows patterns like: alt x { some(_) { ... } none { } } without the '.' after none. The parser suspends judgment about whether a bare ident is a tag or a new bound variable; instead, the resolver disambiguates. This means that any code after resolution that pattern-matches on patterns needs to call pat_util::normalize_pat, which consults an environment to do this disambiguation. In addition, local variables are no longer allowed to shadow tag names, so this required changing some code (e.g. renaming variables named "mut", and renaming ast::sub to subtract). The parser currently accepts patterns with and without the '.'. Once the compiler and libraries are changed, it will no longer accept the '.'.
2012-01-13Undo over-enthusiastic obj system removal in debuginfo.Josh Matthews-0/+3
2012-01-13llvm: Switch back to LLVM trunkBrian Anderson-1/+1
2012-01-13Obj system? What obj system?Marijn Haverbeke-3/+0
Removes the obj system from the compiler. Closes #1484
2012-01-13Remove all remaining uses of objs from the compilerMarijn Haverbeke-3/+3
2012-01-12Make driver::session::session no longer an objectMarijn Haverbeke-15/+16
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).
2012-01-05Switch to new param kind bound syntaxMarijn Haverbeke-2/+2
And remove support for the old syntax
2012-01-05Add more item types to the ast_map so the test suite can build with debug info.Josh Matthews-1/+1
2011-12-29split proto from fn_decl, as not all fn_decls know the proto.Niko Matsakis-1/+1
this will address the (crashing) new test added.
2011-12-22Register new snapshots, purge log_err and log_full in favour of log(...).Graydon Hoare-4/+4
2011-12-22Merge branch 'master' of github.com:graydon/rustGraydon Hoare-7/+7
2011-12-22Register snapshots and switch logging over to use of log_full or #error / ↵Graydon Hoare-5/+5
#debug.
2011-12-22Unify some data structures in syntax::ast that were doing the same thingMarijn Haverbeke-7/+7
As a preparation to removing some duplication in typeck.
2011-12-22Add ty::new_ty_hash, clean up comparing of ty::t'sMarijn Haverbeke-4/+3
2011-12-21Make { || ... } sugar for any type of closure, inferredNiko Matsakis-0/+3
2011-12-19Properly calculate base working dir for compile units.Josh Matthews-4/+9
2011-12-19Long lines.Josh Matthews-9/+12
2011-12-19Fix merge error and rebasing changes for debug information.Josh Matthews-4/+6
2011-12-18Remove source line generation craziness. Ensure incorrect subprogram caches ↵Josh Matthews-88/+57
are not conflated. Generate ast_map entries for object members and resource constructors and destructors.