]> git.lizzy.rs Git - rust.git/log
rust.git
12 years agoAdd @true to common_exprs and fix some exclusions
Jesse Ruderman [Tue, 20 Sep 2011 23:32:27 +0000 (16:32 -0700)]
Add @true to common_exprs and fix some exclusions

12 years agoSwitch URLs.
Graydon Hoare [Tue, 20 Sep 2011 23:26:54 +0000 (16:26 -0700)]
Switch URLs.

12 years agort: Add an on-the-side GC chain
Patrick Walton [Tue, 20 Sep 2011 22:35:14 +0000 (15:35 -0700)]
rt: Add an on-the-side GC chain

12 years agort: Rename rand() to isaac_rand() since the former prevents lots of standard headers...
Patrick Walton [Tue, 20 Sep 2011 22:34:47 +0000 (15:34 -0700)]
rt: Rename rand() to isaac_rand() since the former prevents lots of standard headers from being included

12 years agort: Remove the GC alloc chain
Patrick Walton [Tue, 20 Sep 2011 21:20:16 +0000 (14:20 -0700)]
rt: Remove the GC alloc chain

12 years agort: Remove #include "rust_box.h"
Patrick Walton [Tue, 20 Sep 2011 21:06:57 +0000 (14:06 -0700)]
rt: Remove #include "rust_box.h"

12 years agoRevert "rt: Rename rust_box to rust_box_legacy, as they're about to become self-descr...
Patrick Walton [Tue, 20 Sep 2011 20:57:04 +0000 (13:57 -0700)]
Revert "rt: Rename rust_box to rust_box_legacy, as they're about to become self-describing"

This reverts commit f6871e832c6d79d54f274d4ef4513c087ea7e36b.

12 years agort: Remove rust_box.h; I'm going to switch to an external map.
Patrick Walton [Tue, 20 Sep 2011 20:55:23 +0000 (13:55 -0700)]
rt: Remove rust_box.h; I'm going to switch to an external map.

12 years agort: Remove upcall_malloc_box and upcall_free_box; I don't think they'll be necessary...
Patrick Walton [Tue, 20 Sep 2011 20:50:15 +0000 (13:50 -0700)]
rt: Remove upcall_malloc_box and upcall_free_box; I don't think they'll be necessary after all

12 years agorustc: Pass actual tydescs to upcall_malloc
Patrick Walton [Tue, 20 Sep 2011 20:48:22 +0000 (13:48 -0700)]
rustc: Pass actual tydescs to upcall_malloc

12 years agorustc: Remove trans_raw_malloc, as it's only called from one place
Patrick Walton [Tue, 20 Sep 2011 20:38:35 +0000 (13:38 -0700)]
rustc: Remove trans_raw_malloc, as it's only called from one place

12 years agoFuzzer: add common_exprs, but comment out its use for now. Update lists of known...
Jesse Ruderman [Tue, 20 Sep 2011 19:04:12 +0000 (12:04 -0700)]
Fuzzer: add common_exprs, but comment out its use for now. Update lists of known bugs.

12 years agoRemove bogus comments from run-pass/task-comm-3
Brian Anderson [Tue, 20 Sep 2011 19:01:48 +0000 (12:01 -0700)]
Remove bogus comments from run-pass/task-comm-3

12 years agoRehabilitate run-fail/trivial-message2
Brian Anderson [Tue, 20 Sep 2011 18:59:25 +0000 (11:59 -0700)]
Rehabilitate run-fail/trivial-message2

12 years agoFix syntax error
Jesse Ruderman [Tue, 20 Sep 2011 18:58:33 +0000 (11:58 -0700)]
Fix syntax error

12 years agoRemove a bogus comment from run-fail/spawnfail
Brian Anderson [Tue, 20 Sep 2011 18:51:15 +0000 (11:51 -0700)]
Remove a bogus comment from run-fail/spawnfail

12 years agoActually un-xfail task-comm-14
Brian Anderson [Tue, 20 Sep 2011 18:49:13 +0000 (11:49 -0700)]
Actually un-xfail task-comm-14

