]>
git.lizzy.rs Git - rust.git/log
Graydon Hoare [Fri, 10 Feb 2012 20:07:01 +0000 (12:07 -0800)]
support a fast-make mode that avoids globbing into llvm and libuv
Brian Anderson [Fri, 10 Feb 2012 09:22:10 +0000 (01:22 -0800)]
rt: Use 100k stacks for scheduler threads
Marijn Haverbeke [Fri, 10 Feb 2012 14:48:25 +0000 (15:48 +0100)]
Don't allow binding patterns to bind keywords
Closes #1586
Marijn Haverbeke [Fri, 10 Feb 2012 13:33:36 +0000 (14:33 +0100)]
Remove a vestige of return-by-reference
Marijn Haverbeke [Fri, 10 Feb 2012 12:59:05 +0000 (13:59 +0100)]
Fix mistake in typechecker error refactor
Marijn Haverbeke [Fri, 10 Feb 2012 12:31:33 +0000 (13:31 +0100)]
Add compile-fail tests for interfaces/impls
Closes #1475
Marijn Haverbeke [Fri, 10 Feb 2012 10:32:03 +0000 (11:32 +0100)]
Represent boxed ifaces in a way similar to functions
They are now a (dictptr, box) pair, where box is a regular boxed
representation of the inner type. This cuts down on some special
case code.
Also removes some code from trans::base that was moved to shape but
then somehow restored in trans::base through a bad merge.
Starts on issue #1567
Marijn Haverbeke [Fri, 10 Feb 2012 08:53:05 +0000 (09:53 +0100)]
Complain about multiple methods in scope only once
Closes #1803
Marijn Haverbeke [Fri, 10 Feb 2012 08:50:16 +0000 (09:50 +0100)]
Output meaningful lexer error when no digits given for number
Closes #1802
Brian Anderson [Fri, 10 Feb 2012 06:28:52 +0000 (22:28 -0800)]
rt: Disable some expensive asserts
Brian Anderson [Fri, 10 Feb 2012 06:15:15 +0000 (22:15 -0800)]
rt: Inline everything on the C-stack-switching path
Brian Anderson [Fri, 10 Feb 2012 05:27:50 +0000 (21:27 -0800)]
rt: Move valgrind stack configuration out of the hot path
Brian Anderson [Fri, 10 Feb 2012 00:13:56 +0000 (16:13 -0800)]
rt: Detach pthreads before exiting
Joinable pthreads need to be either joined or detached and we no
longer join with the scheduler threads.
Brian Anderson [Thu, 9 Feb 2012 22:29:55 +0000 (14:29 -0800)]
rt: Remove sync::yield and sync::sleep
Brian Anderson [Thu, 9 Feb 2012 22:24:19 +0000 (14:24 -0800)]
rt: Move rust_thread to its own files
Brian Anderson [Thu, 9 Feb 2012 20:26:11 +0000 (12:26 -0800)]
rt: Add more stack-switching commentary
Brian Anderson [Thu, 9 Feb 2012 19:51:34 +0000 (11:51 -0800)]
rt: Add upcall_call_shim_on_rust_stack
Brian Anderson [Thu, 9 Feb 2012 09:13:32 +0000 (01:13 -0800)]
rt: Use rust_task_thread's C-stack pool for native calls
Brian Anderson [Thu, 9 Feb 2012 06:53:58 +0000 (22:53 -0800)]
rt: Add methods to rust_task_thread for borrowing C stacks
Brian Anderson [Thu, 9 Feb 2012 06:35:05 +0000 (22:35 -0800)]
rt: Move more setup code into create_stack
Brian Anderson [Thu, 9 Feb 2012 05:42:04 +0000 (21:42 -0800)]
rt: Add rust_task::call_on_c_stack
Brian Anderson [Thu, 9 Feb 2012 05:18:23 +0000 (21:18 -0800)]
rt: Rename call_shim_on_c_stack to call_and_change_stacks
Brian Anderson [Thu, 9 Feb 2012 04:52:52 +0000 (20:52 -0800)]
rt: Make rust_task::ref_count private
Brian Anderson [Thu, 9 Feb 2012 04:47:52 +0000 (20:47 -0800)]
rt: Add constructors and destructors for stacks
Brian Anderson [Thu, 9 Feb 2012 02:29:15 +0000 (18:29 -0800)]
rt: Move some stack manipulation functions into rust_task
Brian Anderson [Thu, 9 Feb 2012 02:04:14 +0000 (18:04 -0800)]
rt: Rename new_stack to next_stack, del_stack to prev_stack
Brian Anderson [Thu, 9 Feb 2012 01:55:36 +0000 (17:55 -0800)]
rt: Remove rust_task::rust_sp
Brian Anderson [Thu, 9 Feb 2012 01:46:12 +0000 (17:46 -0800)]
rt: Remove rust_task_user struct
Brian Anderson [Thu, 9 Feb 2012 00:24:14 +0000 (16:24 -0800)]
rt: Remove unused builtins
Brian Anderson [Thu, 9 Feb 2012 00:23:17 +0000 (16:23 -0800)]
core: Use rust_task_config_notify instead of twiddling rust_task's innards
Brian Anderson [Thu, 9 Feb 2012 00:22:38 +0000 (16:22 -0800)]
rt: Add a function for configuring task notification
Brian Anderson [Wed, 8 Feb 2012 23:28:25 +0000 (15:28 -0800)]
rt: Begin moving stack-building functions to rust_stack.cpp
Brian Anderson [Wed, 8 Feb 2012 23:12:28 +0000 (15:12 -0800)]
rt: Remove unused context functions
Jyun-Yan You [Thu, 9 Feb 2012 06:08:24 +0000 (14:08 +0800)]
fix build on freebsd
Tim Chevalier [Thu, 9 Feb 2012 22:39:23 +0000 (14:39 -0800)]
suppress warning
Tim Chevalier [Thu, 9 Feb 2012 22:16:12 +0000 (14:16 -0800)]
Further WIP on classes
Changes to resolve and typeck. Still nothning working yet.
Brian Anderson [Thu, 9 Feb 2012 21:47:55 +0000 (13:47 -0800)]
Merge pull request #1794 from matricks/bugfix
fixed memmove. were using memcpy due to copy paste error
Brian Anderson [Thu, 9 Feb 2012 21:42:59 +0000 (13:42 -0800)]
cargo: Disable system mode per discussion on #1760
Magnus Auvinen [Thu, 9 Feb 2012 20:47:12 +0000 (21:47 +0100)]
fixed memmove. were using memcpy due to copy paste error
Tycho Sci [Tue, 7 Feb 2012 08:15:39 +0000 (17:15 +0900)]
cargo: 2 modes -> 3 modes, and clarify them
* -g or --mode=user to create/use .cargo under $HOME
* -G or --mode=system to create/use .cargo under sysroot
* by default, `cargo` uses .cargo under current working directory
Tycho Sci [Sun, 5 Feb 2012 09:30:03 +0000 (18:30 +0900)]
cargo: Add local mode and use it by default
Marijn Haverbeke [Thu, 9 Feb 2012 16:08:54 +0000 (17:08 +0100)]
Fix bug in decoding of method metadata
Marijn Haverbeke [Thu, 9 Feb 2012 13:33:00 +0000 (14:33 +0100)]
Fix various bugs in monomorphization
Enough to be able to compile librustc with --monomorphize.
Issue #1736
Marijn Haverbeke [Thu, 9 Feb 2012 14:30:19 +0000 (15:30 +0100)]
Remove some pointless imports
Marijn Haverbeke [Thu, 9 Feb 2012 10:50:54 +0000 (11:50 +0100)]
Increase precedence of as operator
Closes #1717
Marijn Haverbeke [Thu, 9 Feb 2012 10:17:11 +0000 (11:17 +0100)]
Monomorphize methods and bounded parameters
Issue #1736
Brian Anderson [Wed, 8 Feb 2012 06:24:56 +0000 (22:24 -0800)]
core: Add a test for blocking in native code
Brian Anderson [Wed, 8 Feb 2012 02:34:04 +0000 (18:34 -0800)]
core: Add task::spawn_sched
This function creates a new scheduler with a specified number of threads and
immediately executes a task on it. The scheduler is configured to terminate
when the task dies. This is the minimum API necessary to enable blocking C
calls.
Brian Anderson [Wed, 8 Feb 2012 01:43:54 +0000 (17:43 -0800)]
rt: Export a scheduler API
Brian Anderson [Wed, 8 Feb 2012 00:11:57 +0000 (16:11 -0800)]
rt: Hold schedulers in a map
Brian Anderson [Tue, 7 Feb 2012 07:38:22 +0000 (23:38 -0800)]
rt: Change the lifecycle of tasks and schedulers for various reasons
This is in preparation for giving schedulers their own life cycle separate
from the kernel.
Tasks must be deleted before their scheduler thread, so we can't let the
scheduler exit before all its tasks have been cleaned up. In this scheme,
the scheduler will unregister tasks with the kernel when they are reaped,
then drop their ref on the task (there may still be others). When the task
ref count hits zero, the task will request to be unregistered from the
scheduler, which is responsible for deleting the task.
Instead of having the kernel tell the scheduler to exit, let the scheduler
decide when to exit. For now it will exit when all of its tasks are
unregistered.
Brian Anderson [Tue, 7 Feb 2012 05:12:59 +0000 (21:12 -0800)]
rt: Start schedulers immediately upon creation
Brian Anderson [Tue, 7 Feb 2012 05:06:12 +0000 (21:06 -0800)]
rt: Refactor the rust_kernel interface a bit
Brian Anderson [Tue, 7 Feb 2012 02:00:49 +0000 (18:00 -0800)]
rt: Introduce scheduler ids
Brian Anderson [Sun, 5 Feb 2012 07:42:27 +0000 (23:42 -0800)]
rt: Delete schedulers immediately upon release
This will be needed once we support dynamically changing schedulers.
Brian Anderson [Sat, 4 Feb 2012 22:54:10 +0000 (14:54 -0800)]
rt: Change the scheme used for terminating the kernel
Instead of joining on the scheduler threads, instead keep a count of active
schedulers. When there are no more schedulers raise a signal for the main
thread to continue.
This will be required once schedulers can be added and removed from the
running kernel.
Brian Anderson [Sun, 5 Feb 2012 00:04:16 +0000 (16:04 -0800)]
rt: Remove is_running flag from rust_thread. Unused
Brian Anderson [Sat, 4 Feb 2012 22:56:24 +0000 (14:56 -0800)]
rt: Remove rust_scheduler::rval. Unused
Tim Chevalier [Wed, 8 Feb 2012 00:40:07 +0000 (16:40 -0800)]
A bit more WIP on classes, and some cleanup in resolve
Niko Matsakis [Wed, 8 Feb 2012 20:06:08 +0000 (12:06 -0800)]
deprecate old style box shape strings
Niko Matsakis [Wed, 8 Feb 2012 20:55:19 +0000 (12:55 -0800)]
fix bug that causes premature pops from obstack
basically, the alignment step did not check if it walked off
the end of the buffer
Brian Anderson [Wed, 8 Feb 2012 19:22:07 +0000 (11:22 -0800)]
Merge pull request #1783 from erickt/master
Adding a str::as_bytes<T>(str, fn([u8] -> T) -> T function
Erick Tryzelaar [Wed, 8 Feb 2012 18:18:29 +0000 (10:18 -0800)]
core: add str::as_bytes function
This pattern is used in a couple places, so it'd be nice
to abstract it away.
Niko Matsakis [Wed, 8 Feb 2012 17:14:30 +0000 (09:14 -0800)]
make shape code use the tydesc found in the box, not the shape str
Graydon Hoare [Wed, 8 Feb 2012 15:57:55 +0000 (07:57 -0800)]
Register new snapshots.
Marijn Haverbeke [Wed, 8 Feb 2012 09:42:33 +0000 (10:42 +0100)]
Suppress warnings in compiletest
Marijn Haverbeke [Wed, 8 Feb 2012 09:05:44 +0000 (10:05 +0100)]
Monomorphize resource and variant constructors
Issue #1736
Brian Anderson [Wed, 8 Feb 2012 09:05:53 +0000 (01:05 -0800)]
bench: Add shootout-spectralnorm
Brian Anderson [Wed, 8 Feb 2012 06:02:55 +0000 (22:02 -0800)]
core: Export floor functions
Brian Anderson [Wed, 8 Feb 2012 04:28:57 +0000 (20:28 -0800)]
rt: Don't ignore result of chdir. Fail hard for now with a FIXME
My gcc won't let the result of this function be ignored.
Brian Anderson [Wed, 8 Feb 2012 04:20:58 +0000 (20:20 -0800)]
std: Use correct split function in generic_os::env
Graydon Hoare [Wed, 8 Feb 2012 02:55:02 +0000 (18:55 -0800)]
Make process-spawning take environments and working directories, remove procsrv task from compiletest.
Tim Chevalier [Tue, 7 Feb 2012 19:31:15 +0000 (11:31 -0800)]
Restore a comment that got lost (comments only)
Brian Anderson [Wed, 8 Feb 2012 00:34:02 +0000 (16:34 -0800)]
core: Use substr in extfmt instead of slice_bytes
Kevin Cantu [Tue, 7 Feb 2012 08:17:02 +0000 (00:17 -0800)]
core: add str::splitn_char and fix str::splitn_char_iter
Kevin Cantu [Tue, 7 Feb 2012 07:06:21 +0000 (23:06 -0800)]
core: make str::substr use char positions (and replace other uses)
Kevin Cantu [Thu, 2 Feb 2012 04:31:01 +0000 (20:31 -0800)]
String split renaming:
* Renamed str::split -> str::split_byte
* Renamed str::splitn -> str::splitn_byte
* Renamed str::split_func -> str::split
* Renamed str::split_char -> str::split_char
* Renamed str::split_chars_iter -> str::split_char_iter
* Added u8::is_ascii
* Fixed the behavior of str::split_str, so that it matches split_chars
and split (i.e. ["", "XXX", "YYY", ""] == split_str(".XXX.YYY.", "."))
* Fixed str::split_byte and str::splitn_byte so that they handle
splitting UTF-8 strings on a given UTF-8/ASCII byte and also handle ""
as the others do
Brian Anderson [Tue, 7 Feb 2012 21:21:11 +0000 (13:21 -0800)]
core: Whitespace policia
Brian Anderson [Tue, 7 Feb 2012 20:04:06 +0000 (12:04 -0800)]
Add Magnus Auvinen to AUTHORS.txt
Magnus Auvinen [Tue, 7 Feb 2012 19:46:34 +0000 (20:46 +0100)]
added some documentation and made the memcpy and memmove unsafe
Magnus Auvinen [Tue, 7 Feb 2012 18:50:42 +0000 (19:50 +0100)]
made leak an intrinsic to avoid a c-call. added memmove and memcpy intrinsics
Tim Chevalier [Tue, 7 Feb 2012 19:31:15 +0000 (11:31 -0800)]
Minor class-related tweaks to the AST
Marijn Haverbeke [Tue, 7 Feb 2012 13:37:10 +0000 (14:37 +0100)]
Stop storing cmp glue in tydescs
There's no such thing anymore, we can simply call upcalls.cmp_type.
Marijn Haverbeke [Tue, 7 Feb 2012 10:25:04 +0000 (11:25 +0100)]
Reuse monomorphized functions for different box types
The free glue for opaque boxes will pick the actual tydesc out of the
box, and call its glue.
Issue #1736
Brian Anderson [Tue, 7 Feb 2012 02:29:58 +0000 (18:29 -0800)]
Revert "log to stderr instead of stdout"
This is causing mysterious hangs on windows. Issue #1769.
This reverts commit
d65eabd5de4c41e4bc93b9c6c03d6278299ceb76 .
Jyun-Yan You [Mon, 6 Feb 2012 03:31:36 +0000 (11:31 +0800)]
change gcc_args to cc_args and make win32 use gcc
Jyun-Yan You [Fri, 27 Jan 2012 03:08:51 +0000 (11:08 +0800)]
use cc instead of gcc
Brian Anderson [Mon, 6 Feb 2012 21:06:39 +0000 (13:06 -0800)]
Add Ian D. Bollinger to AUTHORS.txt
Marijn Haverbeke [Mon, 6 Feb 2012 21:03:17 +0000 (22:03 +0100)]
Make keyword table in reference reflect reality more closely
And remove the part about reserved words.
Marijn Haverbeke [Mon, 6 Feb 2012 14:29:56 +0000 (15:29 +0100)]
Handle built-in typenames in the resolve pass, rather than in parser
Closes #1728
Comments out a section of debuginfo.rs. This code was already broken
(only being called when --xg was passed, and only working on trivial
programs).
Marijn Haverbeke [Fri, 3 Feb 2012 14:15:28 +0000 (15:15 +0100)]
Make ty::t type self-sufficient
It is now no longer needed to have a ty::ctxt to get at the contents
of a ty::t. The straight-forward approach of doing this, simply making
ty::t a box type, unfortunately killed our compiler performance (~15%
slower) through refcounting cost. Thus, this patch now represents
ty::t as an unsafe pointer, assuming that the ty::ctxt, which holds
these boxes alive, outlives any uses of the ty::t values. In the
current compiler this trivially holds, but it is does of course add a
new potential pitfall.
ty::get takes a ty::t and returns a boxed representation of the type.
I've changed calls to ty::struct(X) to do ty::get(X).struct. Type
structs are full of vectors, and copying them every time we wanted to
access them was a bit of a cost.
Marijn Haverbeke [Mon, 6 Feb 2012 08:51:03 +0000 (09:51 +0100)]
Make sure iface_methods are set before they are accessed
Closes #1761
Ian D. Bollinger [Mon, 6 Feb 2012 05:32:31 +0000 (00:32 -0500)]
Removed sendfn from badwords and made the precedence of XOR between that of OR and AND.
Marijn Haverbeke [Tue, 31 Jan 2012 12:37:06 +0000 (13:37 +0100)]
Add monad iface test
Marijn Haverbeke [Mon, 30 Jan 2012 10:52:34 +0000 (11:52 +0100)]
Self types for ifaces
This allows a 'Name:' to appear in front of an iface declaration's
name, which will cause 'Name' to refer to the self type (with the same
number of type parameters as the iface has) in the method signatures
of the iface. For example:
iface F: functor<A> {
fn fmap<B>(f: fn(A) -> B) -> F<B>;
}
Issue #1718
Marijn Haverbeke [Tue, 31 Jan 2012 12:31:02 +0000 (13:31 +0100)]
Allow non-semicolon-requiring expressions to be followed by .field
There is no valid expression that starts with a dot token (.5 is a number token),
so this introduces no ambiguities.
Issue #1716
Brian Anderson [Mon, 6 Feb 2012 04:41:23 +0000 (20:41 -0800)]
test: Add test for issue #1460
Erick Tryzelaar [Wed, 1 Feb 2012 15:46:12 +0000 (07:46 -0800)]
core: Implement str::escape with str::chars_iter.
Erick Tryzelaar [Wed, 1 Feb 2012 15:45:39 +0000 (07:45 -0800)]
vim: block is no longer a keyword.
Brian Anderson [Mon, 6 Feb 2012 02:29:07 +0000 (18:29 -0800)]
test: Issue #953, not #959