Commit graph

165 commits

Author SHA1 Message Date
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