12 years agoRehabilitate task-comm-14
Brian Anderson [Tue, 20 Sep 2011 18:47:22 +0000 (11:47 -0700)]
Rehabilitate task-comm-14

12 years agoAdd an assert to run-fail/unwind-alt
Brian Anderson [Tue, 20 Sep 2011 18:26:01 +0000 (11:26 -0700)]
Add an assert to run-fail/unwind-alt

Jesse reported not being able to reproduce this without the assert. May have
to do with optimtizations.

12 years agoMove linker invocation from driver::rustc to back::link
Brian Anderson [Tue, 20 Sep 2011 18:10:03 +0000 (11:10 -0700)]
Move linker invocation from driver::rustc to back::link

12 years agoZero locals that are inited via alt expressions. Closes #945
Brian Anderson [Tue, 20 Sep 2011 17:28:16 +0000 (10:28 -0700)]
Zero locals that are inited via alt expressions. Closes #945

12 years agoRemove some obsolete 'copy' operators from trans
Marijn Haverbeke [Tue, 20 Sep 2011 15:29:09 +0000 (17:29 +0200)]
Remove some obsolete 'copy' operators from trans

12 years agoProperly handle 'put;' in trans
Marijn Haverbeke [Tue, 20 Sep 2011 15:19:20 +0000 (17:19 +0200)]
Properly handle 'put;' in trans

Closes #947

12 years agoRemove some bogus white-space from llvm.rs
Marijn Haverbeke [Tue, 20 Sep 2011 11:25:04 +0000 (13:25 +0200)]
Remove some bogus white-space from llvm.rs

12 years agoFuzzer: add ability to run the generated programs
Jesse Ruderman [Tue, 20 Sep 2011 04:57:43 +0000 (21:57 -0700)]
Fuzzer: add ability to run the generated programs

12 years agoAdd tests for moving nullary functions
Brian Anderson [Tue, 20 Sep 2011 02:02:53 +0000 (19:02 -0700)]
Add tests for moving nullary functions

I believe this was fixed by marijn recently.

Closes #922

12 years agoUn-xfail various tests
Brian Anderson [Tue, 20 Sep 2011 01:38:14 +0000 (18:38 -0700)]
Un-xfail various tests

12 years agoUn-xfail-fast run-pass/send-iloop
Brian Anderson [Tue, 20 Sep 2011 01:36:31 +0000 (18:36 -0700)]
Un-xfail-fast run-pass/send-iloop

12 years agoRemove a spurious error pattern from run-pass/linked-failure
Brian Anderson [Tue, 20 Sep 2011 01:25:32 +0000 (18:25 -0700)]
Remove a spurious error pattern from run-pass/linked-failure

12 years agoUn-xfail two tests under check-fast
Brian Anderson [Tue, 20 Sep 2011 01:23:34 +0000 (18:23 -0700)]
Un-xfail two tests under check-fast

Closes #937. Fixed by majick.

12 years agoRevert "xfail some tests that hang (instead of segfaulting) since eafb6789a2"
Brian Anderson [Tue, 20 Sep 2011 01:00:41 +0000 (18:00 -0700)]
Revert "xfail some tests that hang (instead of segfaulting) since eafb6789a2"

This reverts commit 5f44a1356e2b0adce5157f5e331ab9a55e891b0a.

Issue #936

12 years agoCheck for the correct exit code on cfail tests. Closes #938
Brian Anderson [Fri, 16 Sep 2011 18:44:55 +0000 (11:44 -0700)]
Check for the correct exit code on cfail tests. Closes #938

12 years agoBuild tuples in two phases to avoid cleaning up partial tuples
Brian Anderson [Tue, 20 Sep 2011 00:48:11 +0000 (17:48 -0700)]
Build tuples in two phases to avoid cleaning up partial tuples

12 years agoRegister tuple cleanups after the tuple is built
Brian Anderson [Tue, 20 Sep 2011 00:04:04 +0000 (17:04 -0700)]
Register tuple cleanups after the tuple is built

Issue #936

