]> git.lizzy.rs Git - rust.git/log
rust.git
11 years agostd: add #[bench] benchmarks for global and local heaps.
Graydon Hoare [Mon, 22 Jul 2013 18:42:47 +0000 (11:42 -0700)]
std: add #[bench] benchmarks for global and local heaps.

11 years agostd: add preliminary str benchmark.
Graydon Hoare [Mon, 22 Jul 2013 17:52:38 +0000 (10:52 -0700)]
std: add preliminary str benchmark.

11 years agostd: add #[cfg(test)] reference to extra so we can benchmark libstd.
Graydon Hoare [Mon, 22 Jul 2013 16:49:04 +0000 (09:49 -0700)]
std: add #[cfg(test)] reference to extra so we can benchmark libstd.

11 years agort: Fix child-iteration bug in crate map.
Graydon Hoare [Mon, 22 Jul 2013 16:48:22 +0000 (09:48 -0700)]
rt: Fix child-iteration bug in crate map.

11 years agoauto merge of #7943 : Dretch/rust/vec-slice-from-to, r=huonw
bors [Mon, 22 Jul 2013 20:49:34 +0000 (13:49 -0700)]
auto merge of #7943 : Dretch/rust/vec-slice-from-to, r=huonw

11 years agoauto merge of #7942 : Dretch/rust/os-listdir-path-no-squiggle, r=brson
bors [Mon, 22 Jul 2013 19:01:41 +0000 (12:01 -0700)]
auto merge of #7942 : Dretch/rust/os-listdir-path-no-squiggle, r=brson

11 years agoauto merge of #7940 : cmr/rust/comments, r=pnkfelix
bors [Mon, 22 Jul 2013 17:07:34 +0000 (10:07 -0700)]
auto merge of #7940 : cmr/rust/comments, r=pnkfelix

11 years agoauto merge of #7903 : michaelwoerister/rust/end_of_spanned, r=jdm
bors [Mon, 22 Jul 2013 15:19:32 +0000 (08:19 -0700)]
auto merge of #7903 : michaelwoerister/rust/end_of_spanned, r=jdm

Continuation of https://github.com/mozilla/rust/pull/7826.

AST spanned<T> refactoring, AST type renamings:

`crate => Crate`
`local => Local`
`blk => Block`
`crate_num => CrateNum`
`crate_cfg => CrateConfig`
`field => Field`

Also, Crate, Field and Local are not wrapped in spanned<T> anymore.

11 years agoDe-spanned<T> and renamed ast::field (now ast::Field)
Michael Woerister [Fri, 19 Jul 2013 14:24:22 +0000 (16:24 +0200)]
De-spanned<T> and renamed ast::field (now ast::Field)

11 years agoAst spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.
Michael Woerister [Fri, 19 Jul 2013 05:38:55 +0000 (07:38 +0200)]
Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.

`crate => Crate`
`local => Local`
`blk => Block`
`crate_num => CrateNum`
`crate_cfg => CrateConfig`

Also, Crate and Local are not wrapped in spanned<T> anymore.

11 years agoauto merge of #7941 : dotdash/rust/codegen, r=huonw
bors [Mon, 22 Jul 2013 13:28:35 +0000 (06:28 -0700)]
auto merge of #7941 : dotdash/rust/codegen, r=huonw

These changes remove unnecessary basic blocks and the associated branches from
the LLVM IR that we emit. Together, they reduce the time for unoptimized builds
in stage2 by about 10% on my box.

11 years agoauto merge of #7926 : brson/rust/issue-4116, r=graydon
bors [Mon, 22 Jul 2013 11:37:36 +0000 (04:37 -0700)]
auto merge of #7926 : brson/rust/issue-4116, r=graydon

When loading a module the parser will look for either foo.rs or foo/mod.rs and generate
an error when both are found.

11 years agoauto merge of #7957 : alexcrichton/rust/ignore-warnings, r=thestinger
bors [Mon, 22 Jul 2013 09:49:36 +0000 (02:49 -0700)]
auto merge of #7957 : alexcrichton/rust/ignore-warnings, r=thestinger

The new snapshot now enables this.

