Commit graph

528 commits

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