]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #8792 : adridu59/rust/master, r=catamorphism
bors [Tue, 27 Aug 2013 22:50:50 +0000 (15:50 -0700)]
auto merge of #8792 : adridu59/rust/master, r=catamorphism

`target_library_in_workspace` is imported but unused:
~/rust/src/librustpkg/tests.rs:21:48: 21:75 warning: unused import [-W unused-imports (default)]

10 years agoauto merge of #8771 : thestinger/rust/repr, r=catamorphism
bors [Tue, 27 Aug 2013 21:35:49 +0000 (14:35 -0700)]
auto merge of #8771 : thestinger/rust/repr, r=catamorphism

10 years agoreflect: rm unused visit_{var,var_integral,constr}
Daniel Micay [Mon, 26 Aug 2013 20:58:38 +0000 (16:58 -0400)]
reflect: rm unused visit_{var,var_integral,constr}

10 years agorepr: include mutability qualifier in visit_ptr
Daniel Micay [Mon, 26 Aug 2013 20:39:51 +0000 (16:39 -0400)]
repr: include mutability qualifier in visit_ptr

10 years agorepr: print integer/float suffixes
Daniel Micay [Mon, 26 Aug 2013 19:58:50 +0000 (15:58 -0400)]
repr: print integer/float suffixes

10 years agoauto merge of #8790 : huonw/rust/unsafearc, r=thestinger
bors [Tue, 27 Aug 2013 20:20:47 +0000 (13:20 -0700)]
auto merge of #8790 : huonw/rust/unsafearc, r=thestinger