12 years agoRevert "Revert "xfail some tests that hang (instead of segfaulting) since eafb6789a2""
Brian Anderson [Mon, 19 Sep 2011 23:08:17 +0000 (16:08 -0700)]
Revert "Revert "xfail some tests that hang (instead of segfaulting) since eafb6789a2""

This reverts commit 6eabe6f3f4b80e8c96286e266db64dfd0e576963.

12 years agoRevert "Check for the correct exit code on cfail tests. Closes #938"
Brian Anderson [Mon, 19 Sep 2011 23:08:06 +0000 (16:08 -0700)]
Revert "Check for the correct exit code on cfail tests. Closes #938"

This reverts commit c42401ebbc82d319c3003088db47f825d65fb9f7.

12 years agoRevert "xfail some tests that hang (instead of segfaulting) since eafb6789a2"
Brian Anderson [Mon, 19 Sep 2011 22:34:19 +0000 (15:34 -0700)]
Revert "xfail some tests that hang (instead of segfaulting) since eafb6789a2"

This reverts commit 5f44a1356e2b0adce5157f5e331ab9a55e891b0a.

Issue #936

12 years agoCheck for the correct exit code on cfail tests. Closes #938
Brian Anderson [Fri, 16 Sep 2011 18:44:55 +0000 (11:44 -0700)]
Check for the correct exit code on cfail tests. Closes #938

12 years agoBreak fold's circular reference during unwinding
Brian Anderson [Mon, 19 Sep 2011 22:30:58 +0000 (15:30 -0700)]
Break fold's circular reference during unwinding

This converts the AST fold into a resource that breaks it's own circular
reference (just a temporary workaround until GC), so that failure during fold
will unwind correctly.

Issue #936

12 years agoSimplify perf target flags. Apparently the event names aren't stable/portable.
Graydon Hoare [Mon, 19 Sep 2011 21:55:52 +0000 (14:55 -0700)]
Simplify perf target flags. Apparently the event names aren't stable/portable.

12 years agoBuild records in two phases to avoid cleanups on partial records
Brian Anderson [Mon, 19 Sep 2011 21:20:15 +0000 (14:20 -0700)]
Build records in two phases to avoid cleanups on partial records

12 years agoDon't register record cleanups until the record is built
Brian Anderson [Mon, 19 Sep 2011 20:11:26 +0000 (13:11 -0700)]
Don't register record cleanups until the record is built

12 years agort: Introduce a self-describing box representation and functions to create and free...
Patrick Walton [Mon, 19 Sep 2011 17:34:27 +0000 (10:34 -0700)]
rt: Introduce a self-describing box representation and functions to create and free them

12 years agoxfail some tests that hang (instead of segfaulting) since eafb6789a2
Marijn Haverbeke [Sun, 18 Sep 2011 20:13:54 +0000 (22:13 +0200)]
xfail some tests that hang (instead of segfaulting) since eafb6789a2

See issue #936

12 years agoStop creating function pairs for static functions
Marijn Haverbeke [Sun, 18 Sep 2011 20:05:58 +0000 (22:05 +0200)]
Stop creating function pairs for static functions

These are now called directly. When taking their value, a null pointer is added
to create a pair.

12 years agoAdd a precondition to GEP_tup_like
Tim Chevalier [Sat, 17 Sep 2011 17:18:30 +0000 (10:18 -0700)]
Add a precondition to GEP_tup_like

12 years agoAdd a type_is_tup_like predicate that takes a block ctxt, and make some fns pure
Tim Chevalier [Sat, 17 Sep 2011 17:17:40 +0000 (10:17 -0700)]
Add a type_is_tup_like predicate that takes a block ctxt, and make some fns pure

12 years agoIn trans, replace another impossible case with a precondition
Tim Chevalier [Sat, 17 Sep 2011 16:12:26 +0000 (09:12 -0700)]
In trans, replace another impossible case with a precondition

12 years agoMake move-mode arguments unwind correctly. Closes #939
Brian Anderson [Fri, 16 Sep 2011 21:37:58 +0000 (14:37 -0700)]
Make move-mode arguments unwind correctly. Closes #939