11 years agoAllow all warnings in stage0 to account for bugs
Alex Crichton [Mon, 22 Jul 2013 07:30:32 +0000 (00:30 -0700)]
Allow all warnings in stage0 to account for bugs

11 years agoauto merge of #7955 : thestinger/rust/snapshot, r=huonw
bors [Mon, 22 Jul 2013 05:34:36 +0000 (22:34 -0700)]
auto merge of #7955 : thestinger/rust/snapshot, r=huonw

11 years agotemporarily disable 3 rustpkg tests
Daniel Micay [Mon, 22 Jul 2013 05:00:00 +0000 (01:00 -0400)]
temporarily disable 3 rustpkg tests

Re-enabling these when the ephemeral failures are fixed is filed as
issue #7956.

11 years agonew snapshot
Daniel Micay [Mon, 22 Jul 2013 04:06:29 +0000 (00:06 -0400)]
new snapshot

11 years agoauto merge of #7938 : crabtw/rust/foreign-vis, r=huonw
bors [Mon, 22 Jul 2013 03:46:33 +0000 (20:46 -0700)]
auto merge of #7938 : crabtw/rust/foreign-vis, r=huonw

11 years agoMerge pull request #7936 from thestinger/cleanup
Daniel Micay [Mon, 22 Jul 2013 03:04:15 +0000 (20:04 -0700)]
Merge pull request #7936 from thestinger/cleanup

rm obsolete no-op lints

11 years agosyntax: Bless mod.rs. #4116
Brian Anderson [Sat, 20 Jul 2013 02:11:30 +0000 (19:11 -0700)]
syntax: Bless mod.rs. #4116

When loading a module the parser will look for either foo.rs or foo/mod.rs and generate
an error when both are found.

11 years agoauto merge of #7932 : blake2-ppc/rust/str-clear, r=huonw
bors [Sun, 21 Jul 2013 22:28:38 +0000 (15:28 -0700)]
auto merge of #7932 : blake2-ppc/rust/str-clear, r=huonw

~str and @str need separate implementations for use in generic
functions, where it will not automatically use the impl on &str.

fixes issue #7900

11 years agoauto merge of #7923 : alexcrichton/rust/add-tests, r=graydon
bors [Sun, 21 Jul 2013 20:07:45 +0000 (13:07 -0700)]
auto merge of #7923 : alexcrichton/rust/add-tests, r=graydon

Closes #5275, #4547

11 years agoauto merge of #7921 : bytewiseand/rust/smallint-iter, r=huonw
bors [Sun, 21 Jul 2013 18:22:38 +0000 (11:22 -0700)]
auto merge of #7921 : bytewiseand/rust/smallint-iter, r=huonw

Made the `iter` and `mut_iter` methods on SmallIntMap and SmallIntSet return double-ended-iterators. These iterators now implement `size_hint`.

Also the iterator tests only tested dense maps/sets, which aren't very useful. So they were changed to iterate over sparse maps/sets.

Fixes #7721

11 years agoRemove what appears to be redundant indirection from
Gareth Smith [Sun, 21 Jul 2013 17:33:29 +0000 (18:33 +0100)]
Remove what appears to be redundant indirection from
os::list_dir_path.

11 years agoAvoid blocks for static allocas and loading the closure environment
Björn Steinbrink [Sun, 21 Jul 2013 14:19:34 +0000 (16:19 +0200)]
Avoid blocks for static allocas and loading the closure environment

These blocks were required because previously we could only insert
instructions at the end of blocks, but we wanted to have all allocas in
one place, so they can be collapse. But now we have "direct" access the
the LLVM IR builder and can position it freely. This allows us to use
the same trick that clang uses, which means that we insert a dummy
"marker" instruction to identify the spot at which we want to insert
allocas. We can then later position the IR builder at that spot and
insert the alloca instruction, without any dedicated block.

The block for loading the closure environment can now also go away,
because the function context now provides the toplevel block, and the
translation of the loading happens first, so that's good enough.

Makes the LLVM IR a bit more readable, saving a bunch of branches in the
unoptimized code, which benefits unoptimized builds.

11 years agoProvide lower level access to the LLVM IR builder
Björn Steinbrink [Sun, 21 Jul 2013 13:33:40 +0000 (15:33 +0200)]
Provide lower level access to the LLVM IR builder

