]> git.lizzy.rs Git - rust.git/log
rust.git
12 years agoMerge remote-tracking branch 'erickt/master'
Brian Anderson [Sun, 5 Feb 2012 23:15:21 +0000 (15:15 -0800)]
Merge remote-tracking branch 'erickt/master'

Conflicts:
src/libcore/vec.rs
src/libstd/getopts.rs

12 years agoAdding str::reserve
Kevin Cantu [Sat, 4 Feb 2012 22:56:42 +0000 (14:56 -0800)]
Adding str::reserve

12 years agoMaking vec::reserve reserve precisely the size given (untested)
Kevin Cantu [Sat, 4 Feb 2012 11:16:59 +0000 (03:16 -0800)]
Making vec::reserve reserve precisely the size given (untested)

12 years agoadd a test where mode inference ought to fail
Niko Matsakis [Sun, 5 Feb 2012 21:59:09 +0000 (13:59 -0800)]
add a test where mode inference ought to fail

12 years agonew test case
Niko Matsakis [Sun, 5 Feb 2012 18:08:14 +0000 (10:08 -0800)]
new test case

12 years agodon't fail if inference is not complete
Niko Matsakis [Sat, 4 Feb 2012 01:10:29 +0000 (17:10 -0800)]
don't fail if inference is not complete

12 years agonew test showing off the improved inference
Niko Matsakis [Sun, 5 Feb 2012 17:56:18 +0000 (09:56 -0800)]
new test showing off the improved inference

12 years agoresolve some merge failures
Niko Matsakis [Sun, 5 Feb 2012 17:56:10 +0000 (09:56 -0800)]
resolve some merge failures

12 years agoinfer modes rather than overwriting with expected ty
Niko Matsakis [Fri, 3 Feb 2012 00:50:17 +0000 (16:50 -0800)]
infer modes rather than overwriting with expected ty

12 years agoplatform-specific valgrind suppression
Niko Matsakis [Fri, 3 Feb 2012 20:22:53 +0000 (12:22 -0800)]
platform-specific valgrind suppression

12 years agoAdd missing 'use std' in tutorial example
Marijn Haverbeke [Sun, 5 Feb 2012 13:57:33 +0000 (14:57 +0100)]
Add missing 'use std' in tutorial example

12 years agobench: Tweak threadring benchmark so it pretty-prints
Brian Anderson [Sun, 5 Feb 2012 04:34:36 +0000 (20:34 -0800)]
bench: Tweak threadring benchmark so it pretty-prints

12 years agobench: Add threadring shootout benchmark
Brian Anderson [Sun, 5 Feb 2012 02:00:59 +0000 (18:00 -0800)]
bench: Add threadring shootout benchmark

12 years agoRevert "bench: Add threadring shootout benchmark"
Brian Anderson [Sun, 5 Feb 2012 03:50:45 +0000 (19:50 -0800)]
Revert "bench: Add threadring shootout benchmark"

This reverts commit cdb246f832a8dcecbd5305a4c256c04e1e266a0a.

12 years agobench: Add threadring shootout benchmark
Brian Anderson [Sun, 5 Feb 2012 02:00:59 +0000 (18:00 -0800)]
bench: Add threadring shootout benchmark

12 years agort: Expand rust_kernel::live_tasks to a uintptr_t
Brian Anderson [Sat, 4 Feb 2012 08:31:29 +0000 (00:31 -0800)]
rt: Expand rust_kernel::live_tasks to a uintptr_t

12 years agort: Stop using atomic ops on rust_kernel::live_tasks
Brian Anderson [Sat, 4 Feb 2012 08:03:45 +0000 (00:03 -0800)]
rt: Stop using atomic ops on rust_kernel::live_tasks

These ops are all done within spitting distance of a suitable lock,
so just protect it with the lock.

12 years agort: Make isaac_init not a template
Brian Anderson [Sat, 4 Feb 2012 02:42:12 +0000 (18:42 -0800)]
rt: Make isaac_init not a template

12 years agort: Remove some silly locks in rust_scheduler
Brian Anderson [Sat, 4 Feb 2012 01:52:58 +0000 (17:52 -0800)]
rt: Remove some silly locks in rust_scheduler

12 years agort: Add sanity checks when we hit the max task/port id
Brian Anderson [Sat, 4 Feb 2012 01:31:00 +0000 (17:31 -0800)]
rt: Add sanity checks when we hit the max task/port id

12 years agort: Clean up the way the kernel tracks tasks
Brian Anderson [Sat, 4 Feb 2012 01:26:54 +0000 (17:26 -0800)]
rt: Clean up the way the kernel tracks tasks

