Michael Sullivan
e7c8019dd9
Kind check tuples. Closes #841 .
2011-08-18 18:13:18 -07:00
Michael Sullivan
f8ac788d66
Print tag names in type error messages. Closes #834 .
2011-08-18 18:13:18 -07:00
Michael Sullivan
6e5af8996d
Get rid of equal_type_structures. Closes #514 .
2011-08-18 16:31:23 -07:00
Brian Anderson
f5ce3bf15d
More misc ivec->vec renaming
2011-08-18 15:01:49 -07:00
Brian Anderson
1aa1f8c4b7
Rename various things from ivec to vec
2011-08-18 14:32:25 -07:00
Brian Anderson
4fc3618233
Change ast::ty_ivec, ty::ty_ivec to ty_vec
2011-08-18 14:11:06 -07:00
Brian Anderson
c2d2dad093
Remove ast::ty_vec
2011-08-18 13:09:50 -07:00
Marijn Haverbeke
079fae28e6
Fix long line
2011-08-18 10:23:24 +02:00
Marijn Haverbeke
cd440d338e
Remove or _-prefix all unused function arguments
...
This should make the compilation process a bit less noisy.
2011-08-18 10:02:13 +02:00
Erick Tryzelaar
af21a27002
Port the compiler to the expr foo::<T> syntax.
2011-08-16 15:05:56 -07:00
Erick Tryzelaar
4abc471390
Port the compiler to foo<T> decl syntax.
2011-08-16 15:05:56 -07:00
Erick Tryzelaar
e4a0f997fb
Port the compiler to the typaram foo<T> syntax.
2011-08-16 15:05:56 -07:00
Patrick Walton
03174b4379
rustc: Implement unique pointer allocation and deallocation
2011-08-16 12:41:53 -07:00
Eric Holk
862bc521a1
Removing tasks, ports and chans from the compiler.
2011-08-16 10:59:49 -07:00
Brian Anderson
f05a91a0dc
Rename std::ivec to std::vec
2011-08-16 10:36:19 -07:00
Brian Anderson
38c2363c45
Replace std::ufind with std::ufindivec. Remove std::ufindivec
2011-08-16 10:29:09 -07:00
Lindsey Kuper
f91351aaf6
The wonky for...in... whitespace was bothering me. Sorry!
2011-08-15 22:19:50 -07:00
Patrick Walton
e3d5b8a8d5
rustc: Add a few type-related methods to unique pointers; add typestate support
2011-08-15 18:12:31 -07:00
Marijn Haverbeke
29ea87542f
Tuple fields are immutable
2011-08-15 12:08:05 +02:00
Marijn Haverbeke
9538b00363
Tuple types back, not constructable yet
2011-08-15 11:40:38 +02:00
Brian Anderson
594c7fb0c6
Remove the last remaining vec expressions in rustc
2011-08-12 16:13:13 -07:00
Brian Anderson
7625ed52ee
Remove vecs from std::sort
2011-08-12 12:14:06 -07:00
Patrick Walton
19424dfab6
rustc: Add unique pointers to the set of types we support
2011-08-10 17:24:22 -07:00
Erick Tryzelaar
8b15045224
Port the compiler to the ivec type [T] syntax.
2011-08-09 15:53:26 -07:00
Graydon Hoare
b54e7e4506
Add new arg-passing mode 'move' denoted with '-T'. Translate as pass-by-value, doesn't deinit source yet nor get proper analysis in typestate, alias passes.
2011-08-08 15:53:41 -07:00
Tim Chevalier
5f03ca48d8
Add a fast path in ty::occurs_check_fails
...
Use type_contains_vars in occurs_check_fails to avoid doing
any work most of the time. This fixes a performance regression.
(No one else noticed yet that typechecking just got 4x slower, right?
Well, now it isn't anymore. :-})
2011-08-04 15:56:40 -07:00
Tim Chevalier
2baaeab784
Implement the occurs check
...
In the writeback phase, the typechecker now checks that it isn't
replacing a type variable T with a type that contains T. It
also does an occurs check in do_autoderef in order to avoid
getting into an infinite chain of derefs.
I'm a bit worried that there are more places where the occurs
check needs to happen where I'm not doing it now, though.
Closes #768
2011-08-04 15:30:09 -07:00
Patrick Walton
4061ca2bbd
rustc: Generate shapes
2011-08-04 10:46:10 -07:00
Tim Chevalier
7c34550931
Make _|_ type binopable
...
But don't actually generate code that does the operation. That means
hoisting the check I added in my last commit from trans_compare
up into trans_eager_binop (don't generate any code if one operand
has type _|_ ).
Closes #777
2011-08-02 18:06:46 -07:00
Michael Sullivan
f371482593
Consolidate environment building/loading between closure types.
2011-08-02 16:30:56 -07:00
Marijn Haverbeke
985c32ef4c
Partially implement destructuring locals
...
You can now say
let {bcx, val} = some_result_returner();
Similar for loop variables. Assigning to such variables is not safe
yet. Function arguments also remain a TODO.
2011-08-01 17:51:37 +02:00
Graydon Hoare
59c441a66a
Encode, decode, and thread through typechecking all the param kinds, not just the counts.
2011-07-29 16:40:30 -07:00
Graydon Hoare
f3c05b9fae
Turn on kind propagation for typarams. Annotate a bunch of typarams in rustc and libstd.
2011-07-29 12:58:52 -07:00
Marijn Haverbeke
c34d74315f
Remove unreachable statements
2011-07-29 20:54:44 +02:00
Marijn Haverbeke
ae46c154f0
Make sure resources always have their drop glue called
...
Even when their content does not contain pointers
2011-07-29 12:53:58 +02:00
Graydon Hoare
3e63fdc4c9
Thread kinds into the type system. Don't quite activate yet, since it breaks stdlib and snapshot isn't ready to compile modified stdlib.
2011-07-28 13:29:39 -07:00
Eric Holk
a5fe66e706
Adding upcalls to to ref() and deref() tasks. This is the first step towards atomic reference counting of tasks.
2011-07-28 10:47:28 -07:00
Graydon Hoare
a11bb404a5
Further refinement to kind system lattice and type-kind rules; first successful caught kind error (prohibits copying a pinned resource, though trans already caught it later).
2011-07-27 21:23:54 -07:00
Michael Sullivan
d1298f768c
Have bind support non-alias parametric non-bound arguments.
...
This was previously disallowed by the typechecker and not properly handled
in trans. I removed the typechecker check (replacing it with a simpler
check that spawned functions don't have type params) and fixed trans.
Closes #756 .
2011-07-27 18:46:46 -07:00
Graydon Hoare
63f74f3771
Remove vestiges of "layers", insert skeletal do-nothing "kind" pass plus cached calculation of kind for each type.
2011-07-27 17:49:00 -07:00
Marijn Haverbeke
6e2a7bff7f
Fix damage done by the pretty-printer
2011-07-27 15:54:33 +02:00
Marijn Haverbeke
df7f21db09
Reformat for new syntax
2011-07-27 15:54:33 +02:00
Michael Sullivan
ac948b4ccd
Resolve and typecheck alias-environment-capturing blocks.
2011-07-26 12:30:14 -07:00
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
Marijn Haverbeke
e949aab10a
Remove some rustboot-isms
...
Closes #464
2011-07-25 15:07:48 +02:00
Marijn Haverbeke
beab6ba8aa
Add a pass that checks for unreachable alt arms
2011-07-25 13:52:59 +02:00
Marijn Haverbeke
b45d973552
Rewrite trans_cast, float->float and float->int casts
2011-07-22 13:10:59 +02: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