12 years agoDead code elim
Tim Chevalier [Fri, 16 Sep 2011 20:32:44 +0000 (13:32 -0700)]
Dead code elim

12 years agoAdd a constraint on trans::type_of_fn_from_ty
Tim Chevalier [Fri, 16 Sep 2011 20:04:14 +0000 (13:04 -0700)]
Add a constraint on trans::type_of_fn_from_ty

And change callers appropriately.

12 years agoAdd a returns_non_ty_var predicate
Tim Chevalier [Fri, 16 Sep 2011 20:03:26 +0000 (13:03 -0700)]
Add a returns_non_ty_var predicate

which just calls non_ty_var on the return type of t, assuming t is
a function type.

12 years agoMake ty_fn_ret pure and get rid of a duplicate function
Tim Chevalier [Fri, 16 Sep 2011 20:03:11 +0000 (13:03 -0700)]
Make ty_fn_ret pure and get rid of a duplicate function

12 years agoWork around an apparent compiler bug to make my patch run
Marijn Haverbeke [Fri, 16 Sep 2011 19:28:47 +0000 (21:28 +0200)]
Work around an apparent compiler bug to make my patch run

Without this, it would fail when optimization is turned on. The result of
the Load(bcx, llclosure) call would end up in llenv in a corrupted form.

12 years agoSaner approach to lvalues and callable values in trans
Marijn Haverbeke [Fri, 16 Sep 2011 14:27:34 +0000 (16:27 +0200)]
Saner approach to lvalues and callable values in trans

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

12 years agoRevert "Revert "Make option::get return the option contents by reference" due to...
Patrick Walton [Fri, 16 Sep 2011 19:20:06 +0000 (12:20 -0700)]
Revert "Revert "Make option::get return the option contents by reference" due to memory corruption"

This reverts commit d1c27ba9e06e08e1dc27b493144e467d0efd526c.

12 years agoUn-xfail some task-comm tests
Brian Anderson [Fri, 16 Sep 2011 18:29:40 +0000 (11:29 -0700)]
Un-xfail some task-comm tests

12 years agoYield after send
Brian Anderson [Fri, 16 Sep 2011 17:49:41 +0000 (10:49 -0700)]
Yield after send

12 years agoAdd non_ty_var precondition for type_of_fn, plus minor cleanup
Tim Chevalier [Fri, 16 Sep 2011 17:49:05 +0000 (10:49 -0700)]
Add non_ty_var precondition for type_of_fn, plus minor cleanup

12 years agort: Add a new rust_box structure to the runtime that describes a self-describing box
Patrick Walton [Fri, 16 Sep 2011 17:03:43 +0000 (10:03 -0700)]
rt: Add a new rust_box structure to the runtime that describes a self-describing box

12 years agort: Rename rust_box to rust_box_legacy, as they're about to become self-describing
Patrick Walton [Fri, 16 Sep 2011 17:03:21 +0000 (10:03 -0700)]
rt: Rename rust_box to rust_box_legacy, as they're about to become self-describing

12 years agoFuzzer: update lists of known bugs
Jesse Ruderman [Fri, 16 Sep 2011 17:44:58 +0000 (10:44 -0700)]
Fuzzer: update lists of known bugs

12 years agoHandle the case where a child task tries to kill a parent while it is dying
Brian Anderson [Fri, 16 Sep 2011 16:30:20 +0000 (09:30 -0700)]
Handle the case where a child task tries to kill a parent while it is dying

Still looks pretty racy

12 years agoRevert "Saner approach to lvalues and callable values in trans"
Marijn Haverbeke [Fri, 16 Sep 2011 16:37:46 +0000 (18:37 +0200)]
Revert "Saner approach to lvalues and callable values in trans"

This reverts commit 66153436c9070386786c8a38cde199b5d3e71289.

12 years agoRequire body of else-less if expressions to be a value-less block
Marijn Haverbeke [Fri, 16 Sep 2011 14:57:54 +0000 (16:57 +0200)]
Require body of else-less if expressions to be a value-less block

For consistency with other constructs that could not possibly return a
value (say, loops).

