Tim Chevalier
beb2cd1658
Remove what's left of resolve1
2012-07-20 17:08:19 -07:00
Patrick Walton
db020ab63c
rustc: Implement and enforce instance coherence
2012-07-17 15:46:43 -07:00
Michael Sullivan
7b2f4755f3
Get rid of ast::ty_vstore, which was only used for fixed length.
2012-07-14 12:45:52 -07:00
Michael Sullivan
92743dc2a6
Move the world over to using the new style string literals and types. Closes #2907 .
2012-07-14 01:03:43 -07:00
Michael Sullivan
985b52be6d
Support prefix notation for vstore strings. Closes #2906 .
2012-07-13 17:03:49 -07:00
Niko Matsakis
a2f60651f1
add comments to region inference
2012-07-13 10:20:50 -07:00
Niko Matsakis
b9aa9def85
infer when types are region parameterized rather than requiring /&
...
- removes various fields from various variants in the AST
- also update tests not to use this notation
2012-07-11 14:41:41 -07:00
Brian Anderson
d1fc2b5995
Convert to new closure syntax
2012-07-01 19:19:32 -07:00
Michael Sullivan
98e161f00e
Switch the compiler over to using ~[] notation instead of []/~. Closes #2759 .
2012-06-29 17:41:45 -07:00
Eric Holk
87eaf91be3
Replaced almost all vector+ in rustc ( #2719 )
...
Didn't update shape because the changes were causing segfaults.
2012-06-28 15:11:09 -07:00
Michael Sullivan
329eca6044
Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725 .
2012-06-25 20:00:46 -07:00
Tim Chevalier
487cbf8e90
Remove resources
...
Also fixed shapes for classes with dtors, as well as handling
offsets for classes with dtors correctly in take glue.
Closes #2485
2012-06-24 15:09:57 -07:00
Lindsey Kuper
ef33c5c9bc
Typo fixes in comments.
2012-05-24 16:48:44 -07:00
Niko Matsakis
bd573becf5
change region scope of call arguments, old one was unsound
...
improve error message to describe kind of deref'd ptr using sigil
2012-05-24 05:19:44 -07:00
Brian Anderson
4756556748
rustc: Move new_def_hash to ast_util
2012-05-23 00:43:02 -07:00
Niko Matsakis
9c7b74b025
check if the type of a local variable contains illegal region
...
also, try to suppress some of the duplicate errors---in general
more work is needed to make these error messages comprehensible
to ordinary humans
2012-05-15 21:20:37 -07:00
Niko Matsakis
ab735320b4
move regionck into typeck, in the process fixing a bug or two
2012-05-15 19:05:03 -07:00
Tim Chevalier
5428a22b95
First cut at dtors for classes
...
Classes with dtors should compile now. Haven't yet tested
whether they actually run correctly.
Beginnings of support for #2295 , though that won't be done until
there's more test cases and resources are removed.
2012-05-14 14:26:10 -07:00
Niko Matsakis
b4d1f1b2c1
replace mutbl pass with borrowck
2012-05-10 21:14:43 -07:00
Niko Matsakis
50a3dd40ae
implement new borrow ck (disabled by default)
2012-05-09 17:00:19 -07:00
Niko Matsakis
50ec6bd2c3
new cap clause syntax
2012-05-04 12:33:08 -07:00
Niko Matsakis
3c995fb8f3
make nominal types optionally parameterized by a self region.
...
Issue #2201 .
2012-04-19 21:01:11 -07:00
Niko Matsakis
35a93e61d4
rewrite region resolution so it takes place in typeck
2012-04-16 19:48:00 -07:00
Niko Matsakis
27f1c2b742
first stab at type checking for borrow: not integrated into trans
2012-04-13 10:41:46 -07:00
Tim Chevalier
5c12cd72f4
Allow classes to implement ifaces
...
Introduce syntax like:
iface animal { ... }
class cat implements animal { ... }
to allow classes to implement ifaces. Casting classes to ifaces
is *not* yet supported. ifaces that a class implements are not
yet included in metadata.
The syntax is subject to change, and may go away completely if we
decide to use duck typing to relate classes with ifaces (see
http://smallcultfollowing.com/babysteps/blog/2012/04/10/declared-vs-duckish-typing/ )
2012-04-11 16:20:01 -07:00
Graydon Hoare
c720ffdbc4
Improve region code surrounding slice types.
2012-04-11 12:07:19 -07:00
Graydon Hoare
7a3b290245
Add vstore/evec/estr to compiler.
2012-04-11 11:08:40 -07:00
Marijn Haverbeke
c902eafa14
Convert old-style for loops to new-style
...
Most could use the each method, but because of the hack used to
disambiguate old- and new-style loops, some had to use vec::each.
(This hack will go away soon.)
Issue #1619
2012-04-06 20:38:23 +02:00
Niko Matsakis
051f24da25
add static region and also fix regions to be contravariant
2012-04-05 21:16:28 -07:00
Niko Matsakis
c0d61795de
wip: refactor repr of regions
...
- we now distinguish bound/free parameters (see region-param
test case for why this is necessary)
- we also track bounds on region variables
- also, restructure fold_ty() to have multiple variants without
duplication instead of one overloaded folder. This also allows
for using block functions.
2012-04-04 19:41:23 -07:00
Patrick Walton
b7a741b5d0
rustc: Combine and unify regions
2012-03-26 15:07:15 -07:00
Patrick Walton
7931a61ebb
rustc: Redo region inference to be a bit less broken
2012-03-23 12:22:58 -07:00
Niko Matsakis
b653a18416
add mut decls to rustc and make them mandatory
2012-03-21 21:04:14 -07:00
Patrick Walton
68e364b54d
rustc: Introduce re_params into the typechecker
...
This is the first step of the region refactoring I need to do in order to handle named regions properly.
2012-03-21 12:21:53 -07:00
Patrick Walton
bc21a5ddbe
rustc: Create self region bindings, and forbid the self region from being used in places it shouldn't be
2012-03-15 16:38:08 -07:00
Brian Anderson
3864d6d845
std: Rename the hashmap constructors to conform to new standards
...
Instead of using the new_ prefix just name them after their type
2012-03-14 18:19:08 -07:00
Patrick Walton
1e0e089185
rustc: Fix a couple of bugs that prevented taking addresses of rvalues
2012-03-14 16:50:20 -07:00
Patrick Walton
3a45f87620
rustc: Record the parent blocks of locals
2012-03-14 11:41:50 -07:00
Patrick Walton
c3516f091b
rustc: Allow the addresses of rvalues to be taken
2012-03-13 18:24:14 -07:00
Patrick Walton
fc50abe6c5
rustc: Instantiate "caller" regions when calling functions
2012-03-13 17:31:34 -07:00
Patrick Walton
b87cdd8572
rustc: Infer regions of variant arguments to the caller region
2012-03-13 16:16:27 -07:00
Patrick Walton
8cbaebbb49
rustc: Get reference typedefs working
2012-03-13 15:53:16 -07:00
Patrick Walton
107767731a
rustc: Use only ast_ty_to_ty for region inference
2012-03-13 12:01:34 -07:00
Patrick Walton
aea8736129
rustc: Fix long line
2012-03-13 11:04:02 -07:00
Patrick Walton
07b4c80c68
rustc: Record what &
would resolve to for every AST type
2012-03-13 10:44:37 -07:00
Patrick Walton
ac57bb3856
rustc: Word a comment more clearly in region.rs
2012-03-12 18:56:13 -07:00
Patrick Walton
afa046a56b
rustc: Use linked lists instead of hash tables for region binding scopes
...
Hash tables are overkill.
2012-03-12 18:47:18 -07:00
Patrick Walton
db77c38fc9
rustc: Use the name map to resolve region names
2012-03-12 13:58:08 -07:00
Patrick Walton
864ff4707e
rustc: Map region names to their functions. Also speed up region checking by 17x.
2012-03-12 13:25:10 -07:00
Patrick Walton
47bfd4f4e9
rustc: Refactor regions to handle nested functions properly and fix the subtyping relation
2012-03-12 12:43:47 -07:00