about summary refs log tree commit diff
path: root/src/comp/middle
AgeCommit message (Collapse)AuthorLines
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-19/+23
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-11/+14
Issue #918
2011-09-15Insert omitted semicolons for statementsMarijn Haverbeke-13/+11
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-15/+21
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
2011-09-14Accept returning refs rooted in an arg from a by-ref funtionMarijn Haverbeke-21/+49
Issue #918
2011-09-14Make ast_map.rs index function args, switch it over to simple_visitorMarijn Haverbeke-12/+16
2011-09-14Remove some extra white-space introduced by the pretty-printerMarijn Haverbeke-17/+1
2011-09-14Disallow implicit arg copying when the function returns a refMarijn Haverbeke-1/+2
Issue #918
2011-09-14Add support for basic return-by-alias to transMarijn Haverbeke-58/+75
Issue #918
2011-09-14Clean up trans_obj.rs a bitMarijn Haverbeke-30/+21
As a preparation to adding an arg to type_of_fn_full
2011-09-14Add a ret_style field to fn_ctxt in transMarijn Haverbeke-9/+19
2011-09-14Simplify trans::new_fn_ctxt_w_idMarijn Haverbeke-20/+8
It was still living in the pre-decent-type-inference era.
2011-09-14Rudimentary checking of safe alias returnsMarijn Haverbeke-27/+52
2011-09-14Rename restrict to binding in alias.rsMarijn Haverbeke-75/+66
Its role gradually changed to the point where the old name doesn't really make sense anymore.
2011-09-14Stop needlessly boxing vectors in alias.rsMarijn Haverbeke-22/+20
2011-09-14Make most of the compiler aware of return-by-referenceMarijn Haverbeke-24/+18
tyencode/tydecode still don't know about it. return_ref will be extended to take arguments anyway.
2011-09-14Rename ast::controlflow to ast::ret_styleMarijn Haverbeke-31/+27
It will include information about returning by alias.
2011-09-13Try harder still to generate fewer landing padsBrian Anderson-1/+19
Scopes that don't have cleanups don't need their own landing pads This takes the optimized rustc bin from 4.7MB to 4.4
2011-09-13Try a little harder to avoid creating new landing padsBrian Anderson-10/+11
It's only when we add or revoke cleanups involving immediates that we need a new landing pad for the scope. Trims 5K off the optimized rustc bin
2011-09-13Reuse landing pads when possibleBrian Anderson-7/+32
Cuts the optimized rustc bin from 5.2 to 4.7MB
2011-09-13Add missing cases for machine floats in shape.rsMarijn Haverbeke-3/+2
2011-09-13Ensure that the declared type and actual type of a constant agreeMarijn Haverbeke-0/+3
Closes #899
2011-09-13Always warn when implicitly copying a generic typeMarijn Haverbeke-12/+10
2011-09-13Properly alias-check bindings in for-each loopsMarijn Haverbeke-40/+32
2011-09-13Clean up copy bookkeeping in alias.rsMarijn Haverbeke-36/+34
2011-09-13Make for loop alias-safeMarijn Haverbeke-52/+36
2011-09-13Apply implicit copying for unsafe references to alt patternsMarijn Haverbeke-54/+125
2011-09-12Kill trailing whitespace.Graydon Hoare-1/+1
2011-09-12Factor imports mindlessly.Graydon Hoare-408/+143
2011-09-12Merge branch 'unwind'Brian Anderson-26/+130
Conflicts: src/comp/middle/trans.rs src/comp/middle/trans_build.rs src/lib/run_program.rs src/test/compiletest/runtest.rs
2011-09-12Undo some pretty-printer damage in ty.rsMarijn Haverbeke-134/+26
2011-09-12Rename alias to reference in docs and error messagesMarijn Haverbeke-8/+9
Update docs to reflect new approach to aliases
2011-09-12Warn when inserting an implicit copy that may be expensiveMarijn Haverbeke-16/+53
2011-09-12Properly implement copy expressionsMarijn Haverbeke-19/+30
(And use them in some places that were doing {expr} before.)
2011-09-12Pretty-print for new arg-mode syntaxMarijn Haverbeke-109/+155
2011-09-12Reformat for new mode syntax, step 1Marijn Haverbeke-1679/+1675
Long lines were fixed in a very crude way, as I'll be following up with another reformat in a bit.
2011-09-12Make the names of the arg mode tag reflect their (revised) meaningMarijn Haverbeke-57/+30
2011-09-12Pass all arguments by reference, make immut alias mode equiv to valueMarijn Haverbeke-155/+185
Arguments that can't be safely referenced will be implicitly copied. (Warnings for expensive copies will be forthcoming.) This will allow us to get rid of most of the ampersands in function signatures. See [1]. [1] https://mail.mozilla.org/pipermail/rust-dev/2011-September/000759.html
2011-09-11Zero locals when the initializer might call a functionBrian Anderson-0/+1
The function might fail, leaving the local uninitialized Issue #236
2011-09-11Invoke put functionsBrian Anderson-1/+1
Issue #236
2011-09-11Add some FIXMEs about unwinding implementationBrian Anderson-0/+5
Issue #236
2011-09-11Invoke upcall_failBrian Anderson-4/+15
This allows landing pads to be generated around fail statements Issue #236
2011-09-11Run cleanups during unwindingBrian Anderson-0/+12
Issue #236