Commit Graph

10774 Commits

Author SHA1 Message Date
Graydon Hoare
b14a6aca9f Cleanups in the int and uint templates. 2012-08-02 18:06:33 -07:00
Graydon Hoare
4019d3a86b Add trait to emacs keyword table. 2012-08-02 18:06:33 -07:00
Lindsey Kuper
2f832d4b2d test: "iface" -> "trait" in filenames. 2012-08-02 17:58:56 -07:00
Brian Anderson
b8f5dde9d4 Register snapshots 2012-08-02 17:45:35 -07:00
Lindsey Kuper
65e0e30e59 Make typeck::collect aware of provided methods in traits. 2012-08-02 17:15:36 -07:00
Michael Sullivan
2fe299d1a5 Extend ast_map to know about method declarations in traits. 2012-08-02 16:02:30 -07:00
Niko Matsakis
97452c0ca1 Remove modes from map API and replace with regions.
API is (for now) mostly by value, there are options to use it by
reference if you like.  Hash and equality functions must be pure
and by reference (forward looking to the day when something
like send_map becomes the standard map).
2012-08-02 15:53:28 -07:00
Niko Matsakis
476ce459bd update ctags def'n which had fallen somewhat out of date 2012-08-02 15:53:27 -07:00
Ben Blum
b1784673b1 Clean up task.rs docs and use replace/swap_unwrap 2012-08-02 14:59:37 -04:00
Ben Blum
9facb15c49 option::swap_unwrap, the ubiquitous 'option dance'. 2012-08-02 14:59:37 -04:00
Paul Stansifer
7d4742e101 Allow macro_rules! m { (...) => ... } 2012-08-02 11:58:16 -07:00
Paul Stansifer
7129883b51 Allow interpolations of all the nt_*s. 2012-08-02 11:58:16 -07:00
Patrick Walton
0646890f63 vim: Don't link conceals to operators if we're concealing mod paths, because that makes mod paths show up as operators. 2012-08-02 11:48:33 -07:00
Ben Blum
63b70b2370 Remove std::util 2012-08-02 14:31:58 -04:00
Michael Sullivan
97601cafc5 Update rust-mode.el with new keywords. 2012-08-02 10:08:17 -07:00
Ben Blum
8d7dfa44b0 Linked failure: Add '100 generations' bench test (#1868) 2012-08-02 00:07:12 -04:00
Ben Blum
7d9c61a9fb Linked failure touchups (#1868) 2012-08-01 23:39:44 -04:00
Ben Blum
ac0c8b0823 Linked failure: add ASCII art. Close #1868. 2012-08-01 23:08:06 -04:00
Ben Blum
7cb3f3e86a Linked failure: enable unidirectional propagate test; replace FIXMEs with comments (tag #1868). 2012-08-01 23:08:06 -04:00
Ben Blum
43b8114750 Linked failure: Rewrite to use ancestor_list and send_map for proper-propagation. (tag #3068, #2190, #1868) 2012-08-01 23:08:01 -04:00
Brian Anderson
2d8c7fd096 syntax: Remove 'ret' 2012-08-01 19:16:09 -07:00
Brian Anderson
b355936b4d Convert ret to return 2012-08-01 19:16:06 -07:00
Brian Anderson
dc499f193e Merge pull request #3077 from erickt/incoming
core: change vec's ref_set to set_ref, move get_ref to unsafe::get.
2012-08-01 18:42:57 -07:00
Brian Anderson
ba822402de Merge pull request #3081 from erickt/vim
Tweaks to the rust/vim conceal support
2012-08-01 18:37:05 -07:00
Brian Anderson
507fba57d1 syntax: Allow any block-like expr to be used as alt arm w/o comma separator 2012-08-01 17:57:03 -07:00
Ben Blum
fd17d347b0 core.rc export core::util 2012-08-01 19:12:23 -04:00
Ben Blum
90ce3d94e4 Add core::util, with swap, replace, and noncopyable 2012-08-01 19:07:28 -04:00
Ben Blum
6fdd1ef9b1 send_map - fix size bug; add is_empty and test case for same 2012-08-01 19:07:28 -04:00
Ben Blum
0c3158b3a5 core::arc - add an assert 2012-08-01 19:07:28 -04:00
Patrick Walton
fd536d9d3e libsyntax: Use the keyword "copy" for copy-mode bindings instead of the +.
Mea culpa for introducing + in the first place.
2012-08-01 16:04:56 -07:00
Patrick Walton
4991cc5d19 rustc: Translate by-value pattern bindings 2012-08-01 15:24:11 -07:00
Graydon Hoare
7f60c56c3e Clean out transitional lint. 2012-08-01 13:35:40 -07:00
Erick Tryzelaar
213291e0c1 vim: Add a concealer for <->
This may break indentation though. However, without it, vim
sees "<->" and interprets it as a "<", folloed by "->", which
it conceals as a right arrow, so I'm not sure which is worse.
2012-08-01 13:17:01 -07:00
Erick Tryzelaar
37d7c9d1c3 vim: Move conceal code into vim/after/syntax.
This makes concealment opt-in.
2012-08-01 13:17:01 -07:00
Erick Tryzelaar
71927615e0 core: change vec's ref_set to set_ref, move get_ref to unsafe::get. 2012-08-01 12:37:13 -07:00
Eric Holk
e7a69fbe4e Working on documentation of pipes. 2012-08-01 12:30:07 -07:00
Patrick Walton
899400cd1a libsyntax: Fix a parsing problem with the temporary syntax for by-value pattern match bindings 2012-08-01 12:28:47 -07:00
Lindsey Kuper
300e2b8513 Start adding infrastructure for checking trait method bodies. 2012-08-01 11:08:47 -07:00
Lindsey Kuper
d747cd724e Rename convert_class_item to convert_field. 2012-08-01 11:08:47 -07:00
Lindsey Kuper
91bd291009 Fix bad indentation. 2012-08-01 11:08:46 -07:00
Lindsey Kuper
ac4e57c640 Introduce self_info (self_ty packaged up with a node_id). 2012-08-01 11:08:46 -07:00
Lindsey Kuper
361a9b03e6 Fix inaccurate comment. 2012-08-01 11:08:46 -07:00
Niko Matsakis
357920a0e7 register new snapshots 2012-08-01 05:52:33 -07:00
Niko Matsakis
a334deb5d5 change how we print and explain region types 2012-07-31 22:00:19 -07:00
Brian Anderson
c5437c0bbf Fix failing tests 2012-07-31 21:13:57 -07:00
Patrick Walton
82198c9925 test: Fix broken test that used "move" as an identifier 2012-07-31 19:27:23 -07:00
Patrick Walton
b414db041b rustc: Parse by-reference pattern bindings with the "ref" keyword 2012-07-31 19:26:25 -07:00
Brian Anderson
a841789a41 rustc: Add non_camel_case_types lint check 2012-07-31 18:58:23 -07:00
Graydon Hoare
2a3084b527 Start implementing structured constants. 2012-07-31 18:34:44 -07:00
Patrick Walton
285fc53570 rustc: "paramerization" -> "parameterization" in driver 2012-07-31 17:35:18 -07:00
Patrick Walton
43c9cd5298 vim: Add new keywords 2012-07-31 17:34:37 -07:00
Patrick Walton
c88933d714 rustc: Implement unary move. Closes #917. 2012-07-31 17:33:20 -07:00
Brian Anderson
c4bb8f8aaf test: Move two tests from run-pass into the libs 2012-07-31 17:30:54 -07:00
Brian Anderson
7b2026bf21 Introduce 'return', 'match' and 'module' as synonyms 2012-07-31 17:22:30 -07:00
Brian Anderson
7d18369804 syntax: Rename 'module' extension to 'module_path' 2012-07-31 17:22:30 -07:00
Patrick Walton
2cfe8fb357 rustc: Check self types in method lookup; allow required trait methods to have self types; write self types into metadata 2012-07-31 16:35:11 -07:00
Brian Anderson
567f881fdf syntax: More tweaks to make alt arrows parse and print correctly 2012-07-31 15:41:26 -07:00
Niko Matsakis
c206d024eb accept naked exprs with commas in pattern arms
pretty printing will use them, but indentation is slightly off
if the expr is long
2012-07-31 15:41:26 -07:00
Ben Blum
a89ed49d3d Add hash tests: idempotent, no_bytes_dropped. 2012-07-31 18:32:58 -04:00
Ben Blum
513557b465 Add hash uint tests 2012-07-31 18:18:45 -04:00
Ben Blum
77efd389dc Add hash_u64, hash_u32, hash_uint. 2012-07-31 18:11:08 -04:00
Ben Blum
ea568f38ff send_map: each -> each_ref, and add each* copying versions; add 'iterate' test 2012-07-31 17:47:19 -04:00
Paul Stansifer
0bd6371155 Now you can use whatever delimiter you want to invoke syntax extensions. 2012-07-31 14:07:59 -07:00
Ben Blum
8e7fb8e8f5 Add send_map::each{,_key,_value} 2012-07-31 17:02:44 -04:00
Brian Anderson
f35abae892 std: getopts::match -> matches 2012-07-31 13:19:00 -07:00
Lindsey Kuper
a413d4e502 Remove "iface" from vim and emacs modes. 2012-07-31 11:52:16 -07:00
Lindsey Kuper
439afaa329 Change remaining "iface" occurrences to "trait"; deprecate "iface" 2012-07-31 11:52:16 -07:00
Paul Stansifer
c2f49c46ae Avoid accidentally printing floating point numbers as 10.f. 2012-07-31 11:49:20 -07:00
Paul Stansifer
fd52df1901 Fix pretty-printer breakage: 1000f -> 1000. 2012-07-31 11:03:22 -07:00
Ben Blum
18851e4248 Build fix: debug![ to debug!{ 2012-07-31 13:25:18 -04:00
Ben Blum
e7d26a4917 make option::map_default<T,U> instead of U:copy 2012-07-31 13:22:32 -04:00
Patrick Walton
09e893ba2e vim: Switch to a dot that shows up in the middle on Linux for module separator 2012-07-30 19:37:20 -07:00
Patrick Walton
51a06c15da libsyntax: Parse self types in methods 2012-07-30 19:37:20 -07:00
Graydon Hoare
290f079474 Frontend bits for #2317, general const-expr classification. 2012-07-30 19:06:06 -07:00
Paul Stansifer
bf8c773936 Update tests for macro syntax change. 2012-07-30 18:38:15 -07:00
Paul Stansifer
e6af5eeaa2 Fix pretty-printing of consecutive idents. 2012-07-30 18:38:15 -07:00
Paul Stansifer
3819b6b3d1 Allow single quote to be escaped in strings. 2012-07-30 18:38:15 -07:00
Paul Stansifer
a9cc5066ee Change syntax extension syntax: #m[...] -> m!{...}. 2012-07-30 18:38:15 -07:00
Paul Stansifer
650fb06d68 Pretty-print token trees. 2012-07-30 18:04:19 -07:00
Paul Stansifer
a28812cfd6 Improve some documentation. 2012-07-30 18:04:19 -07:00
Paul Stansifer
19922fcd93 Feed the interner to the pretty-printer, in anticipation of pretty-printing token trees. 2012-07-30 18:04:19 -07:00
Paul Stansifer
4e9c475527 Work around bug #2935 by unautounboxing. 2012-07-30 18:04:19 -07:00
Paul Stansifer
be3b733c49 Let's give that binder a name that's not incredibly confusing. 2012-07-30 18:04:19 -07:00
Paul Stansifer
e040ab8423 Impl-ize interner. 2012-07-30 18:04:19 -07:00
Paul Stansifer
a7125971c6 Rename #mod -> #module to not collide with the keyword. 2012-07-30 18:04:18 -07:00
Brian Anderson
f6ce2bd831 test: Add a test for mods inside functions. Closes #493 2012-07-30 18:00:56 -07:00
Lindsey Kuper
f78776e9d8 rustc: "iface" -> "trait" in comments, error messages, and identifiers.
(Also "interface" -> "trait" in error messages.)
2012-07-30 17:26:14 -07:00
Lindsey Kuper
dbd39f868b rustc: "ifce" -> "trt" in identifiers 2012-07-30 17:26:14 -07:00
Patrick Walton
d665ae956a vim: Add some optional beautification of ::, ->, and => 2012-07-30 16:33:24 -07:00
Brian Anderson
ef29f7ff36 syntax: Fix semicolon printing. Closes #3036 2012-07-30 16:09:52 -07:00
Elliott Slaughter
416584d339 Revert "Fix build by xfailing tests which produce irreducible CFGs."
This reverts commit 9ca2a11137.
2012-07-30 15:58:23 -07:00
Elliott Slaughter
9c9de0bd6c Update LLVM for better liveness algorithm. 2012-07-30 15:58:23 -07:00
Ben Blum
78dbf7e22e Make rustdoc/demo.rs less gendered 2012-07-30 18:51:12 -04:00
Niko Matsakis
5d32d03b89 Fix #2979: inference for lifetimes of & expressions
What we now do is to create a region variable for each &
expression (and also each borrow).  The lifetime of this
variable will be checked by borrowck to ensure it is not greater
than the lifetime of the underlying data.  This both leads to
shorter lifetimes in some cases but also longer in others,
such as taking the address to the interior of unique boxes
tht are rooted in region pointers (e.g., returning a pointer
to the interior of a sendable map).

This may lead to issue #2977 if the rvalue is not POD, because
we may drop the data in trans sooner than borrowck expects us
to.  Need to work out precisely where that fix ought to occur.
2012-07-30 14:49:28 -07:00
Brian Anderson
6ef13e76e9 Reduce the difficulty of run-pass/bitv-perf-test. Valgrinds slowly 2012-07-30 12:04:58 -07:00
Michael Sullivan
68e9aa5fcb Make at_vec push functions more like the current vec ones. 2012-07-30 11:29:24 -07:00
Patrick Walton
519deca716 rustc: Make option<&foo> no longer cause LLVM asserts by getting rid of regions in normalize_ty 2012-07-30 11:28:43 -07:00
Brian Anderson
2e231fbcb7 LONG LINES\! 2012-07-30 11:26:20 -07:00
Ben Blum
52ed570f1c Move send_map to libcore 2012-07-30 13:56:14 -04:00
Damian Gryski
1854a736f8 rustc: use new siphash impl instead of sha1
Updating types std::sha1::sha1 -> hash::streaming was a relatively
    small change.  Renaming the variables to reflect that things aren't
    sha1s any more touched far more lines.
2012-07-30 10:46:01 -07:00
Damian Gryski
04f2073bea core::hash -- add a hash::streaming interface and associated siphash implementation. 2012-07-30 10:46:01 -07:00
Tim Chevalier
082d8314da Rewrite bitv to use classes and optimize its representation
Rewrote bitv as a class that uses a 32-bit int as its representation
for bit vectors of 32 bits or less, and a vector (the old representation)
otherwise. I didn't benchmark very much, but a bit of informal benchmarking
suggested this is a win.

Closes #2341
2012-07-29 18:39:15 -07:00
Tim Chevalier
6ac86e92fe Make uint::iterate pure 2012-07-29 18:39:15 -07:00
Tim Chevalier
3cb147a71e Make tidy skip emacs backup files 2012-07-29 18:39:14 -07:00
Brian Anderson
e178999833 core: More magic to make core build with --test 2012-07-28 16:06:25 -07:00
Brian Anderson
2df03bfdca core: Correct exports of intrinsic ops 2012-07-28 16:06:25 -07:00
Brian Anderson
dfbe6976c2 core: Fix compilation of intrinsic ops when testing 2012-07-28 16:06:25 -07:00
Brian Anderson
725a73c4d5 std: Implement to_str for net::url::url 2012-07-28 16:05:06 -07:00
Ben Blum
5312704904 Fix too-large constants in linked failure tests for happier valgrinding 2012-07-28 04:23:18 -04:00
Patrick Walton
afe7757525 libstd: Fix missing export from URL module 2012-07-27 22:23:36 -07:00
Patrick Walton
93c2f5e0e4 rustc: Use coherence for operator overloading.
The only use of the old-style impls is now placement new.
2012-07-27 19:35:24 -07:00
Graydon Hoare
e6d2e49852 Kill off another couple uses of the term 'mtcs'. 2012-07-27 19:19:40 -07:00
Graydon Hoare
517af7e743 early => earley. Oops. 2012-07-27 19:18:16 -07:00
Graydon Hoare
e11e90f31c Make macro-system type and constructor names more uniform; more comments. 2012-07-27 19:14:46 -07:00
Graydon Hoare
eabd233dcd Start killing off obsolete/unused quoters, and fix long lines. 2012-07-27 18:06:24 -07:00
Graydon Hoare
1d9f01cb42 Comments in the new macro system, reflecting conversation with pauls. 2012-07-27 17:42:42 -07:00
Tim Chevalier
f7382c454f Forbid duplicate fields in record types and exprs
Closes #3033
2012-07-27 17:33:05 -07:00
Tim Chevalier
a0d05844ed Correctly forbid upvars in nested impls, traits and classes
Previously, resolve was allowing impls, traits or classes that were
nested within a fn to refer to upvars, as well as referring to type
parameters bound by the fn. Fixing this required adding a new kind of
def: def_typaram_binder, which can refer to any of an impl, trait or
class that has bound ty params. resolve uses this to enforce that
methods can refer to their parent item's type parameters, but not to
outer items' type parameters; other stages ignore it. I also made
sure that impl, trait and class methods get checked inside a
MethodRibKind thing so as to forbid upvars, and changed the definition
of MethodRibKind so that its second argument is an optional node_id
(so that required trait method signatures can be checked with a
MethodRibKind as well).
2012-07-27 17:31:42 -07:00
Niko Matsakis
e4ab0f665b change send_map tests to use ~linear_map, much more natural 2012-07-27 15:49:03 -07:00
Niko Matsakis
dd106ba763 export send_map and use fewer impl names 2012-07-27 15:49:03 -07:00
Niko Matsakis
638491712e change region inference to not consider & that appears in a fn
type as indicating region parameterization
2012-07-27 15:49:03 -07:00
Brian Anderson
2407373fa4 core: Make #fmt pure 2012-07-27 15:11:22 -07:00
Patrick Walton
01e2471cb7 core: Trait-ify various overloaded operators 2012-07-27 14:52:46 -07:00
Tim Chevalier
b6aadf56c8 In resolve, check for duplicate pattern-bound vars
Closes #3038
2012-07-27 13:35:17 -07:00
Tim Chevalier
300f54ebc0 Make alts on uninhabited enum types typecheck and translate properly
Possibly one of the silliest Rust commits ever.

Closes #3037
2012-07-27 13:14:03 -07:00
Brian Anderson
8fdf77a20d std: Make url a sendable type 2012-07-27 12:34:55 -07:00
Niko Matsakis
8800413f52 wip: add a sendable hashmap to stdlib
caveats:
- not efficient nor heavily tested
- API subject to change and currently incompatible with map
2012-07-27 08:50:50 -07:00
Brian Anderson
97d59a8ade std: Create correctly-sized buffers on TCP read 2012-07-26 18:40:57 -07:00
Ben Blum
b50279ba94 vim: hilight old style #macros 2012-07-26 21:20:02 -04:00
Ben Blum
9258053b5c Undo dlist's destructor-involving type structure in light of #3039 2012-07-26 21:20:02 -04:00
Ben Blum
73ca5603bd (comments only) Mention unsafe TLS destructor use (#3039) 2012-07-26 21:20:02 -04:00
Eric Holk
3c731df890 re-xfailing pingpong 2012-07-26 17:11:04 -07:00
Eric Holk
79f5d62d47 Added .peek for recv_packets 2012-07-26 17:10:48 -07:00
Eric Holk
c918bd01b0 Fix borrow check errors in k-nucleotide. 2012-07-26 17:10:48 -07:00
Eric Holk
6d142c5e25 Removed the rest of the vec::view calls that were marked with #2880. Fixes #2880. 2012-07-26 17:10:48 -07:00
Eric Holk
65beca4e01 Use iteration protocol for ebml, use vec::view in more places (issue #2880) 2012-07-26 17:10:48 -07:00
Graydon Hoare
dbbaa50290 Nomenclature fixes in the lint checker. Fewer double-negatives.
New style is allow(foo), warn(foo), deny(foo) and forbid(foo),
mirrored by -A foo, -W foo, -D foo and -F foo on command line.

These replace -W no-foo, -W foo, -W err-foo, respectively.

Forbid is new, and means "deny, and you can't override it".
2012-07-26 17:08:33 -07:00
Tim Chevalier
c60a6b93fb Remove superfluous rets (purely style) 2012-07-26 17:06:09 -07:00
Damian Gryski
74d60a619a shootout-mandelbrot: devnull writer needs get_type impl 2012-07-26 17:05:13 -07:00
Damian Gryski
ffb067640b diagnostic: only print color if output is for the screen 2012-07-26 17:05:13 -07:00
Damian Gryski
cdd052f6ea core::io::writer : add get_type() method
The get_type() method can hint to users what kind of item might be
   under the hood.
2012-07-26 17:05:13 -07:00
Paul Stansifer
872ef0f312 Merge branch 'incoming' of github.com:mozilla/rust 2012-07-26 16:32:15 -07:00
Ben Blum
2fc2e2d5ea Add issue number #3039 to dlist destructor 2012-07-26 19:31:50 -04:00
Paul Stansifer
97422f0f0f Merge branch 'incoming' of github.com:mozilla/rust 2012-07-26 16:16:28 -07:00
Paul Stansifer
f1f9066274 Register snapshots. 2012-07-26 15:31:21 -07:00
Patrick Walton
afd9a75c9e rustc: Fix cross-crate max/min-class-style constructors 2012-07-26 15:30:15 -07:00
Ben Blum
5cf99c585a dlist pop needs copy after all (#3024) 2012-07-26 18:20:38 -04:00
Ben Blum
de48b7d4c4 dlist: cleanup a little; pretend to implement "cycle-collecting" destructor 2012-07-26 18:20:38 -04:00
Tim Chevalier
20c6f3c37a Add xfailed test case for #3029 2012-07-26 14:51:10 -07:00
Tim Chevalier
c8ea9fc4c3 Re-added test for Issue 935 -- not sure what happened to it 2012-07-26 14:47:30 -07:00
Patrick Walton
1dd8acd56a core: Mark a bunch of numeric functions as pure 2012-07-26 14:43:44 -07:00
Tim Chevalier
d19b915bc4 Add test for issue 868 2012-07-26 14:29:47 -07:00
Eric Holk
96c6f57d18 Revert "Use pipes in compiletest"
This reverts commit 2d15b6ef42.

This seems like a likely candidate for causing the recent
lock_and_signal failures. I'll revert it for now to see if it fixes it
and hopefully nail down the problem better.
2012-07-26 14:11:46 -07:00
Eric Holk
5805616aad Make parsing about 0.3 seconds faster. 2012-07-26 11:37:57 -07:00
Eric Holk
94f29e0c94 3x faster typechecking 2012-07-26 11:37:57 -07:00
Eric Holk
0a8b794a3a Add #[inline(never)], and also fixed inlining on vec::push 2012-07-26 11:37:57 -07:00
Eric Holk
fec749df16 Comments Only: Remove outdated FIXMEs. Fixes #2886. 2012-07-26 10:20:05 -07:00
Paul Stansifer
f4c093c4af Change #macro to macro_rules! in some cases. 2012-07-26 10:14:01 -07:00
Paul Stansifer
7f5fbd4f9d Allow old-style syntax extensions to be called with new syntax. 2012-07-26 09:52:21 -07:00
Eric Holk
ab1defb1ce Make parsing about 0.3 seconds faster. 2012-07-26 09:47:32 -07:00
Graydon Hoare
c953dad0b9 Pick up changes from eds' unique-ptrs branch. 2012-07-25 19:04:46 -07:00
Patrick Walton
10d8a68791 libcore: Add missing ops.rs 2012-07-25 19:03:55 -07:00
Patrick Walton
da80bd17c3 rustc: Introduce a lang_items pass, part of coherence and operator overloading.
This will also help us remove kinds.
2012-07-25 18:37:03 -07:00
Eric Holk
e1d4bd463c 3x faster typechecking 2012-07-25 18:00:29 -07:00
Eric Holk
3aee39a6ec Add #[inline(never)], and also fixed inlining on vec::push 2012-07-25 17:30:13 -07:00
Elliott Slaughter
987814f11e Added debug flag to enable LLVM debug output. 2012-07-25 16:00:13 -07:00
Graydon Hoare
f8dc9283ad Reject non-UTF-8 files when reading as str. Close #2918. 2012-07-25 15:34:18 -07:00
Eric Holk
62d4f8fe82 Added a select2 trait. Fixes #2898 2012-07-25 15:15:46 -07:00
Eric Holk
531ea695f6 Remove shared_arc (unused) and fix trivial-message 2012-07-25 15:15:46 -07:00
Eric Holk
2d15b6ef42 Use pipes in compiletest 2012-07-25 15:15:46 -07:00
Eric Holk
08a77e06a8 Rewrite task-comm-NN to use pipes 2012-07-25 15:15:46 -07:00
Ben Blum
60d682b577 Fix asserts & short-read bug in isaac_seed (#2870) 2012-07-25 18:03:00 -04:00
Ben Blum
4378e7ead1 Fix os::env race (#2870) 2012-07-25 18:03:00 -04:00
Graydon Hoare
43867bf6f3 Merge pull request #3014 from elliottslaughter/fix-failed-build-by-xfailing-tests
Fix build by xfailing tests which produce irreducible CFGs.
2012-07-25 14:50:02 -07:00
Elliott Slaughter
9ca2a11137 Fix build by xfailing tests which produce irreducible CFGs. 2012-07-25 14:42:37 -07:00
Eric Holk
6748f78cb1 Polymorphic protocols work well enough to do MapReduce.
I did some horrible things with type variable naming here. It should do the right thing in most cases, but we'll need to go through and make it correct someday.
2012-07-25 12:12:26 -07:00
Eric Holk
14adb98b64 Bounded protocols work well enough to compile core, but map reduce has too many type parameters, so we have to get fancier. 2012-07-25 12:12:25 -07:00
Eric Holk
1dde5e7fc2 Thread spans through the pipe compiler. They aren't perfect, but they make debugging far easier than core.rc:0:0.
Changed the is_bounded check, so we fail compiling core right now due to not supporting type parameters.
2012-07-25 12:12:25 -07:00
Eric Holk
7ecddb2771 More purity to make it easier to borrow strings in format strings. 2012-07-25 12:12:25 -07:00
Eric Holk
f5be06fa1f Added infrastructure to spin for a bit on recv. A spin count > 0 makes bench/pingpong.rs about 10x faster, but makes msgsend-ring-pipes unbearably slow. 2012-07-25 12:12:25 -07:00
Eric Holk
35576168dc Added a benchmark of bounded vs unbounded. Bounded is 8-12% faster. The macros currently don't work without pretty printing first. 2012-07-25 12:12:25 -07:00
Eric Holk
7f5f1f90a0 Compiled a bounded version of pingpong.
There are some failures in the other pipe tests, but these seem to just be a matter of generalizing the library code.

Updating pipes library so all tests pass again
2012-07-25 12:12:25 -07:00
Eric Holk
b97fe98354 Generate buffer type for bounded protocols 2012-07-25 12:12:25 -07:00
Eric Holk
c28af26258 Refactor the bounded pingpong example to avoid needing to generate unsafe code.
Took some steps towards bounded codegen.
2012-07-25 12:12:25 -07:00
Eric Holk
88877effa8 Allow logging slices 2012-07-25 12:12:25 -07:00
Eric Holk
4f29814f2a Hand-written bounded pingpong implementation. 2012-07-25 12:12:25 -07:00
Eric Holk
d74fb9875b Refactoring pipes to allow implementing bounded protocols. 2012-07-25 12:12:25 -07:00
Eric Holk
f65d6026ef Started playing with macros to make receiving easier 2012-07-25 12:12:25 -07:00
Eric Holk
6535da8417 Tighten pipe exports, and refactor traits. 2012-07-25 12:12:25 -07:00
Ben Blum
729c37f3cc (minor) remove config_notify from rustrt.def.in 2012-07-25 13:29:50 -04:00
Ben Blum
8d43724087 minor rt cleanup 2012-07-25 13:24:00 -04:00
Ben Blum
c68f2d9aab Remove notification channels in runtime (closes #1078) 2012-07-25 13:22:43 -04:00
Ben Blum
d9e8efca19 Handle notification channels in task.rs 2012-07-25 13:22:43 -04:00
Graydon Hoare
1e241b5abd Merge pull request #3009 from elliottslaughter/utf8-idents-test-fix
Fix test floating point comparison to tolerate imprecise FPUs.
2012-07-25 10:20:40 -07:00
Niko Matsakis
4b8d0539f9 adjust deprecated_use not to warn about sugared closures 2012-07-25 10:19:28 -07:00
Niko Matsakis
dc744e816d fix oversight in ty_decode.
I thought this case would not come up.
2012-07-25 09:19:59 -07:00
Niko Matsakis
cc8086a045 add new deprecated_mode lint pass
It will warn you if you use the default mode for something that
is expensive to copy, and it will warn you if you use any explicit
mode other than copy.  So you should migrate over to using the
default mode for most things (and borrowed pointers when you don't
want to copy) and copy mode for things you really wanted to copy.
2012-07-25 09:19:02 -07:00
Niko Matsakis
99674dc52b avoid capture of bound regions when infering types for closure
expressions. cc #2981
2012-07-25 05:45:52 -07:00
Niko Matsakis
2d3a197f0e comment various region-related things better 2012-07-25 05:45:52 -07:00
Niko Matsakis
7022ede9b3 make unique pointers inherit mutability from owner 2012-07-25 05:45:52 -07:00
Niko Matsakis
3bcd973419 from_fn and ref_set do not require copy bound 2012-07-25 05:45:52 -07:00
Niko Matsakis
f061560ce4 range() is pure 2012-07-25 05:45:52 -07:00
Niko Matsakis
168306f11b correct treatment of mutability for deref'd components
Fixes #2980
2012-07-25 05:45:52 -07:00
Patrick Walton
1df5c52791 vim: Highlight "struct" 2012-07-24 21:09:42 -07:00
Ben Blum
a038d272b0 rust_cond_lock acquire/release should be inside the atomically { .. } 2012-07-24 20:28:30 -04:00
Ben Blum
bb5db3bc8a Add 2-degree familial relations linked failure tests & fix secondborn behaviour 2012-07-24 20:21:20 -04:00
Elliott Slaughter
d9c9a2f97e Remove rustllvm functions which have moved upstream. 2012-07-24 17:11:13 -07:00
Graydon Hoare
668e2c86a0 Bump LLVM, clang and compiler-rt, integrating eds' work. 2012-07-24 17:11:13 -07:00
Zack Corr
480fa7c00e Only initialize targets that are actually supported / linked to in RustWrapper 2012-07-24 17:11:13 -07:00
Graydon Hoare
fada46c421 Add core::hash containing SipHash-2-4 implementation. Re: #1616 and #859. 2012-07-24 17:11:13 -07:00
Patrick Walton
0737f1b53d rustc: Write impl attributes into the metadata 2012-07-24 17:06:32 -07:00
Patrick Walton
22ef08293e test: Add a max/min classes test case 2012-07-24 16:39:26 -07:00
Patrick Walton
728d16cfca rustc: Parse new-style impl declarations 2012-07-24 16:38:24 -07:00
Elliott Slaughter
1e27d1994f Fix test floating point comparison to tolerate imprecise FPUs. 2012-07-24 16:15:30 -07:00
Patrick Walton
587b0edbbf rustc: Don't require that structs have constructors 2012-07-24 15:29:51 -07:00
Ben Blum
695ab09899 Change yield() and wait_event() to be MUST_CHECK and return the killed flag. (closes #2875) 2012-07-24 18:24:24 -04:00
Eric Holk
d948254ccb Fix xfail comment 2012-07-24 14:56:59 -07:00
Eric Holk
22e3a8506f Test case for #3005 2012-07-24 14:56:02 -07:00
Ben Blum
2040a5c632 tiny runtime cleanup 2012-07-24 17:35:08 -04:00
Ben Blum
f42a5a1acd Remove unsupervise 2012-07-24 17:31:43 -04:00
Ben Blum
c0abe69993 task.rs remove old builder interface 2012-07-24 17:27:34 -04:00
Ben Blum
be3a71a1aa Add option::unwrap_expect 2012-07-24 17:27:34 -04:00
Graydon Hoare
160ffb0c2f Fix more windows breakage. 2012-07-24 14:08:34 -07:00
Patrick Walton
32e8429341 rustc: Translate struct literals 2012-07-24 13:59:17 -07:00
Graydon Hoare
b91da0945d Fix windows breakage. 2012-07-24 13:55:27 -07:00
Graydon Hoare
539a160bb7 Merge pull request #3003 from elliottslaughter/free-cant-fail
Don't emit invoke instructions inside landing pads.
2012-07-24 13:49:24 -07:00
Graydon Hoare
8868b222c3 Fix whitespace. 2012-07-24 13:21:25 -07:00
Graydon Hoare
a63e0e47f0 Update some str functions to slices, merge as_buf and unpack_slice. 2012-07-24 12:35:52 -07:00
Ben Blum
ae094a7adc Add 'do atomically { .. }' for exclusives 2012-07-24 15:28:35 -04:00
Elliott Slaughter
c341eb9052 Don't emit invoke instructions inside landing pads.
We can't throw an exception from inside a landing pad without
corrupting the exception handler, so we have no hope of dealing with
these exceptions anyway. See:

http://llvm.org/docs/ExceptionHandling.html#cleanups

Part of #2861.
2012-07-24 12:20:39 -07:00
Paul Stansifer
9103e43909 Bugfix: enable transcription to deal with zero-repetition cases. 2012-07-24 11:44:58 -07:00
Paul Stansifer
e20c5e7596 Improve an error message a little. 2012-07-24 11:44:58 -07:00
Paul Stansifer
f785cccf0f Bugfix: make the parser handle the case where zero repetitions occur, by handling parse results on the basis of what names the matcher expects to bind, not on what names are actually bound. 2012-07-24 11:44:58 -07:00
Paul Stansifer
1c472564e3 Add 5.timesi() |idx| { ... } 2012-07-24 11:44:58 -07:00
Paul Stansifer
a57686d46d Make rustdoc deal with macros. Rustdoc still fails, though; we think it needs to do an unparallelized, non-failure-ignoring resolve. 2012-07-24 11:44:58 -07:00
Patrick Walton
0930b95395 rustc: Typecheck struct literals 2012-07-24 11:29:07 -07:00
Eric Holk
bf96298ff9 Import reader_util 2012-07-24 10:51:30 -07:00
Patrick Walton
b3cad86a05 rustc: Resolve struct names in struct literals 2012-07-23 18:58:57 -07:00
Patrick Walton
0d581bdafe syntax: Expect the closing brace after struct literals 2012-07-23 18:58:56 -07:00
Ted Horst
78fa02106e call task::yield in comm::peek 2012-07-23 17:51:10 -07:00
Glenn Willen
28519c8ef6 Add to_str for hashmap. 2012-07-23 17:30:02 -07:00
Erick Tryzelaar
06ac0c2b1d Switch reader to work with preallocated vecs
This closes #2901.
2012-07-23 17:15:30 -07:00
Erick Tryzelaar
6d042c0f2d tests: Rename to avoid colliding with real rust-zmq. 2012-07-23 17:15:30 -07:00
Erick Tryzelaar
66ebdbb283 libcore: whitespace cleanup. 2012-07-23 17:15:30 -07:00
Erick Tryzelaar
971b59106a libcore: add vec memcpy and memmove fns 2012-07-23 17:15:30 -07:00
Erick Tryzelaar
9d4aab80a7 libcore: add vec::{mut_view, const_view}. 2012-07-23 17:15:30 -07:00
Erick Tryzelaar
a762c725b5 libcore: Modernize a docstring 2012-07-23 17:15:30 -07:00
Ben Blum
cbaa602dbd Convert std::test to new task_builder interface 2012-07-23 20:09:17 -04:00
Ben Blum
b30a58abe2 Convert bench and run-pass tests to new task_builder interface 2012-07-23 20:09:17 -04:00
Ben Blum
e0e9e451e7 Convert os/priv/uv to new task_builder interface 2012-07-23 20:09:17 -04:00
Ben Blum
c7a6a66e4b Get rid of task::future_task 2012-07-23 20:09:17 -04:00
Ben Blum
e6efb24f3f Add task::task_builder interface for improved spawning (related #2585) 2012-07-23 20:09:16 -04:00
Graydon Hoare
7680f504c2 Merge pull request #2998 from elliottslaughter/no-landing-pads
Add debug flag to turn off landing pads.
2012-07-23 16:47:35 -07:00
Patrick Walton
df4db83ed8 rustc: Max/min classes: Add struct literal syntax 2012-07-23 16:40:05 -07:00
Daniel Patterson
ee2abc1cae Adding simple net::url module to parse and format urls. 2012-07-23 15:44:03 -07:00
Tim Chevalier
4806a4f120 Merge pull request #3000 from dgryski/master
Fix formatting of multiline code blocks in asm-comments
2012-07-23 14:39:08 -07:00
Ben Blum
80f4e9f2ec Oops, xfail-win32 task-killjoin-rsrc 2012-07-23 17:36:03 -04:00
Damian Gryski
9b02acbc5d Fix formatting of multi-line blocks in asm-comments 2012-07-23 23:18:12 +02:00
Patrick Walton
a57087e032 syntax: Remove reference to typestate in a comment 2012-07-23 13:24:58 -07:00
Patrick Walton
674dd14eec rustc: Make vtables use the coherence tables 2012-07-23 13:24:05 -07:00
Ben Blum
81f108154a Fix and un-xfail task-killjoin-rsrc.rs 2012-07-23 16:15:12 -04:00
Elliott Slaughter
d8c75cfbe7 Add debug flag to turn off landing pads. 2012-07-23 13:07:35 -07:00
Ben Blum
d0fb85359a Add task::spawn_unlinked and start migrating away from task::unsupervise 2012-07-23 16:06:29 -04:00
Ben Blum
6e21b5fd22 remove unneeded export local_data in task.rs (#2945) 2012-07-23 16:06:29 -04:00
Elliott Slaughter
66e5a8ca18 Add rustrt wrapper functions to export list. 2012-07-23 12:21:41 -07:00
Elliott Slaughter
d257382863 Moved malloc and free upcalls into rust runtime. 2012-07-23 10:45:58 -07:00
Elliott Slaughter
de82a9be61 Move fail upcall into rust libcore. 2012-07-23 10:45:58 -07:00
Tim Chevalier
beb2cd1658 Remove what's left of resolve1 2012-07-20 17:08:19 -07:00
Ben Blum
3dc52da989 [4/4 for #2365, #2671] Reassign one last fixme to #908. Close #2365. Close #2671. 2012-07-20 19:23:19 -04:00
Ben Blum
af7b769465 [3/4 for #2365, #2671] Fix exit/kill race with scheds during rust_kernel::fail 2012-07-20 19:23:19 -04:00
Ben Blum
18c645a883 [2/4 for #2365, #2671] Fix exit/kill race with tasks during rust_kernel::fail 2012-07-20 19:23:19 -04:00
Ben Blum
5bb4a12900 [1/4 for #2365, #2671] Fix create/kill race with schedulers and tasks during rust_kernel::fail 2012-07-20 19:23:19 -04:00
Ben Blum
d1e3e62300 *Properly* ignore the hanging linked failure test 2012-07-20 15:45:09 -04:00
Ben Blum
07bb1aefc9 task.rs rename supervise to linked internally 2012-07-20 14:32:18 -04:00
Tim Chevalier
bb2c45feae Fix string 2012-07-19 19:10:21 -07:00
Tim Chevalier
ce46e113c5 Merge pull request #2910 from gwillen/bug-2360
Better error when rustc fails to write output.
2012-07-19 19:01:22 -07:00
Tim Chevalier
ed62f441e9 Merge pull request #2939 from jld/randomfloat
Prevent random floats from occasionally being greater than 1.
2012-07-19 17:16:11 -07:00
Graydon Hoare
1e13626caa Switch io::print and io::println to take slices. 2012-07-19 14:37:27 -07:00
Graydon Hoare
bc03121d7e Generalize leak suppression slightly, user reported not-real testsuite failure. 2012-07-19 14:37:27 -07:00
Ben Blum
569af8aa28 Add bonus linked failure test, #[ignore]d 2012-07-19 16:44:29 -04:00
Niko Matsakis
f676547c97 Fix intersection of two region params in infer, cc #2962 2012-07-19 10:14:16 -07:00
Patrick Walton
978ca03cb2 Revert "accept naked exprs with commas in pattern arms" due to pretty-printing failures
This reverts commit f712b2d76b.

In alt arms, the parser needs to do a little lookahead to determine
whether it's looking at a record literal or a block.

Also there are some indentation issues in the expected source.
2012-07-19 07:53:55 -07:00
Patrick Walton
00aa5f163f test: XFAIL some more in an effort to unbreak the tree 2012-07-19 07:30:37 -07:00
Patrick Walton
f82db5d136 test: Change the expected error message on iface-test.rs to contain "trait" instead of "interface" 2012-07-18 20:42:14 -07:00
Patrick Walton
6cb38aeb43 test: XFAIL issue-1466.rs due to cycle collector crashes.
I don't want to do this, but the tree has been in a state of chaos for days
and it's not clear what can be backed out to fix this test.
2012-07-18 20:39:56 -07:00
Niko Matsakis
f712b2d76b accept naked exprs with commas in pattern arms
pretty printing will use them, but indentation is slightly off
if the expr is long
2012-07-18 20:16:41 -07:00
Ben Blum
22f492ab09 Linked failure: add {un,}linked {un,}parented fail-{up,down} tests. 2012-07-18 21:57:56 -04:00
Ben Blum
20831d394a Linked failure: unidirectional failure with parented() (soon to be renamed) 2012-07-18 21:57:56 -04:00
Tim Chevalier
35bd579f66 Remove nonexistent imports 2012-07-18 18:32:34 -07:00
Patrick Walton
f48dcaaae3 rustc: Make vtable do duplicate-impl checking. Closes #2958. 2012-07-18 18:10:00 -07:00
Tim Chevalier
3119afc6e8 In resolve3, error on non-existent imports
Closes #2937
2012-07-18 18:02:07 -07:00
Tim Chevalier
de5d5e6eeb Remove non-existent imports 2012-07-18 18:02:07 -07:00
Patrick Walton
57e8de8917 rustc: Implement multiple-traits-per-impl for cross-crate stuff 2012-07-18 17:34:59 -07:00
Patrick Walton
635a959363 rustc: Make coherence aware of multiple-traits-per-impl 2012-07-18 17:08:42 -07:00
Ben Blum
5506bf1480 xfail issue-506 - broken on darwin 2012-07-18 19:55:18 -04:00
Ben Blum
829186cb79 vim: 'owned' keyword 2012-07-18 19:55:18 -04:00
Patrick Walton
9d34c706b2 rustc: Move ty::impl_traits over to a multiple-traits-per-impl world 2012-07-18 16:49:55 -07:00
Patrick Walton
3c583def25 rustc: Make resolve3 multiple-trait-per-impl-aware 2012-07-18 16:28:59 -07:00
Patrick Walton
3ac5b4a86f syntax: Parse multiple trait refs in a single implementation 2012-07-18 16:05:17 -07:00
Patrick Walton
1528256fdc rustc: Encode metadata unconditionally for impls/traits/classes. Closes #2945. 2012-07-18 14:43:16 -07:00