Brian Anderson
2d713215a8
Record the internal reference count of environment boxes. Closes #981
2011-10-21 14:05:16 -07:00
Marijn Haverbeke
6c4c33e009
Clean up character pattern in float.rs
...
This is actually a test to see if I fixed the bot.
2011-10-21 21:06:54 +02:00
Marijn Haverbeke
b0a72ee06a
Be more careful when parsing block calls
...
Previously, the parser would try to interpret this as a block call:
if true {} // No semicolon
{|i, am, a, block|};
Which, though unlikely, might come up in practice.
2011-10-21 14:55:54 +02:00
Marijn Haverbeke
3b5b93221e
Remove some semicolons after block calls
...
The remaining ones can be removed after the next snapshot. (Or
we can let the next pretty-print pass take care of them.)
2011-10-21 14:24:42 +02:00
Marijn Haverbeke
7114702496
Change the way block calls are parsed, mark them as block-calls.
...
This makes it possible to omit the semicolon after the block, and will
cause the pretty-printer to properly print such calls (if
pretty-printing of blocks wasn't so broken). Block calls (with the
block outside of the parentheses) can now only occur at statement
level, and their value can not be used. When calling a block-style
function that returns a useful value, the block must be put insde the
parentheses.
Issue #1054
2011-10-21 14:24:14 +02:00
Marijn Haverbeke
0ce40f60e7
Drop support for iter, put, and for-each
...
Closes #1056
2011-10-21 13:47:24 +02:00
Marijn Haverbeke
050170d2af
Remove remaining uses of iter and for-each
...
Issue #1056
2011-10-21 13:34:35 +02:00
Marijn Haverbeke
fd5a08384d
Move ast_util::pat_bindings over to new iter system.
...
Issue #1056
2011-10-21 12:41:42 +02:00
Marijn Haverbeke
6bcb4a426c
Remove last uses of iterators from stdlib
...
Issue #1056
2011-10-21 12:31:48 +02:00
Marijn Haverbeke
4ebbbe597e
Move hash table iteration over to block-taking functions
...
Issue #1056
2011-10-21 12:21:27 +02:00
Marijn Haverbeke
9bb4595c53
Register new snapshot
...
(For block argument syntax.)
2011-10-21 11:56:39 +02:00
Marijn Haverbeke
f134261ae6
Support Ruby-style block argument syntax
...
Issue #1054
2011-10-21 11:32:26 +02:00
Brian Anderson
ff813f84a8
Run perf on the stage 2 compiler
2011-10-20 22:40:21 -07:00
Brian Anderson
0b791f5143
Restore broken tests in stdtest::test
2011-10-20 21:00:50 -07:00
Brian Anderson
d24894e181
Remove unused empty_fn_ty from rustc::front::test
2011-10-20 20:54:12 -07:00
Brian Anderson
4ef2c37059
Give native functions proto_bare
2011-10-20 20:53:52 -07:00
Brian Anderson
ebc61e39d7
Remove temporary fn# syntax
2011-10-20 20:34:04 -07:00
Brian Anderson
6fb9d4f83b
Remove typeck::proto_to_ty_proto
2011-10-20 20:30:20 -07:00
Brian Anderson
f64d47a61e
Register snapshots
2011-10-20 19:54:57 -07:00
Brian Anderson
c10eb221da
Get windows working under the bare function regime
...
Had to ignore some task failure tests due to the current implementation
of spawn which guarantees that there's always something in the spawned
task that needs to be unwound.
Fixed some win-specific build problems.
2011-10-20 18:23:48 -07:00
Brian Anderson
5c38f7dfd7
Don't allow fn@ items
...
fn@ is intended to be caputring but isn't implemented.
2011-10-20 18:23:48 -07:00
Brian Anderson
9efdd0f326
Merge ast::proto_shared and ast::proto_closure
...
Now they are both just proto_shared and proto_shared takes an
argument indicating that it is sugared as 'lambda'
2011-10-20 18:23:48 -07:00
Brian Anderson
4b30a06abe
Rename ast::proto_fn to ast::proto_shared
2011-10-20 18:23:48 -07:00
Brian Anderson
29ad3bdb10
Make fn denote a bare function. Convert fn to fn@ as needed
2011-10-20 18:23:48 -07:00
Brian Anderson
f324704c0a
Parse obj methods as proto_bare
...
I don't know if this is the right thing to do, but it works
and it lets 'fn' always mean proto_bare
2011-10-20 18:23:48 -07:00
Brian Anderson
391e12124b
Tweak typecheck to enforce covariance on higher-order function arguments
2011-10-20 18:23:48 -07:00
Brian Anderson
342a400e79
Remove type coercion from fn to block
...
fn is a proper subtype of block now
2011-10-20 18:23:48 -07:00
Brian Anderson
8136b92ee8
Give subtype relationships to function types
2011-10-20 18:23:48 -07:00
Brian Anderson
ed985b61d5
Bare functions can coerce to blocks
2011-10-20 18:23:48 -07:00
Brian Anderson
354bfc8292
Bare functions can coerce to shared closures
2011-10-20 18:23:48 -07:00
Brian Anderson
3bb020aaf8
Revert "Remove the environment argument from bare functions"
...
This reverts commit 1b0f1f0b79
.
2011-10-20 18:23:48 -07:00
Brian Anderson
070c39ca1d
Split parsing of fn proto between types, items and anons
...
The meaning of various fn incantations is going to get temporarily confusing
2011-10-20 18:23:47 -07:00
Brian Anderson
686d6a485f
Drop the 2 from the spawn*2 functions
...
Issue #1022
2011-10-20 18:23:47 -07:00
Brian Anderson
e0bba33caa
Rename std::task::spawn_inner to unsafe_spawn_inner
...
Delete the rest of the old, unused spawn functions.
Issue #1022
2011-10-20 18:23:47 -07:00
Brian Anderson
446aea11d0
Stop exporting unsafe spawn functions
...
Issue #1022
2011-10-20 18:23:47 -07:00
Brian Anderson
3b54dcfa79
Convert the test runners to typesafe spawn
...
Issue #1022
2011-10-20 18:23:47 -07:00
Brian Anderson
1abebf042a
Convert std::aio to new spawn functions
...
Issue #1022
2011-10-20 18:23:47 -07:00
Brian Anderson
a4956a7cdd
XFAIL task-perf-word-count-generic
...
This can't be done with bare functions.
Issue #1022
2011-10-20 18:23:47 -07:00
Brian Anderson
ac671c3172
Convert tests to use bare-fn spawn
...
Issue #1022
2011-10-20 18:23:47 -07:00
Brian Anderson
4341e50e3a
Add safe versions of spawn using bare functions
...
Currently they just wrap the unsafe versions. Will need to be rewritten
eventually.
Issue #1022
2011-10-20 18:23:47 -07:00
Brian Anderson
034408c40a
Convert DPRINT to LOG in rust_cc.cpp and add more logging
2011-10-20 18:19:06 -07:00
Brian Anderson
dcee98b024
Un-xfail-fast some tests
...
check-fast is more reliable now.
2011-10-20 16:01:24 -07:00
Brian Anderson
28161fcf3c
Change run-pass/lots-a-fail.rs from xfail-fast to xfail-win32
...
All failing tasks leak on windows now
2011-10-20 16:00:13 -07:00
Brian Anderson
0714bb5f7d
Fix the problem with check-fast randomly failing
...
Trans has been assuming that tag node id's are unique across crates and they
are not so, depending on which way the wind is blowing, it would choose to use
a crate-local tag variant instead of the correct one from std.
No test case since I can't come up with a reliable one that compiles in a
reasonable amount of time.
2011-10-20 15:38:51 -07:00
Marijn Haverbeke
f8f1d950ef
Register new snapshots
2011-10-20 17:36:29 +02:00
Marijn Haverbeke
ba1c6fcf38
Remove the last vestiges of main.ll
...
Closes #992
2011-10-20 17:36:28 +02:00
Marijn Haverbeke
ef63f09dcd
Don't rely on main.ll anymore
...
I'll remove the actual file after I register a snapshot.
Issue #992
2011-10-20 17:18:38 +02:00
Marijn Haverbeke
cff9c67674
Output linker errors, when linking fails
2011-10-20 15:30:27 +02:00
Marijn Haverbeke
8124846b2c
Get rid of taskpointer-passing throughout the compiler
...
Only intrinsics still take a dummy taskptr. We'll have to do some
makefile stunts to snapshot a version without taskptrs-in-intrinsics.
Issue #466
2011-10-20 14:22:17 +02:00
Marijn Haverbeke
457683c7fe
Do not pass taskpointers to "rust" native functions
...
Issue #466
2011-10-20 14:22:17 +02:00