12 years agoSaner approach to lvalues and callable values in trans
Marijn Haverbeke [Fri, 16 Sep 2011 14:27:34 +0000 (16:27 +0200)]
Saner approach to lvalues and callable values in trans

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

12 years agoMove expr_uniq case in trans to a saner place
Marijn Haverbeke [Fri, 16 Sep 2011 13:03:03 +0000 (15:03 +0200)]
Move expr_uniq case in trans to a saner place

Note that unique pointers are still broken in more ways than I can count.

12 years agoRemove autoderef for calls
Marijn Haverbeke [Fri, 16 Sep 2011 12:35:39 +0000 (14:35 +0200)]
Remove autoderef for calls

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.

12 years agoRemove unused method_ty field from lval_result
Marijn Haverbeke [Fri, 16 Sep 2011 12:18:49 +0000 (14:18 +0200)]
Remove unused method_ty field from lval_result

12 years agoClean up (and optimize) root-mutability analysis in alias.rs
Marijn Haverbeke [Fri, 16 Sep 2011 11:46:03 +0000 (13:46 +0200)]
Clean up (and optimize) root-mutability analysis in alias.rs

12 years agoChange convention for specifying referenced argument
Marijn Haverbeke [Fri, 16 Sep 2011 10:42:18 +0000 (12:42 +0200)]
Change convention for specifying referenced argument

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

12 years agoActually call unreachable() in impossible case in type_of_inner
Tim Chevalier [Fri, 16 Sep 2011 06:14:24 +0000 (23:14 -0700)]
Actually call unreachable() in impossible case in type_of_inner

12 years agoAdded non_ty_var precondition to trans::type_of_inner
Tim Chevalier [Fri, 16 Sep 2011 03:47:38 +0000 (20:47 -0700)]
Added non_ty_var precondition to trans::type_of_inner

This allows us to legitimately call unreachable() in the ty_var case.

12 years agoAdd parens, as needed, around else-if conditions.
Jesse Ruderman [Fri, 16 Sep 2011 04:24:24 +0000 (21:24 -0700)]
Add parens, as needed, around else-if conditions.

12 years agoAdded an extra check in trans_alt
Tim Chevalier [Fri, 16 Sep 2011 03:32:01 +0000 (20:32 -0700)]
Added an extra check in trans_alt

Gratuitous right now, but I'm going to change the type of trans::type_of

12 years agoAdded more predicates in trans
Tim Chevalier [Fri, 16 Sep 2011 03:22:03 +0000 (20:22 -0700)]
Added more predicates in trans

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

12 years agoChange a few span_fatals to span_err
Tim Chevalier [Thu, 15 Sep 2011 22:24:42 +0000 (15:24 -0700)]
Change a few span_fatals to span_err

12 years agoAdd unreachable() fn, also nitpicking
Tim Chevalier [Thu, 15 Sep 2011 22:24:22 +0000 (15:24 -0700)]
Add unreachable() fn, also nitpicking

12 years agoUpdate README slightly.
Graydon Hoare [Thu, 15 Sep 2011 23:31:33 +0000 (16:31 -0700)]
Update README slightly.

12 years agoBegin sketching an ICU binding. Doesn't work yet.
Graydon Hoare [Thu, 15 Sep 2011 22:49:17 +0000 (15:49 -0700)]
Begin sketching an ICU binding. Doesn't work yet.

12 years agort: Add libunwind.h support on Mac OS X
Patrick Walton [Thu, 15 Sep 2011 19:52:50 +0000 (12:52 -0700)]
rt: Add libunwind.h support on Mac OS X

12 years agoRevert "Make option::get return the option contents by reference" due to memory corru...
Patrick Walton [Thu, 15 Sep 2011 19:52:09 +0000 (12:52 -0700)]
Revert "Make option::get return the option contents by reference" due to memory corruption

This reverts commit fc0bf125168ec3df75bc57c250a62d3ea225a546.

12 years agoMake option::get return the option contents by reference
Marijn Haverbeke [Thu, 15 Sep 2011 15:47:39 +0000 (17:47 +0200)]
Make option::get return the option contents by reference

