about summary refs log tree commit diff
path: root/src/comp
AgeCommit message (Collapse)AuthorLines
2011-04-29Don't emit metadata unless compiling -shared.Graydon Hoare-5/+8
2011-04-29Implement destructors in rustcMarijn Haverbeke-40/+61
Unlike rustboot, rustc keeps it destructors in vtables. Entry 0 holds either the destructor for the obj or a NULL pointer. The method offsets start at 1.
2011-04-29rustc: Temporarily add a switch and a corresponding makefile variable to ↵Patrick Walton-5/+12
disable typestate
2011-04-29rustc: Add a --time-passes optionPatrick Walton-14/+42
2011-04-29rustc: Handle alias parameters in native functions properlyPatrick Walton-14/+20
2011-04-29rustc: Remove the wrong-compiler warning; we're self-hosting now.Patrick Walton-12/+1
2011-04-29Intern metadata while writing, shrink stage1 from 12mb to 5.7mb.Graydon Hoare-94/+224
2011-04-28rustc: Fix vec append glue for strings. Add a test case.Patrick Walton-5/+8
2011-04-28rustc: Add some value names to the vec append glue function. Un-XFAIL ↵Patrick Walton-0/+6
vec-growth.rs.
2011-04-28More attempts at fixing broken vec-append glue.Graydon Hoare-3/+3
2011-04-28Make the no-growth path (previously never exercised) in rustc *work*.Graydon Hoare-2/+1
2011-04-28Actually hit the no-growth path on vec-append.Graydon Hoare-2/+12
2011-04-28Consider unop deref as an lval. Un-XFAIL vec-push.Graydon Hoare-0/+1
2011-04-28rustc: Only use color if it's supportedPatrick Walton-2/+10
2011-04-28Drop args in native stubs too.Graydon Hoare-0/+11
2011-04-28Enable typestate_checkTim Chevalier-2/+1
This was supposed to be in a previous commit. I don't know what happened.
2011-04-28Add a session field to ty_ctxt and change an err to span_errTim Chevalier-12/+18
I changed instantiate to print out a more helpful error message, which required passing it a session argument. To avoid threading extra arguments through a lot of functions, I added a session field to ty_ctxt.
2011-04-28Reindented things and removed superfluous comments, nothing to see hereTim Chevalier-14/+7
2011-04-28Fix some nested patterns in rustcTim Chevalier-0/+2
In rustc, nested patterns were potentially matching when they shouldn't match, because a loop index wasn't being incremented. Fixed it and added one test case.
2011-04-28Fix bug in handling of expr_alt (postcond for alts was being intersected ↵Tim Chevalier-52/+102
with postcond for scrutinee)
2011-04-28Fixed bug in typeck that wasn't filling in anns for stmtsTim Chevalier-8/+39
(needed for typestate_check). Also changed a (log; fail) to (log_err; fail) in typestate_check, and added some more logging funs in util.common.
2011-04-28Support all expression forms in typestateTim Chevalier-12/+230
Added support for self_method, cont, chan, port, recv, send, be, do_while, spawn, and ext; handled break and cont correctly. (However, there are no non-xfailed test cases for ext or spawn in stage0 currently.) Although the standard library compiles and all test cases pass with typestate enabled, I left typestate checking disabled as rustc terminates abnormally when building the standard library if so, even though it does generate code correctly.
2011-04-28Further work on typestate_checkTim Chevalier-131/+426
Lots of work on typestate_check, seems to get a lot of the way through checking the standard library. * Added for, for_each, assign_op, bind, cast, put, check, break, and cont. (I'm not sure break and cont are actually handled correctly.) * Fixed side-effect bug in seq_preconds so that unioning the preconditions of a sequence of statements or expressions is handled correctly. * Pass poststate correctly through a stmt_decl. * Handle expr_ret and expr_fail properly (after execution of a ret or fail, everything is true -- this is needed to handle ifs and alts where one branch is a ret or fail) * Fixed bug in set_prestate_ann where a thing that needed to be mutated wasn't getting passed as an alias * Fixed bug in how expr_alt was treated (zero is not the identity for intersect, who knew, right?) * Update logging to reflect log_err vs. log * Fixed find_locals so as to return all local decls and exclude function arguments. * Make union_postconds work on an empty vector (needed to handle empty blocks correctly) * Added _vec.cat_options, which takes a list of option[T] to a list of T, ignoring any Nones * Added two test cases.
2011-04-28Add a very minimal set of .cfi_* statements to get part of backtracesRafael Ávila de Espíndola-2/+34
working (on hello world at least): ~/inst/gdb/bin/gdb --args ./foo (gdb) b write ... (gdb) r ... Breakpoint 1, 0xf7f04270 in write () from /lib32/libc.so.6 (gdb) bt 0 0xf7f04270 in write () from /lib32/libc.so.6 1 0x0804931a in rust_native_cdecl_3 () 2 0x080487d7 in _rust_wrapper3_ () 3 0x0804890a in _rust_fn5_main () 4 0x08049440 in rust_native_cdecl_7 ()
2011-04-28Actually perform take/drop on args (oh my!)Graydon Hoare-4/+36
2011-04-28rustc: Joseph and the Amazing Technicolor Error MessagesPatrick Walton-21/+20
2011-04-27Use cnames when present in ty.ty_to_str.Graydon Hoare-10/+10
2011-04-27Cache sha1 values of types, use seq-based mangling for glue as it's private ↵Graydon Hoare-10/+17
anyways.
2011-04-27Partly disable simplified-type glue optimization due to compile-time cost.Graydon Hoare-1/+11
2011-04-26rustc: Ignore the return value of native functions that return nil. stage1 ↵Patrick Walton-1/+10
can build libstd now, though it leaks.
2011-04-26rustc: Actually write the optimized bitcode when --save-temps is onPatrick Walton-12/+13
2011-04-26Support octal #fmt conversionsBrian Anderson-0/+7
2011-04-26Speed up calls to get_tydesc and kill cname-redundant glue generation.Graydon Hoare-16/+29
2011-04-26Merge branch 'master' of ssh://github.com/graydon/rustGraydon Hoare-125/+81
2011-04-26Various bits of trans lint, nothing major.Graydon Hoare-25/+36
2011-04-26rustc: Cap ridiculous type name sizesPatrick Walton-1/+3
2011-04-26Change rustc to use GetOpts rather than ad-hoc command-line parsingMarijn Haverbeke-124/+78
NOTE: all 'long' parameters now use a double dash, so --shared, rather than gcc-style -shared.
2011-04-25rustc: Add a missing return value to Collect.ty_of_item()Patrick Walton-1/+3
2011-04-25A little more guarding against wasted work in ty, typeck.Graydon Hoare-2/+19
2011-04-25rustc: Use the abbreviated type names to avoid LLVM bitcode size explosionPatrick Walton-5/+11
2011-04-25Kick ty_var and ty_local entries out of the type store. Pre-compute presence ↵Graydon Hoare-72/+183
of var, local, param and bound_params in types.
2011-04-25rustc: Add a -save-temps option to save bitcode and write output ↵Patrick Walton-11/+64
simultaneously; document command line switches
2011-04-25rustc: Pass a "type context" around instead of directly passing the type ↵Patrick Walton-833/+786
store; prep for removing type annotations
2011-04-25Avoid type_store hashtable access for a variety of cases, probably only ↵Graydon Hoare-45/+168
ty_var matters.
2011-04-25Skip substitution and/or binding when there's no work to do.Graydon Hoare-0/+34
2011-04-25Bind tag members as aliases rather than new locals.Graydon Hoare-19/+18
2011-04-23Fix busted iter/put code. Un-XFAIL foreach-box-drop.rs.Graydon Hoare-95/+94
2011-04-22rustc: Use a silly "magic numbers" hack; seems to speed things up a bit.Patrick Walton-2/+41
2011-04-22rustc: Include the cname in the hash to increase entropyPatrick Walton-1/+10
2011-04-22rustc: Thread the type store through everything that needs to access type ↵Patrick Walton-383/+412
structures