Brian Anderson
d6ab8ebb07
rt: Add more comments to rust_task_sleep
2011-11-18 16:02:48 -08:00
Brian Anderson
9aa67052e1
rt: Remove some stack-wasting macros from rust_task::yield
2011-11-18 15:59:10 -08:00
Brian Anderson
71bcba6815
intrinsics: Remove declaration of port_recv
2011-11-18 15:37:14 -08:00
Brian Anderson
1e58049da2
rt: Remove fail calls from rust_task::yield
2011-11-18 15:36:48 -08:00
Brian Anderson
792068d871
rt: Remove unblock call from rust_task::yield
2011-11-18 14:45:48 -08:00
Brian Anderson
0f339b481a
rt: Remove a lock from task_start_wrapper that does nothing
2011-11-18 13:38:20 -08:00
Brian Anderson
3cfcdb4bb2
rt: Replace two uses of yield with ctx->swap
...
These uses aren't really doing a full yield. They are just giving up control
to the scheduler and will never return.
2011-11-18 13:38:18 -08:00
Brian Anderson
57b43b53f9
rt: Add comments to rust_task::yield
2011-11-18 13:28:12 -08:00
Brian Anderson
d1ef29ab37
rt: rust_task::conclude_failure doesn't need to call unblock
2011-11-18 13:23:27 -08:00
Brian Anderson
3a6320f71b
intrinsics: Eliminate recv intrinsic
...
This intrinsic existed just to get ahold of the return pointer. I replaced it
with a call_with_retptr intrinsic that grabs the return pointer and passes it
to another Rust function, thereby eliminating the need to call C functions on
the Rust stack.
2011-11-18 12:48:54 -08:00
Brian Anderson
93931311ff
rt: Add FIXMEs about races in rust_task
2011-11-18 10:32:27 -08:00
Brian Anderson
0dfa1410d3
rt: Remove task::on_wakeup. Unused
2011-11-18 10:32:27 -08:00
Brian Anderson
63d40b8ab6
rt: Remove some unnecessary setting of rust_task::killed
...
The value of this variable doesn't matter after the task fails.
2011-11-18 10:32:27 -08:00
Brian Anderson
d52888f0ba
rt: Remove rust_task::yield. Unused
2011-11-18 10:32:27 -08:00
Brian Anderson
5e9f9e8c48
rt: Add some comments about methods that run on the Rust stack
2011-11-18 10:32:27 -08:00
Brian Anderson
21865ddce6
intrinsics: Remove the call to get_task from task_sleep
2011-11-18 10:32:27 -08:00
Brian Anderson
eecbc815ac
intrinsics: Add some comments
2011-11-18 10:32:27 -08:00
Brian Anderson
3feaecd757
intrinsics: Move the call to upcall_fail out of rust_intrinsic_cast
2011-11-18 10:32:27 -08:00
Brian Anderson
44aebb978c
Add tests for unsafe::reinterpret_cast
2011-11-18 10:32:27 -08:00
Brian Anderson
9ca2005959
rt: Remove size_of and align_of functions. Now written in Rust
2011-11-18 10:32:27 -08:00
Brian Anderson
a9f7cbe240
stdlib: Add tests for sys::size_of and sys::align_of
2011-11-18 10:32:27 -08:00
Brian Anderson
1f74af505f
stdlib: Add some useful fields to the definition of type_desc
2011-11-18 10:32:27 -08:00
Marijn Haverbeke
0e21df4610
Add some comments to kind.rs and last_use.rs
2011-11-18 17:09:36 +01:00
Marijn Haverbeke
8cf3ca3b55
Make sure by-copy arguments take last-use into account
2011-11-18 16:43:30 +01:00
Marijn Haverbeke
1cccefd8bb
Register snapshot, finishing kind system transition
...
Closes #1177
2011-11-18 16:17:37 +01:00
Marijn Haverbeke
a7573af59d
Add some tests for new kind system
...
Issue #1177
2011-11-18 16:15:46 +01:00
Marijn Haverbeke
196b2b920f
Make sure trans translates record fields in the order they appear in code
...
This prevents surprising side-effect orders, and makes them easier for
the other passes to deal with.
2011-11-18 15:59:47 +01:00
Marijn Haverbeke
68db68c4cc
Make trans use last_use info to not actually generate copies
...
Issue #925
2011-11-18 15:56:53 +01:00
Marijn Haverbeke
f6491bb426
Update stdlib, compiler, and tests to new kind system
...
This involved adding 'copy' to more generics than I hoped, but an
experiment with making it implicit showed that that way lies madness --
unless enforced, you will not remember to mark functions that don't
copy as not requiring copyable kind.
Issue #1177
2011-11-18 12:49:01 +01:00
Marijn Haverbeke
8f8ebb550c
Implement a last-use-of-local finding algorithm
...
Issue #925
2011-11-18 12:49:01 +01:00
Marijn Haverbeke
0c97fcbf66
Properly check kinds in instantiation of generics
...
Issue #1177
2011-11-18 12:49:01 +01:00
Marijn Haverbeke
7bef89f9b5
Prevent alias pass from inserting implicit copies for noncopyable types
...
Issue #1177
2011-11-18 12:49:01 +01:00
Marijn Haverbeke
17b78c4a7a
Overhaul the kind-checking pass
...
Not really useful yet because missing last-use-of-local optimization.
Also: instantiation of type parameters needs to be checked.
Issue #1177
2011-11-18 12:49:01 +01:00
Marijn Haverbeke
cefff237bf
Make tag, resource and object constructors take their arguments by copy
...
Doing something like some([1, 2, 3]) will now no longer create a temporary
copy of the vector. It will also be easier for the kind checker to see that
putting a resource into a data-structure constructor is safe.
2011-11-18 12:49:01 +01:00
Marijn Haverbeke
4e03112141
Add a pass-by-copy parameter passing convention
...
This is intended to solve the problem of how to pass arguments to
constructor functions -- you want to move in rvalues, but not have to
explicitly copy stuff that is not an rvalue. The by-copy passing
convention will ensure the callee gets its own copy of the value. For
rvalues, it'll just pass off the value. For lvalues, it'll make a
copy.
Issue #1177
2011-11-18 12:49:00 +01:00
Marijn Haverbeke
6297fc979e
Register snapshot
2011-11-18 12:48:57 +01:00
Marijn Haverbeke
9cf48d3753
Preparation for kind system overhaul
...
This goes before a snapshot, so that subsequenct patches can make the
transition without breaking the build. Disables kind checking pass, makes
parser accept both new and old-style kind annotation.
Issue #1177
2011-11-18 10:52:28 +01:00
Niko Matsakis
eff7fae7b9
comparing/walking two pointers still aligns same as 1 ptr
2011-11-17 15:41:45 -08:00
Niko Matsakis
b30f7af98b
remove blank line
2011-11-17 15:11:52 -08:00
Niko Matsakis
60e93cd1ec
Re-enable cycle coll. on x86_64, seems to work better now.
2011-11-17 14:40:03 -08:00
Niko Matsakis
f597971441
make ref cnts a long not an int
2011-11-17 14:23:48 -08:00
Niko Matsakis
8925875ccb
add FIXME for issue #1184
2011-11-17 13:44:13 -08:00
Niko Matsakis
0d874476cf
fix resource-generic
2011-11-17 13:44:13 -08:00
Niko Matsakis
11187437c5
Merge branch 'master' of github.com:graydon/rust
2011-11-17 13:44:04 -08:00
Brian Anderson
6a0e85b81c
Remove intrinsic_2 functions
2011-11-17 13:23:35 -08:00
Brian Anderson
5e7dff4db5
Register snapshots
2011-11-17 13:22:29 -08:00
Brian Anderson
3bffb8b5de
build: Add various shorthand make check rules
2011-11-17 12:04:37 -08:00
Niko Matsakis
f9231e932c
add an extra underscore
2011-11-17 12:02:15 -08:00
Brian Anderson
dd275cd749
Stop using temporary intrinsic_2 functions
2011-11-17 11:55:04 -08:00
Niko Matsakis
e7ad5978d9
Merge branch 'master' of github.com:graydon/rust
2011-11-17 11:52:56 -08:00