Commit graph

9325 commits

Author SHA1 Message Date
Jon Morton
128a8b6ed5 remove rust_srv 2012-04-01 22:18:40 -05:00
Jon Morton
413994ea3e replace assertion macros with plain asserts 2012-04-01 21:14:16 -05:00
Brian Anderson
3654ef0078 rt: Introduce rust_manual_sched_launcher_factory. Again, so sorry 2012-04-01 17:35:35 -07:00
Brian Anderson
7c1be236a5 rt: Introduce rust_sched_launcher_factory. Sorry, I need one 2012-04-01 17:27:18 -07:00
Brian Anderson
fb528dd7d6 rt: Allow some schedulers to stay alive even without tasks to execute 2012-04-01 16:57:14 -07:00
Brian Anderson
0a5e9d45e1 rt: Introduce rust_manual_sched_launcher 2012-04-01 16:21:48 -07:00
Brian Anderson
9ec21933f1 doc: Tutorial fixes
Thanks to Mohd. Bilal Husain
2012-04-01 15:36:56 -07:00
Brian Anderson
efe4c6af23 core: Use the or binop instead of the double-star binop 2012-04-01 15:05:29 -07:00
Brian Anderson
494cf46ea3 Add Jonathan Sternberg to AUTHORS.txt 2012-04-01 15:01:16 -07:00
Brian Anderson
252086c89a Merge pull request #2099 from jsternberg/master
os::list_dir to return only the contents of the directory
2012-04-01 14:59:07 -07:00
Brian Anderson
9d5c20ecca rt: rust_sched_launcher needs a virtual destructor 2012-04-01 13:25:49 -07:00
Jonathan Sternberg
3a0477c398 Fixing issue 1919. list_dir is the more general version that returns a vector with the contents of the directory. list_dir_path contains the old behavior (as a convenience function). 2012-04-01 11:39:17 -04:00
Brian Anderson
ac0381c0bb rt: rust_sched_launcher does not need a join() method 2012-04-01 00:24:25 -07:00
Brian Anderson
e78396850d Merge remote-tracking branch 'brson/mainthread'
Conflicts:
	src/rt/rust_sched_loop.cpp
	src/rt/rust_shape.cpp
	src/rt/rust_task.cpp
2012-04-01 00:15:04 -07:00
Brian Anderson
de47fcfdf9 rt: Extract rust_thread_sched_launcher from rust_sched_launcher 2012-03-31 23:35:41 -07:00
Brian Anderson
21064637ed rt: Fix whitespace 2012-03-31 23:12:06 -07:00
Brian Anderson
cf0c4cd7d2 rt: Begin running tidy on C++ code again. Oops 2012-03-31 23:05:04 -07:00
Brian Anderson
a17097a57b rt: Make rust_sched_launcher hide it's thread implementation 2012-03-31 21:48:52 -07:00
Brian Anderson
2d8ef7387e rt: Add some more locking asserts to rust_sched_loop 2012-03-31 19:51:30 -07:00
Brian Anderson
c8dc6fcb4c Revert "rt: Remove lock_held_by_current_thread"
Adds back the ability to make assertions about locks, but only under the
--enable-debug configuration

This reverts commit b247de6458.

Conflicts:

	src/rt/rust_sched_loop.cpp