12 years agort: Do all task creation through a scheduler
Brian Anderson [Fri, 3 Feb 2012 23:45:59 +0000 (15:45 -0800)]
rt: Do all task creation through a scheduler

12 years agort: Create new tasks through the current thread's scheduler
Brian Anderson [Fri, 3 Feb 2012 23:21:24 +0000 (15:21 -0800)]
rt: Create new tasks through the current thread's scheduler

12 years agort: Add a field to rust_task to hold its scheduler
Brian Anderson [Fri, 3 Feb 2012 23:18:58 +0000 (15:18 -0800)]
rt: Add a field to rust_task to hold its scheduler

12 years agort: Extract rust_scheduler from rust_task_thread
Brian Anderson [Fri, 3 Feb 2012 23:12:18 +0000 (15:12 -0800)]
rt: Extract rust_scheduler from rust_task_thread

12 years agort: Rename rust_scheduler to rust_task_thread
Brian Anderson [Fri, 3 Feb 2012 20:47:01 +0000 (12:47 -0800)]
rt: Rename rust_scheduler to rust_task_thread

12 years agoBeginnings of front-end support for classes
Tim Chevalier [Wed, 1 Feb 2012 03:30:40 +0000 (19:30 -0800)]
Beginnings of front-end support for classes

Added class support to the parser, prettyprinter, fold, and visit.
(See Issue 1726.)

This is WIP -- the test case is xfailed, and attempting to compile
it will error out in resolve.

12 years agolog to stderr instead of stdout
Ted Horst [Sat, 4 Feb 2012 00:43:48 +0000 (18:43 -0600)]
log to stderr instead of stdout

includes rustc diagnostics
runtest updated to check stderr for errors

12 years agoAdd Ted Horst to AUTHORS.txt
Brian Anderson [Sat, 4 Feb 2012 04:55:20 +0000 (20:55 -0800)]
Add Ted Horst to AUTHORS.txt

12 years agoadd third arg for output path, default to no output
Ted Horst [Sat, 4 Feb 2012 04:43:48 +0000 (22:43 -0600)]
add third arg for output path, default to no output

12 years agofix formatting
Ted Horst [Sat, 4 Feb 2012 03:50:32 +0000 (21:50 -0600)]
fix formatting

12 years agoadd mandelbrot image generator from shootout
Ted Horst [Sat, 4 Feb 2012 01:46:17 +0000 (19:46 -0600)]
add mandelbrot image generator from shootout

12 years agoFix various drift issues in the qq branch.
Graydon Hoare [Sat, 4 Feb 2012 01:39:39 +0000 (17:39 -0800)]
Fix various drift issues in the qq branch.

12 years agoAdditional testcase.
Kevin Atkinson [Thu, 2 Feb 2012 05:06:36 +0000 (22:06 -0700)]
Additional testcase.

12 years agoImplement folding of ast::ty.
Kevin Atkinson [Thu, 2 Feb 2012 04:21:01 +0000 (21:21 -0700)]
Implement folding of ast::ty.

12 years agoType anti-quotes now work, add test case.
Kevin Atkinson [Thu, 2 Feb 2012 00:28:49 +0000 (17:28 -0700)]
Type anti-quotes now work, add test case.

12 years agoFix q-q so that non-expression q-q actually work when there is embed anti-q.
Kevin Atkinson [Thu, 2 Feb 2012 00:20:56 +0000 (17:20 -0700)]
Fix q-q so that non-expression q-q actually work when there is embed anti-q.

12 years agoAllow anti-quotes to also be ast::ty rather than just ast::expr.
Kevin Atkinson [Wed, 1 Feb 2012 23:19:45 +0000 (16:19 -0700)]
Allow anti-quotes to also be ast::ty rather than just ast::expr.

12 years agoAdd testcase.
Kevin Atkinson [Wed, 1 Feb 2012 20:41:01 +0000 (13:41 -0700)]
Add testcase.

12 years agoImplement quasi-quoting of multiple syntatic categories.
Kevin Atkinson [Wed, 1 Feb 2012 15:01:21 +0000 (08:01 -0700)]
Implement quasi-quoting of multiple syntatic categories.

12 years agoFormatting cleanups.
Kevin Atkinson [Wed, 1 Feb 2012 10:40:49 +0000 (03:40 -0700)]
Formatting cleanups.

12 years agoStore info about file "substr".
Kevin Atkinson [Wed, 1 Feb 2012 10:37:53 +0000 (03:37 -0700)]
Store info about file "substr".