`UnsafeAtomicRcBox` → `UnsafeArc` (#7674), and `AtomicRcBoxData` → `ArcData` to reflect this.

Also, the inner pointer of `UnsafeArc` is now `*mut ArcData`, which avoids some transmutes to `~`: i.e. less chance of mistakes.

10 years agoauto merge of #8581 : FlaPer87/rust/issue/8232, r=bblum
bors [Tue, 27 Aug 2013 18:35:51 +0000 (11:35 -0700)]
auto merge of #8581 : FlaPer87/rust/issue/8232, r=bblum

As for now, rekillable is an unsafe function, instead, it should behave
just like unkillable by encapsulating unsafe code within an unsafe
block.

This patch does that and removes unsafe blocks that were encapsulating
rekillable calls throughout rust's libs.

Fixes #8232

10 years agoTrailing space
Flaper Fesp [Tue, 27 Aug 2013 18:09:57 +0000 (20:09 +0200)]
Trailing space

10 years agovec: implement `DeepClone`
Daniel Micay [Mon, 26 Aug 2013 03:34:43 +0000 (23:34 -0400)]
vec: implement `DeepClone`

10 years agoauto merge of #8772 : thestinger/rust/option, r=anasazi
bors [Tue, 27 Aug 2013 17:20:52 +0000 (10:20 -0700)]
auto merge of #8772 : thestinger/rust/option, r=anasazi

Closes #6002

There is consensus that the current implementation should be changed or
removed, so removing it seems like the right decision for now.

10 years agooption: rm implementation of Add
Daniel Micay [Mon, 26 Aug 2013 22:04:17 +0000 (18:04 -0400)]
option: rm implementation of Add

Closes #6002

There is consensus that the current implementation should be changed or
removed, so removing it seems like the right decision for now.

10 years agoauto merge of #8789 : pnkfelix/rust/fsk-fix-typo-in-rust-mode.el, r=pnkfelix
bors [Tue, 27 Aug 2013 15:00:51 +0000 (08:00 -0700)]
auto merge of #8789 : pnkfelix/rust/fsk-fix-typo-in-rust-mode.el, r=pnkfelix

Fix #6887.  (or rather, a bug injected by my prior commit for fixing that bug.)

10 years agoauto merge of #8777 : Kimundi/rust/doc_stuff, r=cmr
bors [Tue, 27 Aug 2013 13:45:50 +0000 (06:45 -0700)]
auto merge of #8777 : Kimundi/rust/doc_stuff, r=cmr

10 years agolibrustpkg/tests.rs: cleanup unused import
Adrien Tétar [Tue, 27 Aug 2013 12:45:40 +0000 (14:45 +0200)]
librustpkg/tests.rs: cleanup unused import

10 years agoauto merge of #8780 : brson/rust/from_elem, r=thestinger
bors [Tue, 27 Aug 2013 12:30:54 +0000 (05:30 -0700)]
auto merge of #8780 : brson/rust/from_elem, r=thestinger

10 years agostd: use ArcData rather than c_void in UnsafeArc.
Huon Wilson [Tue, 27 Aug 2013 12:17:58 +0000 (22:17 +1000)]
std: use ArcData rather than c_void in UnsafeArc.

This means that fewer `transmute`s are required, so there is less
chance of a `transmute` not having the corresponding `forget`
(possibly leading to use-after-free, etc).

10 years agoauto merge of #8779 : brson/rust/macsupp, r=thestinger
bors [Tue, 27 Aug 2013 11:15:54 +0000 (04:15 -0700)]
auto merge of #8779 : brson/rust/macsupp, r=thestinger

This callstack changed when the FFI did. I am still a little frightened by
this suppression.

cc #8253

10 years agofix typo in rust-mode.el
Felix S. Klock II [Tue, 27 Aug 2013 10:48:51 +0000 (12:48 +0200)]
fix typo in rust-mode.el

10 years agoRename UnsafeAtomicRcBox to UnsafeArc. Fixes #7674.
Huon Wilson [Tue, 27 Aug 2013 10:00:57 +0000 (20:00 +1000)]
Rename UnsafeAtomicRcBox to UnsafeArc. Fixes #7674.

10 years agoauto merge of #8773 : catamorphism/rust/rustpkg-version-flag, r=anasazi
bors [Tue, 27 Aug 2013 10:00:52 +0000 (03:00 -0700)]
auto merge of #8773 : catamorphism/rust/rustpkg-version-flag, r=anasazi

r? anyone. Now, rustpkg --version does something useful!

10 years agoRebased and replaced yield with deschedule
Flaper Fesp [Tue, 27 Aug 2013 07:53:31 +0000 (09:53 +0200)]
Rebased and replaced yield with deschedule

10 years agoauto merge of #8757 : vadimcn/rust/debug-info-tests, r=brson
bors [Tue, 27 Aug 2013 06:35:54 +0000 (23:35 -0700)]
auto merge of #8757 : vadimcn/rust/debug-info-tests, r=brson

Now that new LLVM has landed, the debug info works on Windows as well.   Most existing tests pass, except for the following four, which I left disabled for now:
lexical-scope-in-for-loop
lexical-scope-in-if
lexical-scope-in-match
lexical-scopes-in-block-expression

Also, fixed a small problem with the debug info test runner.

10 years agoauto merge of #8700 : alexcrichton/rust/better-llvm, r=thestinger
bors [Tue, 27 Aug 2013 04:25:55 +0000 (21:25 -0700)]
auto merge of #8700 : alexcrichton/rust/better-llvm, r=thestinger

Beforehand, it was unclear whether rust was performing the "recommended set" of
optimizations provided by LLVM for code. This commit changes the way we run
passes to closely mirror that of clang, which in theory does it correctly. The
notable changes include:

* Passes are no longer explicitly added one by one. This would be difficult to
  keep up with as LLVM changes and we don't guaranteed always know the best
  order in which to run passes
* Passes are now managed by LLVM's PassManagerBuilder object. This is then used
  to populate the various pass managers run.
* We now run both a FunctionPassManager and a module-wide PassManager. This is
  what clang does, and I presume that we *may* see a speed boost from the
  module-wide passes just having to do less work. I have no measured this.
* The codegen pass manager has been extracted to its own separate pass manager
  to not get mixed up with the other passes
* All pass managers now include passes for target-specific data layout and
  analysis passes

Some new features include:

* You can now print all passes being run with `-Z print-llvm-passes`
* When specifying passes via `--passes`, the passes are now appended to the
  default list of passes instead of overwriting them.
* The output of `--passes list` is now generated by LLVM instead of maintaining
  a list of passes ourselves
* Loop vectorization is turned on by default as an optimization pass and can be
  disabled with `-Z no-vectorize-loops`

All of these "copies" of clang are based off their [source code](http://clang.llvm.org/doxygen/BackendUtil_8cpp_source.html) in case anyone is curious what my source is. I was hoping that this would fix #8665, but this does not help the performance issues found there. Hopefully i'll allow us to tweak passes or see what's going on to try to debug that problem.

10 years agoRewrite pass management with LLVM
Alex Crichton [Fri, 23 Aug 2013 03:58:42 +0000 (20:58 -0700)]
Rewrite pass management with LLVM

Beforehand, it was unclear whether rust was performing the "recommended set" of
optimizations provided by LLVM for code. This commit changes the way we run
passes to closely mirror that of clang, which in theory does it correctly. The
notable changes include:

* Passes are no longer explicitly added one by one. This would be difficult to
  keep up with as LLVM changes and we don't guaranteed always know the best
  order in which to run passes
* Passes are now managed by LLVM's PassManagerBuilder object. This is then used
  to populate the various pass managers run.
* We now run both a FunctionPassManager and a module-wide PassManager. This is
  what clang does, and I presume that we *may* see a speed boost from the
  module-wide passes just having to do less work. I have no measured this.
* The codegen pass manager has been extracted to its own separate pass manager
  to not get mixed up with the other passes
* All pass managers now include passes for target-specific data layout and
  analysis passes

Some new features include:

* You can now print all passes being run with `-Z print-llvm-passes`
* When specifying passes via `--passes`, the passes are now appended to the
  default list of passes instead of overwriting them.
* The output of `--passes list` is now generated by LLVM instead of maintaining
  a list of passes ourselves
* Loop vectorization is turned on by default as an optimization pass and can be
  disabled with `-Z no-vectorize-loops`

10 years agoauto merge of #8747 : pnkfelix/rust/fsk-issue6887-fix-emacs-compilation-regexp, r...
bors [Tue, 27 Aug 2013 02:55:57 +0000 (19:55 -0700)]
auto merge of #8747 : pnkfelix/rust/fsk-issue6887-fix-emacs-compilation-regexp, r=graydon

Fix #6887

10 years agoRewrote module tutorial
Marvin Löbel [Fri, 23 Aug 2013 20:11:44 +0000 (22:11 +0200)]
Rewrote module tutorial

10 years agoauto merge of #8739 : fhahn/rust/ticket_2275, r=brson
bors [Tue, 27 Aug 2013 01:20:56 +0000 (18:20 -0700)]
auto merge of #8739 : fhahn/rust/ticket_2275, r=brson

This is a pull request for #2275

I've created a small python script to generate test files for a list of keywords (as break do else enum extern false fn for if impl let loop match mod mut priv pub ref return self static struct super true trait type unsafe use while), but I'm not really sure where to put it. I've added the created files as well.

I did not use

     fn main() {
        let $KW = "foo"; //~ error
        println($KW); //~ error
    }

as template, because for return, self, ref, loop, mut and break this does not raise an error in the ```println``` line, only in the ```let``` line.

10 years agostd: Make vec::from_elem failure-safe
Brian Anderson [Tue, 27 Aug 2013 01:17:37 +0000 (18:17 -0700)]
std: Make vec::from_elem failure-safe

10 years agoFix valgrind suppression on mac
Brian Anderson [Tue, 27 Aug 2013 00:39:50 +0000 (17:39 -0700)]
Fix valgrind suppression on mac

This callstack changed when the FFI did. I am still a little frightened by
this suppression.

10 years agoauto merge of #8438 : cmr/rust/default, r=thestinger
bors [Tue, 27 Aug 2013 00:05:57 +0000 (17:05 -0700)]
auto merge of #8438 : cmr/rust/default, r=thestinger

10 years agoFix deriving-zero test
Corey Richardson [Mon, 26 Aug 2013 23:47:58 +0000 (19:47 -0400)]
Fix deriving-zero test

10 years agoAdd a Default trait.
Corey Richardson [Sat, 10 Aug 2013 13:38:00 +0000 (09:38 -0400)]
Add a Default trait.

10 years agoauto merge of #8712 : catamorphism/rust/rustpkg-issue-7241, r=pcwalton
bors [Mon, 26 Aug 2013 22:51:15 +0000 (15:51 -0700)]
auto merge of #8712 : catamorphism/rust/rustpkg-issue-7241, r=pcwalton

r? @brson ...multiple workspaces

The test checks that rustpkg uses the first one, rather than complaining
about multiple matches.

Closes #7241

10 years agoDecrement unkillable counter before failing
Flaper Fesp [Tue, 20 Aug 2013 00:10:53 +0000 (02:10 +0200)]
Decrement unkillable counter before failing

10 years agoDon't make the runtime exit on illegal calls
Flaper Fesp [Mon, 19 Aug 2013 23:26:05 +0000 (01:26 +0200)]
Don't make the runtime exit on illegal calls

10 years agorustpkg: Implement --version command-line option
Tim Chevalier [Mon, 26 Aug 2013 22:34:34 +0000 (15:34 -0700)]
rustpkg: Implement --version command-line option

Now, rustpkg --version does something useful!

10 years agoTesting rekillable fails when called from outside an unkillable block
Flaper Fesp [Sun, 18 Aug 2013 16:07:20 +0000 (18:07 +0200)]
Testing rekillable fails when called from outside an unkillable block

10 years agoMake rekillable consistent with unkillable
Flaper Fesp [Sat, 17 Aug 2013 22:51:39 +0000 (00:51 +0200)]
Make rekillable consistent with unkillable

As for now, rekillable is an unsafe function, instead, it should behave
just like unkillable by encapsulating unsafe code within an unsafe
block.

This patch does that and removes unsafe blocks that were encapsulating
rekillable calls throughout rust's libs.

Fixes #8232

10 years agorustpkg: Test that different copies of the same package ID can exist in multiple...
Tim Chevalier [Fri, 23 Aug 2013 18:51:45 +0000 (11:51 -0700)]
rustpkg: Test that different copies of the same package ID can exist in multiple workspaces

The test checks that rustpkg uses the first one, rather than complaining
about multiple matches.

Closes #7241

10 years agoauto merge of #8766 : brson/rust/vecfromfn, r=alexcrichton
bors [Mon, 26 Aug 2013 20:41:12 +0000 (13:41 -0700)]
auto merge of #8766 : brson/rust/vecfromfn, r=alexcrichton

A recently-enabled test of this is causing valgrind failures.

10 years agostd: Make vec::from_fn failure-safe
Brian Anderson [Mon, 26 Aug 2013 20:29:33 +0000 (13:29 -0700)]
std: Make vec::from_fn failure-safe

10 years agoauto merge of #8488 : klutzy/rust/mingw-w64, r=brson
bors [Mon, 26 Aug 2013 18:46:13 +0000 (11:46 -0700)]
auto merge of #8488 : klutzy/rust/mingw-w64, r=brson

This patchset enables rustc to cross-build mingw-w64 outputs.
Tested on mingw + mingw-w64 (mingw-builds, win64/seh/win32-threads/gcc-4.8.1).

I also patched llvm to support Win64 stack unwinding.
https://github.com/klutzy/llvm/commit/ebe22bdbcebc4f8342c4c7c50e3b61fa6c68c1ad

I cross-built test/run-pass/smallest-hello-world.rs and confirmed it works.
However, I also found something went wrong if I don't have custom `#[start]` routine.

10 years agoauto merge of #8764 : blake2-ppc/rust/doc-condition, r=graydon
bors [Mon, 26 Aug 2013 17:36:18 +0000 (10:36 -0700)]
auto merge of #8764 : blake2-ppc/rust/doc-condition, r=graydon

As mentioned in PR #8563 it seems this tutorial has no inbound link!

10 years agodoc: Link condition and error-handling tutorial from main tutorial
blake2-ppc [Mon, 26 Aug 2013 16:10:40 +0000 (18:10 +0200)]
doc: Link condition and error-handling tutorial from main tutorial

10 years agoauto merge of #8758 : pnkfelix/rust/fsk-more-oldvisit-ports, r=pnkfelix
bors [Mon, 26 Aug 2013 15:26:14 +0000 (08:26 -0700)]
auto merge of #8758 : pnkfelix/rust/fsk-more-oldvisit-ports, r=pnkfelix

Further followup on #7081.

There still remains writeback.rs, but I want to wait to investigate that one because I've seen `make check` issues with it in the past.

10 years agoAdd script and tests for using keywords as identifiers
Florian Hahn [Sat, 24 Aug 2013 21:16:06 +0000 (23:16 +0200)]
Add script and tests for using keywords as identifiers

10 years agoauto merge of #8749 : gifnksm/rust/bigint-cfg, r=pnkfelix
bors [Mon, 26 Aug 2013 13:41:15 +0000 (06:41 -0700)]
auto merge of #8749 : gifnksm/rust/bigint-cfg, r=pnkfelix

This also fixes #4393.

10 years agoSupport Win64 context switching
klutzy [Mon, 26 Aug 2013 13:01:55 +0000 (22:01 +0900)]
Support Win64 context switching

This patch saves and restores win64's nonvolatile registers.
This patch also saves stack information of thread environment
block (TEB), which is at %gs:0x08 and %gs:0x10.

10 years agort: Support SEH/SJLJ personality routine
klutzy [Mon, 12 Aug 2013 13:36:57 +0000 (22:36 +0900)]
rt: Support SEH/SJLJ personality routine

10 years agort: Make valgrind Win64-compatible
klutzy [Mon, 12 Aug 2013 13:00:50 +0000 (22:00 +0900)]
rt: Make valgrind Win64-compatible

10 years agostd: Add Win64 support
klutzy [Mon, 12 Aug 2013 06:27:46 +0000 (15:27 +0900)]
std: Add Win64 support

Some extern blobs are duplicated without "stdcall" abi,
since Win64 does not use any calling convention.
(Giving any abi to them causes llvm producing wrong bytecode.)

10 years agostd: Bind write() on Win64
klutzy [Mon, 12 Aug 2013 06:06:06 +0000 (15:06 +0900)]
std: Bind write() on Win64

10 years agostd: Add Win64 types
klutzy [Mon, 12 Aug 2013 06:05:20 +0000 (15:05 +0900)]
std: Add Win64 types

10 years agoSet main_name "WinMain" on Win64
klutzy [Mon, 12 Aug 2013 01:27:16 +0000 (10:27 +0900)]
Set main_name "WinMain" on Win64

10 years agort: Add {get,record}_sp_limit on Win64
klutzy [Sun, 11 Aug 2013 08:56:37 +0000 (17:56 +0900)]
rt: Add {get,record}_sp_limit on Win64

Uses ArbitraryUserPointer area at gs:0x28.

10 years agort: Remove leading underscore on Win64
klutzy [Sun, 11 Aug 2013 08:56:24 +0000 (17:56 +0900)]
rt: Remove leading underscore on Win64

Win64 convention does not use underscore.

10 years agoauto merge of #8737 : blake2-ppc/rust/std-str-rsplit, r=huonw
bors [Mon, 26 Aug 2013 12:06:16 +0000 (05:06 -0700)]
auto merge of #8737 : blake2-ppc/rust/std-str-rsplit, r=huonw

Make CharSplitIterator double-ended which is simple given that the operation is symmetric, once the split-N feature is factored out into its own adaptor.

`.rsplitn_iter()` allows splitting `N` times from the back of a string, so it is a completely new feature. With the double-ended impl, `.split_iter()`, `.line_iter()`, `.word_iter()` all allow picking off elements from either end.

`split_options_iter` is removed with the factoring of the split- and split-N- iterators, instead there is `split_terminator_iter`.

---

Add benchmarks using `#[bench]` and tune CharSplitIterator a bit after Huon Wilson's suggestions

Benchmarks 1-5 do the same split using different implementations of `CharEq`, all splitting an ascii string on ascii space. Benchmarks 6-7 split a unicode string on an ascii char.

Before this PR
test str::bench::split_iter_ascii ... bench: 166 ns/iter (+/- 2)
test str::bench::split_iter_closure ... bench: 113 ns/iter (+/- 1)
test str::bench::split_iter_extern_fn ... bench: 286 ns/iter (+/- 7)
test str::bench::split_iter_not_ascii ... bench: 114 ns/iter (+/- 4)
test str::bench::split_iter_slice ... bench: 220 ns/iter (+/- 12)
test str::bench::split_iter_unicode_ascii ... bench: 217 ns/iter (+/- 3)
test str::bench::split_iter_unicode_not_ascii ... bench: 248 ns/iter (+/- 3)

PR, first commit
test str::bench::split_iter_ascii ... bench: 331 ns/iter (+/- 9)
test str::bench::split_iter_closure ... bench: 114 ns/iter (+/- 2)
test str::bench::split_iter_extern_fn ... bench: 314 ns/iter (+/- 6)
test str::bench::split_iter_not_ascii ... bench: 132 ns/iter (+/- 1)
test str::bench::split_iter_slice ... bench: 157 ns/iter (+/- 3)
test str::bench::split_iter_unicode_ascii ... bench: 502 ns/iter (+/- 64)
test str::bench::split_iter_unicode_not_ascii ... bench: 250 ns/iter (+/- 3)

PR, final version
test str::bench::split_iter_ascii ... bench: 106 ns/iter (+/- 4)
test str::bench::split_iter_closure ... bench: 107 ns/iter (+/- 1)
test str::bench::split_iter_extern_fn ... bench: 267 ns/iter (+/- 6)
test str::bench::split_iter_not_ascii ... bench: 108 ns/iter (+/- 1)
test str::bench::split_iter_slice ... bench: 170 ns/iter (+/- 8)
test str::bench::split_iter_unicode_ascii ... bench: 128 ns/iter (+/- 5)
test str::bench::split_iter_unicode_not_ascii ... bench: 252 ns/iter (+/- 3)

---

There are several ways to deal with `CharEq::only_ascii`. It is a performance optimization, so with that in mind, we allow passing bogus char (outside ascii) as long as they don't match. We use a byte value check to make sure we don't split on these (would split substrings in the middle of encoded char).  (A more principled way would be to only pass the ascii codepoints to the CharEq when it indicates only_ascii, but that undoes some of the performance optimization.)

10 years agostd::str: Tune CharSplitIterator after benchmarks
blake2-ppc [Mon, 26 Aug 2013 09:48:49 +0000 (11:48 +0200)]
std::str: Tune CharSplitIterator after benchmarks

Implement Huon Wilson's suggestions (since the benchmarks agree!).

Use `self.sep.matches(byte as char) && byte < 128u8` to match in the
only_ascii case so that mistaken matches outside the ascii range can't
create invalid substrings.

Put the conditional on only_ascii outside the loop.

10 years agoPlacate `make tidy`.
Felix S. Klock II [Mon, 26 Aug 2013 11:27:36 +0000 (13:27 +0200)]
Placate `make tidy`.

10 years agobigint: fix wrong benchmark fn name
gifnksm [Mon, 26 Aug 2013 11:27:20 +0000 (20:27 +0900)]
bigint: fix wrong benchmark fn name

10 years agoauto merge of #8744 : jld/rust/discr64, r=nikomatsakis
bors [Mon, 26 Aug 2013 10:51:19 +0000 (03:51 -0700)]
auto merge of #8744 : jld/rust/discr64, r=nikomatsakis

This is in preparation for making discriminants not always be int (#1647), but it also makes compiles for a 64-bit target not behave differently — with respect to how many bits of discriminants are preserved — depending on the build host's word size, which is a nice property to have.

We may want to standardize how to abbreviate "discriminant" in a followup change.

10 years agoPort typeck/check/vtable.rs from oldvisit to <V:Visitor> trait API.
Felix S. Klock II [Mon, 26 Aug 2013 09:49:24 +0000 (11:49 +0200)]
Port typeck/check/vtable.rs from oldvisit to <V:Visitor> trait API.

10 years agostd::str: bench tests for .split_iter()
blake2-ppc [Mon, 26 Aug 2013 09:48:48 +0000 (11:48 +0200)]
std::str: bench tests for .split_iter()

10 years agoPort middle/stack_check.rs from oldvisit to <V:Visitor> trait API.
Felix S. Klock II [Mon, 26 Aug 2013 09:43:14 +0000 (11:43 +0200)]
Port middle/stack_check.rs from oldvisit to <V:Visitor> trait API.

10 years agoPort middle/moves.rs from oldvisit to <V:Visitor> trait API.
Felix S. Klock II [Mon, 26 Aug 2013 09:31:21 +0000 (11:31 +0200)]
Port middle/moves.rs from oldvisit to <V:Visitor> trait API.

10 years agoRemove occurrences of `oldvisit` text to improve grepping for old oldvisit.
Felix S. Klock II [Mon, 26 Aug 2013 09:10:18 +0000 (11:10 +0200)]
Remove occurrences of `oldvisit` text to improve grepping for old oldvisit.

10 years agoPort creader.rs from oldvisit to <V:Visitor> trait API.
Felix S. Klock II [Mon, 26 Aug 2013 09:01:39 +0000 (11:01 +0200)]
Port creader.rs from oldvisit to <V:Visitor> trait API.

10 years agoUn-disabled debug info tests on Windows.
Vadim Chugunov [Mon, 26 Aug 2013 08:17:15 +0000 (01:17 -0700)]
Un-disabled debug info tests on Windows.

10 years agoSince we assume that GDB output is UTF-8, make sure it is so on all platforms.
Vadim Chugunov [Mon, 26 Aug 2013 08:15:57 +0000 (01:15 -0700)]
Since we assume that GDB output is UTF-8, make sure it is so on all platforms.
Otherwise it'll choose some "appropriate" platform-specific default (e.g. CP1252 on Windows).

10 years agoauto merge of #8750 : kballard/rust/str-opt-variant, r=thestinger
bors [Mon, 26 Aug 2013 04:36:16 +0000 (21:36 -0700)]
auto merge of #8750 : kballard/rust/str-opt-variant, r=thestinger

Add _opt variants to from_bytes, from_bytes_owned, and from_bytes_slice.
These variants return an Option instead of raising a condition/failing.

10 years agoauto merge of #8751 : brson/rust/metadata-revert, r=brson
bors [Mon, 26 Aug 2013 03:26:18 +0000 (20:26 -0700)]
auto merge of #8751 : brson/rust/metadata-revert, r=brson

This reverts commit 491bc3568c87dadaba4d342135bd308961c6e0ef, reversing
changes made to 05f1bbba16912f63b562a7847801823872f89ec6.

I've heard reports that this broke something. Don't know details yet.

10 years agoRevert "auto merge of #8745 : brson/rust/metadata, r=cmr"
Brian Anderson [Mon, 26 Aug 2013 03:21:13 +0000 (20:21 -0700)]
Revert "auto merge of #8745 : brson/rust/metadata, r=cmr"

This reverts commit 491bc3568c87dadaba4d342135bd308961c6e0ef, reversing
changes made to 05f1bbba16912f63b562a7847801823872f89ec6.

10 years agoAdd _opt variants to str byte-conversion functions
Kevin Ballard [Mon, 26 Aug 2013 00:07:29 +0000 (17:07 -0700)]
Add _opt variants to str byte-conversion functions

Add _opt variants to from_bytes, from_bytes_owned, and from_bytes_slice.
These variants return an Option instead of raising a condition/failing.

10 years agoextend file regexp to match files with embedded spaces.
Felix S. Klock II [Mon, 26 Aug 2013 00:28:27 +0000 (02:28 +0200)]
extend file regexp to match files with embedded spaces.

10 years agoauto merge of #8745 : brson/rust/metadata, r=cmr
bors [Sun, 25 Aug 2013 20:36:14 +0000 (13:36 -0700)]
auto merge of #8745 : brson/rust/metadata, r=cmr

This does two things: 1) stops compressing metadata, 2) stops copying the metadata section, instead holding a reference to the buffer returned by the LLVM section iterator.

Not compressing metadata requires something like 7x the storage space, but makes running tests about 9% faster. This has been a time improvement on all platforms I've tested, including windows. I considered leaving compression as an option but it doesn't seem to be worth the complexity since we don't currently have any use cases where we need to save that space.

In order to avoid copying the metadata section I had to hack up extra::ebml a bit to support unsafe buffers. We should probably move it into librustc so that it can evolve to support the compiler without worrying about having a crummy interface.

r? @graydon

10 years agoauto merge of #8723 : anasazi/rust/temporary-unkillable-io, r=brson
bors [Sun, 25 Aug 2013 19:26:16 +0000 (12:26 -0700)]
auto merge of #8723 : anasazi/rust/temporary-unkillable-io, r=brson

Also added a home_for_io_with_sched variant to consolidate some cases.

This is a temporary step to resolving #8674.

10 years agobigint: Add benchmarks
gifnksm [Sun, 25 Aug 2013 15:26:03 +0000 (00:26 +0900)]
bigint: Add benchmarks

10 years agobigint: un-ignore test_shr
gifnksm [Sun, 25 Aug 2013 14:55:12 +0000 (23:55 +0900)]
bigint: un-ignore test_shr

10 years agobigint: inlining small functions
gifnksm [Sun, 25 Aug 2013 13:47:24 +0000 (22:47 +0900)]
bigint: inlining small functions

10 years agobigint: remove unnecessary method implements
gifnksm [Sun, 25 Aug 2013 13:36:55 +0000 (22:36 +0900)]
bigint: remove unnecessary method implements

10 years agobigint: cfg(target_arch = ...) => cfg(target_word_size = ...)
gifnksm [Sun, 25 Aug 2013 13:18:24 +0000 (22:18 +0900)]
bigint: cfg(target_arch = ...) => cfg(target_word_size = ...)

10 years agorevisions to emacs compilation regexp, more readable and robust.
Felix S. Klock II [Sun, 25 Aug 2013 12:38:12 +0000 (14:38 +0200)]
revisions to emacs compilation regexp, more readable and robust.

10 years agocompilation error regexp specific to rustc.
Felix S. Klock II [Sat, 10 Aug 2013 19:07:51 +0000 (21:07 +0200)]
compilation error regexp specific to rustc.

Fix #6887.

10 years agoauto merge of #8710 : pnkfelix/rust/fsk-issue5516-codepoint-fix, r=alexcrichton
bors [Sun, 25 Aug 2013 11:21:15 +0000 (04:21 -0700)]
auto merge of #8710 : pnkfelix/rust/fsk-issue5516-codepoint-fix, r=alexcrichton

...bytes.

(removing previous note about eff-eye-ex'ing #5516 since it actually does not do so, it just gets us half-way.)

10 years agochar_len is more succinct than count_chars.
Felix S. Klock II [Sun, 25 Aug 2013 09:19:35 +0000 (11:19 +0200)]
char_len is more succinct than count_chars.

10 years agostd::str: Double-ended CharSplitIterator
blake2-ppc [Sun, 25 Aug 2013 06:54:47 +0000 (08:54 +0200)]
std::str: Double-ended CharSplitIterator

Add new methods `.rsplit_iter()` and `.rsplitn_iter()` for &str.

Separate out CharSplitIterator and CharSplitNIterator,
CharSplitIterator (`split_iter` and `rsplit_iter`) is made double-ended
while `splitn_iter` and `rsplitn_iter` (limited to N splits) are not,
since these don't have the same symmetry.

With CharSplitIterator being double ended, derived iterators like
`line_iter` and `word_iter` are too.

10 years agoauto merge of #8736 : luqmana/rust/hf, r=yichoi
bors [Sun, 25 Aug 2013 05:46:13 +0000 (22:46 -0700)]
auto merge of #8736 : luqmana/rust/hf, r=yichoi

Fixes #8536.

10 years agoDon't ever compress metadata
Brian Anderson [Sun, 25 Aug 2013 03:57:35 +0000 (20:57 -0700)]
Don't ever compress metadata

10 years agoauto merge of #8701 : brson/rust/issue-8698, r=thestinger
bors [Sun, 25 Aug 2013 03:31:15 +0000 (20:31 -0700)]
auto merge of #8701 : brson/rust/issue-8698, r=thestinger

10 years agoAdd a test case for the preceding changes.
Jed Davis [Wed, 14 Aug 2013 00:12:43 +0000 (17:12 -0700)]
Add a test case for the preceding changes.

This would have failed on 32-to-64-bit cross-compiles.

10 years agoDon't truncate discriminants to host uint for C_uint's sake.
Jed Davis [Fri, 2 Aug 2013 19:24:21 +0000 (12:24 -0700)]
Don't truncate discriminants to host uint for C_uint's sake.

10 years agoMake enum discriminants u64 instead of the host uint.
Jed Davis [Tue, 12 Mar 2013 05:37:01 +0000 (22:37 -0700)]
Make enum discriminants u64 instead of the host uint.

10 years agoauto merge of #8637 : alexcrichton/rust/ifmt-less-hax, r=graydon
bors [Sun, 25 Aug 2013 02:21:17 +0000 (19:21 -0700)]
auto merge of #8637 : alexcrichton/rust/ifmt-less-hax, r=graydon

Recent improvements to `&mut Trait` have made this work possible, and it solidifies that `ifmt` doesn't always have to return a string, but rather it's based around writers.

10 years agoauto merge of #8607 : sfackler/rust/extensions, r=brson
bors [Sun, 25 Aug 2013 01:11:19 +0000 (18:11 -0700)]
auto merge of #8607 : sfackler/rust/extensions, r=brson

The method names in std::rt::io::extensions::WriterByteConversions are
the same as those in std::io::WriterUtils and a resolve error causes
rustc to fail after trying to find an impl of io::Writer instead of
trying to look for rt::io::Writer as well.

10 years agoIntroduce alternate forms of logging
Alex Crichton [Sat, 24 Aug 2013 19:46:55 +0000 (12:46 -0700)]
Introduce alternate forms of logging

These new macros are all based on format! instead of fmt! and purely exist for
bootstrapping purposes. After the next snapshot, all uses of logging will be
migrated to these macros, and then after the next snapshot after that we can
drop the `2` suffix on everything

10 years agoauto merge of #8740 : brson/rust/rt-opt, r=thestinger
bors [Sat, 24 Aug 2013 23:46:24 +0000 (16:46 -0700)]
auto merge of #8740 : brson/rust/rt-opt, r=thestinger

See #8599

10 years agoMerge pull request #8733 from sfackler/str-to-bytes
Daniel Micay [Sat, 24 Aug 2013 23:41:04 +0000 (16:41 -0700)]
Merge pull request #8733 from sfackler/str-to-bytes

Add OwnedStr::into_bytes

10 years agostd::rt: Enforce sanity a while longer
Brian Anderson [Mon, 19 Aug 2013 17:10:27 +0000 (10:10 -0700)]
std::rt: Enforce sanity a while longer

I'm not comfortable turning off rtassert! yet

10 years agostd: Make vec::push_all_move call reserve_at_least
Brian Anderson [Sun, 18 Aug 2013 06:11:46 +0000 (23:11 -0700)]
std: Make vec::push_all_move call reserve_at_least

vec::unshift uses this to add elements, scheduler queues use unshift,
and this was causing a lot of reallocation

10 years agostd::rt: Remove an unnecessary allocation from the main sched loop
Brian Anderson [Sun, 18 Aug 2013 05:59:46 +0000 (22:59 -0700)]
std::rt: Remove an unnecessary allocation from the main sched loop