about summary refs log tree commit diff
path: root/src/comp/middle/alias.rs
AgeCommit message (Collapse)AuthorLines
2011-12-16reorder args to the various vec, option fns so blk comes lastNiko Matsakis-2/+2
2011-12-16Make uses of self in impls compileMarijn Haverbeke-13/+12
Get rid of expr_self_call, introduces def_self. `self` is now, syntactically, simply a variable. A method implicitly brings a `self` binding into scope. Issue #1227
2011-12-16Parse and resolve implementations.Marijn Haverbeke-1/+1
Issue #1227
2011-12-13Copy first batch of material from libstd to libcore.Graydon Hoare-2/+3
2011-12-08Allow binding of nested patternsMarijn Haverbeke-1/+2
See src/test/run-pass/nested-patterns.rs for some examples. The syntax is boundvar@subpattern Which will match the subpattern as usual, but also bind boundvar to the whole matched value. Closes #838
2011-12-07Remove stmt_crate_directive, it's vestigial and confusing.Graydon Hoare-3/+0
2011-12-07Change literal representation to not truncateMarijn Haverbeke-3/+2
Also shuffles around the organization of numeric literals and types, separating by int/uint/float instead of machine-vs-non-machine types. This simplifies some code. Closes #974 Closes #1252
2011-11-30Box ast::path valuesMarijn Haverbeke-4/+3
It seems inefficient to copy them around. Let's measure whether that's actually > the case
2011-11-23Rollback return-by-referenceMarijn Haverbeke-110/+3
It's proving too inflexible, so I'm ripping out the extra complexity in the hope that regions will, at some point, provide something similar. Closes #918
2011-11-21rustc: Remove abi from ast::native_modHaitao Li-1/+1
2011-11-21Close hole in safe-reference analysisMarijn Haverbeke-3/+15
2011-11-21Fix bad interaction between last-use finding and referencesMarijn Haverbeke-2/+9
The last-use pass now takes input from the alias pass to not mark things as last uses that are still accessed through a reference. Issue #925
2011-11-18Add a pass-by-copy parameter passing conventionMarijn Haverbeke-1/+4
This is intended to solve the problem of how to pass arguments to constructor functions -- you want to move in rvalues, but not have to explicitly copy stuff that is not an rvalue. The by-copy passing convention will ensure the callee gets its own copy of the value. For rvalues, it'll just pass off the value. For lvalues, it'll make a copy. Issue #1177
2011-11-17remove compile-command from local variable blocksNiko Matsakis-1/+0
2011-11-15Fix handling of loops and conditionals in alias.rsMarijn Haverbeke-62/+149
It now threads information about invalidated aliases through the AST properly. This makes it more permissive for conditionals (invalidating an alias in one branch doesn't prevent you from using it in another), and less permissive for loops (it now properly notices when a loop invalidates an alias that it might still use in another iteration). Closes #1144
2011-11-10Cleanup unused importsHaitao Li-2/+2
2011-11-03Disallow writing to function arguments againMarijn Haverbeke-1/+1
Remove implicit copying hack. Closes #1118
2011-10-25Properly take mutable object fields into account during alias analysisMarijn Haverbeke-16/+23
Closes #1055
2011-10-21Change the way block calls are parsed, mark them as block-calls.Marijn Haverbeke-2/+2
This makes it possible to omit the semicolon after the block, and will cause the pretty-printer to properly print such calls (if pretty-printing of blocks wasn't so broken). Block calls (with the block outside of the parentheses) can now only occur at statement level, and their value can not be used. When calling a block-style function that returns a useful value, the block must be put insde the parentheses. Issue #1054
2011-10-21Drop support for iter, put, and for-eachMarijn Haverbeke-32/+0
Closes #1056
2011-10-20Merge ast::proto_shared and ast::proto_closureBrian Anderson-1/+1
Now they are both just proto_shared and proto_shared takes an argument indicating that it is sugared as 'lambda'
2011-10-12expand purity to include unsafeNiko Matsakis-18/+22
2011-10-07Forbid passing dynamically-sized types by valueMarijn Haverbeke-2/+11
Issue #1008
2011-10-07Parse and typecheck by-value and by-ref arg specsMarijn Haverbeke-3/+1
Add sprinkle && throughout the compiler to make it typecheck again. Issue #1008
2011-09-28Revert "Revert "Implement pattern ranges for all numeric types.""Brian Anderson-1/+1
This reverts commit a034f87146e60e1db2327c6f6807c47406a1bb0b. Conflicts: src/comp/middle/check_alt.rs src/comp/middle/trans_alt.rs src/comp/syntax/ast.rs src/comp/syntax/ast_util.rs src/comp/syntax/fold.rs src/comp/syntax/print/pprust.rs Conflicts: src/comp/middle/trans_alt.rs
2011-09-28Remove a few kludges that worked around issue #913Marijn Haverbeke-3/+1
2011-09-23Begin to support pattern matching on unique boxesBrian Anderson-0/+7
Issue #409
2011-09-22Convert ty::ty_uniq to contain a mutable typeBrian Anderson-3/+2
Issue #409
2011-09-21Revert "Implement pattern ranges for all numeric types."Marijn Haverbeke-1/+1
This reverts commit ce0f054f9d56df4e60291fc2e1b89ce979cf374f.
2011-09-21Implement pattern ranges for all numeric types.Josh Matthews-1/+1
2011-09-16Remove autoderef for callsMarijn Haverbeke-2/+2
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-16Clean up (and optimize) root-mutability analysis in alias.rsMarijn Haverbeke-65/+64
2011-09-16Change convention for specifying referenced argumentMarijn Haverbeke-4/+10
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-15Generalize expression roots in alias analysisMarijn Haverbeke-35/+40
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-15Require the parameter that will be referenced to be notedMarijn Haverbeke-25/+32
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-3/+25
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-2/+2
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-31/+25
This further simplifies the alias pass, which is sorely needed.
2011-09-15Add representation for by-ref let bindingsMarijn Haverbeke-1/+2
Issue #918
2011-09-14Add syntax and representation for return-by-mutably-rooted-refMarijn Haverbeke-6/+11
This will be used in the near future to decide what can safely be done with the returned reference. Issue #918
2011-09-14Accept returning refs rooted in an arg from a by-ref funtionMarijn Haverbeke-6/+41
Issue #918
2011-09-14Disallow implicit arg copying when the function returns a refMarijn Haverbeke-1/+2
Issue #918
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-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