That is when a string that is part of a file needs to be parsed for a
reason, record that the string is a substr of the file rather than
using "<anon>" or "-" as the file name.  This will eventually allow
pointing to the right location, for now it just uses a more
meaningful string for the filename.

12 years agoImplement quasi-quotes in more macro form: #ast{...}.
Kevin Atkinson [Wed, 1 Feb 2012 09:58:28 +0000 (02:58 -0700)]
Implement quasi-quotes in more macro form: #ast{...}.

The #(...) form is still supported for now.

12 years agoDon't rely on filename to get a file from the filemap
Kevin Atkinson [Wed, 1 Feb 2012 09:18:59 +0000 (02:18 -0700)]
Don't rely on filename to get a file from the filemap
as there may be more than one filemap with the same filename (in the
case of stdin for instance).  This involved storing a pointer to the
filemap rather than the filename in location info such as
codemap::pos.

12 years agoBug fix in lookup_byte_offset.
Kevin Atkinson [Wed, 1 Feb 2012 08:35:11 +0000 (01:35 -0700)]
Bug fix in lookup_byte_offset.

12 years agoMake macro arg optional in syntax, again untested.
Kevin Atkinson [Wed, 1 Feb 2012 07:20:31 +0000 (00:20 -0700)]
Make macro arg optional in syntax, again untested.

12 years agoAdd support for recognizing macro body, completely untested.
Kevin Atkinson [Wed, 1 Feb 2012 06:50:12 +0000 (23:50 -0700)]
Add support for recognizing macro body, completely untested.

12 years agoChange the type for the macro body to also store the span.
Kevin Atkinson [Wed, 1 Feb 2012 03:30:26 +0000 (20:30 -0700)]
Change the type for the macro body to also store the span.

Note: the body is the part of the macro syntax between the {}.

12 years agoWhen replacing $(...) with $0 preserve spacing for better error messages.
Kevin Atkinson [Sun, 29 Jan 2012 01:20:43 +0000 (18:20 -0700)]
When replacing $(...) with $0 preserve spacing for better error messages.

That is:
  x + $(foo) + y
becomes:
  x + $0     + y
not:
  x + $0 + y

12 years agoExpand result of quasi-quote.
Kevin Atkinson [Sun, 29 Jan 2012 01:09:37 +0000 (18:09 -0700)]
Expand result of quasi-quote.

12 years agoImplement anti-quotes.
Kevin Atkinson [Fri, 27 Jan 2012 08:50:57 +0000 (01:50 -0700)]
Implement anti-quotes.

12 years agoImplement "replace" function.
Kevin Atkinson [Fri, 27 Jan 2012 01:10:33 +0000 (18:10 -0700)]
Implement "replace" function.

12 years agoImplement basic quasi-quoter. No anti-quotes yet.
Kevin Atkinson [Fri, 27 Jan 2012 00:03:20 +0000 (17:03 -0700)]
Implement basic quasi-quoter.  No anti-quotes yet.

12 years agoRename AST builders to use uniform naming scheme. Also add a few more.
Kevin Atkinson [Thu, 26 Jan 2012 23:34:05 +0000 (16:34 -0700)]
Rename AST builders to use uniform naming scheme.  Also add a few more.

12 years agoAdd support for parsing quasi-quotes, doesn't do anything useful yet.
Kevin Atkinson [Wed, 25 Jan 2012 23:38:09 +0000 (16:38 -0700)]
Add support for parsing quasi-quotes, doesn't do anything useful yet.

12 years agoMove useful ast building functions into their own module.
Kevin Atkinson [Wed, 25 Jan 2012 21:47:56 +0000 (14:47 -0700)]
Move useful ast building functions into their own module.

12 years agoAdd function to get a code snippet from a span,
Kevin Atkinson [Wed, 25 Jan 2012 21:22:10 +0000 (14:22 -0700)]
Add function to get a code snippet from a span,
and also to get the byte offset within a string from a span chpos.

12 years agoFix byte_len in char_len_range to be what it is advertised.
Kevin Atkinson [Wed, 25 Jan 2012 05:57:51 +0000 (22:57 -0700)]
Fix byte_len in char_len_range to be what it is advertised.

12 years agocorrect to use enum keyword
Niko Matsakis [Fri, 3 Feb 2012 21:58:26 +0000 (13:58 -0800)]
correct to use enum keyword

12 years agoFix prefixing of logging paths with crate name
Marijn Haverbeke [Fri, 3 Feb 2012 21:11:45 +0000 (22:11 +0100)]
Fix prefixing of logging paths with crate name