I can't believe this actually works!

12 years agoAdd regression tests for previously ambiguous syntactic forms
Brian Anderson [Thu, 15 Sep 2011 15:46:07 +0000 (08:46 -0700)]
Add regression tests for previously ambiguous syntactic forms

12 years agoPrevent binary expressions from parsing when lhs is non-value block
Marijn Haverbeke [Thu, 15 Sep 2011 15:37:10 +0000 (17:37 +0200)]
Prevent binary expressions from parsing when lhs is non-value block

12 years agoRegister new snapshot
Marijn Haverbeke [Thu, 15 Sep 2011 15:33:35 +0000 (17:33 +0200)]
Register new snapshot

12 years agoGeneralize expression roots in alias analysis
Marijn Haverbeke [Thu, 15 Sep 2011 15:01:35 +0000 (17:01 +0200)]
Generalize expression roots in alias analysis

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

12 years agoAdd tests for returning by reference
Marijn Haverbeke [Thu, 15 Sep 2011 14:37:37 +0000 (16:37 +0200)]
Add tests for returning by reference

Issue #918

12 years agoRequire the parameter that will be referenced to be noted
Marijn Haverbeke [Thu, 15 Sep 2011 14:15:17 +0000 (16:15 +0200)]
Require the parameter that will be referenced to be noted

Issue #918

12 years agoOverhaul alias-checking of blocks
Marijn Haverbeke [Thu, 15 Sep 2011 13:34:50 +0000 (15:34 +0200)]
Overhaul alias-checking of blocks

The set of active bindings has to be updated as by-reference locals are
encountered.

Issue #918

12 years agoMake storing returned references in a by-reference local work
Marijn Haverbeke [Thu, 15 Sep 2011 12:53:34 +0000 (14:53 +0200)]
Make storing returned references in a by-reference local work

    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.

12 years agoForbid assignment to by-reference bindings
Marijn Haverbeke [Thu, 15 Sep 2011 12:08:54 +0000 (14:08 +0200)]
Forbid assignment to by-reference bindings

Issue #918

12 years agoMake trans understand by-ref bindings
Marijn Haverbeke [Thu, 15 Sep 2011 12:00:58 +0000 (14:00 +0200)]
Make trans understand by-ref bindings

Issue #918

12 years agoImplement basic checking of by-reference bindings
Marijn Haverbeke [Thu, 15 Sep 2011 11:40:28 +0000 (13:40 +0200)]
Implement basic checking of by-reference bindings

Issue #918

12 years agoMove local numbering into ast_map.rs
Marijn Haverbeke [Thu, 15 Sep 2011 11:18:20 +0000 (13:18 +0200)]
Move local numbering into ast_map.rs

This further simplifies the alias pass, which is sorely needed.

12 years agoAdd representation for by-ref let bindings
Marijn Haverbeke [Thu, 15 Sep 2011 09:42:56 +0000 (11:42 +0200)]
Add representation for by-ref let bindings

Issue #918

12 years agoEnsure parens are wrapped around composite exprs in call/index/field pos
Marijn Haverbeke [Thu, 15 Sep 2011 09:15:14 +0000 (11:15 +0200)]
Ensure parens are wrapped around composite exprs in call/index/field pos

This is needed to fix the second example in issue #919

12 years agoMore thorough check for (.. 10).x in pretty-printer
Marijn Haverbeke [Thu, 15 Sep 2011 08:59:06 +0000 (10:59 +0200)]
More thorough check for (.. 10).x in pretty-printer

Closes #919

12 years agoStop mentioning tail calls in reference
Marijn Haverbeke [Thu, 15 Sep 2011 08:14:14 +0000 (10:14 +0200)]
Stop mentioning tail calls in reference

They don't work, and won't work in the near future.

12 years agoAlso handle fail and put in print_maybe_parens_discrim
Marijn Haverbeke [Thu, 15 Sep 2011 08:12:09 +0000 (10:12 +0200)]
Also handle fail and put in print_maybe_parens_discrim

Closes #920