Brian Anderson
ed0eb8f45a
stdlib: Remove unneeded type params from alt patterns
2011-05-31 01:23:53 -04:00
Brian Anderson
c1d97a41eb
Register new snapshots
2011-05-31 01:23:05 -04:00
Brian Anderson
c7e3f88c93
rustc: Pushdown type params for tag patterns. Closes #363
2011-05-31 00:00:04 -04:00
Brian Anderson
973b93ee2a
rt: Use new module syntax for logging rt pseudo-modules
...
Now use RUST_LOG=rt::mem instead of RUST_LOG=rt.mem
2011-05-30 17:17:51 -04:00
Tim Chevalier
18883fea3a
In pre/postcondition computation, failing calls should set the postcondition
...
A non-returning call should have a postcondition in which all predicates
are true -- not just a poststate. Otherwise, alt expressions where
one or more branches terminate in a non-returning call and others
initialize a variable get rejected.
Includes a test case.
2011-05-27 20:43:51 -07:00
Tim Chevalier
95e1aa18c1
change comment
2011-05-27 20:43:51 -07:00
Tim Chevalier
9a24e4f780
Fix two typestate bugs
...
* Non-returning calls should set all predicates to be true, not
just the "this function returns" predicate
* Fixed a bug in the expr_alt case in tstate.states that wasn't updating
the changed flag properly, then fixed *another* bug that was updating
it too enthusiastically, but was masked by the first bug.
2011-05-27 20:43:51 -07:00
Lindsey Kuper
dc9d5e1689
Lots of comments, and some more descriptive names.
2011-05-27 18:20:43 -07:00
Tim Chevalier
b6e0c5829f
Check the declaration type in a for loop against the sequence type
...
Changed the typechecker to correctly typecheck the declared variable
type in a for or for-each loop against the vector element type (for
a for loop) or the iterator type (for a for-each loop). Added a
test case.
2011-05-27 17:42:09 -07:00
Tim Chevalier
0c5a55f275
add a function that returns the type of a local decl
2011-05-27 17:34:50 -07:00
Eric Holk
193c1fac4c
Enabling valgrind on OSX. It appears to work now.
2011-05-27 16:58:11 -07:00
Graydon Hoare
85a2b0bfb9
Re-XFAIL, not valgrind-clean.
2011-05-27 15:52:00 -07:00
Eric Holk
52795049e7
Generating names for wrappers, removed extra logging
2011-05-27 15:37:19 -07:00
Eric Holk
8cfc388d40
Switched calling conventions so that spawn with multiple arguments works.
2011-05-27 15:20:58 -07:00
Eric Holk
d49998f0ed
Switching over to wrappers for spawning functions of multiple arguments. Doesn't quite work yet.
2011-05-27 15:20:58 -07:00
Eric Holk
842bf7cad1
Un-XFAILing spawn tests.
2011-05-27 15:20:58 -07:00
Eric Holk
da0e0b6f5e
Removing excessively verbous logging.
2011-05-27 15:20:58 -07:00
Eric Holk
a88af906c5
Programs using spawn terminate
2011-05-27 15:20:58 -07:00
Eric Holk
dad426419c
Working on 2 argument spawn. The arguments seem to be copied correctly once, but then they get lost.
2011-05-27 15:20:58 -07:00
Eric Holk
bb4c7a9c68
Arguments seem to be correctly passed to child processes now.
2011-05-27 15:20:58 -07:00
Eric Holk
21efd07bc1
New tasks run, but their arguments get lost and something ends up in an infinite loop when the task exits.
2011-05-27 15:20:58 -07:00
Brian Anderson
e3b3a71e6a
Don't fiddle with RUST_LOG in the Makefiles
...
This is no longer necessary since error logging is not affected by RUST_LOG.
2011-05-27 17:01:15 -04:00
Lindsey Kuper
867e9fb030
Test case showing that issue 324 is resolved.
2011-05-27 12:45:01 -07:00
Tim Chevalier
0cbcf92749
Use annotations on blocks
...
Previously, block_ty returned the type of the terminating
expression of the block (or nil if said expression was absent).
I changed check_expr to write the type of that expression into
the annotation for the block itself, so now block_ty can use the
block's annotation.
2011-05-27 12:21:37 -07:00
Michael Sullivan
a7a42c24be
Change the syntax for RECV from "var <- port" to "port |> var".
2011-05-27 12:01:20 -07:00
Michael Sullivan
2119e3b5b9
Fix missing bump in RECV lexer case.
2011-05-27 12:01:20 -07:00
Michael Sullivan
9c79200a7f
Pretty print the new RECV token...
2011-05-27 12:01:20 -07:00
Michael Sullivan
ea16e582eb
Remove parser support for recv as an initializer in preparation for changing the recv syntax.
2011-05-27 12:01:20 -07:00
Michael Sullivan
55b40e6894
Lex '|>' as the RECV token.
2011-05-27 12:01:20 -07:00
Tim Chevalier
147b088125
Test for use of break as an expression
...
The test was meant to verify that the typechecker correctly
allows a _|_ value (break, here) to be used in any context.
However, the compiler fails with an LLVM assertion failure.
I xfailed it, but wanted it to be on the record anyway.
2011-05-26 20:52:05 -07:00
Tim Chevalier
1a96e79fe0
Make _|_ unify with anything
...
The typechecker had a number of special cases for unifying types
with _|_ (as with checking if and alt). But, a value of type _|_
should be usable in any context, as such a value always diverges,
and will never be used by its immediate context. Changed unify
accordingly, removed special cases.
2011-05-26 20:50:25 -07:00
Paul Stansifer
af6b4821c1
Handle circularity in glob imports in a more elegant fashion.
2011-05-27 02:42:33 +00:00
Paul Stansifer
7fe3d821ac
Add a map from def_id s to items in resolve::env.
...
Use it to provide better error messages in the event of
glob-importing the same name multiple times.
2011-05-27 02:42:33 +00:00
Paul Stansifer
54ca8565c9
Fix bugs: make sure glob imports show up in the right module,
...
and make sure that circular glob imports don't diverge.
2011-05-27 02:42:33 +00:00
Paul Stansifer
3375b8fba2
Add list function 'has'.
2011-05-27 02:42:33 +00:00
Paul Stansifer
40fe44d23e
"import module::*;" now works.
2011-05-27 02:42:33 +00:00
Paul Stansifer
22953f52fa
Added filter_map.
2011-05-27 02:42:33 +00:00
Paul Stansifer
e2bb98001e
Part one of adding globbing to resolve.rs: build up glob links. (Part two will follow those links if non-glob resolution fails.)
2011-05-27 02:42:32 +00:00
Paul Stansifer
f11f846ead
Parsing and folding changes for globbed imports.
2011-05-27 02:42:32 +00:00
Tim Chevalier
610c81af19
Fix typo
2011-05-26 19:13:56 -07:00
Tim Chevalier
83cdb47a7c
Add a list append function, which I didn't end up using, but why not add it?
2011-05-26 19:13:56 -07:00
Graydon Hoare
fc31aa7f85
Fix testcase to be slightly less fussy about line number of error, as it just drifted.
2011-05-26 18:29:28 -07:00
Graydon Hoare
79c9e13073
More delicious dead code removal from runtime, upcalls.
2011-05-26 18:21:02 -07:00
Tim Chevalier
4f792f2dbb
Track spans for each local variable in typestate
...
This lets us print better messages in situations with name
shadowing.
2011-05-26 18:14:32 -07:00
Tim Chevalier
250643c549
Remove unused imports
2011-05-26 18:01:48 -07:00
Tim Chevalier
97e0575e2e
Add a span_str function in session
2011-05-26 18:00:54 -07:00
Tim Chevalier
79693fab1f
Fix typo in error message
2011-05-26 18:00:54 -07:00
Graydon Hoare
9f95538462
Remove redisue of unused fields from 'ann'.
2011-05-26 17:26:59 -07:00
Graydon Hoare
2561b01211
Remove residual uses of fold, and fold itself.
2011-05-26 17:16:54 -07:00
Graydon Hoare
8e945dcd81
Remove native glues. All calls to C are direct now.
2011-05-26 16:45:01 -07:00