Patrick Walton
94e5ca4df8
rustc: Include the cname in the hash to increase entropy
2011-04-22 19:26:00 -07:00
Patrick Walton
e0eccaddb2
rustc: Thread the type store through everything that needs to access type structures
2011-04-22 17:00:46 -07:00
Patrick Walton
3d62c9adf3
rustc: Move the type serialization logic to an Encode module
2011-04-22 14:48:25 -07:00
Patrick Walton
14d1c53a9c
rustc: Remove direct access to the cname field of types
2011-04-22 13:45:21 -07:00
Patrick Walton
c7473c8260
rustc: Switch @ty.t to ty.t so that we can change it to a uint
2011-04-22 12:27:52 -07:00
Patrick Walton
c1335510d5
rustc: Eliminate the direct use of ty.t.struct
2011-04-22 12:09:09 -07:00
Rafael Ávila de Espíndola
9eb1479746
Dispose the module.
...
Thanks to brson for noticing it.
2011-04-22 14:49:02 -04:00
Patrick Walton
106f783b33
rustc: Add a fast path when the types to be unified are exactly equal
2011-04-22 10:51:32 -07:00
Patrick Walton
9edaa7dba3
rustc: Add a fast path if there are no type substitutions to be made
2011-04-22 10:37:51 -07:00
Patrick Walton
9ab9bd9cc2
rustc: Improve the efficiency of lookup_item_type() slightly
2011-04-22 10:19:57 -07:00
Marijn Haverbeke
2361b65526
Switch to binary search in codemap.lookup_pos
...
Patrick observed excessive slowness when looking up positions
in rustc. This might help.
2011-04-22 12:11:00 +02:00
Patrick Walton
117aff8688
rustc: Intern types
2011-04-21 19:31:13 -07:00
Brian Anderson
540344acb9
Fix the signature of expr_ext
...
The extension body is just a string, not an expression.
2011-04-21 20:42:26 -04:00
Patrick Walton
5e7336ec0d
rustc: Add a shallow type equality function, not used yet
2011-04-21 17:06:01 -07:00
Patrick Walton
5dbf554bb3
rustc: Pass a type store around, which does nothing yet
2011-04-21 14:30:27 -07:00
Patrick Walton
3dbfc9310a
rustc: Make the parser never assign any types, not even ty_nil
2011-04-21 13:00:06 -07:00
Patrick Walton
4d5fad696a
rustc: Get rid of boring_ann(); it duplicates plain_ann()
2011-04-21 12:51:46 -07:00
Patrick Walton
ef0fcdd630
rustc: Create a unification context
2011-04-21 12:10:53 -07:00
Patrick Walton
f4b89f5d79
rustc: Move ty.unify to a separate namespace
2011-04-21 11:46:31 -07:00
Graydon Hoare
4509e6fd70
Change ty.eq_ty to avoid stringification.
2011-04-21 05:31:00 +00:00
Patrick Walton
1ee96891a0
rustc: Create an item collection context during typechecking; move collection to a module
2011-04-20 17:59:33 -07:00
Graydon Hoare
c0d98cec45
Fix walk bug that coupled with marijns work to regress stage1.
2011-04-20 22:52:33 +00:00
Patrick Walton
bc50a3ba44
rustc: Add a type unification cache
2011-04-20 15:26:55 -07:00
Patrick Walton
7596fcfba7
rustc: Define type hashing inductively
2011-04-20 14:34:17 -07:00
Patrick Walton
276a0f2de8
rustc: Precompute type hashes
2011-04-20 12:22:28 -07:00
Patrick Walton
cac7524c1a
rustc: Remove all manual type construction outside ty.rs
2011-04-20 11:59:10 -07:00
Patrick Walton
38e842244c
rustc: Remove all uses of plain_ty() and friends from outside of ty.rs
2011-04-20 11:23:36 -07:00
Patrick Walton
ac62488bb1
rustc: Introduce preferred type constructors, which will eventually precompute hashes and intern
2011-04-20 10:51:41 -07:00
Marijn Haverbeke
c49735d7c4
Remove last uses of fold from trans.rs
2011-04-20 17:43:37 +02:00
Marijn Haverbeke
757f1520d7
Change trans.collect_items to use walk, not fold
2011-04-20 17:23:45 +02:00
Marijn Haverbeke
4fe339d5ef
Change collect_upvars from using fold to using walk
2011-04-20 12:35:34 +02:00
Marijn Haverbeke
fc6fbc1ed0
Integrate walk.rs
2011-04-20 12:35:07 +02:00
Graydon Hoare
9034a8fbd6
Fix #335 , log context needs to be a scope to capture cleanups.
2011-04-20 04:55:55 +00:00
Graydon Hoare
2e6711fca5
Small fast-path hack to ty.hash_ty and eq_ty.
2011-04-19 18:46:54 -07:00
Patrick Walton
1080ac5349
rustc: Add a -noverify option
2011-04-19 18:31:27 -07:00
Graydon Hoare
d1b9ddc8d4
Add testcase for bootstrap blocker and fix for each result type to nil.
2011-04-19 16:53:12 -07:00
Patrick Walton
6651826677
rustc: Cache the results of type_of()
2011-04-19 16:41:08 -07:00
Patrick Walton
5475c0009c
rustc: Use marijnh's stringifier for type hash and equality, since it's not sensitive to cnames
2011-04-19 16:41:08 -07:00
Patrick Walton
0ee997cee6
rustc: Make structured comparison glue instead of emitting it inline
2011-04-19 15:29:27 -07:00
Tim Chevalier
b7dd75c904
Handle nested items correctly in typestate_check
...
Summary says it all. Actually, only nested objects and functions
are handled, but that's better than before. The fold that I was using
before to traverse a crate wasn't working correctly, because annotations
have to reflect the number of local variables of the nearest enclosing
function (in turn, because annotations are represented as bit vectors).
The fold was traversing the AST in the wrong order, first filling in
the annotations correctly, but then re-traversing them with the bit
vector length for any outer nested functions, and so on.
Remedying this required writing a lot of tedious boilerplate code
because I scrapped the idea of using a fold altogether.
I also made typestate_check handle unary, field, alt, and fail.
Also, some miscellaneous changes:
* added annotations to blocks in typeck
* fix pprust so it can handle spawn
* added more logging functions in util.common
* fixed _vec.or
* added maybe and from_maybe in option
* removed fold_block field from ast_fold, since it was never used
2011-04-19 14:56:28 -07:00
Graydon Hoare
3d9cf15d0b
Remove half-baked 'opacity' layer qualifier.
2011-04-19 14:00:04 -07:00
Graydon Hoare
d2bd07dcb0
Remove effect system from src.
2011-04-19 13:35:49 -07:00
Patrick Walton
d9d5eb82a7
rustc: Allow glue to be emitted even for scalar types; this is necessary to support compare glue
2011-04-19 11:25:40 -07:00
Patrick Walton
6599b310f7
rustc: Don't return "result" types from glue helper functions. This allows glue to fail.
2011-04-19 11:17:01 -07:00
Patrick Walton
37b5e91544
rustc: Assert that each basic block isn't terminated before adding instructions to it
2011-04-19 10:40:38 -07:00
Marijn Haverbeke
6511d471ba
replace error logging with log_err in stdlib and rustc
2011-04-19 16:57:13 +02:00
Marijn Haverbeke
6d3a423094
add log_err to rustc
2011-04-19 16:57:13 +02:00
Marijn Haverbeke
9bfc8bf11e
Add log_err to rustboot
2011-04-19 16:57:13 +02:00
Brian Anderson
d4f1a48111
Support 0 flag in #fmt
2011-04-18 21:36:04 -04:00
Graydon Hoare
4763cd39ca
Boilerplate city, for anyone who wants it.
2011-04-18 18:32:05 -07:00