Commit Graph

8053 Commits

Author SHA1 Message Date
Marijn Haverbeke 47143ee24a Stop storing cmp glue in tydescs
There's no such thing anymore, we can simply call upcalls.cmp_type.
2012-02-07 14:37:10 +01:00
Marijn Haverbeke b28a5552e3 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
2012-02-07 14:36:02 +01:00
Brian Anderson 3bd0338c19 Revert "log to stderr instead of stdout"
This is causing mysterious hangs on windows. Issue #1769.

This reverts commit d65eabd5de.
2012-02-06 18:29:58 -08:00
Jyun-Yan You 5563eab227 change gcc_args to cc_args and make win32 use gcc 2012-02-06 17:57:22 -08:00
Jyun-Yan You 98bb5b73a5 use cc instead of gcc 2012-02-06 17:56:41 -08:00
Brian Anderson fc8a1f513d Add Ian D. Bollinger to AUTHORS.txt 2012-02-06 13:06:39 -08:00
Marijn Haverbeke 87a488048d Make keyword table in reference reflect reality more closely
And remove the part about reserved words.
2012-02-06 22:03:17 +01:00
Marijn Haverbeke a08e589390 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).
2012-02-06 17:06:19 +01:00
Marijn Haverbeke 8673c4f195 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.
2012-02-06 16:53:25 +01:00
Marijn Haverbeke 6ed8d03784 Make sure iface_methods are set before they are accessed
Closes #1761
2012-02-06 09:56:42 +01:00
Ian D. Bollinger d1158ca333 Removed sendfn from badwords and made the precedence of XOR between that of OR and AND. 2012-02-06 09:56:41 +01:00
Marijn Haverbeke 91da710d86 Add monad iface test 2012-02-06 09:56:41 +01:00
Marijn Haverbeke e0fa5cd2ed 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
2012-02-06 09:56:41 +01:00
Marijn Haverbeke 5c42e3df9c 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
2012-02-06 09:13:32 +01:00
Brian Anderson da61e1ff15 test: Add test for issue #1460 2012-02-05 20:42:05 -08:00
Erick Tryzelaar be35893834 core: Implement str::escape with str::chars_iter. 2012-02-05 19:42:56 -08:00
Erick Tryzelaar 1a7aa20eab vim: block is no longer a keyword. 2012-02-05 19:42:56 -08:00
Brian Anderson 1b3339df63 test: Issue #953, not #959 2012-02-05 18:29:07 -08:00
Brian Anderson 292f3e0958 test: Add an xfailed test for issue #959 2012-02-05 18:27:15 -08:00
Brian Anderson cbeeb13dfd test: Add an xfailed test for issue #929 2012-02-05 18:24:17 -08:00
Brian Anderson 80cd6aa96e test: Update and un-xfail compile-fail/tag-that-dare-not... 2012-02-05 18:06:54 -08:00
Brian Anderson 0b43bf9782 test: Add test for #901. Closes #901 2012-02-05 17:54:52 -08:00
Brian Anderson c04b897cb2 core: Resolve some FIXMEs 2012-02-05 17:30:47 -08:00
Brian Anderson 34aa956e68 test: Resolve some FIXMEs 2012-02-05 17:05:24 -08:00
Brian Anderson 67b1034989 rustdoc: Resolve some FIXMEs 2012-02-05 16:38:18 -08:00
Brian Anderson fdf50e84b8 std: Use ctypes::c_int in path_is_dir 2012-02-05 16:21:52 -08:00
Kevin Atkinson b7ec2488ff Fix macro backtraces.
In addition add information about the macro doing the expansion, and
move the printing of the expansion backtrace from codemap::span_to_str
to the diagnostic code.  The backtrace is now more verbose and
includes information on the macro doing the expansion, in addition to
the expansion site.
2012-02-05 15:38:27 -08:00
Kevin Atkinson 1d855ebc51 Remove support for $(...) form of quasi-quotes, use #ast{...} instead. 2012-02-05 15:38:27 -08:00
Brian Anderson 91b6dc5c8e Merge remote-tracking branch 'erickt/master'
Conflicts:
	src/libcore/vec.rs
	src/libstd/getopts.rs
2012-02-05 15:15:21 -08:00
Kevin Cantu 6be25c8a0c Adding str::reserve 2012-02-05 14:56:16 -08:00
Kevin Cantu d3dfe8758d Making vec::reserve reserve precisely the size given (untested) 2012-02-05 14:56:16 -08:00
Niko Matsakis 9f0239ce9c add a test where mode inference ought to fail 2012-02-05 13:59:09 -08:00
Niko Matsakis dd51031390 new test case 2012-02-05 10:37:07 -08:00
Niko Matsakis 966504c828 don't fail if inference is not complete 2012-02-05 10:06:27 -08:00
Niko Matsakis daf0d63a59 new test showing off the improved inference 2012-02-05 09:56:18 -08:00
Niko Matsakis 7f12358656 resolve some merge failures 2012-02-05 09:56:10 -08:00
Niko Matsakis 77b06d24cd infer modes rather than overwriting with expected ty 2012-02-05 09:12:44 -08:00
Niko Matsakis 5163606d06 platform-specific valgrind suppression 2012-02-05 09:07:23 -08:00
Marijn Haverbeke 75c56e8494 Add missing 'use std' in tutorial example 2012-02-05 14:57:33 +01:00
Brian Anderson 30a671dc0c bench: Tweak threadring benchmark so it pretty-prints 2012-02-04 20:34:51 -08:00
Brian Anderson b4e221bf90 bench: Add threadring shootout benchmark 2012-02-04 20:01:55 -08:00
Brian Anderson 5d4b372902 Revert "bench: Add threadring shootout benchmark"
This reverts commit cdb246f832.
2012-02-04 19:50:45 -08:00
Brian Anderson cdb246f832 bench: Add threadring shootout benchmark 2012-02-04 18:00:59 -08:00
Brian Anderson e818406072 rt: Expand rust_kernel::live_tasks to a uintptr_t 2012-02-04 01:15:00 -08:00
Brian Anderson 9fa950ec53 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.
2012-02-04 00:31:43 -08:00
Brian Anderson 21d783c338 rt: Make isaac_init not a template 2012-02-03 23:48:12 -08:00
Brian Anderson f7a727e861 rt: Remove some silly locks in rust_scheduler 2012-02-03 23:48:12 -08:00
Brian Anderson c7777f4fd9 rt: Add sanity checks when we hit the max task/port id 2012-02-03 23:48:12 -08:00
Brian Anderson 12fa90888e rt: Clean up the way the kernel tracks tasks 2012-02-03 23:48:12 -08:00
Brian Anderson e7f00b6493 rt: Do all task creation through a scheduler 2012-02-03 23:48:12 -08:00