12 years agorustdoc: Add various sorting passes
Brian Anderson [Fri, 3 Feb 2012 20:00:49 +0000 (12:00 -0800)]
rustdoc: Add various sorting passes

12 years agoFix tests for str::le patch
Marijn Haverbeke [Fri, 3 Feb 2012 13:18:14 +0000 (14:18 +0100)]
Fix tests for str::le patch

12 years agocore: rename str::lteq to str::le
Tom Lee [Fri, 3 Feb 2012 11:28:49 +0000 (03:28 -0800)]
core: rename str::lteq to str::le

12 years agoClean up and update trans::ty_ctxt type definition
Marijn Haverbeke [Fri, 3 Feb 2012 12:37:55 +0000 (13:37 +0100)]
Clean up and update trans::ty_ctxt type definition

It had been messed up by the pretty-printer at some point, and was
partially out of date.

12 years agoStart on in-crate monomorphizing
Marijn Haverbeke [Thu, 2 Feb 2012 11:37:17 +0000 (12:37 +0100)]
Start on in-crate monomorphizing

Adds a --monomorpize flag to rustc to turn it on. You probably don't
want to use it yet, since it's broken in a whole bunch of ways, but it
successfully monomorphizes simple generic functions called from within
the crate.

Issue #1736

12 years agostd: rename sort::lteq to sort::le.
Tom Lee [Fri, 3 Feb 2012 10:53:00 +0000 (02:53 -0800)]
std: rename sort::lteq to sort::le.

12 years agoStore item paths in ast_map, get rid of trans::local_ctxt
Marijn Haverbeke [Fri, 3 Feb 2012 08:53:37 +0000 (09:53 +0100)]
Store item paths in ast_map, get rid of trans::local_ctxt

The direct motivation for this was that the monomorphizer needs to be
able to generate sane symbols for random items. The typechecker can
probably also use this in the future to provide more useful error
messages.

12 years agoRemove experimental GC code
Marijn Haverbeke [Fri, 3 Feb 2012 08:34:42 +0000 (09:34 +0100)]
Remove experimental GC code

It's been sitting unused long enough to have bitrotted completely.

12 years agort: Change the win32 event object to an auto-reset event
Brian Anderson [Fri, 3 Feb 2012 02:30:04 +0000 (18:30 -0800)]
rt: Change the win32 event object to an auto-reset event

The way I read the docs, having this be a manual reset event means
that after the first time it's signalled it stays that way until reset,
and we never, ever reset it.

12 years agort: Remove lock_and_signal::signal_all
Brian Anderson [Fri, 3 Feb 2012 02:29:03 +0000 (18:29 -0800)]
rt: Remove lock_and_signal::signal_all

12 years agort: Remove lock_and_signal::timed_wait
Brian Anderson [Fri, 3 Feb 2012 02:25:49 +0000 (18:25 -0800)]
rt: Remove lock_and_signal::timed_wait

12 years agort: Stop waking up the scheduler on a timer
Brian Anderson [Fri, 3 Feb 2012 02:23:01 +0000 (18:23 -0800)]
rt: Stop waking up the scheduler on a timer

12 years agort: Remove unused arguments in rust_scheduler
Brian Anderson [Fri, 3 Feb 2012 02:17:33 +0000 (18:17 -0800)]
rt: Remove unused arguments in rust_scheduler

12 years agort: Simplify reap_dead_tasks
Brian Anderson [Fri, 3 Feb 2012 01:22:12 +0000 (17:22 -0800)]
rt: Simplify reap_dead_tasks

12 years agort: Remove rust_scheduler::interrupt_flag. Unused
Brian Anderson [Fri, 3 Feb 2012 01:31:02 +0000 (17:31 -0800)]
rt: Remove rust_scheduler::interrupt_flag. Unused

12 years agort: Only wake up all schedulers when no tasks are left
Brian Anderson [Fri, 3 Feb 2012 01:02:50 +0000 (17:02 -0800)]
rt: Only wake up all schedulers when no tasks are left

At the moment there's not really any reason to be raising this signal,
since they schedulers wake up periodically anyway, but once we remove
the timer this will be how the schedulers know to exit.

12 years agort: Do all signalling while holding a lock
Brian Anderson [Fri, 3 Feb 2012 00:47:21 +0000 (16:47 -0800)]
rt: Do all signalling while holding a lock

This will matter once the scheduler is changed to not wake up on a timer

12 years agort: Remove bogus task reaping from the scheduler
Brian Anderson [Fri, 3 Feb 2012 00:34:34 +0000 (16:34 -0800)]
rt: Remove bogus task reaping from the scheduler

