Michael Sullivan
491d110645
Make type_desc fields have useful types and better names. Add in cmp_glue.
2011-06-14 15:35:08 -07:00
Patrick Walton
355c417267
rustc: Add some interior vector spill code, untested as of yet
2011-06-13 19:27:04 -07:00
Patrick Walton
c3bf7d07e9
rustc: Implement simple interior vector append translation
2011-06-13 18:57:25 -07:00
Eric Holk
d1857d30fc
This is the mega-ucontext commit. It replaces the task switching mechanism with a new one inspired by ucontext. It works under Linux, OS X and Windows, and is Valgrind clean on Linux and OS X (provided the runtime is built with gcc).
...
This commit also moves yield and join to the standard library, as requested in #42 . Join is currently a no-op though.
2011-06-13 18:14:13 -07:00
Graydon Hoare
a1bc2b17cc
Make darwin happy.
2011-06-10 18:32:38 -07:00
Graydon Hoare
603ad1748b
Fix printf flags.
2011-06-10 17:59:34 -07:00
Graydon Hoare
1d1010cac0
Move rt:: logging namespace to ::rt:: and implement RUST_LOG=? and RUST_LOG=::help as synonyms that dump the crate logging map. Also warn when some logging specs don't match.
2011-06-10 17:31:48 -07:00
Graydon Hoare
52c4c9014f
Encode meta tags in the crate and start sketching enhanced logic for resolving crate "use" directives.
...
Now with extra "works on OSX" kludging.
2011-06-10 12:57:29 -07:00
Erick Tryzelaar
501201a431
Remove executable bit from lock_and_signal.cpp.
2011-06-09 12:30:57 -07:00
Rafael Ávila de Espíndola
46920e073b
Remove hack now that stage0 doesn't use it.
2011-06-09 14:26:10 -04:00
Rafael Ávila de Espíndola
b1d6f12a05
Don't put a copy of main (the C one) in each binary we produce. This is a step
...
in getting a driver that works on all linux systems.
Sorry for the linker hacks, I will remove them after snapshotting a new compiler.
2011-06-07 16:56:27 -04:00
Rafael Ávila de Espíndola
cc96eeafca
Move rust_vec_append_glue to rt.
2011-05-31 14:32:08 -04:00
Rafael Ávila de Espíndola
697be84d61
Fix the bots.
2011-05-31 13:50:16 -04:00
Rafael Ávila de Espíndola
3dc6c3b737
Remove code that is now dead.
2011-05-31 13:38:10 -04:00
Rafael Ávila de Espíndola
e66f9e46f6
Start finishing up the rust_start signature transition.
2011-05-31 11:17:17 -04:00
Brian Anderson
973b93ee2a
rt: Use new module syntax for logging rt pseudo-modules
...
Now use RUST_LOG=rt::mem instead of RUST_LOG=rt.mem
2011-05-30 17:17:51 -04:00
Eric Holk
8cfc388d40
Switched calling conventions so that spawn with multiple arguments works.
2011-05-27 15:20:58 -07:00
Eric Holk
d49998f0ed
Switching over to wrappers for spawning functions of multiple arguments. Doesn't quite work yet.
2011-05-27 15:20:58 -07:00
Eric Holk
dad426419c
Working on 2 argument spawn. The arguments seem to be copied correctly once, but then they get lost.
2011-05-27 15:20:58 -07:00
Graydon Hoare
79c9e13073
More delicious dead code removal from runtime, upcalls.
2011-05-26 18:21:02 -07:00
Rafael Ávila de Espíndola
4c4a4aee91
Fix non linux bots.
2011-05-25 16:03:50 -04:00
Rafael Ávila de Espíndola
94129c4216
dead argument removal part one.
2011-05-25 15:33:57 -04:00
Rafael Ávila de Espíndola
db47cb5c13
Dead code.
2011-05-25 15:22:25 -04:00
Rafael Ávila de Espíndola
0e324cad0a
Dead code.
2011-05-25 15:08:31 -04:00
Rafael Ávila de Espíndola
9a3624466b
Dead code.
2011-05-25 14:12:09 -04:00
Rafael Ávila de Espíndola
2306fb19f2
dead code.
2011-05-25 13:25:00 -04:00
Rafael Ávila de Espíndola
23c1335cb3
Dead code.
2011-05-25 12:00:16 -04:00
Rafael Ávila de Espíndola
579b317ae8
Dead code.
2011-05-25 11:45:07 -04:00
Rafael Ávila de Espíndola
3eafea46a3
Dead code.
2011-05-25 11:36:34 -04:00
Rafael Ávila de Espíndola
4364be3744
Dead code.
2011-05-24 20:36:27 -04:00
Rafael Ávila de Espíndola
0c1ea141b4
Dead code.
2011-05-24 20:12:30 -04:00
Rafael Ávila de Espíndola
f9946c9748
Dead code.
2011-05-24 19:39:30 -04:00
Rafael Ávila de Espíndola
40a3923fca
Dead code.
2011-05-24 19:29:46 -04:00
Rafael Ávila de Espíndola
395940f7e3
Dead code elimination.
2011-05-24 19:07:30 -04:00
Rafael Ávila de Espíndola
de2e84e5b0
Only one gc glue.
2011-05-24 18:52:31 -04:00
Rafael Ávila de Espíndola
ac836dd79c
There is only one yield glue.
2011-05-24 18:29:08 -04:00
Rafael Ávila de Espíndola
b1292580b9
Remove dead code for unwind_glue.
2011-05-24 17:28:37 -04:00
Rafael Ávila de Espíndola
0fc91b6ecc
There is only one activate function now.
2011-05-24 17:00:45 -04:00
Rafael Ávila de Espíndola
fe90159b86
"constant propagate" rust_new_exit_task_glue to its only use.
2011-05-24 15:51:22 -04:00
Eric Holk
0de27ce8bd
Translated start_task, but it fails on spp == align_down(spp)
2011-05-20 16:51:09 -07:00
Eric Holk
d01948cd07
Called the new_task upcall. There are refcount issues though.
2011-05-20 16:51:08 -07:00
Marijn Haverbeke
c750c520e3
Remove rustboot-related logging hacks
...
(Also, feel free to start adding logging to your code. Really. It's fast.)
2011-05-19 19:33:32 +02:00
Rafael Ávila de Espíndola
bb7d4e15a8
Remove dead code.
2011-05-18 16:33:22 -04:00
Rafael Ávila de Espíndola
843739ee98
A quick hack to get the bots green while I refactor this code.
2011-05-18 16:16:52 -04:00
Rafael Ávila de Espíndola
96516e9ca2
One exit_task_glue to rule them all.
2011-05-18 15:43:48 -04:00
Rafael Ávila de Espíndola
a795d0e5b2
And yet more dead code.
2011-05-18 14:28:08 -04:00
Rafael Ávila de Espíndola
d108bfe2ee
Remove a bit more dead code.
2011-05-18 14:02:53 -04:00
Rafael Ávila de Espíndola
cebc9b359d
Remove dead rustboot code.
2011-05-18 13:48:57 -04:00
Brian Anderson
0b73b29383
rt: Don't overshoot the end of the logging spec during parsing
2011-05-13 23:22:29 -04:00
Brian Anderson
9e9d57657d
rt: Allocate room for null terminator in logging spec
2011-05-13 23:22:25 -04:00
Brian Anderson
e35984b6c6
Introduce str_slice runtime function
...
This reduces the time to execute the new lib-str tests from 1:40ish to a few
seconds and will eventually allow the full lib-sha1 test to run in a
reasonable amount of time. XFAIL lib-str in stage0 - it will run very slowly
until the next snapshot.
2011-05-11 01:38:16 -04:00
Graydon Hoare
46886b2339
Attempt to put out burning darwin tinderbox.
2011-05-10 17:47:55 -07:00
Patrick Walton
7641142ce2
rt: Consistently refer to structs as structs and classes as classes. Clang complains about this.
2011-05-08 21:10:42 -07:00
Rafael Ávila de Espíndola
8df37716ce
Fix OS X build.
2011-05-05 23:16:59 -04:00
Rafael Ávila de Espíndola
d6deeffd95
Change the setup so that rust_activate_glue returns to rust_exit_task_glue
...
and rust_exit_task_glue calls the rust main.
This is simpler since we only need to setup one frame. It also matches
what ld.so does, so gdb is happy and stops a backtrace at rust_exit_task_glue
instead of continuing past whatever function happened to be before
rust_exit_task_glue is the object file.
This is the rt part and should be merged after the rust0 part.
2011-05-05 15:46:10 -07:00
Patrick Walton
a74feaf159
rustc: Link with intrinsics.bc; change intrinsics linkage to linkonce_odr
2011-05-05 12:46:22 -07:00
Ralph Giles
06f0713906
Mark valgrind's _qzz_res as unused to silence warnings on gcc 4.6.
...
This applies c11675 by Julian Seward from valgrind trunk
(svn://svn.valgrind.org/valgrind/trunk) to rustrt's included
copies of memcheck.h and valgrind.h, effectively backporting
the fix from the unreleased 3.6.2. The commit simply applies
the gcc 'unused' attribute to the relevant declarations.
This change allows compilation of the runtime code under
gcc 4.6 with -Werror, as the makefile currently requests.
2011-05-05 10:55:54 -07:00
Patrick Walton
04f966f0bc
build: Build intrinsics.bc
2011-05-04 18:29:08 -07:00
Graydon Hoare
895ec07453
Try to fail nicely, again.
2011-05-04 15:04:53 +00:00
Graydon Hoare
99f1dffd49
Fail in a slightly more organized fashion for now.
2011-05-04 06:19:58 +00:00
Patrick Walton
dc181bca4e
rustc: Stub Rust intrinsics. We check in the .ll file for now to temporarily dodge a dependency on clang.
2011-05-03 18:51:41 -07:00
Graydon Hoare
b5a6082d41
Update valgrind.h and memcheck.h to 3.6.0
2011-05-03 12:04:00 -07: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
Patrick Walton
5d3e553141
stdlib: Add a Time module to the standard library
2011-04-29 11:54:06 -07:00
Graydon Hoare
bfa3c05994
Log refcounts in upcall_vec_grow.
2011-04-28 13:26:19 -07:00
Tim Chevalier
54aff74af0
Slightly more helpful error message for "null lib handle"
...
I changed the error message to also suggest checking the -L flag
when this happens.
2011-04-28 13:26:19 -07:00
Patrick Walton
180a389832
stdlib/rt: Add an unsafe function to cast immutable vectors to mutable ones
2011-04-27 18:14:56 -07:00
Patrick Walton
e3fa22ab13
rt: Add str_vec to the def file. Puts out burning tinderbox.
2011-04-27 14:40:16 -07:00
Graydon Hoare
4c7886de80
Fix _str.bytes to trivial version.
2011-04-27 13:06:19 -07:00
Patrick Walton
735435bf96
stdlib: Add a pointer equality function to the standard library and a test case
2011-04-21 16:44:17 -07:00
Marijn Haverbeke
9287641c86
add rustboot-specific log upcalls to .def file
2011-04-19 18:12:49 +02: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
Marijn Haverbeke
9bfc8bf11e
Add log_err to rustboot
2011-04-19 16:57:13 +02:00
Marijn Haverbeke
ef62fae9db
Add a proper check for rustboot
...
Uncomment log initialization.
2011-04-18 19:59:49 +02:00
Marijn Haverbeke
c40cf96656
Temporarily turn off logging initialization
...
Will be restored as soon as I find a way for the runtime
to figure out whether it is on rustboot or rustc.
2011-04-18 18:29:20 +02:00
Marijn Haverbeke
f6be25a870
Update foregoing patches to leave rust_crate alone.
...
Apparently it can't live in the main binary, since on non-Linux
platforms, dynamics libs won't find symbols in the binary. This
removes the crate_map pointer from rust_crate again, and instead
passes it as an extra argument to rust_start. Rustboot doesn't pass
this argument, but supposedly that's okay as long as we don't actually
use it on that platform.
2011-04-18 16:21:49 +02:00
Marijn Haverbeke
148e6f7b00
Make log the log level configurable per module
...
This overloads the meaning of RUST_LOG to also allow
'module.submodule' or 'module.somethingelse=2' forms. The first turn
on all logging for a module (loglevel 3), the second sets its loglevel
to 2. Log levels are:
0: Show only errors
1: Errors and warnings
2: Errors, warnings, and notes
3: Everything, including debug logging
Right now, since we only have one 'log' operation, everything happens
at level 1 (warning), so the only meaningful thing that can be done
with the new RUST_LOG support is disable logging (=0) for some
modules.
TODOS:
* Language support for logging at a specific level
* Also add a log level field to tasks, query the current task as well
as the current module before logging (log if one of them allows it)
* Revise the C logging API to conform to this set-up (globals for
per-module log level, query the task level before logging, stop
using a global mask)
Implementation notes:
Crates now contain two extra data structures. A 'module map' that
contains names and pointers to the module-log-level globals for each
module in the crate that logs, and a 'crate map' that points at the
crate's module map, as well as at the crate maps of all external
crates it depends on. These are walked by the runtime (in
rust_crate.cpp) to set the currect log levels based on RUST_LOG.
These module log globals are allocated as-needed whenever a log
expression is encountered, and their location is hard-coded into the
logging code, which compares the current level to the log statement's
level, and skips over all logging code when it is lower.
2011-04-18 15:28:47 +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
Graydon Hoare
35573144c5
Remove silly legacy glue-offset encoding, predicate runtime adjustments by ABI. LLVM should inline most glue now.
2011-04-09 00:54:46 +00:00
Brian Anderson
b883ec4c9d
Avoid some gotchas with logging macros
...
I think this is sufficient to eliminate multiple evaluation and the
possibility of accidental miscompilation from the logging macros.
2011-04-07 22:53:16 -04:00
Marijn Haverbeke
009e01dbe7
add FIXME related to the -fno-strict-aliasing workaround
2011-04-08 02:23:33 +02:00
Marijn Haverbeke
bb56253015
Initialize two more variables to keep darwin tinderbox happy
2011-04-08 00:59:45 +02: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
8e9c5b96fb
Change rust_vec to have a 16-byte header, to 16-byte-align vec-body data. Major perf win.
2011-04-02 19:05:12 -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
b2427509e2
Another go at changing compile-command, this time using RBUILD env var.
2011-03-25 15:07:27 -07:00
Graydon Hoare
91c2b82b09
Revert "Bulk-edit compile commands in emacs chatter to point to assumed build/ dir off src root."
...
This reverts commit 846f2e2ba9
.
2011-03-25 14:05:38 -07:00
Graydon Hoare
846f2e2ba9
Bulk-edit compile commands in emacs chatter to point to assumed build/ dir off src root.
2011-03-25 13:48:37 -07:00
Tim Chevalier
a47cd50dfb
Parse FP literals without coercing to int. This allows parsing 64-bit
...
floats. However, if someone writes a literal that can't be represented
precisely in 64 bits, the front-end will accept it while the back-end
will (presumably) complain.
2011-03-25 11:20:30 -07:00
Marijn Haverbeke
a045514477
Start making the standard-lib utf-8 aware
...
Finally implements _str.is_utf8, adds from_chars, from_char, to_chars,
char_at, char_len, (push|pop|shift|unshift)_char. Also, proper
character I/O for streams.
2011-03-25 08:22:52 -07:00
Graydon Hoare
0f9d460e24
Placate win32 build; no idea how it can be working currently on tinderbox.
2011-03-25 00:16:04 -07:00
Lindsey Kuper
bcc104ce79
A first stab at the 'nbody' demo, with support for calling C sqrt().
2011-03-25 00:15:56 -07:00
Patrick Walton
0b9cf7902c
build: Generate an object file for stage0/libstd.dylib
2011-03-24 18:43:32 -07:00
Patrick Walton
af3d0d1848
rustc: Open "use"d crates; add a _vec.vec_from_buf() method along the way; XFAIL use-import-export.rs in rustc
2011-03-24 17:22:07 -07:00
Patrick Walton
c0f66a5240
Add .def.in files that I forgot to stage. Should put out burning tinderboxes on Windows and Darwin.
2011-03-24 12:36:14 -07:00
Patrick Walton
f284c5c1eb
Generate the platform-specific .def files at build time
2011-03-24 12:24:22 -07:00
Graydon Hoare
99682db53c
Make symbol resolution failures log under rust_log::ERR flag as well.
2011-03-24 12:20:48 -07:00
Patrick Walton
f0706d8932
Add trailing semicolons to Linux .def files
2011-03-24 11:50:02 -07:00
Patrick Walton
8c9f5ffc77
Add a Linux .def file. Might put out burning tinderbox.
2011-03-24 11:43:51 -07:00
Patrick Walton
a2b9a7ce8f
rustc: Use a .def file for Darwin. Puts out burning Darwin tinderbox.
2011-03-24 11:26:46 -07:00
Tim Chevalier
23e23bd762
Further support for floating-point. Literals with exponents work
...
and literals with the 'f32' or 'f64' suffixes work as well. In
addition, logging things with the f32 or f64 type works. (float is
still assumed to be a synonym for f64).
2011-03-22 17:31:27 -07:00
Tim Chevalier
caa22c9341
Started adding support for floating-point type, floating-point literals, and logging of floats. Other operations on float probably don't work yet.
2011-03-21 18:10:34 -07:00
Patrick Walton
0943475f37
Add a suitable .def file for rustrt.dll on Windows
2011-03-21 18:01:25 -07:00
Patrick Walton
0366f5ae23
Add some C99 and C++ compatibility headers for MSVC
2011-03-21 10:24:00 -07:00
Patrick Walton
368eb4bab6
Add some mutable variants of vector functions to the standard library
2011-03-18 13:53:49 -07:00
Patrick Walton
ea7197e2cf
rustc: Add str_from_cstr() and str_from_buf() functions to the standard library, as well as a test case
2011-03-16 18:42:08 -07:00
Marijn Haverbeke
ea5dc54c3f
Add functionality for running external programs to the std lib
...
See lib/run_program.rs.
2011-03-14 14:57:13 -07:00
Marijn Haverbeke
441697ab35
Extend stream functionality
...
Writer and reader streams now come with methods to write and read
little-endian numbers. Whether that is the right place for such
methods is debatable, but for now, that's where they live.
2011-03-14 14:57:13 -07:00
Marijn Haverbeke
c731d625fe
Add basic file-system functionality
...
std.fs.list_dir will list the files in a directory, std.fs.file_is_dir
will, given a pathname, determine whether it is a directory or not.
2011-03-14 14:57:13 -07:00
Graydon Hoare
5041944fd2
Yell louder when a linkage error in rt occurs, as compiler output fails quietly on null return.
2011-03-07 08:41:48 -08:00
Graydon Hoare
d33110ebfc
Comment-out TRACK_ALLOCATIONS again. Leave a note about it.
2011-03-02 13:43:33 -08:00
Brian Anderson
fe5de6bfff
Parse parameter types for fmt extension
2011-03-02 10:28:14 -08: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
c7e3f951e6
Disable TRACK_ALLOCATIONS by default, it's a bit heavy-handed.
2011-02-14 16:34:12 -08:00
Graydon Hoare
c4a56f7368
Commit the trap-failure hack to the runtime, since I keep using it in my workspace anyways.
2011-02-10 11:29:47 -08:00
Graydon Hoare
d55bee4417
Further corrections to the logging layer in runtime.
2011-01-14 16:50:37 -08:00
Graydon Hoare
fe1a4ab23c
Change log buffer butes to a symbolic const in runtime.
2011-01-14 13:41:39 -08:00
Brian Anderson
9e5f6d3977
Cleanup circular_buffer
2011-01-10 11:31:33 -08:00
Brian Anderson
295c54e10f
Remove the assumption that circular_buffer's buffer has a power of two size
...
It was not obvious how to make this implementation work when the unit size
was not also a power of two, so for now just make the buffer size a multiple
of the unit size so it can pass all the tests.
2011-01-10 11:31:33 -08:00
Brian Anderson
4841c9f3f8
Cleanup circular_buffer grow / shrink routines
2011-01-10 11:31:33 -08:00
Brian Anderson
97aa599b0d
Fix circular_buffer growth when _next != 0
2011-01-10 11:31:33 -08:00
Brian Anderson
ebf8638d31
Remove tabs
2011-01-10 11:31:33 -08:00
Brian Anderson
f1df1d1a51
Don't allow circular_buffer to shrink below its original size when unit_sz is not a power of two
2011-01-10 11:31:33 -08:00
Brian Anderson
5f05ae68e5
Don't allow circular_buffer to shrink below it's initial size
2011-01-10 11:31:32 -08:00
Brian Anderson
04056d89c8
Fix the check for growing the circular_buffer
2011-01-10 11:31:32 -08:00
Brian Anderson
a9994a2963
Correctly initialize circular_buffer to a power-of-two bytes
2011-01-07 11:34:14 -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
c0d4e88428
Add std.dbg.trap(str msg) for help debugging.
2010-12-31 10:35:39 -08:00
Patrick Walton
5a1cba7883
Make failing to resolve a symbol an error
2010-12-13 17:59:05 -08:00
Graydon Hoare
4dc98e54d1
Make the ugly detailed leak-spray on rustc failures optional.
2010-11-30 17:10:51 -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
Graydon Hoare
89946609f2
Support a special const-value refcount, use it for const strings.
2010-11-09 14:15:07 -08:00
Graydon Hoare
da13c508d8
First pass on splitting stratum and opacity off of effects. WIP.
2010-11-02 11:11:58 -07:00
Ralph Giles
3b3cd550d4
Cast NULL to uintptr_t when calling rust_task::start().
...
On gcc 4.5.1 (fedora 14 i686) rust_test_runtime.cpp fails to compile
with the following error:
rt/test/rust_test_runtime.cpp:57:61: error: passing NULL to non-pointer argument 3 of ‘void rust_task::start(uintptr_t, uintptr_t, uintptr_t, size_t)’
The explicit cast works around the error.
2010-10-28 10:13:30 -07:00
Patrick Walton
28d43678b6
Add a virtual destructor to rust_thread in sync.h, to quiet the compiler
2010-10-20 10:32:36 -07:00
Patrick Walton
5177898db1
Use new and delete instead of alloca(). Should put out the burning tinderbox.
2010-10-11 17:11:59 -07:00
Patrick Walton
94cec74096
Try to print backtraces on failure
2010-10-11 16:40:18 -07:00
Patrick Walton
246e72b0fb
Use RTLD_GLOBAL when loading libraries. This is needed to get LLVM working on the Mac in rustc.
2010-10-05 11:37:46 -07:00
Graydon Hoare
2e0d075407
Fix bug in bind thunks failing top drop unbound args; add test and adjust rustc to use bind again.
2010-09-30 17:39:37 -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
1bd331b7aa
Fixed deadlock caused by the message pump not being notified of new message sends.
2010-09-16 00:51:03 -07:00
Michael Bebenita
a493350eb5
Cleanup, refactoring, and some runtime tests.
2010-09-10 14:38:31 -07:00
Michael Bebenita
f985fded3e
Added lock_and_signal::signal_all(), and made the rust_kernel::join() use wait instead of yield.
2010-09-10 14:38:31 -07:00
Michael Bebenita
c877f31730
Fixed lost signal notifications.
2010-09-08 22:20:31 -07:00
Michael Bebenita
743ca289b6
Cache task handles.
2010-09-08 21:25:16 -07:00
Graydon Hoare
616b7afb72
Tidy up the sync dir, remove dead or mis-designed code in favour of OS primitives, switch rust_kernel to use a lock/signal pair and wait rather than spin.
2010-09-08 19:13:49 -07:00
Graydon Hoare
13d6f87431
XFAIL many.rs since it crashes on win32, and add a time-slice sleep to the kernel message loop to get tests to finish in a sane time.
2010-09-08 15:48:18 -07:00
Michael Bebenita
388f8ce520
Cleaned up locking in the kernel.
2010-09-08 15:17:09 -07:00
Michael Bebenita
7f6d8b95bd
Fixed race in the rust kernel.
2010-09-07 23:37:51 -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
a6aebdaedd
Started work on a framework for writing runtime tests, added some simple test cases.
2010-09-07 18:41:08 -07:00
Michael Bebenita
5375b39160
Small updates to util classes.
2010-09-07 18:41:08 -07:00
Michael Bebenita
b03812af2b
Change signature of array_list::pop().
2010-09-07 18:41:08 -07:00
Michael Bebenita
6b7ba50e17
Added "new" inline operators to memory regions.
2010-09-07 18:41:08 -07:00
Michael Bebenita
066c14009b
Added a .cpp file for rust_proxy to help avoid .h file dependencies in the future.
2010-09-07 18:41:08 -07:00
Michael Bebenita
9b74129a4f
Added a thread utility class to factor out operations on threads.
2010-09-07 18:41:07 -07:00
Michael Bebenita
f8ff013e3c
Added a few utility classes, cleaned up the include order of .h files, and started to make the Rust kernel own domain message queues rather than the Rust domains themselves.
2010-09-07 18:41:07 -07:00
Roy Frostig
cf62b54028
Add a little pointer-cast helper to dbg.
2010-09-06 23:24:01 -07:00
Roy Frostig
4e355aebf7
When vec growth results in a newly allocated (extended) buffer, copy existing elements over via element-wise copy, not flat memcpy. Introduce new vec growth glue to achieve this.
2010-09-03 16:18:32 -07:00
Graydon Hoare
b90e6b93c1
Whitespace churn.
2010-08-31 14:36:51 -07:00
Roy Frostig
47e86a05ae
Fix rust_vec constructor assertion failure caused by slow path of upcall_vec_grow. Add testcase.
2010-08-31 13:01:57 -07:00
Michael Bebenita
64ff82ecf9
Implemented an lock free queue based on this paper http://www.cs.rochester.edu/~scott/papers/1996_PODC_queues.pdf , the "lock free queue" we had before wasn't lock free at all.
2010-08-24 21:07:14 -07:00
Roy Frostig
7ccdb88374
Add support in dbg.debug_obj for printing the obj body.
2010-08-24 19:49:39 -07:00
Roy Frostig
d9e3fb2c5d
Add std.dbg module for inspecting rust values in memory.
2010-08-24 18:37:42 -07:00
Patrick Walton
fac28ad42f
Disable task-growing logic for now until #151 is fixed
2010-08-20 11:05:06 -07:00
Roy Frostig
4a7aa75b5d
Make _io.buf_reader read more than 0 bytes at a time.
2010-08-19 17:37:22 -07:00
Michael Bebenita
a4b8c74f9f
Added simple deadlock detection in the scheduler.
2010-08-17 23:49:57 -07:00
Michael Bebenita
2c1ec6771b
Lots of changes around memory managment in the Runtime. Added memory regions and fixed race caused by calling rust_srv::malloc() from multiple threads when sending messages.
2010-08-17 23:49:57 -07:00
Michael Bebenita
9fa2b53d8c
Add a "special" rust_log flag to be used for debugging in cases where the full log output prevents races from occurring.
2010-08-17 23:49:57 -07:00
Michael Bebenita
e20752de68
Added labels to blocking conditions.
2010-08-17 23:49:57 -07:00
Michael Bebenita
7ff39ea448
Fixed deadlock by removing channel flushing.
2010-08-17 23:49:57 -07:00
Michael Bebenita
6e9f0f952d
Made the lock_free_queue lock (temporarily, until fixed).
2010-08-17 23:49:57 -07:00
Michael Bebenita
5d98a311e4
Putting out the burning tree on Windows. Turns out you can completely starve threads by not yielding on windows/vmware, really weird.
2010-08-16 18:44:26 -07:00
Michael Bebenita
14f5b5750d
Un-xfailed working tests.
2010-08-16 15:05:57 -07:00
Michael Bebenita
b40a9fa787
Pulled rust_srv in its own file. Some cleanup, and added varargs to assertion macros.
2010-08-16 15:05:57 -07:00
Roy Frostig
73ee16b1a4
A little tidy-up that should have gone in with 4e376852e7
.
2010-08-12 19:20:29 -07:00
Roy Frostig
445d3fe39c
Add vec debugging utility to _vec module.
2010-08-12 13:11:49 -07:00
Michael Bebenita
988695a96c
Added support for task sleeping in the scheduler.
2010-08-11 21:24:04 -07:00
Roy Frostig
22719e45b8
Remove commented-out code that slipped in during last commit.
2010-08-11 16:10:44 -07:00
Michael Bebenita
74e12fcef6
Ignore upcall_flush for channels that are disassociated from ports. This makes task-comm-10 break a little less hard, but it still leaks because messages pending in the channel are never freed.
2010-08-11 16:08:45 -07:00
Michael Bebenita
d584de7a37
Made ref_count a word sized value.
2010-08-11 16:08:45 -07:00
Michael Bebenita
ff93e5e196
Print domain and task names in log prefix.
2010-08-11 16:08:45 -07:00
Roy Frostig
f307688bf4
Add native vec[u8] to str converter. Put in workaround for leak in str to vec[u8] converter. Add testcase exercising both. Drive-by fix a potential array-out-of-bounds write on rust_str buffers.
2010-08-11 16:06:45 -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
4641fcef61
Added peek() to ptr_vec.
2010-08-09 08:01:40 -07:00
Michael Bebenita
f65c885c83
Made ref_count signed to help detect negative ref_count bugs.
2010-08-09 08:00:04 -07:00
Michael Bebenita
30734a9a7b
Some pretty printing in the runtime.
2010-08-09 07:52:07 -07:00
Michael Bebenita
9ff6a3d031
Added class to abstract away platform specific thread primitives.
2010-08-09 07:42:06 -07:00
Michael Bebenita
56cd4e458a
Made the runtime keep track of all live domains and print their state.
2010-08-09 07:34:11 -07:00
Michael Bebenita
c5744c8aef
Added the RUST_SEED env variable to seed the Rust task scheduler -- helpful when debugging task race conditions within a single thread domain.
2010-08-09 07:30:48 -07:00
Michael Bebenita
0e422c748b
Added "none" option to rust_log env string to disable all log output.
2010-08-09 07:07:00 -07:00
Michael Bebenita
d2c2fbe7ca
Added timed_wait to condition variables.
2010-08-09 07:04:38 -07:00
Michael Bebenita
76ba8f1d84
Changed array_list::replace() return behavior.
2010-08-09 06:59:46 -07:00