Currently, the helper functions in the "build" module can only append
at the end of a block. For certain things we'll want to be able to
insert code at arbitrary locations inside a block though. Although can
we do that by directly calling the LLVM functions, that is rather ugly
and means that somethings need to be implemented twice. Once in terms
of the helper functions and once in terms of low level LLVM functions.

Instead of doing that, we should provide a Builder type that provides
low level access to the builder, and which can be used by both, the
helper functions in the "build" module, as well larger units of
abstractions that combine several LLVM instructions.

11 years agoRemove an unnecessary block/jump from the drop glue for @-pointer
Björn Steinbrink [Thu, 18 Jul 2013 18:45:01 +0000 (20:45 +0200)]
Remove an unnecessary block/jump from the drop glue for @-pointer

The nested with_cond calls each introduce a "next" block, with the
inner one just jumping to the outer one.

11 years agoAvoid creating llenv blocks when there's nothing to load
Björn Steinbrink [Wed, 17 Jul 2013 19:59:58 +0000 (21:59 +0200)]
Avoid creating llenv blocks when there's nothing to load

Currently, all closures have an llenv block to load values from the
captured environment, but for closure that don't actually capture
anything, that block is useless and can be skipped.

11 years agoAdd slice_from and slice_to methods for vec, like the
Gareth Smith [Sun, 21 Jul 2013 13:39:01 +0000 (14:39 +0100)]
Add slice_from and slice_to methods for vec, like the
methods of the same names that already exist for strs.

11 years agoDoc for ast::Path
Corey Richardson [Thu, 18 Jul 2013 11:12:07 +0000 (07:12 -0400)]
Doc for ast::Path

11 years agosyntax: print visibilities of foreign items
Jyun-Yan You [Sun, 21 Jul 2013 07:35:02 +0000 (15:35 +0800)]
syntax: print visibilities of foreign items

11 years agoauto merge of #7913 : brson/rust/rm-install-snap, r=graydon
bors [Sun, 21 Jul 2013 06:55:27 +0000 (23:55 -0700)]
auto merge of #7913 : brson/rust/rm-install-snap, r=graydon

11 years agoauto merge of #7912 : graydon/rust/extra-new-benchmarks-1, r=catamorphism
bors [Sun, 21 Jul 2013 05:10:28 +0000 (22:10 -0700)]
auto merge of #7912 : graydon/rust/extra-new-benchmarks-1, r=catamorphism

This adds new #[bench] benchmarks for extra::smallintmap, treemap, sha1, sha256 and 512, and base64. Also fixes a bunch of warnings in bitv.

11 years agoauto merge of #7902 : huonw/rust/attr++, r=cmr,pcwalton
bors [Sun, 21 Jul 2013 03:25:31 +0000 (20:25 -0700)]
auto merge of #7902 : huonw/rust/attr++, r=cmr,pcwalton

This does a number of things, but especially dramatically reduce the
number of allocations performed for operations involving attributes/
meta items:

- Converts ast::meta_item & ast::attribute and other associated enums
  to CamelCase.
- Converts several standalone functions in syntax::attr into methods,
  defined on two traits AttrMetaMethods & AttributeMethods. The former
  is common to both MetaItem and Attribute since the latter is a thin
  wrapper around the former.
- Deletes functions that are unnecessary due to iterators.
- Converts other standalone functions to use iterators and the generic
  AttrMetaMethods rather than allocating a lot of new vectors (e.g. the
  old code would have to allocate a new vector to use functions that
  operated on &[meta_item] on &[attribute].)
- Moves the core algorithm of the #[cfg] matching to syntax::attr,
  similar to find_inline_attr and find_linkage_metas.

This doesn't have much of an effect on the speed of #[cfg] stripping,
despite hugely reducing the number of allocations performed; presumably
most of the time is spent in the ast folder rather than doing attribute
checks.

Also fixes the Eq instance of MetaItem_ to correctly ignore spans, so
that `rustc --cfg 'foo(bar)'` now works.

11 years agoauto merge of #7896 : pcwalton/rust/pub-extern, r=pcwalton
bors [Sun, 21 Jul 2013 01:40:39 +0000 (18:40 -0700)]
auto merge of #7896 : pcwalton/rust/pub-extern, r=pcwalton

