Marijn Haverbeke
2c1250780d
Remove tuple support from the compiler
2011-07-26 15:19:56 +02:00
Marijn Haverbeke
aea537779e
Remove all uses of tuples from the compiler and stdlib
2011-07-26 14:06:02 +02:00
Michael Sullivan
25a89e068d
Rename the block type to be blk also. Sorry.
2011-07-25 14:18:07 -07:00
Michael Sullivan
6bcdb48e35
Disallow block as a variable name in preparation for it becoming a keyword.
2011-07-25 13:42:38 -07:00
Marijn Haverbeke
e949aab10a
Remove some rustboot-isms
...
Closes #464
2011-07-25 15:07:48 +02:00
Marijn Haverbeke
48013db5c5
Tie up the ends needed to get external consts working
...
Closes #658
2011-07-25 14:58:59 +02:00
Marijn Haverbeke
beab6ba8aa
Add a pass that checks for unreachable alt arms
2011-07-25 13:52:59 +02:00
Michael Sullivan
0cacbe901d
Overhaul how we handle freevars.
2011-07-22 17:46:52 -07:00
Michael Sullivan
2bf50114eb
Simple cleanup of the freevars pass.
2011-07-22 17:46:52 -07:00
Michael Sullivan
f2f8943a85
Add a "fake" def_upvar and mechanisms to create it.
2011-07-22 17:46:52 -07:00
Eric Holk
54be5b044f
Fixing (or at least improving) translation of move semantics for send and receive. This let's us run all of the task-comm tests.
2011-07-22 16:05:51 -07:00
Eric Holk
838511e3aa
Folding recv_val into trans_recv, since this is its only use.
2011-07-22 16:05:51 -07:00
Marijn Haverbeke
5cdb010fae
Remove typechecker work-arounds now that I know how
2011-07-22 20:15:46 +02:00
Marijn Haverbeke
b9b674abe7
Start adding support for multiple variable declarations per stmt
...
This adds parser support and most of the machinery for
auto x = 10, y = 20;
However, the above still goes wrong somewhere in typestate, causing
the state checker to believe only the last variable in the list is
initialized after the statement.
Tim, if you have a moment, could you go over the changes to the tstate
code in this patch and see where I'm going wrong?
Multi-var-decls without the typestate extension
Add a loop
2011-07-22 17:51:26 +02:00
Marijn Haverbeke
b45d973552
Rewrite trans_cast, float->float and float->int casts
2011-07-22 13:10:59 +02:00
Marijn Haverbeke
5864d4e13a
Report unresolved names only once per function
...
Closes #708
2011-07-22 11:38:30 +02:00
Marijn Haverbeke
93ffed4c16
Fix unboxing in alias pass
...
The alias checker would only deref once for autoderef, and only deref
boxes. It should now do the right thing. Closes #725 .
2011-07-22 09:29:01 +02:00
Lindsey Kuper
5566e0c3f1
Removing unnecessary argument from process_fwding_mthd().
2011-07-21 18:41:30 -07:00
Michael Sullivan
a0a2cee896
Clean up build_environment by having it return a rec with usefully named fields.
2011-07-21 18:19:07 -07:00
Michael Sullivan
4170390cb6
Add some useful functions to freevars.
2011-07-21 18:18:59 -07:00
Michael Sullivan
4b59ae0aa9
Add some support for using a map like a set.
2011-07-21 18:14:39 -07:00
Michael Sullivan
3b2d23b2cd
Move a bunch of trans into trans_common, including the context structures.
...
Probably more should be moved or split off into other files. My algorithm
was something along the lines of: move the contexts and their transitive
dependencies along with some functions to work with them. I stopped when
I was going to have to start pulling glue generation, which really
should go into a trans_glue file.
2011-07-21 17:39:06 -07:00
Michael Sullivan
f8bb5a3b58
Make ty::ctxt be boxed.
...
Arguably we should leave ty_ctxt as a bare rec and just always work with
boxes of it. This winds up being simpler and prettier, though.
2011-07-21 17:39:06 -07:00
Tim Chevalier
a9a1392b2c
Instantiate function preconditions inside the function body
...
so that if we have a function like:
f(...) : p(x) {
...
}
p(x) is true inside the body of f.
Closes #694 .
2011-07-21 16:11:34 -07:00
Tim Chevalier
2261ddc717
Move ast_constr_to_constr from typeck to ty
...
so that it can be used in places that import ty.
2011-07-21 16:09:55 -07:00
Lindsey Kuper
075a094c1f
Now with more type inference.
2011-07-21 15:46:03 -07:00
Lindsey Kuper
879b6392d9
Comments and cleanup.
2011-07-21 15:12:27 -07:00
Lindsey Kuper
8ebd292253
Consolidate obj_field_from_anon_obj_field().
2011-07-21 15:12:27 -07:00
Lindsey Kuper
55acc737a8
Remove vestiges of typarams from anon objs.
2011-07-21 15:12:27 -07:00
Eric Holk
d79afd7916
Improving move semantics for channel operations.
...
This lets us un-XFAIL task-comm-10.rs.
2011-07-21 11:51:22 -07:00
Eric Holk
3ae4dcd41e
Lots of work on memory tracking and channels.
...
We're trying to get closer to doing correct move semantics for channel
operations. This involves a lot of cleanup (such as removing the
unused sched parameter from rust_vec constructor) and making
circular_buffer kernel_owned.
Added tagging for memory allocations. This means we give a string tag
to everything we allocate. If we leak something and TRACK_ALLOCATIONS
is enabled, then it's much easier now to tell exactly what is leaking.
2011-07-21 11:51:22 -07:00
Patrick Walton
a44fb04d57
Revert "rustc: Avoid SHA-1 hashing every type, since they're interned"
...
This reverts commit df90f57a5f
.
2011-07-21 11:44:12 -07:00
Patrick Walton
b49bdad499
rustc: Box raw types. Shaves about 5 seconds off compilation.
2011-07-21 11:43:52 -07:00
Patrick Walton
df90f57a5f
rustc: Avoid SHA-1 hashing every type, since they're interned
2011-07-21 11:24:20 -07:00
Patrick Walton
355f77ef87
rustc: Remove cnames for now
2011-07-20 19:13:55 -07:00
Patrick Walton
3ec3b02ed0
rustc: Strip cnames before generating glue to avoid duplicates
2011-07-20 19:04:45 -07:00
Patrick Walton
142ff3bb4e
rustc: Translate functions only once
2011-07-20 18:43:05 -07:00
Michael Sullivan
1b9dbcc5b4
Box the vec of freevars we store in the freevars cache.
2011-07-20 18:15:56 -07:00
Lindsey Kuper
00f54b4a42
Refactoring and cleaning up.
2011-07-20 12:22:55 -07:00
Rafael Ávila de Espíndola
94c91382cd
Fix typo.
2011-07-20 15:14:13 -04:00
Rafael Ávila de Espíndola
b7a7120804
give rust_metadata internal linkage but mark it as used. This allows
...
multiple static crates to be used.
2011-07-20 14:55:01 -04:00
Tim Chevalier
41212792c6
Add missing case in tyencode for ty_constr
...
Fixes the Windoze breakage, I hope.
2011-07-19 20:16:03 -07:00
Lindsey Kuper
2eb4762936
Typechecking self-calls in anon objs. Closes #540 .
2011-07-19 19:52:21 -07:00
Lindsey Kuper
64fb39cdd3
Clean up formatting.
2011-07-19 19:52:21 -07:00
Tim Chevalier
bd4aeef78b
Beginnings of support for constrained types
...
Programs with constrained types now parse and typecheck, but
typestate doesn't check them specially, so the one relevant test
case so far is XFAILed.
Also rewrote all of the constraint-related data structures in the
process (again), for some reason. I got rid of a superfluous
data structure in the context that was mapping front-end constraints
to resolved constraints, instead handling constraints in the same
way in which everything else gets resolved.
2011-07-19 18:57:28 -07:00
Lindsey Kuper
19a17b3d1d
Style and indentation cleanups.
2011-07-19 16:08:49 -07:00
Lindsey Kuper
18162d3261
Some progress on issue #540 .
2011-07-19 14:30:53 -07:00
Lindsey Kuper
a0c6d0a27f
Comments and cleanup.
2011-07-19 12:33:45 -07:00
Lindsey Kuper
61ee22dc84
Wrapping long strings.
2011-07-19 12:33:45 -07:00
Michael Sullivan
f8c6d282f8
Add a pass that finds all of the free variables.
2011-07-19 12:01:14 -07:00