Graydon Hoare
895ec07453
Try to fail nicely, again.
2011-05-04 15:04:53 +00:00
Rafael Ávila de Espíndola
5617462388
Remove unused variable.
2011-05-03 11:06:57 -04:00
Rafael Ávila de Espíndola
a3ff02f126
Split start into rustc and rustboot versions. This introduces a bit of
...
duplication, but we will hopefully drop the rustboot one soon.
This is also a preparation for changing the rustc one to have the activate glue
return to the exit glue which will then call the main function.
This (returning to the function that calls main) matches what happens when
loader stats a program or a new thread. It lets gdb produce good backtraces
and should help with EH too.
2011-05-03 10:24:18 -04:00
Marijn Haverbeke
880be6a940
Overhaul logging system in runtime
...
See https://github.com/graydon/rust/wiki/Logging-vision
The runtime logging categories are now treated in the same way as
modules in compiled code. Each domain now has a log_lvl that can be
used to restrict the logging from that domain (will be used to allow
logging to be restricted to a single domain).
Features dropped (can be brought back to life if there is interest):
- Logger indentation
- Multiple categories per log statement
- I possibly broke some of the color code -- it confuses me
2011-04-19 16:57:13 +02:00
Patrick Walton
fee88f79f5
rt: Remove half-baked, incomplete, commented-out print_stack_trace() stub
2011-04-14 11:35:22 -07:00
Patrick Walton
65b7578851
rustc: Remove generalize_ty. Instead, maintain an explicit type parameter substitution list.
2011-04-14 11:24:25 -07:00
Marijn Haverbeke
973023030e
add -O2 when compiling rt, fix warnings triggered by optimizer
2011-04-08 00:41:52 +02:00
Marijn Haverbeke
9a7576fe2c
Move to macro-based logging checks in the C++ code
...
No functions should be called for log statements that turn out to be
inactive.
2011-04-07 15:15:30 -07:00
Graydon Hoare
a154c5b656
Um, that'd be, align the word *before* retpc. Addresses point to the low part of a word. Un-XFAIL nbody on Darwin.
2011-03-30 14:10:06 -07:00
Graydon Hoare
3e7b991d49
Ensure task stacks start out with a 16-byte aligned entry frame. Should make OSX behave a bit better.
2011-03-30 13:04:18 -07:00
Graydon Hoare
af4d6ae76b
Add ABI tagging to crates, adjust rustc output and runtime stack-frame setup so access to argv works.
2011-02-22 16:37:27 -08:00
Graydon Hoare
aaa6965794
Fix typo in rust_task::start. Should be copying 1 fewer initial arg.
2011-02-21 18:55:08 -08:00
Graydon Hoare
d55bee4417
Further corrections to the logging layer in runtime.
2011-01-14 16:50:37 -08:00
Brian Anderson
73fd87baf5
Don't attempt to wake tasks that aren't blocked.
...
It's possible for a supervised task to kill and wake its supervising
task then immediately try to wake it again if the supervising task
has joined the supervised. This is the easiest way to prevent that.
2011-01-03 10:59:00 -08:00
Graydon Hoare
26ecec4e12
Update frame logic to be compatible with SysV x86 ABI. Improves diagnostics.
2010-11-16 13:51:32 -08:00
Patrick Walton
94cec74096
Try to print backtraces on failure
2010-10-11 16:40:18 -07:00
Graydon Hoare
b970563fe3
Patchwork of attempted fixes to effect system and gc system; eventually give up and disable it entirely in the runtime. Will need extensive reworking.
2010-09-29 17:22:13 -07:00
Michael Bebenita
a493350eb5
Cleanup, refactoring, and some runtime tests.
2010-09-10 14:38:31 -07:00
Michael Bebenita
743ca289b6
Cache task handles.
2010-09-08 21:25:16 -07:00
Michael Bebenita
de611a3090
Lots of design changes around proxies and message passing. Made it so that domains can only talk to other domains via handles, and with the help of the rust_kernel.
2010-09-07 18:44:12 -07:00
Michael Bebenita
b03812af2b
Change signature of array_list::pop().
2010-09-07 18:41:08 -07:00
Patrick Walton
fac28ad42f
Disable task-growing logic for now until #151 is fixed
2010-08-20 11:05:06 -07:00
Michael Bebenita
e20752de68
Added labels to blocking conditions.
2010-08-17 23:49:57 -07:00
Michael Bebenita
988695a96c
Added support for task sleeping in the scheduler.
2010-08-11 21:24:04 -07:00
Graydon Hoare
dbe8760af3
Merge commit 'jyasskin/work'
...
Conflicts:
src/rt/rust_dom.cpp
src/rt/rust_upcall.cpp
2010-08-10 13:26:00 -07:00
Michael Bebenita
97d6342bf0
Synthesize a flush_chan upcall right before a channel's ref_count drops to zero. This should only happen in the Rust code and not in the drop glue, or on the unwind path. This change allows the task owning the channel to block on a flush and delete its own channel. This change also cleans up some code around rust_port and rust_chan.
2010-08-09 08:15:34 -07:00
Michael Bebenita
5917ca3519
Fixed deadlock in the scheduler caused by condition variables.
2010-08-09 08:06:08 -07:00
Michael Bebenita
30734a9a7b
Some pretty printing in the runtime.
2010-08-09 07:52:07 -07:00
Jeffrey Yasskin
b71340552f
Add names to tasks and domains. These can either be an explicit literal string
...
after the "spawn" keyword, or implicitly the call expression used to start the
spawn.
2010-08-09 11:43:16 +02:00
Graydon Hoare
0b9c882d66
Log join-wait count under rust_log::TASK bits, not ::ALL.
2010-07-29 10:41:22 -07:00
Michael Bebenita
4246d567b7
Move ports out into their own file, add data_message and make communication system use it (and proxies) instead of existing token scheme.
2010-07-28 20:30:29 -07:00
Michael Bebenita
4ff8e15128
Move notification-messages out into their own file and unify into notify_message, make them use proxies, cache task proxies in dom.
2010-07-28 20:30:29 -07:00
Michael Bebenita
defd8a66ea
Rename rust_proxy_delegate to maybe_proxy, flesh out logic in it. Add strong-ref distinction on rust_proxy.
2010-07-28 20:30:29 -07:00
Michael Bebenita
5db5eb0c55
Null rust_task::cond on wakeup, add asserts and logging to block/wakeup.
2010-07-28 20:30:29 -07:00
Graydon Hoare
9935a48e95
Fix message formatting in runtime library.
2010-07-20 15:16:09 -07:00
Michael Bebenita
00d1465d13
Added a message passing system based on lock free queues for inter-thread communication. Channels now buffer on the sending side, and no longer require blocking when sending. Lots of other refactoring and bug fixes.
2010-07-19 14:05:18 -07:00
Roy Frostig
7c8c98a6d7
Adjust call args laid out by fake frame created in rust_task::start to reflect new position of closure-or-obj pointer.
2010-07-15 12:30:46 -07:00
Graydon Hoare
7c837b8c9b
Correct doubly-linked list management logic; bug exposed during conversation on issue #106 .
2010-07-12 13:26:28 -07:00
Chris Double
2fcd99c3e6
Fix for compile error when using gcc 4.5.0
2010-07-11 11:10:56 +08:00
Graydon Hoare
b1eeb9b825
Change from 'spawner' to 'supervisor' in rust_task, and add an unsupervise call.
2010-07-05 14:43:40 -07:00
Graydon Hoare
b2692ef2ec
Actually link GC allocations onto the gc_alloc_chain, der.
2010-07-02 08:17:41 -07:00
Graydon Hoare
5abc483d9a
Move more of the GC logic into the runtime.
2010-06-28 18:53:43 -07:00
Graydon Hoare
eed5c0aa24
Add rust_task::gc(size_t args) method that drops us back into the GC glue.
2010-06-25 16:54:03 -07:00
Graydon Hoare
d6b7c96c3e
Populate tree.
2010-06-23 21:03:09 -07:00