Marijn Haverbeke
56eb986584
Fix some uses of span_warn in alias.rs that should be span_fatal
2011-06-20 23:53:29 +02:00
Marijn Haverbeke
588dc3897b
Make trans use the new ast_map instead of building its own
2011-06-20 23:53:28 +02:00
Marijn Haverbeke
854b3a9b73
Use ast_map in typeck, instead of building another index
2011-06-20 23:53:28 +02:00
Marijn Haverbeke
40db3aa6fb
Add a separate AST mapping phase
...
This will replace the various node_id-to-node mappings done in several
other passes. This commit already uses the new map in resolve, dropping
the ast_map that was built there before.
2011-06-20 23:53:28 +02:00
Marijn Haverbeke
77af54bf6f
Reduce confusing variable naming in resolve
...
'id' is now used for node_ids, 'name' for idents
2011-06-20 23:53:28 +02:00
Marijn Haverbeke
75681f9ad7
Get rid of def_ids and anns in AST nodes, use single node_id
...
This reduces some redundancy in the AST data structures and cruft in
the code that works with them. To get a def_id from a node_id, apply
ast::local_def, which adds the local crate_num to the given node_id.
Most code only deals with crate-local node_ids, and won't have to
create def_ids at all.
2011-06-20 23:53:28 +02:00
Eric Holk
a2dcd08cc2
Added string duplication to deep_copy. Closes #520 .
2011-06-20 13:47:02 -07:00
Eric Holk
992153672b
Removed duplicated ret_ty_of_fn. This also means the native function branch is working now, so this commit closes #506 .
2011-06-20 12:04:33 -07:00
Eric Holk
5640bead58
Teach ret_ty_of_fn_ty to understand native functions. Closes #506 .
2011-06-20 12:04:33 -07:00
Graydon Hoare
97cf57adc1
Fix pp blank-lines insertion at beginning of file and before 'let' decls.
2011-06-20 10:45:33 -04:00
Brian Anderson
200dbe4c4f
Remove various rustboot workarounds
2011-06-19 20:48:20 -07:00
Patrick Walton
3f7380ccec
rustc: Change smallintmap to use an ivec and use it for the node type table. 3x typechecking speedup.
2011-06-19 18:03:19 -07:00
Brian Anderson
6cf9b17086
rustc: Make name resolution errors less fatal
...
Failure happens at the end of name resolution
Issue #440
2011-06-19 15:23:11 -07:00
Brian Anderson
c5238d57eb
rustc: Make import resolution errors less fatal
...
Failure happens at the end of import resolution
Issue #440
2011-06-19 14:35:50 -07:00
Brian Anderson
76a752e7a4
rustc: Export only what's needed from middle::ty
...
The list is formidable.
2011-06-19 12:27:43 -07:00
Brian Anderson
80a8af7b47
rustc: Export only what's used from middle::resolve
2011-06-19 12:27:43 -07:00
Brian Anderson
43427dae0c
rustc: Rename session.span_err -> span_fatal, err -> fatal
...
Issue #440
2011-06-19 12:19:53 -07:00
Brian Anderson
cf9ed08a50
Revert previous 6 commits. Hopefully put out Windows fire.
...
Revert "rustc: Export only what's needed from middle::ty"
This reverts commit 4255d58aa5
.
Revert "rustc: Make name resolution errors less fatal"
This reverts commit b8ab9ea89c
.
Revert "rustc: Make import resolution errors less fatal"
This reverts commit 92a8ae94b9
.
Revert "rustc: Export only what's used from middle::resolve"
This reverts commit 4539a2cf7a
.
Revert "rustc: Re-introduce session.span_err, session.err"
This reverts commit 7fe9a88e31
.
Revert "rustc: Rename session.span_err -> span_fatal, err -> fatal"
This reverts commit c394a7f49a
.
2011-06-19 03:29:19 -07:00
Brian Anderson
4255d58aa5
rustc: Export only what's needed from middle::ty
...
The list is formidable.
2011-06-19 02:42:05 -07:00
Brian Anderson
b8ab9ea89c
rustc: Make name resolution errors less fatal
...
Failure happens at the end of name resolution
Issue #440
2011-06-19 02:42:05 -07:00
Brian Anderson
92a8ae94b9
rustc: Make import resolution errors less fatal
...
Failure happens at the end of import resolution
Issue #440
2011-06-19 02:42:01 -07:00
Brian Anderson
4539a2cf7a
rustc: Export only what's used from middle::resolve
2011-06-19 02:41:03 -07:00
Brian Anderson
c394a7f49a
rustc: Rename session.span_err -> span_fatal, err -> fatal
...
Issue #440
2011-06-19 02:40:59 -07:00
Brian Anderson
514813148b
rustc: Store the lhs and rhs of receive exprs in left to right order
...
With the changing of receive semantics the parser has been putting the rhs
expression in the first argument of expr_recv and the lhs in the second, and
all subsequent passes have been referring to them backwords (but still doing
the right thing because they were assuming that lhs was the port and rhs was
the receiver).
This makes all code agree on what lhs and rhs mean for receive expressions.
2011-06-18 20:23:05 -07:00
Brian Anderson
3852f1eee3
Typecheck block tail expressions that are fn return values
2011-06-18 20:23:05 -07:00
Brian Anderson
ddbb31eb8e
rustc: Remove the meta keyword
...
Issue #487
2011-06-18 20:23:05 -07:00
Patrick Walton
4f13879218
rustc: Allocate derived tydescs before dynamically sized allocas
2011-06-18 18:43:07 -07:00
Patrick Walton
877f001512
rustc: Don't bother to supply an alignment argument to the memmove intrinsic; LLVM is very fussy about what it considers a constant.
2011-06-18 16:59:44 -07:00
Patrick Walton
2ba7729ae7
rustc: Cache results of type_has_pointers. 70% translation speedup.
2011-06-18 00:41:25 -07:00
Patrick Walton
5894e400b6
rustc: Add missing case for interior vectors in alias.rs
2011-06-17 19:16:26 -07:00
Tim Chevalier
7fc89f573d
Restructure the "checking" pass in typestate
...
I noticed that typestate was being lazier than it should be,
because it was only checking typestate for statements and
top-level expression (that is, the expression in a stmt_expr, but
not any subexpressions). So I rewrote the checks in tstate/ck.rs
to use walk, which exposed a few bugs in typestate that I fixed.
Also added some more test cases for if-check.
2011-06-17 19:09:18 -07:00
Patrick Walton
a4eb6630f3
rustc: Increment by the dynamically-computed size in ivec::trans_append. Uncomment init_fn test in lib-ivec.
2011-06-17 19:01:14 -07:00
Patrick Walton
5fb9325848
rustc: Fix a bunch of memory management bugs relating to generic interior vectors. Uncomment all tests in lib-ivec.
2011-06-17 17:31:24 -07:00
Patrick Walton
68122edac3
Revert "rustc: Fix a bunch of memory management bugs relating to generic interior vectors"
...
This reverts commit 2b5e40311d
.
2011-06-17 16:38:47 -07:00
Patrick Walton
2b5e40311d
rustc: Fix a bunch of memory management bugs relating to generic interior vectors
2011-06-17 16:23:06 -07:00
Eric Holk
2c1b269960
Implemented enough of deep_copy that we can pass scalars and channels to tasks. Closes #507 .
2011-06-17 15:17:46 -07:00
Eric Holk
81fc51a8d7
Started using deep_copy for spawn arguments.
2011-06-17 15:17:46 -07:00
Patrick Walton
e43a3755dd
rustc: Add a type_owns_heap_mem() predicate
2011-06-17 12:32:18 -07:00
Patrick Walton
dfb806b367
rustc: Cast to opaque interior vector types in trans_vec_append if necessary. Puts out burning tinderbox.
2011-06-17 12:23:04 -07:00
Patrick Walton
4918c99f69
rustc: Copy the contents of generic interior vectors
2011-06-17 12:22:53 -07:00
Patrick Walton
4bb7597542
Revert "rustc: Copy the contents of generic interior vectors"
...
This reverts commit 5bdbe1dfc2
.
2011-06-17 12:03:21 -07:00
Patrick Walton
5bdbe1dfc2
rustc: Copy the contents of generic interior vectors
2011-06-17 11:45:51 -07:00
Brian Anderson
e8228e1260
rustc: Demand that if conditions have bool type
...
Closes #513
2011-06-17 11:35:00 -07:00
Brian Anderson
a4d88dacc9
rustc: Fail to unify if two ty_vars don't unify
...
Closes #500
2011-06-17 11:35:00 -07:00
Brian Anderson
753da64fd6
rustc: Demand unification of both sides of a binop
...
Issue #500
2011-06-17 11:35:00 -07:00
Paul Stansifer
391348ec86
Consistify ast::local.
2011-06-16 17:56:24 -07:00
Patrick Walton
ab7ebb608a
rustc: Fix dominance issue when translating generic interior vectors
2011-06-16 17:48:32 -07:00
Patrick Walton
e50c918e6b
rustc: Implement type walking and comparison glue for unsafe pointers
2011-06-16 17:07:02 -07:00
Graydon Hoare
b84fffaa4e
Reformat a bunch of recent churn.
2011-06-16 16:55:46 -07:00
Patrick Walton
d90ad442b4
rustc: Work around leak when translating interior vectors. Un-XFAIL interior-vec.rs.
2011-06-16 15:07:21 -07:00