]> git.lizzy.rs Git - rust.git/log
rust.git
11 years agoexpand on double-ended iterators in the tutorial
Daniel Micay [Tue, 23 Jul 2013 18:37:06 +0000 (14:37 -0400)]
expand on double-ended iterators in the tutorial

11 years agoadd a RandomAccessIterator trait
Daniel Micay [Tue, 23 Jul 2013 00:11:24 +0000 (20:11 -0400)]
add a RandomAccessIterator trait

11 years agoauto merge of #7992 : huonw/rust/un-xfail, r=z0w0
bors [Wed, 24 Jul 2013 11:22:36 +0000 (04:22 -0700)]
auto merge of #7992 : huonw/rust/un-xfail, r=z0w0

...(they still don't work).

11 years agoauto merge of #7987 : alexcrichton/rust/tests-for-closed-issues, r=huonw
bors [Wed, 24 Jul 2013 08:34:38 +0000 (01:34 -0700)]
auto merge of #7987 : alexcrichton/rust/tests-for-closed-issues, r=huonw

Closes #5844

11 years agoauto merge of #7980 : graydon/rust/misc-benchmarks, r=catamorphism
bors [Wed, 24 Jul 2013 05:46:39 +0000 (22:46 -0700)]
auto merge of #7980 : graydon/rust/misc-benchmarks, r=catamorphism

Some machinery for enabling #[bench] benchmarks in std and some examples showing how to write them.

11 years agoauto merge of #7958 : kemurphy/rust/link-section, r=alexcrichton
bors [Wed, 24 Jul 2013 03:04:53 +0000 (20:04 -0700)]
auto merge of #7958 : kemurphy/rust/link-section, r=alexcrichton

This allows for control over the section placement of static, static
mut, and fn items.  One caveat is that if a static and a static mut are
placed in the same section, the static is declared first, and the static
mut is assigned to, the generated program crashes.  For example:

#[link_section=".boot"]
static foo : uint = 0xdeadbeef;

#[link_section=".boot"]
static mut bar : uint = 0xcafebabe;

Declaring bar first would mark .bootdata as writable, preventing the
crash when bar is written to.

11 years agoauto merge of #7885 : graydon/rust/workcache-fixes-1, r=pcwalton
bors [Wed, 24 Jul 2013 00:49:54 +0000 (17:49 -0700)]
auto merge of #7885 : graydon/rust/workcache-fixes-1, r=pcwalton

This just redoes various parts of workcache to support context-cloning (eventually quite crudely, via ARCs), the absence of which was blocking rustpkg from being able to use it. Better versions of this are possible (notably removing the ARCs on everything except the database) but it ought to work well enough for now.

11 years agostd: wrap "long" utf8 lines.
Graydon Hoare [Tue, 23 Jul 2013 23:02:14 +0000 (16:02 -0700)]
std: wrap "long" utf8 lines.

11 years agoextra: rebase fallout.
Graydon Hoare [Tue, 23 Jul 2013 22:59:24 +0000 (15:59 -0700)]
extra: rebase fallout.

11 years agoauto merge of #7964 : pnkfelix/rust/fsk-issue3994-readme-note, r=huonw
bors [Tue, 23 Jul 2013 22:40:53 +0000 (15:40 -0700)]
auto merge of #7964 : pnkfelix/rust/fsk-issue3994-readme-note, r=huonw

See #3994.

11 years agoextra: give up trying to make more fields of context cloneable, just use ARCs.
Graydon Hoare [Thu, 18 Jul 2013 20:05:18 +0000 (13:05 -0700)]
extra: give up trying to make more fields of context cloneable, just use ARCs.

11 years agoextra: switch json from hashmaps to treemaps
Graydon Hoare [Thu, 18 Jul 2013 19:37:40 +0000 (12:37 -0700)]
extra: switch json from hashmaps to treemaps

11 years agoextra: add consume iter to treemap.
Graydon Hoare [Thu, 18 Jul 2013 19:37:18 +0000 (12:37 -0700)]
extra: add consume iter to treemap.

11 years agoextra: clean up workcache to use & in place of @ most places.
Graydon Hoare [Thu, 18 Jul 2013 04:12:36 +0000 (21:12 -0700)]
extra: clean up workcache to use & in place of @ most places.

11 years agoextra: remove a @ in workcache config.
Graydon Hoare [Wed, 17 Jul 2013 23:41:35 +0000 (16:41 -0700)]
extra: remove a @ in workcache config.

11 years agoextra: change workcache::Work::unwrap to move out of self.
Graydon Hoare [Wed, 17 Jul 2013 23:33:38 +0000 (16:33 -0700)]
extra: change workcache::Work::unwrap to move out of self.

11 years agoextra: access workcache db via RWARC.
Graydon Hoare [Wed, 17 Jul 2013 23:18:43 +0000 (16:18 -0700)]
extra: access workcache db via RWARC.

11 years agoextra: use deriving more in workcache, switch to treemaps.
Graydon Hoare [Wed, 17 Jul 2013 23:10:11 +0000 (16:10 -0700)]
extra: use deriving more in workcache, switch to treemaps.

11 years agoAdd simple link_section test to exercise it
Kevin Murphy [Tue, 23 Jul 2013 21:23:22 +0000 (17:23 -0400)]
Add simple link_section test to exercise it

11 years agoauto merge of #7954 : zslayton/rust/master, r=huonw
bors [Tue, 23 Jul 2013 20:19:56 +0000 (13:19 -0700)]
auto merge of #7954 : zslayton/rust/master, r=huonw

fixes #7689

11 years agoauto merge of #7848 : michaelwoerister/rust/trans_cleanup_1, r=jdm
bors [Tue, 23 Jul 2013 18:10:47 +0000 (11:10 -0700)]
auto merge of #7848 : michaelwoerister/rust/trans_cleanup_1, r=jdm

The following types are renamed:
```rust
block_ => Block
block => @mut Block

fn_ctx_ => FunctionContext
fn_ctx => @mut FunctionContext

scope_info => ScopeInfo
```
I also tried to convert instances of `@mut` to `&mut` or `&` but a lot of them are blocked by issue #6268, so I left it for some time later.

11 years agoAdapted `trans::common::{block, fn_ctxt, scope_info}` to new naming convention.
Michael Woerister [Wed, 17 Jul 2013 10:12:08 +0000 (12:12 +0200)]
Adapted `trans::common::{block, fn_ctxt, scope_info}` to new naming convention.

11 years agoauto merge of #7944 : blake2-ppc/rust/dlist-move-nodes, r=bblum
bors [Tue, 23 Jul 2013 11:46:41 +0000 (04:46 -0700)]
auto merge of #7944 : blake2-ppc/rust/dlist-move-nodes, r=bblum

Factor out internal methods to pop/push list nodes so that .merge() and .rotate_to_front(), .rotate_to_back() (new methods) can be implemented without allocating nodes.

With that, some cleanup changes to DList use of Option, and adding a missing Encodable implementation.

11 years agoauto merge of #7934 : sfackler/rust/smallintset, r=alexcrichton
bors [Tue, 23 Jul 2013 10:04:39 +0000 (03:04 -0700)]
auto merge of #7934 : sfackler/rust/smallintset, r=alexcrichton

SmallIntSet is equivalent to BitvSet but with 64 times the memory
overhead. There's no reason for it to exist.

SmallIntSet's overhead should really only be 8 times, but for some
reason, `sys::size_of::<Option<()>>() == 8`, not 1.

11 years agotest/run-fail: Un-xfail a test, make some other xfailed ones compile (they still...
Huon Wilson [Tue, 23 Jul 2013 08:55:15 +0000 (18:55 +1000)]
test/run-fail: Un-xfail a test, make some other xfailed ones compile (they still don't work).

11 years agoauto merge of #7875 : sstewartgallus/rust/fubar, r=alexcrichton
bors [Tue, 23 Jul 2013 06:13:41 +0000 (23:13 -0700)]
auto merge of #7875 : sstewartgallus/rust/fubar, r=alexcrichton

11 years agoAdd a test for #5844 (a closed issue now)
Alex Crichton [Tue, 23 Jul 2013 04:48:41 +0000 (21:48 -0700)]
Add a test for #5844 (a closed issue now)

11 years agoauto merge of #7873 : sstewartgallus/rust/cleanup_syntax, r=alexcrichton
bors [Tue, 23 Jul 2013 03:58:35 +0000 (20:58 -0700)]
auto merge of #7873 : sstewartgallus/rust/cleanup_syntax, r=alexcrichton

11 years agoAdd link_section attribute for static and fn items
Kevin Murphy [Tue, 23 Jul 2013 02:34:04 +0000 (22:34 -0400)]
Add link_section attribute for static and fn items

This allows for control over the section placement of static, static
mut, and fn items.  One caveat is that if a static and a static mut are
placed in the same section, the static is declared first, and the static
mut is assigned to, the generated program crashes.  For example:

#[link_section=".boot"]
static foo : uint = 0xdeadbeef;

#[link_section=".boot"]
static mut bar : uint = 0xcafebabe;

Declaring bar first would mark .bootdata as writable, preventing the
crash when bar is written to.

11 years agoauto merge of #7703 : sfackler/rust/bitv, r=alexcrichton
bors [Tue, 23 Jul 2013 02:13:39 +0000 (19:13 -0700)]
auto merge of #7703 : sfackler/rust/bitv, r=alexcrichton

Switched Bitv and BitvSet to external iterators. They still use some internal iterators internally (ha).

Derived clone for all Bitv types.

Removed indirection in BitvVariant. It previously held a unique pointer to the appropriate Bitv struct, even though those structs are the size of a pointer themselves. BitvVariant is the same size (16 bytes) as it was previously.

11 years agoauto merge of #7916 : olsonjeffery/rust/newrt_timer, r=brson
bors [Tue, 23 Jul 2013 00:28:35 +0000 (17:28 -0700)]
auto merge of #7916 : olsonjeffery/rust/newrt_timer, r=brson

My first bit of newsched IO work. Pretty simple and limited in scope.

the RtioTimer trait only has a `sleep(msecs: u64)` method, for now. Taking requests on what else ought to be here.

oh yeah: this resolves #6435

11 years agostd: various additional language benchmarks in util.
Graydon Hoare [Mon, 22 Jul 2013 23:50:36 +0000 (16:50 -0700)]
std: various additional language benchmarks in util.

11 years agostd: add benchmark for allocating-and-dropping a struct with a dtor.
Graydon Hoare [Mon, 22 Jul 2013 23:50:17 +0000 (16:50 -0700)]
std: add benchmark for allocating-and-dropping a struct with a dtor.

11 years agostd: add #[bench] benchmarks for num::strconv
Graydon Hoare [Mon, 22 Jul 2013 18:43:32 +0000 (11:43 -0700)]
std: add #[bench] benchmarks for num::strconv

11 years agostd: add #[bench] benchmarks for rand.
Graydon Hoare [Mon, 22 Jul 2013 18:43:12 +0000 (11:43 -0700)]
std: add #[bench] benchmarks for rand.

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 agodlist: Rename rotate methods to .rotate_forward() and .rotate_backward()
blake2-ppc [Mon, 22 Jul 2013 23:31:30 +0000 (01:31 +0200)]
dlist: Rename rotate methods to .rotate_forward() and .rotate_backward()

11 years agoauto merge of #7883 : brson/rust/rm-std-net, r=graydon
bors [Mon, 22 Jul 2013 22:40:36 +0000 (15:40 -0700)]
auto merge of #7883 : brson/rust/rm-std-net, r=graydon

This removes all the code from libextra that depends on libuv. After that it removes three runtime features that existed to support the global uv loop: weak tasks, runtime-global variables, and at_exit handlers.

The networking code doesn't have many users besides servo, so shouldn't have much fallout. The timer code though is useful and will probably break out-of-tree code until the new scheduler lands, but I expect that to be soon.

It also incidentally moves `os::change_dir_locked` to `std::unstable`. This is a function used by test cases to avoid cwd races and in my opinion shouldn't be public (#7870).

Closes #7251 and #7870

11 years agostd: fix for blocked task resume
Jeff Olson [Mon, 22 Jul 2013 22:28:32 +0000 (15:28 -0700)]
std: fix for blocked task resume

11 years agostd: Remove at_exit API. Unused
Brian Anderson [Thu, 18 Jul 2013 02:51:40 +0000 (19:51 -0700)]
std: Remove at_exit API. Unused

11 years agostd: Remove unstable::global. Unused
Brian Anderson [Thu, 18 Jul 2013 02:14:58 +0000 (19:14 -0700)]
std: Remove unstable::global. Unused

11 years agostd: Move change_dir_locked to unstable. #7870
Brian Anderson [Thu, 18 Jul 2013 01:59:29 +0000 (18:59 -0700)]
std: Move change_dir_locked to unstable. #7870

11 years agostd::rt: Stop using unstable::global in change_dir_locked
Brian Anderson [Thu, 18 Jul 2013 01:38:12 +0000 (18:38 -0700)]
std::rt: Stop using unstable::global in change_dir_locked

11 years agostd: Remove weak_task API. Unused
Brian Anderson [Thu, 18 Jul 2013 01:04:10 +0000 (18:04 -0700)]
std: Remove weak_task API. Unused

11 years agoextra: Add url module
Brian Anderson [Thu, 18 Jul 2013 00:47:20 +0000 (17:47 -0700)]
extra: Add url module

Used to be under extra::net, which no longer exists

11 years agoextra: Remove uv, net, timer code
Brian Anderson [Wed, 17 Jul 2013 22:14:34 +0000 (15:14 -0700)]
extra: Remove uv, net, timer code

This will all be reimplemented in the new runtime.

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 agostd: make check appeasement
Jeff Olson [Fri, 19 Jul 2013 23:24:07 +0000 (16:24 -0700)]
std: make check appeasement

11 years agostd: minor timer cleanup based on feedback
Jeff Olson [Fri, 19 Jul 2013 23:22:13 +0000 (16:22 -0700)]
std: minor timer cleanup based on feedback

11 years agostd: add rt::io::Timer
Jeff Olson [Fri, 19 Jul 2013 23:03:02 +0000 (16:03 -0700)]
std: add rt::io::Timer

11 years agostd: add RtioTimer and UvTimer impl atop rt::uv
Jeff Olson [Fri, 19 Jul 2013 23:02:38 +0000 (16:02 -0700)]
std: add RtioTimer and UvTimer impl atop rt::uv

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 agodlist: Fix .peek_next() w.r.t double ended iterators
blake2-ppc [Mon, 22 Jul 2013 15:51:11 +0000 (17:51 +0200)]
dlist: Fix .peek_next() w.r.t double ended iterators

.peek_next() needs to check the element counter just like the .next()
and .next_back() iterators do.

Also clarify .insert_next() doc w.r.t double ended iteration.

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 agoNote incompatibility with global-whitespace-mode.
Felix S. Klock II [Mon, 22 Jul 2013 10:27:46 +0000 (12:27 +0200)]
Note incompatibility with global-whitespace-mode.

See #3994.

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 agoExposed previously hidden 'use' statements in the tutorial's sample code.
zslayton [Mon, 22 Jul 2013 03:38:39 +0000 (23:38 -0400)]
Exposed previously hidden 'use' statements in the tutorial's sample code.

11 years agoCleanup libsyntax a bit
Steven Stewart-Gallus [Thu, 18 Jul 2013 03:04:37 +0000 (20:04 -0700)]
Cleanup libsyntax a bit

11 years agoMinor cleanup of hashmap
Steven Stewart-Gallus [Thu, 18 Jul 2013 05:35:34 +0000 (22:35 -0700)]
Minor cleanup of hashmap

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 agoEliminated SmallIntSet
Steven Fackler [Sat, 20 Jul 2013 22:38:10 +0000 (18:38 -0400)]
Eliminated SmallIntSet

SmallIntSet is equivalent to BitvSet but with 8 times the memory
overhead. There's no reason for it to exist.

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 agodlist: Remove extraneous unwrap in .pop_back_node()
blake2-ppc [Sun, 21 Jul 2013 20:37:14 +0000 (22:37 +0200)]
dlist: Remove extraneous unwrap in .pop_back_node()

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 agodlist: Use Ord for .insert_ordered()
blake2-ppc [Sun, 21 Jul 2013 19:05:48 +0000 (21:05 +0200)]
dlist: Use Ord for .insert_ordered()

We don't need TotalOrd for ordered insertion, just the normal sort order
Ord.

11 years agodlist: Remove bench tests for vec
blake2-ppc [Sun, 21 Jul 2013 19:05:48 +0000 (21:05 +0200)]
dlist: Remove bench tests for vec

These tests for ~[] performance don't really belong here, they were for
comparison.

11 years agodlist: Add bench test for rotate_to_{front, back}
blake2-ppc [Sun, 21 Jul 2013 19:05:48 +0000 (21:05 +0200)]
dlist: Add bench test for rotate_to_{front, back}

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 agodlist: Add .rotate_to_front(), .rotate_to_back()
blake2-ppc [Sun, 21 Jul 2013 17:31:40 +0000 (19:31 +0200)]
dlist: Add .rotate_to_front(), .rotate_to_back()

Add methods to move back element to front or front element to back,
without reallocating nodes.

11 years agodlist: Factor out pop and push operations by list node
blake2-ppc [Sun, 21 Jul 2013 17:31:40 +0000 (19:31 +0200)]
dlist: Factor out pop and push operations by list node

Factor out internal methods for pop/push ~Node<T>, This allows moving
nodes instead of destructuring and allocating new.

Make use of this in .merge() so that it requires no allocations when
merging two DList.

11 years agodlist: Simplify match clauses to use Option methods
blake2-ppc [Sun, 21 Jul 2013 17:31:40 +0000 (19:31 +0200)]
dlist: Simplify match clauses to use Option methods

Make the core Deque implementation a bit simpler by using Option methods
when we simply map on a Some value, and deduplicate some common lines.

11 years agoserialize: implement Encodable for DList
blake2-ppc [Sun, 21 Jul 2013 17:31:40 +0000 (19:31 +0200)]
serialize: implement Encodable for DList

This impl was missing for unknown reason.

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 agoAdded bitv iterator benchmarks
Steven Fackler [Sun, 14 Jul 2013 18:52:49 +0000 (11:52 -0700)]
Added bitv iterator benchmarks

11 years agoAdded iterator tests
Steven Fackler [Fri, 12 Jul 2013 06:13:26 +0000 (02:13 -0400)]
Added iterator tests

11 years agoRemoved unecessary indirection in Bitv
Steven Fackler [Wed, 10 Jul 2013 07:29:24 +0000 (03:29 -0400)]
Removed unecessary indirection in Bitv

BitvVariant is the same size as it was before (16 bytes).

11 years agoDerive Clone for bitv stuff
Steven Fackler [Wed, 10 Jul 2013 05:57:07 +0000 (01:57 -0400)]
Derive Clone for bitv stuff

11 years agoSwitched bitv to external iterators
Steven Fackler [Wed, 10 Jul 2013 05:06:38 +0000 (01:06 -0400)]
Switched bitv to external iterators

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