Erick Tryzelaar
e8519b5b2f
Revert "Reimporting libuv as a submodule."
...
This reverts commit cbae254d8a
.
2011-11-07 21:38:18 -08:00
Erick Tryzelaar
cbae254d8a
Reimporting libuv as a submodule.
...
Closes #1152 .
2011-11-07 21:34:17 -08:00
Erick Tryzelaar
df30663fdd
Removing the baked in libuv.
2011-11-07 21:34:17 -08:00
Brian Anderson
8857657640
Rename rust_uv.cpp to rust_aio.cpp
2011-11-07 19:35:39 -08:00
Brian Anderson
fdeb5ba304
Upgrade libuv to f1859eb841be2fe48512bc10e64556383f408b01
2011-11-07 19:24:25 -08:00
Brian Anderson
b0c2416270
Clean up logging output. Closes #1088
2011-11-07 14:14:36 -08:00
Niko Matsakis
b578ed9b2a
add required symbols
2011-11-02 14:14:20 -07:00
Niko Matsakis
0982c7f78c
hastily port so we don't fail to build
2011-11-02 14:14:20 -07:00
Niko Matsakis
f1bc9307d8
get things checking on ia32
2011-11-02 14:14:19 -07:00
Niko Matsakis
f05761ddb3
enable intrinsics for multiple arch
2011-11-02 14:13:22 -07:00
Niko Matsakis
20946e6970
start going back to an i386 build
2011-11-02 14:13:22 -07:00
Niko Matsakis
8011e3fabb
hack around on makefiles trying to get a 64 bit build
...
right now there are many temporary hacks, search for NDM to find them
2011-11-02 14:13:22 -07:00
Niko Matsakis
020cd360e1
modify x64 assembly and so forth
2011-11-02 14:13:22 -07:00
Niko Matsakis
d3e865438f
do not preserve caller-saved registers
2011-11-02 14:13:22 -07:00
Niko Matsakis
6a0d86c754
copy over x86-specific code
2011-11-02 14:13:22 -07:00
Patrick Walton
587c118cac
rt: Fix long lines
2011-10-31 15:50:15 -07:00
Patrick Walton
956812bda5
rt: Have __morestack conform to the calling convention that LLVM generates on x86
2011-10-31 15:41:19 -07:00
Patrick Walton
c9003d301f
Stub a __morestack implementation and stack segment allocation. Untested.
2011-10-31 14:20:56 -07:00
Brian Anderson
17c651b3b0
Remove task::join_id
...
This is the old, racy way of joining to a task. It is no longer used.
2011-10-26 20:43:47 -07:00
Niko Matsakis
c78b1639b4
fix c-stack-cdecl when used w/ i64
2011-10-24 17:03:18 -07:00
Niko Matsakis
8f2d75d53c
switch over sqrt from llvm to c-stack-cdecl, exposing a bug in
...
the supported return types of upcall_c_stack
2011-10-24 16:06:18 -07:00
Niko Matsakis
c81808a9f7
update intrinsics file
2011-10-24 16:06:18 -07:00
Niko Matsakis
02d7a1e781
move sys fns into c-stack-cdecl and get_type_desc() into rusti
...
there is one test failure, stdtest/sys.rs, which inexplicably
(thus far) fails to compile because it invokes
sys::rustrt::last_os_error() instead of invoking
sys::last_os_error(). If stdtest/sys.rs is updated to invoke
the wrapper, it passes. Still tracing the source of this error.
2011-10-24 16:06:17 -07:00
Niko Matsakis
0598635bdc
migrate leak
2011-10-24 16:06:17 -07:00
Niko Matsakis
5ddc15e42e
migrate debugging funcs
2011-10-24 16:06:17 -07:00
Niko Matsakis
96629d5c21
move rand functions into c-stack-cdecl mode
2011-10-24 16:06:17 -07:00
Niko Matsakis
b13e7e0f3d
move fs routines to c-stack-stdlib
2011-10-24 16:06:16 -07:00
Niko Matsakis
4880065429
rip out unused task pointers
2011-10-24 16:06:16 -07:00
Niko Matsakis
d9b23cb022
move comm functions out of rust abi
2011-10-24 16:06:16 -07:00
Austin Seipp
1703e9ec89
Fix an insane rt build error running 'make check -j3'
2011-10-23 19:04:49 -07:00
Brian Anderson
bdbeb75bfb
Upgrade libuv to 179f475b2ad64729feb0422f06ce133cb364482a
2011-10-22 17:37:18 -07:00
Brian Anderson
160c56e768
Get 'make tidy' to work rustllvm and rt again
2011-10-21 17:35:52 -07:00
Brian Anderson
739b1b5b53
Cycle-collect objects
2011-10-21 17:21:59 -07:00
Niko Matsakis
67d3d9308f
add get_type_desc to list of exported funcs
2011-10-21 16:19:27 -07:00
Niko Matsakis
cdf91bbf9a
add get_type_desc function to library
2011-10-21 16:19:27 -07:00
Brian Anderson
7ab6315f5f
Free vectors during cc sweep
2011-10-21 16:07:40 -07:00
Brian Anderson
2d713215a8
Record the internal reference count of environment boxes. Closes #981
2011-10-21 14:05:16 -07:00
Brian Anderson
034408c40a
Convert DPRINT to LOG in rust_cc.cpp and add more logging
2011-10-20 18:19:06 -07:00
Marijn Haverbeke
ba1c6fcf38
Remove the last vestiges of main.ll
...
Closes #992
2011-10-20 17:36:28 +02:00
Marijn Haverbeke
ef63f09dcd
Don't rely on main.ll anymore
...
I'll remove the actual file after I register a snapshot.
Issue #992
2011-10-20 17:18:38 +02:00
Marijn Haverbeke
8124846b2c
Get rid of taskpointer-passing throughout the compiler
...
Only intrinsics still take a dummy taskptr. We'll have to do some
makefile stunts to snapshot a version without taskptrs-in-intrinsics.
Issue #466
2011-10-20 14:22:17 +02:00
Marijn Haverbeke
457683c7fe
Do not pass taskpointers to "rust" native functions
...
Issue #466
2011-10-20 14:22:17 +02:00
Marijn Haverbeke
6323a012bd
Remove taskptr argument from upcalls
...
Issue #466
2011-10-20 13:15:21 +02:00
Marijn Haverbeke
e927df17f7
Remove spawn_wrap and main_wrap kludges
...
This isn't needed now that our functions are cdecl (and was apparently
only still working by accident).
Issue #992
2011-10-20 13:15:09 +02:00
Marijn Haverbeke
243c5c3479
Use snap runtime, and the old main.o, for stage1
...
This is intended to be reverted again after I register the next
snapshot.
2011-10-20 13:14:28 +02:00
Patrick Walton
8d8b48a901
rt: Make C stack switching Valgrind-clean by warning Valgrind when we're about to write to the C stack from the Rust stack
2011-10-05 16:33:17 -07:00
Niko Matsakis
61c9c46d94
remove pthread_exit() from rust_start()
...
It was causing OS X Lion to hang and (according to Apple) is undefined
in any case
2011-10-05 16:10:36 -07:00
Patrick Walton
af60cf407c
rt: Switch the AIO stuff to the C stack
2011-10-04 12:08:06 -07:00
Patrick Walton
53c9b9a5dd
rt: Switch the libuv bindings over to not using explicit task pointers
2011-10-03 18:23:30 -07:00
Patrick Walton
3ad4fa00ac
rt: Fix comment typo in rust_uv.cpp
2011-10-03 18:23:30 -07:00
Patrick Walton
a7b44e847a
rt: Make the builtins no longer take an explicit task parameter
2011-10-03 18:23:30 -07:00
Patrick Walton
4793a02376
rt: Omit leading underscore on symbol names on Linux
2011-09-30 18:50:05 -07:00
Patrick Walton
e31849fb79
rt: Fix assembler for C calls to work more like a regular function call
2011-09-29 17:34:49 -07:00
Patrick Walton
d8a80cb31f
rt: Add a call stub that switches to the C stack, untested as of yet
2011-09-28 12:26:36 -07:00
Patrick Walton
1eaaae860f
rt: Add an upcall to allocate space on the C stack. This will be used for native calls on the C stack.
2011-09-28 11:31:44 -07:00
Patrick Walton
e8757ea01f
rt: Expose the C stack inside the Rust scheduler so that C calls can switch to it
2011-09-28 10:22:02 -07:00
Patrick Walton
dbf472b0df
rustc: Switch to cdecl for all calls. This is needed to make stack growth efficient, as I need to use eax and ecx in the function prologue and can't afford to stomp on incoming arguments.
2011-09-28 10:22:02 -07:00
Patrick Walton
9ba86178ef
rt: Store the task in TLS
2011-09-27 18:12:03 -07:00
Patrick Walton
a88d9effbc
rt: Don't run arbitrary destructors on cycle collection; that's just broken.
2011-09-26 17:41:22 -07:00
Patrick Walton
5c973142df
rt: Turn on cycle collection at task death; add a test case
2011-09-26 16:59:15 -07:00
Patrick Walton
ad19ab4c6f
rt: Make the logic that moves environments between tasks update the GC alloc chain correctly
2011-09-26 16:59:15 -07:00
Patrick Walton
81f1863de7
rt: Remove obsolete comment
2011-09-26 10:24:21 -07:00
Patrick Walton
7979bbbf51
rt: Sweep in cycle collection
2011-09-23 17:57:25 -07:00
Patrick Walton
41082c6b83
rt: Whitespace police
2011-09-23 17:57:25 -07:00
Patrick Walton
b995028c47
rt: Turn off some debug code
2011-09-23 17:57:25 -07:00
Patrick Walton
0c4e0fdfae
rt: Get rid of the hack that looks for captured type descriptors adjacent to the root one for functions and objects
2011-09-23 17:57:25 -07:00
Erick Tryzelaar
5f066e06b9
Update to libuv commit 3ca382.
...
This patch changes libuv's gyp build system to
make it's own makefiles. To generate them for rust,
run these commands. They requires python 2.x to
work:
$ mkdir -p src/rt/libuv/build
$ svn co http://gyp.googlecode.com/svn src/rt/libuv/build/gyp
$ ./etc/src/gyp_uv
2011-09-23 16:53:06 -07:00
Patrick Walton
87700adb2f
rt: Add missing <stdint.h> in rust_abi.h
2011-09-23 15:14:44 -07:00
Patrick Walton
e036c9d8d2
rt: Add missing const on the Windows path
2011-09-23 15:08:37 -07:00
Patrick Walton
557d641175
rt: Get RUST_TRACK_ORIGINS working. You can now call 'debug::dump_origin' in gdb and get a backtrace saying where a box came from.
2011-09-23 15:06:28 -07:00
Patrick Walton
aabff480c9
rt: Factor out stack walking into rust_abi.cpp
2011-09-23 12:49:20 -07:00
Patrick Walton
82935c2d17
rt: Fix message formatting issues in rust_debug
2011-09-23 12:27:13 -07:00
Patrick Walton
03f0932a6d
rt: ifdef out backtrace() on Windows
2011-09-23 12:26:41 -07:00
Patrick Walton
9226ac9ec5
rt: Fix build bustage due to gcc's format string warnings
2011-09-23 12:09:52 -07:00
Patrick Walton
61afef29a1
rt: Add a RUST_TRACK_ORIGINS debug flag to help track down memory corruption
2011-09-23 11:42:20 -07:00
Patrick Walton
dbdeff659f
rt: Factor out the logic that handles the various magic debug environment variables
2011-09-23 11:04:14 -07:00
Patrick Walton
f8007b5535
rt: Remove the problematic min()/max()/align()/abs() macros from isaac/standard.h, as they're unused
2011-09-23 11:04:14 -07:00
Brian Anderson
dbd2ee015a
Remove is_stateful flag from tydesc. Closes #136
2011-09-22 22:15:25 -07:00
Marijn Haverbeke
aad1342e13
Fix long line
2011-09-22 09:23:07 +02:00
Marijn Haverbeke
5e3d0e304f
Fix missing cast in do_cc
...
Apparently not needed on Mac (clang?), but breaking the win and linux boxes.
2011-09-22 09:17:26 +02:00
Patrick Walton
8c02adc630
rustc: Port the fn and obj traversal logic over from the GC branch. Doesn't actually do anything yet due to lack of support in trans.
2011-09-21 19:08:26 -07:00
Patrick Walton
ad3b9c41b4
rt: Implement cycle collection marking. Simple cycles can now be detected.
2011-09-21 18:14:23 -07:00
Brian Anderson
a993621e43
Log and compare unique boxes
...
Issue #409
2011-09-21 17:08:40 -07:00
Jesse Ruderman
01ea880196
Re-wrap long line
2011-09-20 19:40:47 -07:00
Patrick Walton
eafb70072a
rt: Zero out allocations so that the CC won't die if it happens to run while a box is being constructed.
...
This is kind of unfortunate.
2011-09-20 19:15:46 -07:00
Patrick Walton
a63cc03a07
rt: Add some debug code (ifdef'd out) for diagnosing marking problems
2011-09-20 19:15:13 -07:00
Patrick Walton
ab76305cb9
rt: Skip over the reference count properly before walking the contents of the box when determining internal reference counts
2011-09-20 19:14:58 -07:00
Patrick Walton
74194df7dd
rt: Remove obsolete comment
2011-09-20 19:14:18 -07:00
Patrick Walton
b39c7c4c45
rt: Increase the tolerance of the vector range sanity check
2011-09-20 19:13:45 -07:00
Patrick Walton
e27279d7db
rt: Clean up debugging print statements in rust_obstack.cpp
2011-09-20 18:26:09 -07:00
Patrick Walton
be1feaa918
rt: First stab at computing internal reference counts
2011-09-20 17:49:49 -07:00
Patrick Walton
e26b1883dd
rt: Stub code for the cycle collector
2011-09-20 16:49:31 -07:00
Patrick Walton
c61691110a
rt: Make rust_shape.h able to be included in more contexts
2011-09-20 16:49:31 -07:00
Patrick Walton
77f0101edb
rt: Add an on-the-side GC chain
2011-09-20 15:35:14 -07:00
Patrick Walton
5209b19255
rt: Rename rand() to isaac_rand() since the former prevents lots of standard headers from being included
2011-09-20 15:34:47 -07:00
Patrick Walton
307957710c
rt: Remove the GC alloc chain
2011-09-20 14:20:16 -07:00
Patrick Walton
45086b7bfd
rt: Remove #include "rust_box.h"
2011-09-20 14:07:10 -07:00
Patrick Walton
9a8b4a1be6
Revert "rt: Rename rust_box to rust_box_legacy, as they're about to become self-describing"
...
This reverts commit f6871e832c
.
2011-09-20 13:57:04 -07:00
Patrick Walton
d73a8606c9
rt: Remove rust_box.h; I'm going to switch to an external map.
2011-09-20 13:55:23 -07:00
Patrick Walton
e981abdb01
rt: Remove upcall_malloc_box and upcall_free_box; I don't think they'll be necessary after all
2011-09-20 13:50:15 -07:00
Patrick Walton
3632629acc
rt: Introduce a self-describing box representation and functions to create and free them
2011-09-19 11:40:41 -07:00
Brian Anderson
4028a099f5
Yield after send
2011-09-16 11:08:01 -07:00
Patrick Walton
469853d5ff
rt: Add a new rust_box structure to the runtime that describes a self-describing box
2011-09-16 10:51:59 -07:00
Patrick Walton
f6871e832c
rt: Rename rust_box to rust_box_legacy, as they're about to become self-describing
2011-09-16 10:51:58 -07:00
Brian Anderson
25394950ae
Handle the case where a child task tries to kill a parent while it is dying
...
Still looks pretty racy
2011-09-16 10:05:12 -07:00
Patrick Walton
18cf4d904c
rt: Add libunwind.h support on Mac OS X
2011-09-15 12:52:50 -07:00
Brian Anderson
a0ad9a42cd
Unsupervise tasks before the scheduler kills them. Unblock before yield->fail
2011-09-14 17:05:35 -07:00
Brian Anderson
103197bc42
Make failure propagation to dead parents work
...
The failure will basically go 'through' the dead parent and continue
propagating the failure (as if the child was reparented).
2011-09-14 15:48:14 -07:00
Brian Anderson
9505d70513
Make linked task failure work again
2011-09-14 14:20:41 -07:00
Brian Anderson
22001d1dce
Remove hack_allow_leaks
...
Happy to close the loop on this one.
Issue #236
2011-09-11 17:31:40 -07:00
Brian Anderson
0ea55ffdc8
Use a unique exit status when the runtime fails normally
...
Check for it in run-fail tests
2011-09-11 17:31:40 -07:00
Brian Anderson
6f6f36172b
Remove unused task_exit function
...
Issue #236
2011-09-11 17:31:40 -07:00
Brian Anderson
9f4b4d89ce
Add upcall_rust_personality
...
This just wraps __gxx_personality_v0 with our upcall naming convention
Issue #236
2011-09-11 17:31:38 -07:00
Marijn Haverbeke
139b1d1b31
Get rid of some unused upcalls
...
I guess these became obsolete when the communication stuff moved into
the stdlib.
2011-09-09 14:02:07 +02:00
Marijn Haverbeke
bd2ec03771
Remove unused logging upcalls from runtime
2011-09-09 13:55:43 +02:00
Patrick Walton
87c6416d0c
rt: Don't double-print commas when logging e.g. a vec of boxes
2011-09-08 13:24:21 -07:00
Brian Anderson
c047cfb710
Unwind the stack on task failure
...
When a task fails, we will throw an exception, then catch it at the bottom of
the stack.
On Windows we don't do this yet because the exception doesn't propagate
correctly.
No cleanups yet.
Issue #236
2011-09-07 10:32:58 -07:00
Brian Anderson
c337fd5467
Child tasks take a ref to their parents
...
This is so that when a child dies after the parent, it still holds a valid
pointer and can call supervisor->kill() safely.
2011-09-07 10:32:58 -07:00
Brian Anderson
25ae3d655c
Rewrite spawn yet again
...
The motivation here is that the bottom of each stack needs to contain a C++
try/catch block so that we can unwind. This is already the case for main, but
not spawned tasks.
Issue #236
2011-09-07 10:32:58 -07:00
Brian Anderson
bb08ffbaf4
Refactor task failure a bit
...
Issue #236
2011-09-07 10:32:58 -07:00
Patrick Walton
d3e8887d3c
rt: Implement poison-on-free, for debugging memory issues
2011-09-06 14:15:01 -07:00
Brian Anderson
23210a3293
Remove unused runtime functions. Issue #855
2011-09-03 00:50:57 -07:00
Brian Anderson
1b67d211b4
Add a rust_str typedef to the runtime. Issue #855
2011-09-02 22:11:46 -07:00
Brian Anderson
01b254b411
Rename istr-stuff to str in the runtime. Issue #855
2011-09-02 22:11:46 -07:00
Brian Anderson
72c14d5a41
Eliminate const_refcount. Issue #855
2011-09-02 15:13:41 -07:00
Brian Anderson
99ee0fca67
Remove estrs and evecs from runtime. Issue #855
2011-09-02 15:13:41 -07:00
Patrick Walton
00470fef12
rt: Remove evecs from the shape code
2011-09-02 10:49:03 -07:00
Brian Anderson
9c173f17c0
Remove lots of estr code from rustc. Issue #855
2011-09-01 23:25:33 -07:00
Brian Anderson
f07a328c16
Convert rust_list_files to istrs. Issue #855
2011-09-01 15:51:47 -07:00
Brian Anderson
82634cd530
Convert rust_getcwd to istrs. Issue #855
2011-09-01 15:51:47 -07:00
Brian Anderson
372aa4d210
Factor out make_istr utility function in runtime. Issue #855
2011-09-01 15:51:47 -07:00
Brian Anderson
1262df652f
Reduce the amount of locking in the kernel's memory region
...
The only thing here that really needs locking on malloc and free is
access to the allocation list, which is only used for TRACK_ALLOCATIONS.
Improves bench/task-perf-vector-party by 70%.
2011-09-01 14:20:43 -07:00
Marijn Haverbeke
458ac89894
Back out copy-glue
...
This wasn't a good idea after all.
2011-09-01 22:37:23 +02:00
Brian Anderson
8f531e769a
Convert rust_file_is_dir from estrs to cstrs. Issue #855
2011-09-01 13:16:44 -07:00
Brian Anderson
baa1e8790d
Check error code in rust_file_is_dir. Prevent comparison of uninitialized mem
2011-09-01 13:16:44 -07:00
Brian Anderson
d0c509ad1b
Remove a bunch of string builtins. Issue #855
2011-09-01 12:14:33 -07:00
Patrick Walton
cc08fd1ef9
rt: Allow iteration over the dynastack
2011-09-01 11:47:59 -07:00
Patrick Walton
9d00ef9a46
rt: Make logging more resilient to null vector pointers (useful when debugging GC)
2011-09-01 11:47:58 -07:00
Patrick Walton
bbac2dd768
rt: Make debug string in rust_obstack slightly prettier
2011-09-01 11:47:58 -07:00
Patrick Walton
83ac32e8aa
rt: Zero out dynamic allocas for now
2011-09-01 11:47:58 -07:00
Patrick Walton
a6c14964c8
rt: Include rust_shape.h in rust_obstack.cpp and remove the duplicate DPRINT() macro
2011-09-01 11:47:58 -07:00
Patrick Walton
156bc7f012
rt: Add a missing FIXME to rust_obstack.cpp for segmented stacks
2011-09-01 11:47:58 -07:00
Patrick Walton
876142f051
rt: Remove duplicate DPRINT() macro from rust_gc.cpp
2011-09-01 11:47:58 -07:00
Patrick Walton
60137273d2
rt: Disable debug spew in rust_shape
2011-09-01 11:47:58 -07:00
Erick Tryzelaar
b199e9da92
Expose STDERR to rust.
2011-08-31 20:40:00 -07:00
Patrick Walton
614a930c51
rt: Make the dynamic stack self-describing
2011-08-31 19:19:05 -07:00
Patrick Walton
729437d2c0
rt: Set n_params appropriately in upcall_get_type_desc
2011-08-31 18:03:12 -07:00
Patrick Walton
dc6f78561c
rt: Prevent trailing commas from showing up when logging oddly aligned arrays
2011-08-31 16:22:19 -07:00
Patrick Walton
dfcbfa61f3
rt: Introduce "end_dp" bailouts in order to avoid marching past the end of oddly aligned vectors
2011-08-31 16:02:17 -07:00
Patrick Walton
143569fce4
rt: Make |align| a member of the shape glue class instead of threading it through every function
2011-08-31 15:25:32 -07:00
Brian Anderson
be2ad97a61
Allow main to take istrs. Issue #855
2011-08-30 23:57:09 -07:00
Patrick Walton
fc0212a63b
rt: Override the character interpretation of u8/i8 values when logging
2011-08-30 19:34:27 -07:00
Patrick Walton
b722dc36a5
rt: Fix logging of type-parametric resources
2011-08-30 15:56:42 -07:00
Patrick Walton
05d96f155f
rustc: Allow non-type-parametric resources to be logged
2011-08-30 13:50:48 -07:00
Patrick Walton
f1ed03dfa5
rt: Have data::walk_fn be defensive regarding whether the derived implementation of walk_fn moves the data pointer
2011-08-29 16:50:06 -07:00
Patrick Walton
0a4d43379e
rt: Move to a custom alignof since __alignof__ returns the "preferred" alignment rather than the one that gets used in structs
2011-08-29 16:24:03 -07:00
Patrick Walton
b16a9a984a
rt: Don't dereference a null pointer when traversing a function with no environment
2011-08-29 15:27:55 -07:00
Brian Anderson
3d26665e60
Rename upcall_istr_push to rust_istr_push in rustrt.def.in
2011-08-29 14:18:46 -07:00
Marijn Haverbeke
b099b1e3f7
Make std::istr::push_byte efficient
...
It used to allocate two (!) heap values per pushed byte. It now goes through
a runtime function that simply grows the istr and writes the byte.
2011-08-29 22:46:49 +02:00
Marijn Haverbeke
14567c5eb0
Factor vector reserve code in runtime into its own function
2011-08-29 22:35:29 +02:00
Marijn Haverbeke
c9c5ee252a
Implement non-internal ivecs
...
Vectors are now similar to our old, pre-internal vectors, except that
they are uniquely owned, not refcounted.
Their name should probably change too, then. I've renamed them to vec
in the runtime, will do so throughout the compiler later.
2011-08-29 09:07:53 +02:00
Patrick Walton
5fe80a0d48
rt: Allow closures to be logged
2011-08-26 17:05:59 -07:00
Patrick Walton
4dd23f24d6
rt: Null check in walk_obj_contents. Prevents marking from crashing when calling object constructors.
2011-08-25 17:14:54 -07:00
Patrick Walton
8bd019bdc8
rt: Remember the number of captured type descriptors for objects in the type descriptor crate cache
2011-08-25 14:21:05 -07:00
Patrick Walton
880fd788eb
rustc: Add an extra flag to object tydescs so that shapes know how to find the captured subtydescs
2011-08-25 12:01:10 -07:00
Eric Holk
2f7c583bc1
Cleaning up task and comm exports, updating all the test cases.
2011-08-25 11:21:25 -07:00
Patrick Walton
b371891c7c
rt: Fix walk_obj_contents for type-parameteric objects. Hash tables can be logged now.
2011-08-24 16:54:10 -07:00
Patrick Walton
72d78e6a93
rt: Factor out type param construction into from_tydesc and from_obj_shape. (The latter is unimplemented at the moment.)
2011-08-24 15:19:59 -07:00
Patrick Walton
b07968dda4
rt: Print out fields of objects when logging them
2011-08-24 12:09:06 -07:00
Brian Anderson
a0208e3899
Return an error code after fail under win32
2011-08-24 12:03:07 -07:00
Marijn Haverbeke
fa97793139
Revert "Back out copy-glue"
...
This reverts commit 629ee94a0b
.
2011-08-24 20:30:20 +02:00
Marijn Haverbeke
629ee94a0b
Back out copy-glue
...
This wasn't a good idea after all.
2011-08-24 17:05:53 +02:00
Marijn Haverbeke
054914712e
Remove rust_start_ivec
2011-08-24 13:59:22 +02:00
Marijn Haverbeke
e58c48bdda
Optimize += [x] into a simple push operation
...
This is a preparation for making vectors always-on-the-heap again,
which would cause way too much malloc traffic for this idiom. I will
add an efficient std::vec::push in the future, and migrate += [x] to
that instead.
Reduces compiler code size by 3%
2011-08-24 13:57:27 +02:00
Marijn Haverbeke
cd5e4c21ee
Add skeleton of copy glue that actually copies
2011-08-22 11:41:49 +02:00
Marijn Haverbeke
7588a89553
Rename copy_glue back to take_glue
2011-08-22 10:42:56 +02:00
Marijn Haverbeke
35c962e9a1
Pass structural types by pointer, not by value
...
If we lose tail calls, this is possible. It simplifies things a lot.
Direct motivation: We want ivecs with pointers pointing into
themselves. When copying those, the pointers have to be adjusted. It
is impossible to this when copying them with Load/Store.
2011-08-22 10:16:09 +02:00
Brian Anderson
6ad5b71ad9
Conditionally define CDECL and FASTCALL on windows
...
These may already be defined by other includes. Hopefully puts out the windows
fire.
2011-08-20 16:31:38 -07:00
Brian Anderson
7dad31d11c
Fix comment typos
2011-08-20 16:30:27 -07:00
Brian Anderson
abdb6cd71b
Rewrite reap_dead_tasks to never grab the sched lock before a task lock
...
Doing so contradicts the locking order used everywhere else and causes
deadlocks.
Un-XFAIL task-perf-spawnalot
Closes #854
2011-08-20 16:21:27 -07:00
Patrick Walton
25416bfae1
rustc: Introduce ABI versioning so we can change value representations without breaking the compiler
2011-08-20 14:22:09 -07:00
Patrick Walton
2f650038ad
rt: Move the GetProcAddress/dlsym stuff out of rust_gc.cpp into rust_abi.h
2011-08-20 14:06:04 -07:00
Brian Anderson
4aa165553b
Move bump_dp, get_dp from rust_shape.cpp to rust_shape.h
...
Put out the darwin fire for real
2011-08-20 10:51:31 -07:00
Brian Anderson
6751d40c60
Revert "Add another 'using namespace shape' inside namespace shape"
...
This reverts commit 09f4cd90a8
.
2011-08-20 10:33:41 -07:00
Brian Anderson
09f4cd90a8
Add another 'using namespace shape' inside namespace shape
...
Try again to put out the darwin tinderbox
2011-08-20 10:28:30 -07:00
Brian Anderson
2c54b46408
Revert "Shuffle around definitions in rust_shape.h"
...
This reverts commit d09b421d55
.
2011-08-20 10:19:45 -07:00
Brian Anderson
d09b421d55
Shuffle around definitions in rust_shape.h
...
Try to put out darwin tinderbox fire
2011-08-20 09:48:00 -07:00
Patrick Walton
d0171913aa
rt: Remove rustboot's GC infrastructure
2011-08-19 19:17:05 -07:00
Patrick Walton
8fa86672ab
rt: Implement stack crawling
2011-08-19 18:52:36 -07:00
Patrick Walton
a3f4a1b6ad
rt: Split out shapes into rust_shape.cpp and rust_shape.h so that shape code can be written outside of rust_shape.cpp
2011-08-19 18:52:35 -07:00
Brian Anderson
e417e78e2b
Add missing struct keyword to rust_gc
2011-08-19 18:42:33 -07:00
Patrick Walton
907ab4a11b
rt: Find roots on the stack; stub mark and sweep routines
2011-08-19 17:42:58 -07:00
Patrick Walton
d1836034e2
rt: Attempt to put out burning tinderbox by fully qualifying gc::gc().
2011-08-19 15:21:48 -07:00
Patrick Walton
cede5e53b3
rt: Call maybe_gc on mallocs
2011-08-19 14:30:01 -07:00
Patrick Walton
4d03b7b1fb
rt: Remove "TODO: Windows"
2011-08-18 18:52:11 -07:00
Patrick Walton
9c2abb8253
rt: Fix the calculation of the location of GC safe points
2011-08-18 18:51:49 -07:00
Patrick Walton
396f6b4f59
rustc: Stub GC routines
2011-08-18 18:48:32 -07:00
Patrick Walton
0fedea39ce
rt: Remove rust_alarm dead code
2011-08-18 18:21:03 -07:00
Michael Sullivan
ddc2076902
Make windows respect RUST_SEED. Closes #627 .
2011-08-18 16:24:36 -07:00
Michael Sullivan
eb368d1b34
Remove rc_base. Closes #603 .
2011-08-18 15:49:58 -07:00
Brian Anderson
223f6017c7
Remove rust_intrinsic_vec_len
...
I just edited the ll by hand since I don't have clang on hand
2011-08-18 14:51:07 -07:00
Brian Anderson
0467fa6a00
Rename rust_vec to rust_evec
2011-08-18 14:43:17 -07:00
Brian Anderson
504ec8b00d
Rename some vec upcalls and trans functions from vec* to evec*
2011-08-18 13:09:50 -07:00
Brian Anderson
7903daf86f
Remove upcall_new_vec
2011-08-18 13:09:50 -07:00
Brian Anderson
250cc45c3b
Remove oldvecs from runtime command line processing
2011-08-18 13:09:49 -07:00
Brian Anderson
0a8bffceb3
Simplify the _rust_main/rust_start interface
...
rust_start will always call _rust_main with the command line args, and it is
_rust_main's responsibility to free the args ivec heap. _rust_main will be
generated slightly differently depending on whether main takes an ivec or not:
if so then it's just passed through to main, otherwise it frees the ivec
directly.
2011-08-18 13:09:49 -07:00
Brian Anderson
c2d8a4df35
Continue transition to an ivec-only main
...
Only generate a single main function. Rename rust_start_ivec to rust_start,
leaving a transitional rust_start_ivec in place.
2011-08-18 13:09:49 -07:00
Patrick Walton
f17edf9829
rustc: Use obstacks in lieu of dynamically-allocated frames only when the frame is actually dynamically-sized
2011-08-17 18:14:57 -07:00
Patrick Walton
df51fe36f1
Revert "rt: Use obstacks in lieu of dynamically-sized frames"
...
This reverts commit cc5fcfce89
.
2011-08-17 17:27:31 -07:00
Patrick Walton
cc5fcfce89
rt: Use obstacks in lieu of dynamically-sized frames
2011-08-17 17:24:57 -07:00
Eric Holk
ae89ea223d
Making more of the rust_task structure directly accessible from Rust.
2011-08-17 14:42:40 -07:00
Eric Holk
efac7c9a19
Yet another comm interface.
2011-08-17 14:42:40 -07:00
Patrick Walton
702fe5cdac
rustc: Run obstack cleanups at the end of each function
2011-08-17 13:58:49 -07:00
Patrick Walton
3aab46b020
rustc: Mark an obstack fencepost when entering a dynamically-sized frame
2011-08-17 13:16:15 -07:00
Patrick Walton
d8c5bd6195
rt: Implement obstacks, untested as of yet
2011-08-16 19:49:25 -07:00
Eric Holk
8686645aad
New channel-based task status notifications.
2011-08-16 16:47:40 -07:00
Eric Holk
3db300b06e
Removing port, chan and task shapes.
2011-08-16 12:30:32 -07:00
Eric Holk
89df915a13
Removing task, chan and port upcalls.
2011-08-16 11:22:24 -07:00
Brian Anderson
053b8bff5a
Accept main(args: [str]) as main signature
2011-08-16 10:29:08 -07:00
Eric Holk
76aab80e39
Disabling TRACK_ALLOCATIONS
2011-08-16 10:28:09 -07:00
Eric Holk
cf2def46c1
Removed trans_comm.rs from the compiler. Updating aio/sio to work with the new chan and port system, started on a networking module for the standard library.
2011-08-16 09:36:29 -07:00
Brian Anderson
977d8ba0e9
Abort abruptly on failure on windows
...
Trying to shutdown cleanly results in wierd failures
2011-08-15 19:25:47 -07:00
Eric Holk
5c6790519b
Reducing the chances for race conditions in join.
2011-08-15 12:39:55 -07:00
Eric Holk
3fd3f35699
Fixing win32 build.
2011-08-15 10:48:04 -07:00
Eric Holk
d63f8340a5
Properly ref counting to fix valgrind issues on linux.
2011-08-15 09:26:52 -07:00
Eric Holk
be7325073a
Removed spawn and task from the parser. Updated all the tests except for the benchmarks.
2011-08-15 09:26:52 -07:00
Eric Holk
b9f1f77622
Fixed memory accounting and task stack creation bugs.
2011-08-15 09:26:51 -07:00
Eric Holk
2f23405a60
Working on more spawn test cases.
2011-08-15 09:26:51 -07:00
Eric Holk
a332043561
Updating to build on Linux and Mac, and hopefully Windows too.
2011-08-15 09:26:51 -07:00
Eric Holk
b2dad8af31
Added a library version of spawn. Before long, we can remove the old version.
2011-08-15 09:26:51 -07:00
Eric Holk
39b16077bb
Port ID-based channels.
2011-08-15 09:26:51 -07:00
Eric Holk
04af99ecb0
First step towards port handles.
2011-08-15 09:26:51 -07:00
Brian Anderson
4fc0848a49
Rename rust_list_files_ivec to rust_list_files
2011-08-12 12:14:07 -07:00
Brian Anderson
8561f7654c
Remove rust_list_files from std and rt
2011-08-12 12:14:07 -07:00
Brian Anderson
d1b3ed8c3f
Remove runtime vector builtins
2011-08-12 12:14:07 -07:00
Brian Anderson
878fbac278
Remove str_from_vec runtime function
2011-08-12 12:08:27 -07:00
Brian Anderson
2e7e58812b
Remove vec version of str::bytes, rename bytes_ivec to str::bytes
2011-08-12 12:08:26 -07:00
Patrick Walton
ba7c8f18d4
rustc: Remove unused "trace" upcalls
2011-08-10 18:09:52 -07:00
Patrick Walton
347230b001
rt: Add the last few cases to polymorphic log
2011-08-10 15:45:32 -07:00
Patrick Walton
955ac84da4
rt: Step over type params properly in glue
2011-08-10 15:39:05 -07:00
Patrick Walton
15e1e3185d
rt: Allow records and boxes to be logged
2011-08-10 15:36:37 -07:00
Patrick Walton
6affa3264b
rt: Allow tags to be logged
2011-08-10 14:57:02 -07:00
Patrick Walton
f5c8c85196
rt: Implement logging of vectors
2011-08-10 14:42:06 -07:00
Patrick Walton
dc720c3aba
rt: Implement polymorphic log on strings
2011-08-10 14:35:12 -07:00
Patrick Walton
adce35acd4
rustc: Use polymorphic logging
2011-08-10 14:35:12 -07:00
Brian Anderson
0cd607bcbd
rt: Shutdown gracefully on failure
...
When the kernel fails, kill all tasks and wait for the schedulers to stop
instead of just exiting. I'm sure there are tons of lurking issues here but
this is enough to fail without leaking (at least in the absence of cleanups).
2011-08-10 13:02:31 -07:00
Patrick Walton
f6ad051408
rt: Use _LP64 instead of SIZE_MAX and UINT64_MAX to try to put out the burning tinderbox
2011-08-10 10:55:41 -07:00
Patrick Walton
ceaf02abe1
rt: Attempt to quiet MinGW by including limits.h
2011-08-10 05:17:30 -07:00
Patrick Walton
6fbb7ffdbd
rt: Stub code for polymorphic log
2011-08-09 19:01:15 -07:00
Patrick Walton
1f8e0fa083
rt: Implement comparison of functions, objects, ports, channels, and tasks
2011-08-09 17:02:17 -07:00