about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2011-09-16Handle the case where a child task tries to kill a parent while it is dyingBrian Anderson-1/+24
Still looks pretty racy
2011-09-16Revert "Saner approach to lvalues and callable values in trans"Marijn Haverbeke-220/+197
This reverts commit 66153436c9070386786c8a38cde199b5d3e71289.
2011-09-16Require body of else-less if expressions to be a value-less blockMarijn Haverbeke-17/+21
For consistency with other constructs that could not possibly return a value (say, loops).
2011-09-16Saner approach to lvalues and callable values in transMarijn Haverbeke-197/+220
LValues no longer carry information about generics and objs, instead there's an extended form of lvalue, lval_maybe_callee, only used by call and bind, which holds this info. This makes it possible to take the value of a method and get a working closure, and will (with some more work) allow us to call statically known functions without loading from their pair. Closes #435 Closes #758
2011-09-16Move expr_uniq case in trans to a saner placeMarijn Haverbeke-12/+4
Note that unique pointers are still broken in more ways than I can count.
2011-09-16Remove autoderef for callsMarijn Haverbeke-52/+18
We were only using it in a single place, and there for no discernable reason (probably as part of the bare-fn-vals-are-not-copyable plan). It seems more surprising than useful.
2011-09-16Remove unused method_ty field from lval_resultMarijn Haverbeke-10/+5
2011-09-16Clean up (and optimize) root-mutability analysis in alias.rsMarijn Haverbeke-70/+64
2011-09-16Change convention for specifying referenced argumentMarijn Haverbeke-22/+34
It is now 1-based, rather than 0 based. (Seems more natural, and allows 0 to be used to refer to self and maybe to closure.) Also allows non-referenced args to be implicitly copied again. Issue #918
2011-09-15Actually call unreachable() in impossible case in type_of_innerTim Chevalier-3/+5
2011-09-15Added non_ty_var precondition to trans::type_of_innerTim Chevalier-57/+109
This allows us to legitimately call unreachable() in the ty_var case.
2011-09-15Add parens, as needed, around else-if conditions.Jesse Ruderman-3/+10
2011-09-15Added an extra check in trans_altTim Chevalier-0/+1
Gratuitous right now, but I'm going to change the type of trans::type_of
2011-09-15Added more predicates in transTim Chevalier-2/+16
Added the non_ty_var predicate (soon to be used) Added a check in get_res_dtor (will be necessary for a future change to type_of_fn) Removed a gratuitous ret
2011-09-15Change a few span_fatals to span_errTim Chevalier-5/+5
2011-09-15Add unreachable() fn, also nitpickingTim Chevalier-7/+8
2011-09-15Update README slightly.Graydon Hoare-2/+3
2011-09-15Begin sketching an ICU binding. Doesn't work yet.Graydon Hoare-0/+167
2011-09-15rt: Add libunwind.h support on Mac OS XPatrick Walton-1/+22
2011-09-15Revert "Make option::get return the option contents by reference" due to ↵Patrick Walton-2/+2
memory corruption This reverts commit fc0bf125168ec3df75bc57c250a62d3ea225a546.
2011-09-15Make option::get return the option contents by referenceMarijn Haverbeke-2/+2
I can't believe this actually works!
2011-09-15Add regression tests for previously ambiguous syntactic formsBrian Anderson-0/+37
2011-09-15Prevent binary expressions from parsing when lhs is non-value blockMarijn Haverbeke-0/+1
2011-09-15Register new snapshotMarijn Haverbeke-0/+5
2011-09-15Generalize expression roots in alias analysisMarijn Haverbeke-35/+49
This allows calls-returning-a-reference to count as expression roots, making it possible to return the result of such a call by reference. Issue #918
2011-09-15Add tests for returning by referenceMarijn Haverbeke-0/+92
Issue #918
2011-09-15Require the parameter that will be referenced to be notedMarijn Haverbeke-38/+74
Issue #918
2011-09-15Overhaul alias-checking of blocksMarijn Haverbeke-34/+27
The set of active bindings has to be updated as by-reference locals are encountered. Issue #918
2011-09-15Make storing returned references in a by-reference local workMarijn Haverbeke-39/+47
fn f(a: {x: str}) -> &str { ret a.x; } fn main() { let x = {x: "hi"}; let &y = f(x); // Look ma, no copy! log_err y; } Issue #918.
2011-09-15Forbid assignment to by-reference bindingsMarijn Haverbeke-21/+25
Issue #918
2011-09-15Make trans understand by-ref bindingsMarijn Haverbeke-8/+19
Issue #918
2011-09-15Implement basic checking of by-reference bindingsMarijn Haverbeke-3/+57
Issue #918
2011-09-15Move local numbering into ast_map.rsMarijn Haverbeke-48/+67
This further simplifies the alias pass, which is sorely needed.
2011-09-15Add representation for by-ref let bindingsMarijn Haverbeke-19/+31
Issue #918
2011-09-15Ensure parens are wrapped around composite exprs in call/index/field posMarijn Haverbeke-5/+10
This is needed to fix the second example in issue #919
2011-09-15More thorough check for (.. 10).x in pretty-printerMarijn Haverbeke-5/+21
Closes #919
2011-09-15Also handle fail and put in print_maybe_parens_discrimMarijn Haverbeke-2/+5
Closes #920
2011-09-15Remove maybe_protect_block kludge from pretty-printerMarijn Haverbeke-121/+1
It is no longer needed.
2011-09-15Introduce new semicolon rulesMarijn Haverbeke-71/+44
- Loop bodies and resource constructors aren't allowed to have trailing expressions anymore. - An expression that ends* in a block without trailing expression can can not be called, indexed, or subscripted. - Only expression-statements that end* in a block without trailing expression can omit their semicolon. *) 'Ending in a trailing expression' is defined as being a block or construct-ending-in-a-block (if, alt) that either ends in an expression itself, or ends in another block-like expression that has a trailing expression (by these same rules).
2011-09-15Insert omitted semicolons for statementsMarijn Haverbeke-35/+30
2011-09-14xfail-fast run-pass/linked-failure.rs. Not sure what the problem is.Brian Anderson-1/+1
2011-09-14Unsupervise tasks before the scheduler kills them. Unblock before yield->failBrian Anderson-3/+9
2011-09-14Add a run-pass test for linked failureBrian Anderson-0/+24
2011-09-14Make failure propagation to dead parents workBrian Anderson-3/+81
The failure will basically go 'through' the dead parent and continue propagating the failure (as if the child was reparented).
2011-09-14Make linked task failure work againBrian Anderson-4/+14
2011-09-14Add another XFAILed test for failing destructorsBrian Anderson-0/+13
2011-09-14Add another unwind testBrian Anderson-0/+12
This makes sure that cleanups added after the first invoke in a scope are actually run on unwind
2011-09-14Revert "Try a little harder to avoid creating new landing pads"Brian Anderson-11/+10
This reverts commit b8e31ac46917edcf5922f0b191c5e6c4505830d2. Conflicts: src/comp/middle/trans.rs
2011-09-14Add syntax and representation for return-by-mutably-rooted-refMarijn Haverbeke-34/+55
This will be used in the near future to decide what can safely be done with the returned reference. Issue #918
2011-09-14Prevent memory errors when returning references to temp args.Marijn Haverbeke-14/+18
Issue #918