12 years agort: Remove rust_task::can_schedule. Does nothing
Brian Anderson [Fri, 3 Feb 2012 00:30:22 +0000 (16:30 -0800)]
rt: Remove rust_task::can_schedule. Does nothing

12 years agort: Remove running_on flag. Does nothing
Brian Anderson [Fri, 3 Feb 2012 00:15:19 +0000 (16:15 -0800)]
rt: Remove running_on flag. Does nothing

12 years agort: Remove task pinning. Does nothing
Brian Anderson [Thu, 2 Feb 2012 23:56:30 +0000 (15:56 -0800)]
rt: Remove task pinning. Does nothing

12 years agort: Rename task_sleep intrinsic to task_yield. Remove usec param
Brian Anderson [Thu, 2 Feb 2012 23:48:08 +0000 (15:48 -0800)]
rt: Rename task_sleep intrinsic to task_yield. Remove usec param

12 years agort: Remove yield timers
Brian Anderson [Fri, 3 Feb 2012 00:24:32 +0000 (16:24 -0800)]
rt: Remove yield timers

12 years agort: Remove bitrotted tests
Brian Anderson [Thu, 2 Feb 2012 22:57:13 +0000 (14:57 -0800)]
rt: Remove bitrotted tests

12 years agort: Generate intrinsics
Brian Anderson [Fri, 3 Feb 2012 00:07:34 +0000 (16:07 -0800)]
rt: Generate intrinsics

12 years agort: Fix intrinsics bustage
Brian Anderson [Fri, 3 Feb 2012 00:07:05 +0000 (16:07 -0800)]
rt: Fix intrinsics bustage

intrinsics.cpp and the file to generate the ll had bitrotted.

12 years agoUpdate libuv.
Graydon Hoare [Fri, 3 Feb 2012 01:39:47 +0000 (17:39 -0800)]
Update libuv.

12 years agoWin32 warning police.
Graydon Hoare [Thu, 2 Feb 2012 19:35:07 +0000 (11:35 -0800)]
Win32 warning police.

12 years agoAdd test case for issue #1733
Marijn Haverbeke [Thu, 2 Feb 2012 09:30:07 +0000 (10:30 +0100)]
Add test case for issue #1733

12 years agoFix assumption in mut.rs that op overloading breaks
Marijn Haverbeke [Thu, 2 Feb 2012 07:11:20 +0000 (08:11 +0100)]
Fix assumption in mut.rs that op overloading breaks

Closes #1733

12 years agorustdoc: Add support for type items
Brian Anderson [Thu, 2 Feb 2012 06:41:41 +0000 (22:41 -0800)]
rustdoc: Add support for type items

12 years agoRename str::char_slice -> str::slice
Kevin Cantu [Wed, 1 Feb 2012 12:36:33 +0000 (04:36 -0800)]
Rename str::char_slice -> str::slice

12 years agoMake the tests work, too
Kevin Cantu [Wed, 1 Feb 2012 12:30:19 +0000 (04:30 -0800)]
Make the tests work, too

12 years agoRename (again) str::unsafe::slice -> str::unsafe::slice_bytes and
Kevin Cantu [Wed, 1 Feb 2012 12:20:21 +0000 (04:20 -0800)]
Rename (again) str::unsafe::slice -> str::unsafe::slice_bytes and
str::unsafe::safe_slice -> str::unsafe::slice_bytes_safe_range

12 years agoStop exporting str::slice and str::safe_slice (use unsafe instead)
Kevin Cantu [Wed, 1 Feb 2012 12:02:14 +0000 (04:02 -0800)]
Stop exporting str::slice and str::safe_slice (use unsafe instead)

12 years agoPropagating unsafe::slice 4
Kevin Cantu [Wed, 1 Feb 2012 11:53:09 +0000 (03:53 -0800)]
Propagating unsafe::slice 4

12 years agoPropagating unsafe::slice 3
Kevin Cantu [Wed, 1 Feb 2012 11:45:44 +0000 (03:45 -0800)]
Propagating unsafe::slice 3

12 years agoPropagating unsafe::slice 2
Kevin Cantu [Wed, 1 Feb 2012 11:41:58 +0000 (03:41 -0800)]
Propagating unsafe::slice 2

12 years agoPropagating unsafe::slice 1
Kevin Cantu [Wed, 1 Feb 2012 11:36:07 +0000 (03:36 -0800)]
Propagating unsafe::slice 1

12 years agoMake it work 1
Kevin Cantu [Wed, 1 Feb 2012 11:32:15 +0000 (03:32 -0800)]
Make it work 1