about summary refs log tree commit diff
path: root/src/comp/middle
AgeCommit message (Collapse)AuthorLines
2011-12-07Change literal representation to not truncateMarijn Haverbeke-349/+167
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-12-07repair more hash functionsNiko Matsakis-15/+15
2011-12-07Disallow binding by-mut-ref and by-move argumentsMarijn Haverbeke-0/+31
Fix bug in bound by-copy arguments. Closes #1261
2011-12-07Make typestate properly descend pattern guardsMarijn Haverbeke-0/+10
Closes #1265
2011-12-06do not stringify AST nodes unless emitting commentsNiko Matsakis-2/+6
2011-12-06rt: Various tweaks to make __morestack unwinding work on linuxBrian Anderson-0/+5
When unwinding through __morestack the stack limit in the TLS is invalidated and must be reset. Instead of actually landing at __morestack we're just going to make all our Rust landing pads call upcall_reset_stack_limit, which will find the stack segment that corresponds to the current stack pointer and put the limit in the TLS. Also massively expand the stack segment red zone to make more room for the dynamic linker. Will fix in the future.
2011-12-05rustc: Remove whitespaceBrian Anderson-1/+1
2011-12-05rustc: Add suffix ".rc" to LLVM module identifierHaitao Li-1/+12
LLVM code generator emits the ".file filename" directive for ELF backends. Value of the "filename" is set as the LLVM module identifier. Due to a LLVM MC bug[1], LLVM crashes if the module identifer is same as other symbols such as a function name in the module. This patch adds a ".rc" suffix (means crates) to LLVM module identifier to workaround the bug. Fixes issue #1251. 1. http://llvm.org/bugs/show_bug.cgi?id=11479
2011-12-05typeck: Fix for #932Stefan Plantikow-0/+14
2011-12-05rustc: Fix memory leak in do-while loopHaitao Li-2/+5
Issue #1257
2011-12-02const_check: trans: added support for trivial castsStefan Plantikow-0/+11
Part of #1215
2011-12-02parse: typeck: enabling trivial casts of tail-call return valuesStefan Plantikow-13/+24
introduces ctypes::m_* machine type aliases for int, uint, float depending on cfg(target_arch) that are used in tests
2011-12-02ty: trans: added support for dropping trivial castsStefan Plantikow-4/+25
2011-12-02ty: added type comparison that subs prim types with targ_cfg machine typesStefan Plantikow-0/+37
2011-12-02Include full module path in unresolved errors when looking in moduleMarijn Haverbeke-28/+61
Closes #1228
2011-12-02Make import ignore imports coming after themMarijn Haverbeke-14/+54
This broke no code at all, so I guess people were already writing imports in this style. Issue #1228
2011-12-02Finally make the -1 crate id in resolve.rs a constMarijn Haverbeke-10/+7
2011-12-02Allow literal patterns to contain arbitrary literal expressionsMarijn Haverbeke-80/+88
This removes the need for the unary minus hacks, and allows some other neat things like matching on 1 >> 4. Issue #954
2011-12-01Fix mistake in last use passMarijn Haverbeke-5/+12
Closes #1243
2011-11-30Box ast::path valuesMarijn Haverbeke-20/+20
It seems inefficient to copy them around. Let's measure whether that's actually > the case
2011-11-29fix bug in shape concerning size of tag variantNiko Matsakis-7/+16
2011-11-23Add some changes that *should* have been in e98286b594Marijn Haverbeke-4/+4
Forgot to amend the commit after fixing the failure.
2011-11-23Allow import directives in any blockMarijn Haverbeke-72/+88
Closes #49
2011-11-23Make type_kind properly recognize ty_ptr as sendableMarijn Haverbeke-3/+3
2011-11-23Rollback return-by-referenceMarijn Haverbeke-198/+43
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-23Remove deep scope traversal in revoke_cleanMarijn Haverbeke-8/+2
It is not needed anymore.
2011-11-22comp: allowed the declaration of pure fn's in native modsStefan Plantikow-0/+1
This is especially useful for the native calls in std::math This commit does NOT yet point to new snapshots
2011-11-22Properly check for copies when constructing a record using withMarijn Haverbeke-1/+16
Closes #989
2011-11-22Make type_needs_drop accurate, get rid of type_has_pointersMarijn Haverbeke-47/+24
Closes #1209
2011-11-22Fix inconsistency in ordering of patterns during alt compilationMarijn Haverbeke-17/+12
Closes #1153
2011-11-22Only warn about unreachable range patterns when appropriateMarijn Haverbeke-35/+15
Also simplifies the literal-munging, and moves it into ast_util Closes #1170
2011-11-22Make ast::visit only descend into types when necessaryMarijn Haverbeke-4/+3
If visit_ty is not overridden, it uses a stub function which does not descend into types. Closes #1204
2011-11-21rustc: Remove abi from ast::native_modHaitao Li-80/+88
2011-11-21Close hole in safe-reference analysisMarijn Haverbeke-3/+15
2011-11-21Add a pass that checks that blocks are only used in safe waysMarijn Haverbeke-0/+41
Closes #1188
2011-11-21Fix bad interaction between last-use finding and referencesMarijn Haverbeke-12/+29
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-18get pure wrappers approach runningNiko Matsakis-100/+49
2011-11-18sketch out designNiko Matsakis-54/+98
2011-11-18Add some comments to kind.rs and last_use.rsMarijn Haverbeke-0/+33
2011-11-18Make sure by-copy arguments take last-use into accountMarijn Haverbeke-1/+7
2011-11-18Make sure trans translates record fields in the order they appear in codeMarijn Haverbeke-24/+25
This prevents surprising side-effect orders, and makes them easier for the other passes to deal with.
2011-11-18Make trans use last_use info to not actually generate copiesMarijn Haverbeke-24/+47
Issue #925
2011-11-18Update stdlib, compiler, and tests to new kind systemMarijn Haverbeke-4/+4
This involved adding 'copy' to more generics than I hoped, but an experiment with making it implicit showed that that way lies madness -- unless enforced, you will not remember to mark functions that don't copy as not requiring copyable kind. Issue #1177
2011-11-18Implement a last-use-of-local finding algorithmMarijn Haverbeke-2/+224
Issue #925
2011-11-18Properly check kinds in instantiation of genericsMarijn Haverbeke-286/+29
Issue #1177
2011-11-18Prevent alias pass from inserting implicit copies for noncopyable typesMarijn Haverbeke-6/+4
Issue #1177
2011-11-18Overhaul the kind-checking passMarijn Haverbeke-126/+189
Not really useful yet because missing last-use-of-local optimization. Also: instantiation of type parameters needs to be checked. Issue #1177
2011-11-18Make tag, resource and object constructors take their arguments by copyMarijn Haverbeke-40/+18
Doing something like some([1, 2, 3]) will now no longer create a temporary copy of the vector. It will also be easier for the kind checker to see that putting a resource into a data-structure constructor is safe.
2011-11-18Add a pass-by-copy parameter passing conventionMarijn Haverbeke-4/+15
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-18Preparation for kind system overhaulMarijn Haverbeke-27/+27
This goes before a snapshot, so that subsequenct patches can make the transition without breaking the build. Disables kind checking pass, makes parser accept both new and old-style kind annotation. Issue #1177