r? @nikomatsakis

11 years agolibrustc: Remove `pub extern` and `priv extern` from the language.
Patrick Walton [Fri, 19 Jul 2013 02:08:57 +0000 (19:08 -0700)]
librustc: Remove `pub extern` and `priv extern` from the language.

Place `pub` or `priv` on individual items instead.

11 years agorm obsolete no-op lints
Daniel Micay [Sat, 20 Jul 2013 23:59:58 +0000 (19:59 -0400)]
rm obsolete no-op lints

11 years agoauto merge of #7882 : blake2-ppc/rust/iterator-clone, r=thestinger
bors [Sat, 20 Jul 2013 23:58:30 +0000 (16:58 -0700)]
auto merge of #7882 : blake2-ppc/rust/iterator-clone, r=thestinger

Implement method .cycle() that repeats an iterator endlessly

Implement Clone for simple iterators (without closures), including VecIterator.

> The theory is simple, the immutable iterators simply hold state
> variables (indicies or pointers) into frozen containers. We can freely
> clone these iterators, just like we can clone borrowed pointers.

11 years agoauto merge of #7910 : brson/rust/rm-fixme, r=graydon
bors [Sat, 20 Jul 2013 22:16:33 +0000 (15:16 -0700)]
auto merge of #7910 : brson/rust/rm-fixme, r=graydon

11 years agoauto merge of #7908 : anasazi/rust/fix_udp_mut, r=brson
bors [Sat, 20 Jul 2013 20:31:34 +0000 (13:31 -0700)]
auto merge of #7908 : anasazi/rust/fix_udp_mut, r=brson

11 years agodlist: Implement Clone for immutable iterators
blake2-ppc [Thu, 18 Jul 2013 16:46:37 +0000 (18:46 +0200)]
dlist: Implement Clone for immutable iterators

11 years agostd: Implement Clone for VecIterator and iterators using it
blake2-ppc [Thu, 18 Jul 2013 15:38:17 +0000 (17:38 +0200)]
std: Implement Clone for VecIterator and iterators using it

The theory is simple, the immutable iterators simply hold state
variables (indicies or pointers) into frozen containers. We can freely
clone these iterators, just like we can clone borrowed pointers.

VecIterator needs a manual impl to handle the lifetime struct member.

11 years agoiterator: Add test for .cycle()
blake2-ppc [Thu, 18 Jul 2013 15:34:28 +0000 (17:34 +0200)]
iterator: Add test for .cycle()

11 years agoiterator: Let closure-less iterators derive Clone
blake2-ppc [Thu, 18 Jul 2013 15:31:33 +0000 (17:31 +0200)]
iterator: Let closure-less iterators derive Clone

11 years agoiterator: Add .cycle() to repeat an iterator
blake2-ppc [Thu, 18 Jul 2013 15:09:08 +0000 (17:09 +0200)]
iterator: Add .cycle() to repeat an iterator

11 years agoauto merge of #7894 : pcwalton/rust/and-pointers-in-at-boxes, r=brson
bors [Sat, 20 Jul 2013 17:55:34 +0000 (10:55 -0700)]
auto merge of #7894 : pcwalton/rust/and-pointers-in-at-boxes, r=brson

r? @brson

11 years agostr: Implement Container for ~str, @str and Mutable for ~str
blake2-ppc [Sat, 20 Jul 2013 17:28:38 +0000 (19:28 +0200)]
str: Implement Container for ~str, @str and Mutable for ~str

~str and @str need separate implementations for use in generic
functions, where it will not automatically use the impl on &str.

11 years agoauto merge of #7710 : michaelwoerister/rust/WP4, r=jdm
bors [Sat, 20 Jul 2013 16:10:34 +0000 (09:10 -0700)]
auto merge of #7710 : michaelwoerister/rust/WP4, r=jdm

This pull request includes various improvements:

+ Composite types (structs, tuples, boxes, etc) are now handled more cleanly by debuginfo generation. Most notably, field offsets are now extracted directly from LLVM types, as opposed to trying to reconstruct them. This leads to more stable handling of edge cases (e.g. packed structs or structs implementing drop).

+ `debuginfo.rs` in general has seen a major cleanup. This includes better formatting, more readable variable and function names, removal of dead code, and better factoring of functionality.

