Commit graph

566 commits

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