Brian Anderson
066bcc6c79
Make "cannot determine a type for this local variable" non-fatal
2011-07-06 11:44:42 -07:00
Brian Anderson
5c20a8aa9c
Make "cannot determine a type for this expression" non-fatal. Closes #621
2011-07-06 11:44:36 -07:00
Brian Anderson
c31472e845
Refactor the typeck::writeback AST walk
...
All visitors take a wb_ctxt now instead of some taking a fn_ctxt and some
taking an ignore flag.
2011-07-06 11:42:20 -07:00
Brian Anderson
0c9c4cb575
Remove unused method from typeck::writeback
2011-07-06 11:42:20 -07:00
Brian Anderson
c1136e4e05
Limit exports from typeck
2011-07-06 11:42:20 -07:00
Brian Anderson
97c1537374
Limit exports from typeck::writeback
2011-07-06 11:42:20 -07:00
Lindsey Kuper
e30d2c82ae
Simplify AST for expr_anon_obj.
2011-07-06 11:36:06 -07:00
Lindsey Kuper
23bae67f4c
Simplify arguments to trans_anon_obj and friends.
2011-07-06 11:36:06 -07:00
Eric Holk
bc5d6aefda
Added a task wakeup callback. Closes #599 .
...
The callback happens when a task moves from the "blocked" state to the
"running" state. The callback is also inherited by child tasks. There
is currently only a native API.
This code hasn't been heavily exercised yet.
2011-07-06 11:30:00 -07:00
Patrick Walton
bbdba21b1f
rustc: Revert the conversion to interior vectors due to heap corruption
2011-07-06 11:26:26 -07:00
Patrick Walton
ec890fff23
Temp commit on the way to making meta_item into an interior vector
2011-07-06 11:09:08 -07:00
Patrick Walton
3f6c9f8d84
rustc: Move crate directives over to interior vectors
2011-07-06 11:09:08 -07:00
Patrick Walton
c927d97fa0
rustc: Convert attribute in the AST to interior vectors
2011-07-06 11:09:08 -07:00
Patrick Walton
1591955adf
rustc: Make AST paths use interior vectors
2011-07-06 11:09:08 -07:00
Patrick Walton
b108280db1
rustc: Move middle::tstate::collect_locals over to interior vectors
2011-07-06 11:09:08 -07:00
Patrick Walton
48438ba1ae
rustc: Remove unused or seldom-used imports from middle::tstate::{bitvectors, ck}
2011-07-06 11:09:07 -07:00
Patrick Walton
ec634e471f
rustc: Remove some unused references to std::vec from tstate::ann and tstate::auxiliary
2011-07-06 11:09:07 -07:00
Patrick Walton
cfc659009e
rustc: Move middle::tstate::auxiliary and middle::tstate::bitvectors over to interior vectors
2011-07-06 11:09:07 -07:00
Patrick Walton
702f88a3be
rustc: Move tstate::annotate over to interior vectors
2011-07-06 11:09:07 -07:00
Patrick Walton
4c384304e9
rustc: Convert bind_params_in_type() to use interior vectors
2011-07-06 11:09:07 -07:00
Patrick Walton
5703bd1760
rustc: Migrate tag variants to interior vectors
2011-07-06 11:09:07 -07:00
Patrick Walton
52a7c2b78e
rustc: Make object methods into interior vectors
2011-07-06 11:09:07 -07:00
Patrick Walton
75c5f9bdba
rustc: Use an interior vector for ty::count_ty_params
2011-07-06 11:09:06 -07:00
Patrick Walton
bd7a072266
rustc: Move the interner over to interior vectors
2011-07-06 11:09:06 -07:00
Patrick Walton
b9a2117475
rustc: Make the various constraint-related types in middle::ty use interior vectors
2011-07-06 11:09:06 -07:00
Patrick Walton
0eb889f9d2
rustc: Make type parameter substitutions interior vectors
2011-07-06 11:09:06 -07:00
Patrick Walton
8bee69da25
rustc: Change constraints in types to use interior vectors
2011-07-06 11:09:06 -07:00
Patrick Walton
f391acbd3f
rustc: Switch tag type parameters to interior vectors
2011-07-06 11:09:06 -07:00
Patrick Walton
09e591c12f
rustc: Use interior vectors for tag type parameters
2011-07-06 11:09:06 -07:00
Patrick Walton
9c4411ac5e
snap: Register new snapshots
2011-07-06 11:05:57 -07:00
Lindsey Kuper
6bd80d0121
Add a compile-fail test for attempts to extend non-objects.
2011-07-06 10:47:36 -07:00
Marijn Haverbeke
8e585e7008
Support paren-free and lightweight-case syntax
...
(The old syntax is still supported as well, for now.)
It is now possible to leave out the parens around if, while, and
do/while conditions, and around alt expressions. Cases in an alt block
can now leave off the case keyword and parens around the pattern.
After the next snapshot, we can start migrating our code to use the
new alt syntax, probably with a pretty-printer pass. The paren-free
syntax will remain optional (you may always parenthesize expressions),
but the old case syntax will no longer be supported in the future.
2011-07-06 17:50:52 +02:00
Marijn Haverbeke
7661c08496
Remove temporary stdlib placeholders, use actual stdlib functions
...
(Possible now that a snapshot took place.)
2011-07-06 16:46:17 +02:00
Lindsey Kuper
4c315666dd
Forwarding functions. Lots of progress toward #539 , #540 , #543 .
2011-07-05 20:21:59 -07:00
Lindsey Kuper
993e47175f
Comments and cleanup.
2011-07-05 20:17:33 -07:00
Tim Chevalier
f279e0d76e
Handle pattern-bound upvars
...
If a closure inside a case alternative (for example, a for each loop)
referenced a pattern-bound variable, this would cause an assertion
failure in trans. Changed trans::collect_upvars to handle pattern-bound
vars correctly.
Incidentally, eliminated all direct uses of option::get in trans.
2011-07-05 19:58:49 -07:00
Patrick Walton
1bba585044
stdlib: Implement ivec::foldl
2011-07-05 18:29:47 -07:00
Brian Anderson
2cb129355b
Change ast::meta_name_value to accept any literal, not just string
...
This isn't useful for much of anything yet, since metadata::encoder doesn't
know how to handle the non-string variants.
Issue #611
2011-07-05 17:25:18 -07:00
Patrick Walton
8261d2e6fb
stdlib: Add filter_map to ivec
2011-07-05 17:22:02 -07:00
Patrick Walton
ee5d7bbc86
stdlib: Don't have ivec::map take a mutable alias
2011-07-05 16:28:07 -07:00
Brian Anderson
375f0b2211
Require that the meta items in a use statement have unique names
2011-07-05 16:12:24 -07:00
Tim Chevalier
a793b85fbd
Handle fail inside a for-each loop properly
2011-07-05 16:05:38 -07:00
Tim Chevalier
ded9008e38
handle fail inside a for loop
2011-07-05 16:05:38 -07:00
Tim Chevalier
6d0cb70fc3
Handle fail as an argument
2011-07-05 16:05:38 -07:00
Patrick Walton
1980a2db53
stdlib: Add str::connect_ivec() temporarily
2011-07-05 16:02:02 -07:00
Patrick Walton
219cd4b21f
stdlib: Change ivec::rustrt::ivec_on_heap() to use a 32-bit return value
2011-07-05 15:34:50 -07:00
Graydon Hoare
741db24e49
Print remaining comments at end of *crate*, not module.
2011-07-05 14:44:54 -07:00
Brian Anderson
a9d84ab28a
Make type unification failures non-fatal
...
Add a failure checkpoint after the typechecking pass. There are still many
fatal errors in typeck, but loosening up this one makes it easier to lean on
the compiler when making changes to types.
Issue #440 .
2011-07-05 14:40:33 -07:00
Patrick Walton
291df4d732
rt: Add missing CDECL to routines in rust_builtin
2011-07-05 14:29:14 -07:00
Graydon Hoare
a7d82a7f0f
Factor the ivec code a touch.
2011-07-05 14:19:27 -07:00