+ Handling of `VariantInfo` in `ty.rs` has been improved. That is, the `type VariantInfo = @VariantInfo_` typedef has been replaced with explicit uses of @VariantInfo, and the duplicated logic for creating VariantInfo instances in `ty::enum_variants()` and `typeck::check::mod::check_enum_variants()` has been unified into a single constructor function. Both function now look nicer too :)

+ Debug info generation for enum types is now mostly supported. This includes:
  + Good support for C-style enums. Both DWARF and `gdb` know how to handle them.
  + Proper description of tuple- and struct-style enum variants as unions of structs.
  + Proper handling of univariant enums without discriminator field.
  + Unfortunately `gdb` always prints all possible interpretations of a union, so debug output of enums is verbose and unintuitive. Neither `LLVM` nor `gdb` support DWARF's `DW_TAG_variant` which allows to properly describe tagged unions. Adding support for this to `LLVM` seems doable. `gdb` however is another story. In the future we might be able to use `gdb`'s Python scripting support to alleviate this problem. In agreement with @jdm this is not a high priority for now.

+ The debuginfo test suite has been extended with 14 test files including tests for packed structs (with Drop), boxed structs, boxed vecs, vec slices, c-style enums (standalone and embedded), empty enums, tuple- and struct-style enums, and various pointer types to the above.

~~What is not yet included is DI support for some enum edge-cases represented as described in `trans::adt::NullablePointer`.~~

Cheers,
Michael

PS: closes #7819,  fixes #7712

11 years agoauto merge of #7886 : msullivan/rust/default-methods, r=pcwalton
bors [Sat, 20 Jul 2013 14:28:36 +0000 (07:28 -0700)]
auto merge of #7886 : msullivan/rust/default-methods, r=pcwalton

