about summary refs log tree commit diff
path: root/src/comp
AgeCommit message (Collapse)AuthorLines
2011-08-10rustc: Don't free shared memory when --gc is onPatrick Walton-5/+28
2011-08-10rustc: Add a --gc switch for debugging and experimentationPatrick Walton-3/+7
2011-08-10Rework check_expr substantially.Michael Sullivan-130/+66
The bulk of check_expr is now check_expr_with_unifier, which takes an expected type and a unification function and will perform the unification on the type it produces. check_expr calls check_expr_with_unifier with a dummy unifier and a new function, check_expr_with, takes an expected type and uses the simple unifier. I think this generally makes thing cleaner, but the purpose for doing this is to enable type inferred lambda-blocks to be useful by allowing the argument types to be unified before the body of the lambda is checked.
2011-08-10Introduce a ty_infer ast node and use it instead of option::t[ty].Michael Sullivan-49/+55
This actually basically makes things worse, since we get less nice type system guarentees but it will make doing type inferred blocks a fair deal less painful. I'm not /really/ happy about this...
2011-08-10rustc: Mark functions as "rust" GCPatrick Walton-1/+3
2011-08-10Eliminate the last vestiges of init_recv.Michael Sullivan-10/+1
2011-08-10Some cleanup in check_expr.Michael Sullivan-14/+12
2011-08-10rustc: Remove unused "trace" upcallsPatrick Walton-17/+0
2011-08-10rustc: Declare GC-related intrinsicsPatrick Walton-0/+8
2011-08-10rustc: Add unique pointers to the set of types we supportPatrick Walton-24/+49
2011-08-10Use actual type, not declared type, when zeroing move argumentsTim Chevalier-3/+14
trans was failing with a bounds check error because the caller was using the declared type (an out-of-scope ty param) and not the actual type in a list of argument types to zero. Closes #811
2011-08-10Remove dead keywords from parser.Graydon Hoare-2/+0
2011-08-10Factor out creation of object body types.Lindsey Kuper-55/+48
2011-08-10Rename unify::simple to unify::unify.Michael Sullivan-4/+3
2011-08-10Some trivial cleanup.Michael Sullivan-33/+4
2011-08-10Comments, cleanup, whitespace, refactoring.Lindsey Kuper-77/+74
2011-08-10rustc: Use polymorphic loggingPatrick Walton-105/+26
2011-08-09rustc: Make iter_structural_ty_full and friends take one value, not two. ↵Patrick Walton-70/+36
Shaves a second off codegen.
2011-08-09rustc: Remove the code to generate cmp gluePatrick Walton-172/+5
2011-08-09Actually perform handoff from caller to callee on move-mode args.Graydon Hoare-9/+41
2011-08-09rustc: Use shapes instead of codegen'd cmp gluePatrick Walton-7/+1
2011-08-09Move object-system-related trans stuff to its own file.Lindsey Kuper-1008/+1005
2011-08-09Convert remaning ivec decls to new syntaxBrian Anderson-3/+3
These snuck in during rebasing
2011-08-09Remove support for the ivec T[] syntax.Erick Tryzelaar-35/+16
2011-08-09Port the compiler to the ivec type [T] syntax.Erick Tryzelaar-831/+832
2011-08-09Change the ivec type syntax to [T].Erick Tryzelaar-14/+8
This preserves the old syntax for now.
2011-08-09A little backwarding cleanup/refactoring.Lindsey Kuper-14/+10
2011-08-09Thread "self" through the stack. Backwarding! Closes #702.Lindsey Kuper-20/+82
2011-08-08Implement typestate checking for move-mode args. Un-XFAIL ↵Graydon Hoare-28/+110
compile-fail/move-arg.rs.
2011-08-08rustc: Emit the shape of "float" as f64, not f32Patrick Walton-1/+1
2011-08-08Don't bother zeroing out slots in cleanups.Michael Sullivan-5/+1
2011-08-08rustc: Fix signature on cmp glue upcallPatrick Walton-1/+1
2011-08-08Add new arg-passing mode 'move' denoted with '-T'. Translate as ↵Graydon Hoare-6/+17
pass-by-value, doesn't deinit source yet nor get proper analysis in typestate, alias passes.
2011-08-08rustc: Declare upcall_cmp_typePatrick Walton-10/+20
2011-08-05Revert "rustc: bzero in zero_alloca. Shaves off a second or three."Paul Stansifer-1/+1
This causes trouble in Valgrind in drop glue in parsing. This reverts commit 4d180793f04ece462d2053c1a04ea2b0d73b4ee2.
2011-08-05Atomic ref counting for chans.Eric Holk-1/+17
2011-08-05Initialize all constraints to FalseTim Chevalier-9/+24
Previously, typestate was initializing the init constraint for a declared-but-not-initialized variable (like x in "let x;") to False, but other constraints to Don't-know. This led to over-lenient results when a variable was used before declaration (see the included test case). Now, everything gets initialized to False in the prestate/poststate- finding phase, and Don't-know should only be used in pre/postconditions. This aspect of the algorithm really needs formalization (just on paper), but for now, this closes #700
2011-08-05rustc: Parse "inline". Also write it into metadata.Patrick Walton-13/+33
2011-08-05rustc: Add inlineness to the fn decl insteadPatrick Walton-0/+10
2011-08-05Revert "rustc: Introduce the concept of inline to the AST"Patrick Walton-104/+86
This reverts commit 9b9170f9fe2e4701255a5bd0630c203409d8e934.
2011-08-05rustc: Introduce the concept of inline to the ASTPatrick Walton-86/+104
2011-08-05(Almost) Always unify a function tail expr with the function result typeTim Chevalier-6/+31
typeck::check_fn had an exception for the case where the tail expr was compatible with type nil -- in that case, it doesn't unify the tail expr's type with the enclosing function's result type. This seems wrong to me. There are several test cases in Issue #719 that illustrate why. If the tail expr has type T, for some type variable T that isn't resolved when this check happens, then T never gets unified with anything, which is incorrect -- T should be unified with the result type of the enclosing function. (The bug was occurring because an unconstrained type variable is compatible with type nil.) Instead, I removed the check for type nil and added a check that the function isn't an iterator -- if it's an iterator, I don't check the tail expr's type against the function result type, as that wouldn't make sense. However, this broke two test cases, and after discussion with brson, I understood that the purpose of the check was to allow semicolons to be omitted in some cases. The whole thing seems rather ad hoc. But I came up with a hacky compromise solution: instead of checking whether the tailexpr type is *compatible* with nil, we now just check whether it *is* nil. This also necessitates calling resolve_type_vars_if_possible before the check happens, which worries me. But, this fixes the bug from Issue #719 without requiring changes to any test cases. Closes #719 but I didn't try every variation -- so reopen the bug if one of the variations still doesn't work.
2011-08-04Prohibit assignment to upvars in lambdas. Closes #805.Michael Sullivan-5/+27
2011-08-04Revert "rustc: Don't emit memset for non-structural types" due to crashesPatrick Walton-13/+2
This reverts commit 3d5a777fe19ab210aedf473678687a98023ff586.
2011-08-04rustc: Don't emit memset for non-structural typesPatrick Walton-2/+13
2011-08-04Add a cleanup for copying closures. Closes #804.Michael Sullivan-0/+3
2011-08-04Don't force resolution of type variables until there is no enclosing ↵Michael Sullivan-8/+7
function scope. Closes #803.
2011-08-04rustc: bzero in drop_slotPatrick Walton-1/+1
2011-08-04Enable creation of backwarding vtables (issue #702), but don't startLindsey Kuper-160/+232
using them yet. Also, refactor process_fwding_mthd into separate functions to handle backwarding and forwarding, and refactor create_vtbl to be more digestible.
2011-08-04rustc: bzero in zero_alloca. Shaves off a second or three.Patrick Walton-1/+1