2012-03-31 19:51:29 -07:00
Brian Anderson
609144f7a6 rt: Extract start_main_loop from rust_sched_loop to rust_sched_driver 2012-03-31 19:51:29 -07:00
Brian Anderson
218dd08469 rt: Introduce rust_sched_reaper
This just moves the responsibility for joining with scheduler threads
off to a worker thread. This will be needed when we allow tasks to be
scheduled on the main thread.
2012-03-31 19:51:29 -07:00
Brian Anderson
771c1be6a6 rt: Refactor the scheduler loop so that it can be driven from without 2012-03-31 19:51:29 -07:00
Brian Anderson
243790836a rt: Rename rust_task_thread to rust_sched_loop
This class no longer represents a thread; it just schedules tasks.
2012-03-31 19:51:29 -07:00
Brian Anderson
6bf8d19712 rt: Extract rust_sched_launcher from rust_task_thread
rust_sched_launcher is actually responsible for setting up the thread and
starting the loop. There will be other implementations that do not actually
set up a new thread, in order to support scheduling tasks on the main OS
thread.
2012-03-31 19:51:29 -07:00
Brian Anderson
620b4d4946 Add Jon Morton to AUTHORS.txt 2012-03-31 17:56:51 -07:00
Jon Morton
9851a906a5 initialize cur_thread, first task on thread 0 2012-03-31 13:14:54 -05:00
Jon Morton
8aee42a382 Choose task thread in rust_scheduler by round robin
Remove the random context from rust_scheduler and use a simple round robin system to choose which thread a new task gets put on. Also, some incorrect tab indents around scoped blocks were fixed.
2012-03-31 02:14:44 -05:00
Brian Anderson
0904f25507 rustc: Convert some error logs to debug 2012-03-30 17:31:40 -07:00
Marijn Haverbeke
a4906b81f7 Change a span_err back to span_fatal
Closes #2073
2012-03-30 08:25:45 +02:00
Brian Anderson
6e8cf935db core: Add each, each_char to str::extensions 2012-03-29 22:30:15 -07:00
Brian Anderson
8641c95221 core: Add str::each_char 2012-03-29 22:28:26 -07:00
Brian Anderson
9bff2f2545 core: Add each, eachi to vec::extensions 2012-03-29 22:17:11 -07:00
Brian Anderson
5d54defce4 core: Add extension methods for vec 2012-03-29 20:56:50 -07:00
Brian Anderson
f65ea0c812 core: Add extension methods for option 2012-03-29 20:56:50 -07:00
Brian Anderson
392d3c8d44 core: Add extension methods for str 2012-03-29 20:56:50 -07:00
Niko Matsakis
35a3fa0999 add some comments explaining how the tables work 2012-03-29 19:41:09 -07:00
Niko Matsakis
2b45da8a33 refactor to store the types during inference in tables in the fcx
this is a step towards separating out the repr. of
types during inference from the repr. in later stages.
2012-03-29 19:41:09 -07:00
Niko Matsakis
f682b99e36 generate correct constraints for assignments 2012-03-29 19:41:09 -07:00
Niko Matsakis
76d0a13ae5 resolve type variables with no constraints to bot 2012-03-29 19:41:09 -07:00
Brian Anderson
f452973a7f build: Add --enable-debug configure option
When CFG_ENABLE_DEBUG is defined it will call rustc with -g --cfg=debug
and cc with -DRUST_DEBUG. Otherwise it calls rustc with --cfg=ndebug and cc
with -DRUST_NDEBUG.

I plan to use this for a few things in the runtime.
2012-03-29 19:10:38 -07:00
Brian Anderson
5b3740508a test: Prevent run-fail/too-much-recursion from being optimized to nothing 2012-03-29 16:43:18 -07:00
Brian Anderson
b17145b4ae rt: Track backtraces of all allocations with RUSTRT_TRACK_ALLOCATIONS=3 2012-03-29 16:43:18 -07:00
Brian Anderson
3ff01361d5 rt: Make the CC sweep use the box annihilator 2012-03-29 16:43:18 -07:00
Brian Anderson
ad26b00696 rustc: Generate fewer landing pads 2012-03-29 16:43:18 -07:00
Brian Anderson
15de9b3c95 rt: Make the box annihilator walk and delete contents 2012-03-29 16:43:18 -07:00
Brian Anderson
5747fe7a2c rt: For now, only run the box annihilator after task failure 2012-03-29 16:43:18 -07:00
Brian Anderson
7f9ed39040 rustc: Only invoke when there are cleanups 2012-03-29 16:43:18 -07:00
Brian Anderson
8780db2e0b rustc: Delete some unused invoke code 2012-03-29 16:43:18 -07:00
Brian Anderson
b420f46f03 rustc: Don't generate landing pad cleanups for boxy things 2012-03-29 16:43:18 -07:00