This does a bunch of cleanup on the data structures for the trait system. (Unfortunately it doesn't remove `provided_method_sources`. Maybe later.)

It also changes how cross crate methods are handled, so that information about them is exported in metadata, instead of having the methods regenerated by every crate that imports an impl.

r? @nikomatsakis, maybe?

11 years agoauto merge of #7884 : pcwalton/rust/check-loans-and-inside-at, r=graydon
bors [Sat, 20 Jul 2013 12:43:38 +0000 (05:43 -0700)]
auto merge of #7884 : pcwalton/rust/check-loans-and-inside-at, r=graydon

r? @graydon

11 years agoauto merge of #7858 : bblum/rust/kill, r=brson
bors [Sat, 20 Jul 2013 10:55:39 +0000 (03:55 -0700)]
auto merge of #7858 : bblum/rust/kill, r=brson

Some notes about the commits.

Exit code propagation commits:
* ```Reimplement unwrap()``` has the same old code from ```arc::unwrap``` ported to use modern atomic types and finally (it's considerably nicer this way)
* ```Add try_unwrap()``` has some new slightly-tricky (but pretty simple) concurrency primitive code
* ```Add KillHandle``` and ```Add kill::Death``` are the bulk of the logic.

Task killing commits:
* ```Implement KillHandle::kill() and friends```, ```Do a task-killed check```, and ```Add BlockedTask``` implement the killing logic;
* ```Change the HOF context switchers``` turns said logic on

Linked failure commits:
* ```Replace *rust_task ptrs``` adapts the taskgroup code to work for both runtimes
* ```Enable taskgroup code``` does what it says on the tin.

r? @brson

11 years agoauto merge of #7419 : catamorphism/rust/default-package, r=graydon
bors [Sat, 20 Jul 2013 09:16:41 +0000 (02:16 -0700)]
auto merge of #7419 : catamorphism/rust/default-package, r=graydon

r? @brson `rustpkg build`, if executed in a package source directory inside
a workspace, will now build that package. By "inside a workspace"
I mean that the parent directory has to be called `src`, and rustpkg
will create a `build` directory in .. if there isn't already one.

Same goes for `rustpkg install` and `rustpkg clean`.

For the time being, `rustpkg build` (etc.) will still error out if
you run it inside a directory whose parent isn't called `src`.
I'm not sure whether or not it's desirable to have it do something
in a non-workspace directory.

11 years agoUse Option .take() or .take_unwrap() instead of util::replace where possible
blake2-ppc [Wed, 17 Jul 2013 21:41:50 +0000 (23:41 +0200)]
Use Option .take() or .take_unwrap() instead of util::replace where possible

11 years agoFix warnings in stdtest and extratest. Maybe somebody will care.
Ben Blum [Wed, 17 Jul 2013 21:01:03 +0000 (17:01 -0400)]
Fix warnings in stdtest and extratest. Maybe somebody will care.

11 years agoFix warnings in src/test/bench tests. Nobody will ever care.
Ben Blum [Wed, 17 Jul 2013 19:31:20 +0000 (15:31 -0400)]
Fix warnings in src/test/bench tests. Nobody will ever care.

11 years agoAdd watched and indestructible spawn modes.
Ben Blum [Tue, 16 Jul 2013 21:28:46 +0000 (17:28 -0400)]
Add watched and indestructible spawn modes.

11 years agoRename TCB to Taskgroup
Ben Blum [Tue, 16 Jul 2013 17:42:12 +0000 (13:42 -0400)]
Rename TCB to Taskgroup

11 years agoEnable taskgroup code for newsched spawns.
Ben Blum [Mon, 15 Jul 2013 19:32:35 +0000 (15:32 -0400)]
Enable taskgroup code for newsched spawns.

11 years agoFix linked failure tests to block forever instead of looping around yield.
Ben Blum [Tue, 16 Jul 2013 01:28:37 +0000 (21:28 -0400)]
Fix linked failure tests to block forever instead of looping around yield.

11 years ago(cleanup) impl TaskSet
Ben Blum [Mon, 15 Jul 2013 18:27:33 +0000 (14:27 -0400)]
(cleanup) impl TaskSet

11 years ago(cleanup) Don't check taskgroup generation monotonicity unless cfg(test).
Ben Blum [Mon, 15 Jul 2013 18:08:25 +0000 (14:08 -0400)]
(cleanup) Don't check taskgroup generation monotonicity unless cfg(test).

11 years ago(cleanup) Modernize taskgroup code for the new borrow-checker.
Ben Blum [Mon, 15 Jul 2013 17:59:17 +0000 (13:59 -0400)]
(cleanup) Modernize taskgroup code for the new borrow-checker.

11 years agoReplace *rust_task ptrs in taskgroup code with TaskHandle, for transitioning to newsc...
Ben Blum [Sat, 13 Jul 2013 02:45:19 +0000 (22:45 -0400)]
Replace *rust_task ptrs in taskgroup code with TaskHandle, for transitioning to newsched killing.

11 years agoAdd option::take(), the building block of the option::take_* family.
Ben Blum [Sat, 13 Jul 2013 02:40:57 +0000 (22:40 -0400)]
Add option::take(), the building block of the option::take_* family.

11 years agoStash a spare kill flag inside tasks, to save two atomic xadds in the blocking fastpath.
Ben Blum [Fri, 12 Jul 2013 02:14:54 +0000 (22:14 -0400)]
Stash a spare kill flag inside tasks, to save two atomic xadds in the blocking fastpath.

11 years agoAdd tests for task killing and blocking.
Ben Blum [Thu, 11 Jul 2013 23:43:02 +0000 (19:43 -0400)]
Add tests for task killing and blocking.

11 years agoAdd test::with_test_task() convenience function.
Ben Blum [Thu, 11 Jul 2013 23:42:40 +0000 (19:42 -0400)]
Add test::with_test_task() convenience function.

11 years agoChange the HOF context switchers to pass a BlockedTask instead of a ~Task.
Ben Blum [Thu, 11 Jul 2013 18:29:33 +0000 (14:29 -0400)]
Change the HOF context switchers to pass a BlockedTask instead of a ~Task.

11 years agoAdd BlockedTask (wake, try_block, etc) in kill.rs.
Ben Blum [Thu, 11 Jul 2013 18:22:13 +0000 (14:22 -0400)]
Add BlockedTask (wake, try_block, etc) in kill.rs.

11 years agoDo a task-killed check at the start of task 'timeslices'.
Ben Blum [Mon, 8 Jul 2013 23:31:32 +0000 (19:31 -0400)]
Do a task-killed check at the start of task 'timeslices'.

11 years agoImplement KillHandle::kill() and friends (unkillable, atomically). Close #6377.
Ben Blum [Mon, 8 Jul 2013 17:48:57 +0000 (13:48 -0400)]
Implement KillHandle::kill() and friends (unkillable, atomically). Close #6377.

11 years agoAdd tests for KillHandle
Ben Blum [Wed, 3 Jul 2013 18:30:56 +0000 (14:30 -0400)]
Add tests for KillHandle

11 years agoRemove join_latch
Ben Blum [Tue, 2 Jul 2013 21:55:54 +0000 (17:55 -0400)]
Remove join_latch

11 years agoAdd kill::Death for task death services and use it in Task.
Ben Blum [Tue, 2 Jul 2013 03:24:24 +0000 (23:24 -0400)]
Add kill::Death for task death services and use it in Task.

11 years agoAdd KillHandle and implement exit code propagation to replace join_latch
Ben Blum [Wed, 3 Jul 2013 01:15:34 +0000 (21:15 -0400)]
Add KillHandle and implement exit code propagation to replace join_latch

11 years agoAdd UnsafeAtomicRcBox::try_unwrap()
Ben Blum [Tue, 2 Jul 2013 18:13:52 +0000 (14:13 -0400)]
Add UnsafeAtomicRcBox::try_unwrap()

11 years agoReimplement ARC::unwrap() and friends.
Ben Blum [Tue, 2 Jul 2013 17:37:19 +0000 (13:37 -0400)]
Reimplement ARC::unwrap() and friends.

11 years agoAdd AtomicOption::fill() and AtomicOption::is_empty()
Ben Blum [Tue, 2 Jul 2013 17:13:07 +0000 (13:13 -0400)]
Add AtomicOption::fill() and AtomicOption::is_empty()

11 years agoRemove redundant Atomic{Ui,I}nt types from unstable::sync
Ben Blum [Tue, 2 Jul 2013 17:46:04 +0000 (13:46 -0400)]
Remove redundant Atomic{Ui,I}nt types from unstable::sync

11 years agoAdd Option::take_map{,_default}()
Ben Blum [Tue, 2 Jul 2013 21:47:38 +0000 (17:47 -0400)]
Add Option::take_map{,_default}()

11 years agoAdd Either::expect_{left,right}
Ben Blum [Tue, 2 Jul 2013 18:35:41 +0000 (14:35 -0400)]
Add Either::expect_{left,right}

11 years agodebuginfo: Removed some test relying on data structure sizes hard to predict for...
Michael Woerister [Sat, 20 Jul 2013 08:47:24 +0000 (10:47 +0200)]
debuginfo: Removed some test relying on data structure sizes hard to predict for all possible platforms and configurations.

11 years agoauto merge of #7855 : brson/rust/rt-overcommit, r=pcwalton
bors [Sat, 20 Jul 2013 07:37:42 +0000 (00:37 -0700)]
auto merge of #7855 : brson/rust/rt-overcommit, r=pcwalton

Too much overcommit here exhausts the low fd limit on OS X.

11 years agoMerge pull request #7897 from thestinger/double
Daniel Micay [Sat, 20 Jul 2013 03:25:46 +0000 (20:25 -0700)]
Merge pull request #7897 from thestinger/double

rollup of small pull requests

404de4f r=huonw
0cdb0a2 r=pcwalton
b082302 r=sanxiyn
b6a0138 r=huonw
8d64fa3 r=graydon
ddd8c15 r=thestinger
eb74f0c r=thestinger

11 years agoAdd tests for issues which can be closed
Alex Crichton [Sat, 20 Jul 2013 02:01:46 +0000 (19:01 -0700)]
Add tests for issues which can be closed

Closes #5275, $4547

11 years agoAdded a new method to extra::future (unwrap) + a test
Matthijs Hofstra [Sat, 20 Jul 2013 01:02:38 +0000 (03:02 +0200)]
Added a new method to extra::future (unwrap) + a test

11 years agostd: Remove old magic core mod
Brian Anderson [Sat, 20 Jul 2013 00:32:08 +0000 (17:32 -0700)]
std: Remove old magic core mod

11 years agoReorganize README to make it more clear.
Jack Moffitt [Thu, 18 Jul 2013 23:27:43 +0000 (17:27 -0600)]
Reorganize README to make it more clear.

This also adds a note about required memory usage and instructions for
building from Git.

11 years agoPR #7637 followup: no need to print the set of removed files twice.
Felix S. Klock II [Thu, 18 Jul 2013 07:43:19 +0000 (09:43 +0200)]
PR #7637 followup: no need to print the set of removed files twice.

11 years agoupdated manual
maikklein [Thu, 18 Jul 2013 22:35:51 +0000 (00:35 +0200)]
updated manual

11 years agoremove dead take glue code paths
Daniel Micay [Fri, 19 Jul 2013 17:55:12 +0000 (13:55 -0400)]
remove dead take glue code paths

Closes #7888

11 years agoiterator: impl DoubleEndedIterator for adaptors
Daniel Micay [Thu, 18 Jul 2013 23:50:51 +0000 (19:50 -0400)]
iterator: impl DoubleEndedIterator for adaptors

11 years agosmallint{map,set}: replace iterators with DoubleEndedIterator
Andreas Martens [Sat, 20 Jul 2013 00:29:54 +0000 (02:29 +0200)]
smallint{map,set}: replace iterators with DoubleEndedIterator

Also changed the tests to iterate over sparse maps/sets.

11 years agomk: Remove CFG_INSTALL_SNAP logic. #2664
Brian Anderson [Fri, 19 Jul 2013 22:35:42 +0000 (15:35 -0700)]
mk: Remove CFG_INSTALL_SNAP logic. #2664

11 years agoextra: add some microbenchmarks
Graydon Hoare [Fri, 19 Jul 2013 21:07:00 +0000 (14:07 -0700)]
extra: add some microbenchmarks

11 years agostd::rt: Remove an obsolete FIXME. #7757
Brian Anderson [Fri, 19 Jul 2013 21:35:46 +0000 (14:35 -0700)]
std::rt: Remove an obsolete FIXME. #7757

11 years agostd::rt: Use a constant 4 threads for multithreaded sched tests. #7772
Brian Anderson [Wed, 17 Jul 2013 17:51:54 +0000 (10:51 -0700)]
std::rt: Use a constant 4 threads for multithreaded sched tests. #7772

Too much overcommit here exhausts the low fd limit on OS X.

11 years agoMissed the methods of UdpWatcher.
Eric Reed [Fri, 19 Jul 2013 20:00:57 +0000 (13:00 -0700)]
Missed the methods of UdpWatcher.

11 years agoChanged methods on UDP sockets and TCP/UDP watchers to &mut self to reflect that...
Eric Reed [Wed, 17 Jul 2013 22:16:44 +0000 (15:16 -0700)]
Changed methods on UDP sockets and TCP/UDP watchers to &mut self to reflect that libuv may change the underlying handle.

11 years agosyntax: modernise attribute handling in syntax::attr.
Huon Wilson [Fri, 19 Jul 2013 11:51:37 +0000 (21:51 +1000)]
syntax: modernise attribute handling in syntax::attr.

This does a number of things, but especially dramatically reduce the
number of allocations performed for operations involving attributes/
meta items:

- Converts ast::meta_item & ast::attribute and other associated enums
  to CamelCase.
- Converts several standalone functions in syntax::attr into methods,
  defined on two traits AttrMetaMethods & AttributeMethods. The former
  is common to both MetaItem and Attribute since the latter is a thin
  wrapper around the former.
- Deletes functions that are unnecessary due to iterators.
- Converts other standalone functions to use iterators and the generic
  AttrMetaMethods rather than allocating a lot of new vectors (e.g. the
  old code would have to allocate a new vector to use functions that
  operated on &[meta_item] on &[attribute].)
- Moves the core algorithm of the #[cfg] matching to syntax::attr,
  similar to find_inline_attr and find_linkage_metas.

This doesn't have much of an effect on the speed of #[cfg] stripping,
despite hugely reducing the number of allocations performed; presumably
most of the time is spent in the ast folder rather than doing attribute
checks.

Also fixes the Eq instance of MetaItem_ to correctly ignore spaces, so
that `rustc --cfg 'foo(bar)'` now works.