Patrick Walton
7d7f62613a
rt: Compare tags
2011-08-08 18:29:20 -07:00
Patrick Walton
e5531504c9
rt: Align when comparing the insides of boxes
2011-08-08 17:30:21 -07:00
Patrick Walton
0459e38bde
rt: Align mallocs to 16 byte boundaries
2011-08-08 17:30:21 -07:00
Eric Holk
42b13c1db3
Disabling TRACK_ALLOCATIONS
2011-08-08 17:12:44 -07:00
unknown
44bef5f2cb
Introduced task handles.
...
This is the new way to refer to tasks in rust-land. Currently all they
do is serve as a key to look up the old rust_task structure. Ideally
they won't be ref counted, but baby steps.
2011-08-08 16:55:38 -07:00
Patrick Walton
f4f057ced1
rt: Compare the insides of boxes
2011-08-08 16:52:11 -07:00
Patrick Walton
42daeab7df
rt: "const foo const &" == "const foo &", duh. Puts out burning tinderbox.
2011-08-08 14:55:35 -07:00
Patrick Walton
eb7e9dce4d
rt: Stub the shape-based cmp upcall
2011-08-08 14:33:06 -07:00
Eric Holk
d9b84a546c
Converted the rest of the task-comm-* tests over. Also fixed some
...
channel lifecycle bugs.
2011-08-08 08:57:52 -07:00
Patrick Walton
0aeddb3673
rt: Stub compare glue
2011-08-05 18:47:12 -07:00
Patrick Walton
d7828e694d
rt: Uncomment data<T>
2011-08-05 17:50:59 -07:00
Eric Holk
50670eb426
Removing trailing whitespace in rust_shape.cpp
2011-08-05 17:08:22 -07:00
Patrick Walton
5261bd771f
rt: Simplify the signature of walk_tag; stub code for the data walker
2011-08-05 16:47:43 -07:00
Brian Anderson
f918418953
Fix a type in the libuv mingw makefile
2011-08-05 15:48:19 -07:00
Eric Holk
b62e80c1f0
Atomic ref counting for chans.
2011-08-05 15:27:28 -07:00
Eric Holk
200bbcf91b
Rewrote receive to return a value. This lets us initialize variables by receiving them.
2011-08-05 15:27:27 -07:00
Graydon Hoare
7da64ae461
Munge libuv makefiles sufficiently to build out of tree.
2011-08-05 11:57:07 -07:00
Brian Anderson
f6d5c56f21
Tweak libuv makefiles so they pick up custom CFLAGS
2011-08-05 11:57:07 -07:00
Brian Anderson
e653520a6f
Fix uv_buf_t declaration on win32
...
The fields of this structure are mysteriously defined in the opposite order
on windows as on unix
2011-08-05 11:57:06 -07:00
Rob Arnold
a4951cab7f
Add libuv Makefile
2011-08-05 11:57:06 -07:00
Rob Arnold
8229c3fa75
Update libuv to revision ee599ec1141cc48f895de1f9d148033babdf9c2a
2011-08-05 11:57:06 -07:00
Rob Arnold
f4b87c749f
Basic async IO module using libuv
2011-08-05 11:57:06 -07:00
Rob Arnold
b64a52df42
Integrate libuv into the build system
2011-08-05 11:57:06 -07:00
Rob Arnold
904f443fa9
Drop in libuv rev 2b5707d834a6b85b8e589ac04cb61a6db2dab94b
2011-08-05 11:57:06 -07:00
Rob Arnold
b6be83885f
Log tags in memory_region::{free,realloc}
...
Make this useful and consistent with the destructor.
2011-08-05 11:57:06 -07:00
Patrick Walton
6bb6922c28
rt: Change int to uint32_t. Put out burning tinderbox.
2011-08-04 09:50:11 -07:00
Patrick Walton
e351ad762d
rt: Stub shape glue and implement shape::print and shape::size_of.
2011-08-03 20:25:44 -07:00
Erick Tryzelaar
a8943f3442
timeout_in_ns was renamed to timeout_in_ms.
2011-08-03 19:28:49 -07:00
Eric Holk
7a2e9f4874
Sleep for a nonzero amount of time on Windows.
2011-08-03 18:21:19 -07:00
Brian Anderson
2298a2b29f
Whitespace cleanup
2011-08-03 16:25:38 -07:00
Brian Anderson
4ae6c835cb
Add some hacks to get stdin piping working more correctly in windows
...
The way pipes work in windows is not the same as unix, though I'm not
entirely clear on the differences. This patch changes the windows pipe
method to return non-inheritable fds, and the windows rust_run_program
method to duplicate them before spawning the new process.
This allows make-check-pretty to work on windows.
2011-08-03 15:09:00 -07:00
Eric Holk
286be2d94e
Adding an intrinsic for recv.
2011-08-01 18:43:05 -07:00
Eric Holk
939bca0d84
Added send and receive to comm library.
2011-08-01 15:58:39 -07:00
Eric Holk
6a6d5c669e
Enabling logging in circular_buffer again.
2011-08-01 15:58:39 -07:00
Eric Holk
b3d9d9b73c
Objectified library chans and ports.
2011-08-01 15:58:30 -07:00
Eric Holk
5a673cc2c9
Started working on a library-based comm system. Creating and deleting ports work.
2011-08-01 15:58:30 -07:00
Brian Anderson
7b87fa3683
Replace a lock/unlock with scoped_lock in rust_scheduler::create_task
2011-08-01 11:01:59 -07:00
Brian Anderson
d552a0b959
Minimize scheduler locking on task creation
...
This takes my CPU utilization on task-perf-spawnalot from 35% to 55%
2011-07-29 23:02:51 -07:00
Brian Anderson
6657e729de
Lock the new task's scheduler when creating a task
...
Previously we were locking the spawning task's scheduler. I couldn't
see that that was protecting anything. The newborn_task list in the new task's
scheduler though was unprotected from concurrent access. So now we're locking
the new task's scheduler.
2011-07-29 22:43:11 -07:00
Brian Anderson
9dbe6941c4
Add sched_threads rt function to get the number of scheduler threads
2011-07-29 21:03:17 -07:00
Eric Holk
d1dbb99984
Removing proxies and message queues.
2011-07-29 18:54:59 -07:00
robarnold
bdf2daee1e
Merge pull request #781 from robarnold/upstream-stable
...
More useful leak debugging output.
2011-07-29 09:13:20 -07:00
Brian Anderson
3dd522b6b7
Add an assertion about the lock in rust_chan::disassociate
2011-07-28 16:04:49 -07:00
Brian Anderson
73812cd3de
Turn off TRACK_ALLOCATIONS
2011-07-28 14:52:50 -07:00
Brian Anderson
4b356097c2
Change the locking rules around channel disassociation again
...
This prevents port's destructor from accessing a deleted channel
2011-07-28 14:25:20 -07:00
Brian Anderson
5c0fd045ce
Fiddle with the locking around channel disassociation
...
This still looks a bit sketchy to me (why isn't there locking in
port::destroy?) but this manages to get rid of a problem with channels
accessing their task after it's NULL.
2011-07-28 12:53:44 -07:00
Brian Anderson
b54eb0480d
No strnlen on mac
2011-07-28 12:53:14 -07:00
Brian Anderson
0fcd72c932
When using the allow leaks hack don't even print a warning about the leak
...
This is only used for the test runner and in that case it just makes the test
output confusing
2011-07-28 12:23:01 -07:00
Brian Anderson
4ef1ec580a
Do all runtime calls to getenv at initialization
...
getenv is not threadsafe and (maybe as a result) it's randomly crashing with
CFLAGS=-g and RUST_THREADS=32. Calls from rust code are still on their
own.
2011-07-28 12:23:01 -07:00
Brian Anderson
75985ab75e
Remove color-related code from rust_log
...
This is all dead. If someone decides they want color it will be easy to redo.
2011-07-28 12:23:00 -07:00
Eric Holk
3d7016ae95
Updating to work on Windows.
2011-07-28 10:47:29 -07:00
Eric Holk
9618ab67ae
Re-enabled the rest of the asserts and things in rust_chan.cpp
2011-07-28 10:47:29 -07:00
Eric Holk
b85dee8d5b
Resurrecting some of the logging in rust_chan.cpp
2011-07-28 10:47:28 -07:00
Eric Holk
9ea8476faa
Removed outdated comment.
2011-07-28 10:47:28 -07:00
Eric Holk
279844ce9f
Atomic reference counting for tasks.
2011-07-28 10:47:28 -07:00
Eric Holk
a5fe66e706
Adding upcalls to to ref() and deref() tasks. This is the first step towards atomic reference counting of tasks.
2011-07-28 10:47:28 -07:00
Eric Holk
5302cde188
Made task threads wait instead of sleep, so they can be woken up. This appears to give us much better parallel performance.
...
Also, commented out one more unsafe log and updated rust_kernel.cpp to compile under g++
2011-07-28 10:47:28 -07:00
Eric Holk
e697a52359
Adding a function to stdlib to set the min stack size, for programs
...
that absolutely will not succeed with a large default stack. This
should be removed once we have stack grown working.
Also updated word-count to succeed under the new test framework.
2011-07-28 10:47:28 -07:00
Eric Holk
62bc6b5113
Per-thread scheduling. Closes #682 .
...
Tasks are spawned on a random thread. Currently they stay there, but
we should add task migration and load balancing in the future. This
should drammatically improve our task performance benchmarks.
2011-07-28 10:47:28 -07:00
Eric Holk
b51f5c395c
Made root_task no longer special.
2011-07-28 10:47:28 -07:00
Rob Arnold
f45ac8db07
More useful leak debugging output.
...
When printing out leaked allocations, print the allocation tag and address of
the returned pointer.
2011-07-28 08:28:32 -07:00
Marijn Haverbeke
73e8e49897
More thorough check for interior-ness in str_from_ivec
...
Closes #750
2011-07-27 21:46:14 +02:00
Brian Anderson
49a98f1508
Base scheduler threads on number of cores. Closes #739
2011-07-26 11:12:20 -07:00
Graydon Hoare
42e57f64b7
remove datalayout from the intrinsics.ll.in file, silence linkage warning.
2011-07-25 11:50:09 -07:00
Eric Holk
57459ec8ae
Fixed another concurrency issue in channels.
2011-07-23 12:21:23 -07:00
Eric Holk
8878b128ba
More work on word-count.
...
Updated the MapReduce protocol so that it's correct more often. It's
still not perfect, but the bugs repro less often now.
Also found a race condition in channel sending. The problem is that
send and receive both need to refer to the _unread field in
circular_buffer. For now I just grabbed the port lock to send. We can
probably get around this by using atomics instead.
2011-07-22 18:45:34 -07:00
Eric Holk
75ee817713
Fixing a use of uninitialized memory error in valgrind.
2011-07-22 16:05:51 -07:00
Michael Sullivan
f33309502a
Bump the stack size and make the RUST_MIN_STACK env variable accept hex values.
2011-07-21 14:05:51 -07:00
Eric Holk
d79afd7916
Improving move semantics for channel operations.
...
This lets us un-XFAIL task-comm-10.rs.
2011-07-21 11:51:22 -07:00
Eric Holk
3ae4dcd41e
Lots of work on memory tracking and channels.
...
We're trying to get closer to doing correct move semantics for channel
operations. This involves a lot of cleanup (such as removing the
unused sched parameter from rust_vec constructor) and making
circular_buffer kernel_owned.
Added tagging for memory allocations. This means we give a string tag
to everything we allocate. If we leak something and TRACK_ALLOCATIONS
is enabled, then it's much easier now to tell exactly what is leaking.
2011-07-21 11:51:22 -07:00
Brian Anderson
a467e8e4e6
Add a huge hack to allow the test runner to continue if a single task leaks
...
This is just until unwinding works. Adds a flag to the runtime to turn
the memory leak checks on task destruction into warnings instead of fatal
errors. I am so sorry.
Issue #428
2011-07-20 10:22:18 -07:00
Brian Anderson
652214d7f9
Fix calculation of sizeof boxed ivec of str in rt. Closes #712
2011-07-19 16:55:45 -07:00
Brian Anderson
20a3adbc08
Revert "Add setenv to standard library"
...
This reverts commit 6fb168b3db
.
2011-07-17 19:16:18 -07:00
Brian Anderson
6fb168b3db
Add setenv to standard library
2011-07-17 18:50:01 -07:00
Patrick Walton
88574c3cea
rustc: Implement interior string logging in DPS
2011-07-15 18:37:57 -07:00
Brian Anderson
7d475530a0
Remove task_unsupervise from rt builtin functions
...
This was an exact duplicate of the unsupervise function
2011-07-15 10:07:32 -07:00
Brian Anderson
ced8393f20
Modify task::join to indicate how the task terminated
...
This involves sticking yet another field into the task structure
2011-07-15 10:07:29 -07:00
Brian Anderson
f634ab45bc
Add task_unsupervise to rustrt.def.in
2011-07-14 19:14:36 -07:00
Brian Anderson
c99e110119
Modify upcall_fail so that failing tasks relinquish control to the scheduler
...
This is sufficient to let unsupervised tasks that don't allocate fail without
crashing or leaking.
2011-07-14 18:49:18 -07:00
Brian Anderson
01a52d728c
Add an unsupervise builtin and function to std::task
...
Calling task::unsupervise de-parents the current task, with the result
that failures do not propogate up the task tree.
2011-07-14 17:56:59 -07:00
Brian Anderson
4738cf83b0
Move the responsibility for process failure from tasks to the scheduler
...
When the root task fails the process fails. Failures on other tasks propagate
up the task tree. Failures on non-root tasks without parents just
(theoretically) unwind and disappear.
2011-07-14 17:44:39 -07:00
Graydon Hoare
39151f2ad8
Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.
2011-07-13 15:44:09 -07:00
Graydon Hoare
d39f84d8ec
Trim a few more fail(1)s, not sure how they slipped past.
2011-07-13 14:04:38 -07:00
Graydon Hoare
336a4df778
Remove 'Nop.' comments, add emacs lines, remove obsolete file.
2011-07-13 14:03:18 -07:00
Graydon Hoare
49116adbe9
Fix compile-command lines in rt.
2011-07-13 13:51:20 -07:00
Graydon Hoare
2e2951305d
Remove obsolete nargs counts from runtime.
2011-07-13 13:43:35 -07:00
Graydon Hoare
01fc165517
Attempt to correct buggy win32 timer code (causing tinderbox failures).
2011-07-13 12:25:36 -07:00
Patrick Walton
598b50e10a
stdlib: Move fs over to interior vectors by introducing a rust_list_files_ivec builtin
2011-07-12 15:14:57 -07:00
Patrick Walton
a9b77a5011
rt: Remove the locks around upcall_shared_malloc and upcall_shared_free
2011-07-12 11:53:45 -07:00
Patrick Walton
eef61a527d
stdlib: Add addr_of() to the standard library
2011-07-11 14:25:35 -07:00
Patrick Walton
7efb942639
rt: Remove the now-unused upcall_ivec_resize and upcall_ivec_spill, which allocated from the wrong heap
2011-07-10 01:30:45 -07:00
Patrick Walton
d30f22eb65
rt: Remove the _2 prefix from intrinsics; all rust-intrinsics now use explicit return pointers
2011-07-10 01:20:18 -07:00
Patrick Walton
f42c94740a
rustc: Make rust-intrinsics take an explicit return pointer
2011-07-09 21:13:25 -07:00
Patrick Walton
e823ca4965
stdlib: Implement casts. The horror.
2011-07-09 20:14:47 -07:00
Patrick Walton
91d45b91e6
stdlib: Implement str::unsafe_from_bytes_ivec()
2011-07-08 22:23:11 -07:00
Patrick Walton
aa0f6f4961
stdlib: Add an offset function for simple pointer arithmetic on unsafe pointers
2011-07-08 21:56:15 -07:00
Eric Holk
d7db25e8f6
Added an environment variable to override the minimum stack size. Closes #637 .
2011-07-08 11:36:56 -07:00
Eric Holk
3958c72cd8
Some cleanup
2011-07-07 18:32:45 -07:00
Eric Holk
4739953b84
Fixed two races.
...
The first is that the memory_region destructor would complain there is
still an outstanding allocation. This is because circular_buffer from
rust_chan wasn't refing its task, so the task was being destructed too
soon.
The second was where the program could deadlock while joining a
task. The target task would die in the time between checking whether
the task should block and then actually blocking. The fix is to use
the target task's lock.
2011-07-07 18:22:27 -07:00
Eric Holk
f6e37f659c
Made TRACK_ALLOCATIONS add only constant time overhead. This makes it
...
feasible to turn it on and run rustc.
2011-07-07 18:22:27 -07:00
Eric Holk
5d9a5b7d55
Tightened up the scoping for our various new operators, which should
...
make it harder to use the wrong one.
2011-07-07 18:22:27 -07:00
Eric Holk
8acadb17c2
Work on debugging race conditions.
...
Ports and channels have been moved to the kernel pool, since they've
been known to outlive their associated task. This probably isn't the
right thing to do, the life cycle needs fixed instead.
Some refactorying in memory_region.cpp. Added a helper function to
increment and decrement the allocation counter. This makes it easier
to switch between atomic and non-atomic increments. Using atomic
increments for now, although this still does not fix the problem.
2011-07-07 18:22:27 -07:00
Eric Holk
dcd2563a3a
Removing the synchronized memory region from tasks.
2011-07-07 18:22:27 -07:00
Eric Holk
a0f45f4456
Removing most of the locks in rust_upcall.cpp and elsewhere.
2011-07-07 18:22:27 -07:00
Rob Arnold
f6117173c9
Allocate rust_ivec buffers out of the kernel pool
...
The duplication of upcalls is due to the fact that the runtime is
shared between stage0/rustc and stage1/rustc. Once snapshots are
updated, they should be de-duplicated.
2011-07-06 20:41:24 -07:00
Rob Arnold
2e2e1f7cb3
Add realloc method to rust_kernel
2011-07-06 20:37:27 -07:00
Patrick Walton
0391e14fc2
rt: Double stack size
2011-07-06 15:13:00 -07:00
Patrick Walton
91eb63eaee
rt: Add a stack check to upcall_get_type_desc
2011-07-06 15:07:04 -07:00
Eric Holk
111989a626
Removed what seems to be the last of the calls to rand(). Closes #582 .
2011-07-06 11:50:25 -07:00
Eric Holk
bc5d6aefda
Added a task wakeup callback. Closes #599 .
...
The callback happens when a task moves from the "blocked" state to the
"running" state. The callback is also inherited by child tasks. There
is currently only a native API.
This code hasn't been heavily exercised yet.
2011-07-06 11:30:00 -07:00
Patrick Walton
291df4d732
rt: Add missing CDECL to routines in rust_builtin
2011-07-05 14:29:14 -07:00
Rob Arnold
4e59b0be54
Sync rust_chan's deref() method with rustc's code.
...
If the channel is associated with a port then the destructor will assert.
Additionally, destruction of the object is not always appropriate. This brings
the deref() method into sync with the behavior of generated rust code which
only invokes destroy() once the reference count goes to 0.
2011-07-01 16:59:11 -07:00
Rob Arnold
02a5949aba
Add macro for refcounting runtime structures.
...
The macro with the extra dtor parameter is intended for structures like
rust_chan which may not necessarily delete themselves when the ref count
becomes 0. This functionality will be used in an upcoming changeset.
2011-07-01 16:59:10 -07:00
Rob Arnold
73cc624e8e
Move the channel destroy code into rust_chan.
...
This lets native code more easily destroy channels since directly deleting a
channel is not always the right way to destroy it.
2011-07-01 16:59:10 -07:00
Rob Arnold
09921cf86f
Move channel cloning logic into a method on rust_chan.
...
This will allow us to more easily clone channels from native code.
2011-07-01 16:59:10 -07:00
Patrick Walton
be50cdd24a
rt: Add room for the new fill slot when resizing interior vectors
2011-06-30 11:35:05 -07:00
Eric Holk
b4a145e60f
Added a nanosecond timer to time.rs, support for some floating point casts, and a commandline-driven mode for pfib.rs
2011-06-30 11:32:10 -07:00
Eric Holk
b3e5b5bd05
Added inheritance for task pinning. Closes #598 for real.
2011-06-29 18:56:34 -07:00
Eric Holk
63dcd325b9
Adding support for pinning tasks to the currently running thread. Closes #598 .
2011-06-29 18:47:47 -07:00
Graydon Hoare
c796a8f24d
Re-enable tidy (it was broken) and fix various non-tidy things.
2011-06-29 15:14:55 -07:00
Tim Chevalier
1ba85932b1
Add a runtime flag to enable/disable claims en masse
...
Now, if the environment variable CHECK_CLAIMS is set, then all
claims turn into checks. Otherwise, claims are no-ops.
2011-06-29 14:28:02 -07:00
Rafael Ávila de Espíndola
8c535d4aba
Don't enable ssp everywhere.
2011-06-29 16:25:54 -04:00
Patrick Walton
a2ce532337
rt: Remove the lock around upcall_vec_append. Add a test case. Closes #156 .
2011-06-29 10:33:51 -07:00
Patrick Walton
74f8eb51ae
rustc: Move duplicate_heap_parts to copy glue; add a test case
2011-06-28 17:59:30 -07:00
Patrick Walton
dfcfef41df
rustc: Rename take glue to copy glue
2011-06-28 16:52:59 -07:00
Eric Holk
866ee6ecb4
Re-enabling some tests.
2011-06-28 16:12:34 -07:00
Eric Holk
f6f8a06d6b
Resurrecting the runtime unit tests, and modifying them so they compile under the latest refactoring changes.
2011-06-28 16:12:34 -07:00
Eric Holk
657e5a2bd5
Renamed what's left of rust_dom to rust_scheduler
2011-06-28 16:12:33 -07:00
Eric Holk
02f6645fca
Moved win32_require to the kernel.
2011-06-28 16:12:33 -07:00
Eric Holk
2f84987a48
Fixed Win32 compile errors.
2011-06-28 16:12:33 -07:00
Eric Holk
49a8cb34d2
Removed dom_owned, splitting things between task_owned and kernel_owned. Had to re-xfail a few tests brson recently un-xfailed.
2011-06-28 16:12:33 -07:00
Eric Holk
f6f945fed5
Moved thread management to rust_kernel.
2011-06-28 16:12:33 -07:00
Eric Holk
c6d8324830
There is only one domain per kernel now.
2011-06-28 16:12:33 -07:00
Eric Holk
1c852ac9c0
Removing runtime tests. The runtime is tested well enough by the standard library tests, so we might as well have less code to fix during refactoring.
2011-06-28 16:12:33 -07:00
Michael Sullivan
99b4fff4d2
Properly handle the case where src==dst but we have to allocate a new vector.
2011-06-27 12:34:45 -07:00
Michael Sullivan
8ad7f3b56b
Properly handle the case where src==dst in upcall_vec_append.
2011-06-27 12:34:44 -07:00
Graydon Hoare
bc9fa31618
A little tidying in rt.
2011-06-27 10:08:57 -07:00
Eric Holk
022ebc198b
Implementation mising features in lock_and_signal for Win32. Also lowered the minimum stack size to get the pfib benchmark to run without exhausting its address space on Windows.
2011-06-27 09:58:39 -07:00
Eric Holk
681c063ec0
Conservatively serialize nearly all upcalls. Successfuly ran make check with RUST_THREADS=8, so we're probably fairly safe now. In the future we can relax the synchronization to get better performance.
2011-06-27 09:58:39 -07:00
Eric Holk
6367bcf427
Fixed a few concurrency bugs. Still not perfect, but overall it seems much more reliable.
2011-06-27 09:58:39 -07:00
Eric Holk
4d99bf9af2
Added some locking to ports to prevent the case where two threads simultaneously wake up a task blocked on a certain port.
2011-06-27 09:58:39 -07:00
Eric Holk
cb00befff0
Added an environment variable to control how many threads to use.
2011-06-27 09:58:39 -07:00
Eric Holk
4bc773465f
Basic multithreading support. The infinite loops test successfully maxes out the CPU.
2011-06-27 09:58:39 -07:00
Eric Holk
860e8fd98b
Combined set_registers and get_registers into swap_registers.
2011-06-23 20:23:04 -07:00
Eric Holk
98dee91f25
Wrote swap_context in assembly. Closes #548 . This also allows us to re-enable optimization on OSX for both gcc and clang. Also, re-enamed task-comm-1.rs, which was previously broken by optimization.
2011-06-23 18:49:29 -07:00
Eric Holk
a2dcd08cc2
Added string duplication to deep_copy. Closes #520 .
2011-06-20 13:47:02 -07:00
Patrick Walton
8cdef277b2
rt: Fix size miscalculation in ivec_reserve
2011-06-19 18:03:19 -07:00
Patrick Walton
5fb9325848
rustc: Fix a bunch of memory management bugs relating to generic interior vectors. Uncomment all tests in lib-ivec.
2011-06-17 17:31:24 -07:00
Eric Holk
7c57b8baf5
Updating rustrt.def.in so that the path manipulation functions work on OS X.
2011-06-17 15:53:20 -07:00
Eric Holk
a40116b398
stdlib: added getcwd and a convenience function to make relative paths absolute. This will be helpful for #441 .
2011-06-17 15:53:19 -07:00
Patrick Walton
982f51aa95
stdlib: Fix reserve on zero-length interior vectors; uncomment test_unsafe_ptrs()
2011-06-16 18:01:57 -07:00
Patrick Walton
40746fa447
rustc: Implement conversions from interior vector data to unsafe pointers and vice-versa
2011-06-16 17:07:02 -07:00
Patrick Walton
050f62983d
stdlib: Introduce an ivec module into the standard library; add a minimal test case
2011-06-16 16:08:26 -07:00
Eric Holk
6ed6791df4
Removing dead upcall_join. Closes #509 .
2011-06-16 12:23:13 -07:00
Michael Sullivan
bd8f6097a7
Get rid of old vec_append glue.
2011-06-16 11:58:29 -07:00
Patrick Walton
02c0501a61
rt: memory_region::free(NULL) shouldn't touch the live allocation count
2011-06-16 11:16:03 -07:00
Patrick Walton
f9da8b2676
rt: Add an ivec length intrinsic and an ivec reserve function, both untested as of yet
2011-06-16 10:32:52 -07:00
Eric Holk
67360ae618
Fixed a problem where spawn arguments were getting lost again. Also, fixed up stack alignment, which closes #496
2011-06-15 18:16:59 -07:00
Eric Holk
c4f9bd9470
Re-enabled join.
2011-06-15 18:16:59 -07:00
Eric Holk
02018fed42
Step 3 of cdecl conversion.
2011-06-15 16:04:39 -07:00
Eric Holk
92bd35075b
Step 2 of cdecl task transition.
2011-06-15 14:25:53 -07:00
Eric Holk
01ea27b205
Step 1 of moving task startup to always be cdecl.
2011-06-15 12:10:15 -07:00
Patrick Walton
ac743cfcb0
Merge pull request #490 from msullivan/fix_vec_append
...
Move the implementation of vec_append from llvm assembly to a regular upcall
2011-06-14 18:32:04 -07:00
Patrick Walton
c6be352f73
rustc: Implement on-heap resizing for interior vectors
2011-06-14 18:23:13 -07:00
Michael Sullivan
ccd1bcf7a7
Make tydesc glue functions use cdecl.
2011-06-14 16:09:21 -07:00
Michael Sullivan
95def699f1
Implement upcall_vec_append and use it for vector append.
2011-06-14 15:35:09 -07:00
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