]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #9301 : luqmana/rust/ncm, r=brson
bors [Mon, 23 Sep 2013 22:46:05 +0000 (15:46 -0700)]
auto merge of #9301 : luqmana/rust/ncm, r=brson

Get rid of the crate_map arg!

r? @brson

10 years agoFind the cratemap at runtime on windows.
Luqman Aden [Sun, 22 Sep 2013 02:48:12 +0000 (19:48 -0700)]
Find the cratemap at runtime on windows.

10 years agoauto merge of #9438 : brson/rust/relnotes, r=thestinger
bors [Mon, 23 Sep 2013 21:26:04 +0000 (14:26 -0700)]
auto merge of #9438 : brson/rust/relnotes, r=thestinger

10 years agoMore 0.8 release notes
Brian Anderson [Mon, 23 Sep 2013 21:17:58 +0000 (14:17 -0700)]
More 0.8 release notes

10 years agoauto merge of #9423 : madjar/rust/patch-1, r=alexcrichton
bors [Mon, 23 Sep 2013 16:20:56 +0000 (09:20 -0700)]
auto merge of #9423 : madjar/rust/patch-1, r=alexcrichton

Just something I noticed while reading the tutorial.

10 years agoauto merge of #9398 : Kimundi/rust/work1, r=huonw
bors [Mon, 23 Sep 2013 12:40:54 +0000 (05:40 -0700)]
auto merge of #9398 : Kimundi/rust/work1, r=huonw

10 years agoExtended the module tutorial section about files a bit
Marvin Löbel [Sun, 22 Sep 2013 02:44:07 +0000 (04:44 +0200)]
Extended the module tutorial section about files a bit

10 years agoFixed a small typo in the tutorial
Georges Dubus [Mon, 23 Sep 2013 08:04:48 +0000 (10:04 +0200)]
Fixed a small typo in the tutorial

Just something I noticed while reading the tutorial.

10 years agoauto merge of #9422 : alexcrichton/rust/fix-link, r=thestinger
bors [Mon, 23 Sep 2013 07:20:51 +0000 (00:20 -0700)]
auto merge of #9422 : alexcrichton/rust/fix-link, r=thestinger

This makes clicking on the logo do what you'd expect.

10 years agoauto merge of #9385 : alexcrichton/rust/actually-ndebug, r=pnkfelix
bors [Mon, 23 Sep 2013 05:20:50 +0000 (22:20 -0700)]
auto merge of #9385 : alexcrichton/rust/actually-ndebug, r=pnkfelix

Turns out that even if the default is "enabled", that doesn't mean that the
CFG_ENABLE_DEBUG variable will be defined. Instead, test whether
CFG_DISABLE_DEBUG is defined and disable debug things if that's the case.

10 years agoauto merge of #9413 : bytbox/rust/master, r=alexcrichton
bors [Mon, 23 Sep 2013 03:20:52 +0000 (20:20 -0700)]
auto merge of #9413 : bytbox/rust/master, r=alexcrichton

10 years agoPlace *all* rustdoc output in doc/{crate}
Alex Crichton [Mon, 23 Sep 2013 03:09:42 +0000 (20:09 -0700)]
Place *all* rustdoc output in doc/{crate}

10 years agotouch LLVM clean trigger
Daniel Micay [Mon, 23 Sep 2013 02:47:30 +0000 (22:47 -0400)]
touch LLVM clean trigger

10 years agoAdd docs for extra::semver
Scott Lawrence [Mon, 23 Sep 2013 00:20:24 +0000 (20:20 -0400)]
Add docs for extra::semver

10 years agoauto merge of #9412 : thestinger/rust/no_starve_xfail, r=cmr
bors [Sun, 22 Sep 2013 22:30:51 +0000 (15:30 -0700)]
auto merge of #9412 : thestinger/rust/no_starve_xfail, r=cmr

this is still broken on the bsd builder, perhaps because it has 1 core

10 years agodisable starvation test completely for now
Daniel Micay [Sun, 22 Sep 2013 22:25:59 +0000 (18:25 -0400)]
disable starvation test completely for now

this is still broken on the bsd builder, perhaps because it has 1 core

10 years agoauto merge of #9389 : poiru/rust/issue-9333, r=alexcrichton
bors [Sun, 22 Sep 2013 19:45:52 +0000 (12:45 -0700)]
auto merge of #9389 : poiru/rust/issue-9333, r=alexcrichton

Closes #9333.

10 years agoauto merge of #9408 : thestinger/rust/valgrind, r=alexcrichton
bors [Sun, 22 Sep 2013 18:10:52 +0000 (11:10 -0700)]
auto merge of #9408 : thestinger/rust/valgrind, r=alexcrichton

10 years agodisable scheduler starvation test on valgrind
Daniel Micay [Sun, 22 Sep 2013 17:48:23 +0000 (13:48 -0400)]
disable scheduler starvation test on valgrind

10 years agoActually default rustc to have debug! output
Alex Crichton [Sat, 21 Sep 2013 08:49:38 +0000 (01:49 -0700)]
Actually default rustc to have debug! output

Turns out that even if the default is "enabled", that doesn't mean that the
CFG_ENABLE_DEBUG variable will be defined. Instead, test whether
CFG_DISABLE_DEBUG is defined and disable debug things if that's the case.

10 years agoauto merge of #9402 : alexcrichton/rust/no-ng, r=thestinger
bors [Sun, 22 Sep 2013 16:55:52 +0000 (09:55 -0700)]
auto merge of #9402 : alexcrichton/rust/no-ng, r=thestinger

Removes old rustdoc, moves rustdoc_ng into its place instead (plus drops the _ng
suffix). Also shreds all reference to rustdoc_ng from the Makefile rules.

Nothin like deleting 7k lines from a repo!

10 years agorustdoc: Out with the old, in with the new
Alex Crichton [Sun, 22 Sep 2013 06:25:48 +0000 (23:25 -0700)]
rustdoc: Out with the old, in with the new

Removes old rustdoc, moves rustdoc_ng into its place instead (plus drops the _ng
suffix). Also shreds all reference to rustdoc_ng from the Makefile rules.

10 years agoauto merge of #9362 : huonw/rust/rand, r=alexcrichton
bors [Sun, 22 Sep 2013 14:15:54 +0000 (07:15 -0700)]
auto merge of #9362 : huonw/rust/rand, r=alexcrichton

First steps on toward a shiny new `std::rand`, this does a variety of relatively clean-up tasks, like:
- moving `std/rand.rs` to `std/rand/mod.rs` in preparation for (e.g.) splitting the large chunk that is the `Isaac` implementation into a separate file later.
- removing the now unused RNG code in the old rt (500 lines gone just like that!)
- merging Rng and RngUtil via default methods
- examples in the documentation for almost all methods.

And other things mentioned in the commit messages.

10 years agoRemove the C(++) ISAAC Rng from the old rt.
Huon Wilson [Sun, 22 Sep 2013 11:57:31 +0000 (21:57 +1000)]
Remove the C(++) ISAAC Rng from the old rt.

This has to leave rust_gen_seed and rng_gen_seed around since they're
used to initialise the std::rand RNGs.

10 years agostd: merge rand::{Rng,RngUtil} with default methods.
Huon Wilson [Fri, 20 Sep 2013 11:47:05 +0000 (21:47 +1000)]
std: merge rand::{Rng,RngUtil} with default methods.

Also, documentation & general clean-up:
- remove `gen_char_from`: better served by `sample` or `choose`.
- `gen_bytes` generalised to `gen_vec`.
- `gen_int_range`/`gen_uint_range` merged into `gen_integer_range` and
  made to be properly uniformly distributed. Fixes #8644.

Minor adjustments to other functions.

10 years agostd: move rand.rs to rand/mod.rs.
Huon Wilson [Fri, 20 Sep 2013 14:58:16 +0000 (00:58 +1000)]
std: move rand.rs to rand/mod.rs.

10 years agoReserve the `alignof`, `offsetof`, and `sizeof` keywords
Birunthan Mohanathas [Sat, 21 Sep 2013 13:31:57 +0000 (16:31 +0300)]
Reserve the `alignof`, `offsetof`, and `sizeof` keywords
Closes #9333.

10 years agoauto merge of #9395 : brson/rust/0.8, r=alexcrichton
bors [Sun, 22 Sep 2013 07:25:56 +0000 (00:25 -0700)]
auto merge of #9395 : brson/rust/0.8, r=alexcrichton

10 years agoauto merge of #9401 : bytbox/rust/master, r=thestinger
bors [Sun, 22 Sep 2013 05:20:56 +0000 (22:20 -0700)]
auto merge of #9401 : bytbox/rust/master, r=thestinger

Along with a tiny bit of cleanup in rust.vim.

10 years agoRemove 'copy' from syntax files, as it's no longer a keyword
Scott Lawrence [Sun, 22 Sep 2013 04:29:45 +0000 (00:29 -0400)]
Remove 'copy' from syntax files, as it's no longer a keyword

10 years agoauto merge of #9399 : brson/rust/tinfo, r=thestinger
bors [Sun, 22 Sep 2013 03:40:55 +0000 (20:40 -0700)]
auto merge of #9399 : brson/rust/tinfo, r=thestinger

The right way to link to terminfo varies by linux distribution, so
this is making our snapshots less compatible.

10 years agoauto merge of #9353 : brson/rust/sched, r=alexcrichton,cmr
bors [Sun, 22 Sep 2013 01:31:01 +0000 (18:31 -0700)]
auto merge of #9353 : brson/rust/sched, r=alexcrichton,cmr

This guarantees that if there is work to do it will be found

10 years agoPass --disable-terminfo to LLVM's configure script. Closes #9334
Brian Anderson [Sun, 22 Sep 2013 01:01:11 +0000 (18:01 -0700)]
Pass --disable-terminfo to LLVM's configure script. Closes #9334

The right way to link to terminfo varies by linux distribution, so
this is making our snapshots less compatible.

10 years agoauto merge of #9366 : olsonjeffery/rust/file_io_doc_cleanup, r=brson
bors [Sun, 22 Sep 2013 00:06:03 +0000 (17:06 -0700)]
auto merge of #9366 : olsonjeffery/rust/file_io_doc_cleanup, r=brson

fixing spew that @achricto was nice enough to point out to me

10 years agoUpdate version numbers to 0.8
Brian Anderson [Sat, 21 Sep 2013 23:25:08 +0000 (16:25 -0700)]
Update version numbers to 0.8

10 years agostd: add file::io::test module and ensure correct build
Jeff Olson [Sat, 21 Sep 2013 21:15:26 +0000 (14:15 -0700)]
std: add file::io::test module and ensure correct build

10 years agostd: cleanup file::io rustdoc_ng output
Jeff Olson [Fri, 20 Sep 2013 20:52:37 +0000 (13:52 -0700)]
std: cleanup file::io rustdoc_ng output

10 years agoauto merge of #9393 : alexcrichton/rust/fix-docs, r=brson
bors [Sat, 21 Sep 2013 20:30:57 +0000 (13:30 -0700)]
auto merge of #9393 : alexcrichton/rust/fix-docs, r=brson

This needs libstd in its proper location to resolve references when generating
docs for libextra.

10 years agoFix the dependencies of rustdoc_ng doc generation
Alex Crichton [Sat, 21 Sep 2013 20:25:33 +0000 (13:25 -0700)]
Fix the dependencies of rustdoc_ng doc generation

This needs libstd in its proper location to resolve references when generating
docs for libextra.

10 years agoauto merge of #9380 : thestinger/rust/par, r=alexcrichton
bors [Sat, 21 Sep 2013 17:10:56 +0000 (10:10 -0700)]
auto merge of #9380 : thestinger/rust/par, r=alexcrichton

This was a dead end experiment, and not a sensible way of implementing
generic data parallelism. This also removes the `graph500-bfs.rs`
benchmark because it relies on `extra::par`.

Closes #5626

10 years agoauto merge of #9381 : luisbg/rust/master, r=cmr
bors [Sat, 21 Sep 2013 15:10:55 +0000 (08:10 -0700)]
auto merge of #9381 : luisbg/rust/master, r=cmr

Closes #9379

10 years agoauto merge of #9369 : sebcrozet/rust/f64_inline, r=thestinger
bors [Sat, 21 Sep 2013 13:05:56 +0000 (06:05 -0700)]
auto merge of #9369 : sebcrozet/rust/f64_inline, r=thestinger

This was, somehow, missed by #8332.

10 years agoauto merge of #9368 : StrLght/rust/master, r=thestinger
bors [Sat, 21 Sep 2013 11:45:57 +0000 (04:45 -0700)]
auto merge of #9368 : StrLght/rust/master, r=thestinger

10 years agoauto merge of #9360 : huonw/rust/4449, r=pnkfelix
bors [Sat, 21 Sep 2013 09:56:01 +0000 (02:56 -0700)]
auto merge of #9360 : huonw/rust/4449, r=pnkfelix

Fixes #4449. (Ran it through try-bsd: http://buildbot.rust-lang.org/builders/try-bsd/builds/451)

10 years agoauto merge of #9354 : thestinger/rust/cleanup, r=alexcrichton
bors [Sat, 21 Sep 2013 08:35:59 +0000 (01:35 -0700)]
auto merge of #9354 : thestinger/rust/cleanup, r=alexcrichton

I don't see the point of this function, and there are no users.

10 years agoauto merge of #9374 : alexcrichton/rust/rustdoc-web, r=cmr
bors [Sat, 21 Sep 2013 07:16:02 +0000 (00:16 -0700)]
auto merge of #9374 : alexcrichton/rust/rustdoc-web, r=cmr

This large commit implements and `html` output option for rustdoc_ng. The
executable has been altered to be invoked as "rustdoc_ng html <crate>" and
it will dump everything into the local "doc" directory. JSON can still be
generated by changing 'html' to 'json'.

This also fixes a number of bugs in rustdoc_ng relating to comment stripping,
along with some other various issues that I found along the way.

The `make doc` command has been altered to generate the new documentation into
the `doc/ng/$(CRATE)` directories.

Previews
* http://www.contrib.andrew.cmu.edu/~acrichto/doc/std/
* http://www.contrib.andrew.cmu.edu/~acrichto/doc/extra/

Missing features
* Different versions of documentation on the same page (all possibly indexed as well?) I think that this needs to be thought out before action is taken. It's an awesome idea, but it should be done carefully.
* Source links are missing. This is a little dependent on getting versions working. In theory we should link back to github, but we should always link back to the exact version the documentation was generated from.
* Integration with other tools. It would be awesome to have rustpkg-style inference of the package name and version so they don't have to be specified anywhere. Additionally, I should be able to build documentation for a pkgid, not necessarily a crate file.

cc @cmr/@Seldaek

10 years agoImplement a web backend for rustdoc_ng
Alex Crichton [Thu, 19 Sep 2013 05:18:38 +0000 (22:18 -0700)]
Implement a web backend for rustdoc_ng

This large commit implements and `html` output option for rustdoc_ng. The
executable has been altered to be invoked as "rustdoc_ng html <crate>" and
it will dump everything into the local "doc" directory. JSON can still be
generated by changing 'html' to 'json'.

This also fixes a number of bugs in rustdoc_ng relating to comment stripping,
along with some other various issues that I found along the way.

The `make doc` command has been altered to generate the new documentation into
the `doc/ng/$(CRATE)` directories.

10 years agoDocument a few undocumented methos in Vector
Luis de Bethencourt [Sat, 21 Sep 2013 05:17:22 +0000 (01:17 -0400)]
Document a few undocumented methos in Vector

Closes #9379

10 years agodrop `extra::par`
Daniel Micay [Sat, 21 Sep 2013 05:01:01 +0000 (01:01 -0400)]
drop `extra::par`

This was a dead end experiment, and not a sensible way of implementing
generic data parallelism. This also removes the `graph500-bfs.rs`
benchmark because it relies on `extra::par`.

Closes #5626

10 years agoauto merge of #9350 : pnkfelix/rust/fsk-issue-4691-catch-bad-fsu-during-compute-moves...
bors [Sat, 21 Sep 2013 03:26:02 +0000 (20:26 -0700)]
auto merge of #9350 : pnkfelix/rust/fsk-issue-4691-catch-bad-fsu-during-compute-moves, r=nikomatsakis

Resolves third bullet of #4691: if the functional-struct-update (FSU) expression `{ a: b, ..s }` causes `s` to move and `s` has a destructor, then the expression is illegal.

r? @nikomatsakis

10 years agoauto merge of #9349 : brson/rust/relnotes, r=thestinger
bors [Sat, 21 Sep 2013 01:01:04 +0000 (18:01 -0700)]
auto merge of #9349 : brson/rust/relnotes, r=thestinger

10 years agoauto merge of #9371 : thestinger/rust/text, r=pnkfelix
bors [Fri, 20 Sep 2013 23:11:04 +0000 (16:11 -0700)]
auto merge of #9371 : thestinger/rust/text, r=pnkfelix

We force the usage of LF line endings, but *only* in text files.

10 years agostd: add missing #[inline] annotation to the f64 neg method.
Sébastien Crozet [Fri, 20 Sep 2013 22:23:49 +0000 (00:23 +0200)]
std: add missing #[inline] annotation to the f64 neg method.

This was, somehow, missed by #8332.

10 years agoFix example in std::Option
Grigoriy [Fri, 20 Sep 2013 22:00:20 +0000 (02:00 +0400)]
Fix example in std::Option

10 years agoauto merge of #9276 : alexcrichton/rust/dox, r=brson
bors [Fri, 20 Sep 2013 21:11:08 +0000 (14:11 -0700)]
auto merge of #9276 : alexcrichton/rust/dox, r=brson

Hopefull this will make our libstd docs appear a little more "full".

10 years agoauto merge of #9278 : alexcrichton/rust/ndebug, r=brson
bors [Fri, 20 Sep 2013 19:46:05 +0000 (12:46 -0700)]
auto merge of #9278 : alexcrichton/rust/ndebug, r=brson

Many people will be very confused that their debug! statements aren't working
when they first use rust only to learn that they should have been building with
`--cfg debug` the entire time. This inverts the meaning of the flag to instead
of enabling debug statements, now it disables debug statements.

This way the default behavior is a bit more reasonable, and requires less
end-user configuration. Furthermore, this turns on debug by default when
building the rustc compiler.

10 years agoInvert --cfg debug to --cfg ndebug
Alex Crichton [Wed, 18 Sep 2013 04:02:11 +0000 (21:02 -0700)]
Invert --cfg debug to --cfg ndebug

Many people will be very confused that their debug! statements aren't working
when they first use rust only to learn that they should have been building with
`--cfg debug` the entire time. This inverts the meaning of the flag to instead
of enabling debug statements, now it disables debug statements.

This way the default behavior is a bit more reasonable, and requires less
end-user configuration. Furthermore, this turns on debug by default when
building the rustc compiler.

10 years agoAdd a note about improved rustc perf to 0.8 relnotes
Brian Anderson [Fri, 20 Sep 2013 18:49:27 +0000 (11:49 -0700)]
Add a note about improved rustc perf to 0.8 relnotes

10 years agoFix spelling and phrasing in 0.8 release notes
Brian Anderson [Thu, 19 Sep 2013 23:50:49 +0000 (16:50 -0700)]
Fix spelling and phrasing in 0.8 release notes

10 years agoauto merge of #9338 : steveklabnik/rust/rustpkg_update_manpage, r=catamorphism
bors [Fri, 20 Sep 2013 18:21:07 +0000 (11:21 -0700)]
auto merge of #9338 : steveklabnik/rust/rustpkg_update_manpage, r=catamorphism

I didn't update the manpage when I added the init command. Whoops.

10 years agoauto merge of #9327 : larsbergstrom/rust/tutorial_installation_tweak, r=catamorphism
bors [Fri, 20 Sep 2013 16:56:09 +0000 (09:56 -0700)]
auto merge of #9327 : larsbergstrom/rust/tutorial_installation_tweak, r=catamorphism

I've had multiple people whom I pointed at the Rust tutorial ask me where to download the snapshot compiler, so I made the text more explicit.

10 years agoauto merge of #9337 : steveklabnik/rust/rustpkg_usage, r=catamorphism
bors [Fri, 20 Sep 2013 15:31:12 +0000 (08:31 -0700)]
auto merge of #9337 : steveklabnik/rust/rustpkg_usage, r=catamorphism

When I took out the ability to make a new project by name, I forgot to
update the usage to reflect the changes.

10 years agoauto merge of #9332 : eugals/rust/master, r=alexcrichton
bors [Fri, 20 Sep 2013 14:06:13 +0000 (07:06 -0700)]
auto merge of #9332 : eugals/rust/master, r=alexcrichton

It is intended to optimize/beautify the code generated in a few trivial trait operations.
Let's take the following code as an example:
```
trait Stuff {
    fn bar(&self);
}

fn callBar(s: &Stuff) {
    s.bar();
}

struct Foo;

impl Stuff for Foo {
    fn bar(&self) {
    }
}

pub fn main() {
    let o = Foo;
    callBar(&o as &Stuff);
}
```

At present it is translated into something like:
```
define void @_ZN7callBar_UUID.0E({ i32, %tydesc*, i8*, i8*, i8 }*, { %tydesc*, i8* }*) #4 {
"function top level":
  %__trait_callee = alloca { %tydesc*, i8* }
  %__auto_borrow_obj = alloca { %tydesc*, i8* }
  %2 = getelementptr inbounds { %tydesc*, i8* }* %1, i32 0, i32 0
  %3 = load %tydesc** %2
  %4 = getelementptr inbounds { %tydesc*, i8* }* %__auto_borrow_obj, i32 0, i32 0
  store %tydesc* %3, %tydesc** %4
  %5 = getelementptr inbounds { %tydesc*, i8* }* %1, i32 0, i32 1
  %6 = load i8** %5
  %7 = getelementptr inbounds { %tydesc*, i8* }* %__auto_borrow_obj, i32 0, i32 1
  store i8* %6, i8** %7
  %8 = bitcast { %tydesc*, i8* }* %__auto_borrow_obj to i8*
  %9 = bitcast { %tydesc*, i8* }* %__trait_callee to i8*
  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %9, i8* %8, i32 8, i32 4, i1 false)
  %10 = getelementptr inbounds { %tydesc*, i8* }* %__trait_callee, i32 0, i32 1
  %11 = load i8** %10
  %12 = bitcast i8* %11 to { i32, %tydesc*, i8*, i8*, i8 }*
  %13 = getelementptr inbounds { %tydesc*, i8* }* %__trait_callee, i32 0, i32 0
  %14 = bitcast %tydesc** %13 to [1 x i8*]**
  %15 = load [1 x i8*]** %14
  %16 = getelementptr inbounds [1 x i8*]* %15, i32 0, i32 1
  %17 = load i8** %16
  %18 = bitcast i8* %17 to void ({ i32, %tydesc*, i8*, i8*, i8 }*)*
  call void %18({ i32, %tydesc*, i8*, i8*, i8 }* %12)
  ret void
}

...

define void @_ZN4main_UUID.0E({ i32, %tydesc*, i8*, i8*, i8 }*) #4 {
"function top level":
  %o = alloca %struct.Foo
  %1 = alloca { %tydesc*, i8* }
  %__auto_borrow_obj = alloca { %tydesc*, i8* }
  %2 = getelementptr inbounds { %tydesc*, i8* }* %1, i32 0, i32 1
  %3 = bitcast i8** %2 to %struct.Foo**
  store %struct.Foo* %o, %struct.Foo** %3
  %4 = getelementptr inbounds { %tydesc*, i8* }* %1, i32 0, i32 0
  %5 = bitcast %tydesc** %4 to { %tydesc*, void ({ i32, %tydesc*, i8*, i8*, i8 }*)* }**
  store { %tydesc*, void ({ i32, %tydesc*, i8*, i8*, i8 }*)* }* @vtable1081, { %tydesc*, void ({ i32, %tydesc*, i8*, i8*, i8 }*)* }** %5
  %6 = getelementptr inbounds { %tydesc*, i8* }* %1, i32 0, i32 0
  %7 = load %tydesc** %6
  %8 = getelementptr inbounds { %tydesc*, i8* }* %__auto_borrow_obj, i32 0, i32 0
  store %tydesc* %7, %tydesc** %8
  %9 = getelementptr inbounds { %tydesc*, i8* }* %1, i32 0, i32 1
  %10 = load i8** %9
  %11 = getelementptr inbounds { %tydesc*, i8* }* %__auto_borrow_obj, i32 0, i32 1
  store i8* %10, i8** %11
  call void @_ZN7callBar_UUID.0E({ i32, %tydesc*, i8*, i8*, i8 }* undef, { %tydesc*, i8* }* %__auto_borrow_obj)
  ret void
}
```

If you apply my patch, it would become way shorter and cleaner:
```
define void @_ZN7callBar_UUID.0E({ i32, %tydesc*, i8*, i8*, i8 }*, { %tydesc*, i8* }*) #4 {
"function top level":
  %2 = getelementptr inbounds { %tydesc*, i8* }* %1, i32 0, i32 1
  %3 = load i8** %2
  %4 = bitcast i8* %3 to { i32, %tydesc*, i8*, i8*, i8 }*
  %5 = getelementptr inbounds { %tydesc*, i8* }* %1, i32 0, i32 0
  %6 = bitcast %tydesc** %5 to [1 x i8*]**
  %7 = load [1 x i8*]** %6
  %8 = getelementptr inbounds [1 x i8*]* %7, i32 0, i32 1
  %9 = load i8** %8
  %10 = bitcast i8* %9 to void ({ i32, %tydesc*, i8*, i8*, i8 }*)*
  call void %10({ i32, %tydesc*, i8*, i8*, i8 }* %4)
  ret void
}

...

define void @_ZN4main_UUID.0E({ i32, %tydesc*, i8*, i8*, i8 }*) #4 {
"function top level":
  %o = alloca %struct.Foo
  %1 = alloca { %tydesc*, i8* }
  %2 = getelementptr inbounds { %tydesc*, i8* }* %1, i32 0, i32 1
  %3 = bitcast i8** %2 to %struct.Foo**
  store %struct.Foo* %o, %struct.Foo** %3
  %4 = getelementptr inbounds { %tydesc*, i8* }* %1, i32 0, i32 0
  %5 = bitcast %tydesc** %4 to { %tydesc*, void ({ i32, %tydesc*, i8*, i8*, i8 }*)* }**
  store { %tydesc*, void ({ i32, %tydesc*, i8*, i8*, i8 }*)* }* @vtable1081, { %tydesc*, void ({ i32, %tydesc*, i8*, i8*, i8 }*)* }** %5
  call void @_ZN7callBar_UUID.0E({ i32, %tydesc*, i8*, i8*, i8 }* undef, { %tydesc*, i8* }* %1)
  ret void
}
```

Although this change doesn't increase the compilation speed much (I mentioned only about 1-2% boost on "rustc -O -Z time-passes syntax.rs"), but I still think it's a good thing to do as it greatly simplifies/clarifies LL generated in some cases which would definitely help in the future code generation investigations.

I don't provide any new test cases in this patch as it is merely an optimization.

Sorry guys, I somehow messed my previous PR and I don't see any better way to fix as to recreate it here.

10 years agoauto merge of #9326 : NiccosSystem/rust/master, r=bstrie
bors [Fri, 20 Sep 2013 11:56:09 +0000 (04:56 -0700)]
auto merge of #9326 : NiccosSystem/rust/master, r=bstrie

10 years agoUncomment a test. Fixes #4449.
Huon Wilson [Fri, 20 Sep 2013 06:55:01 +0000 (16:55 +1000)]
Uncomment a test. Fixes #4449.

10 years agoauto merge of #9322 : catamorphism/rust/rustpkg-discovered-outputs, r=brson
bors [Fri, 20 Sep 2013 10:26:10 +0000 (03:26 -0700)]
auto merge of #9322 : catamorphism/rust/rustpkg-discovered-outputs, r=brson

r? @brson as per #9112

Closes #9112

10 years agoauto merge of #9321 : chris-morgan/rust/lowercase-nan-methods, r=brson
bors [Fri, 20 Sep 2013 09:01:13 +0000 (02:01 -0700)]
auto merge of #9321 : chris-morgan/rust/lowercase-nan-methods, r=brson

This is for consistency in naming conventions.

- ``std::num::Float::NaN()`` is changed to ``nan()``;
- ``std::num::Float.is_NaN()`` is changed to ``is_nan()``; and
- ``std::num::strconv::NumStrConv::NaN()`` is changed to ``nan()``.

Fixes #9319.

10 years agoauto merge of #9320 : chris-morgan/rust/unreachable-macro-part-two-of-two-containing...
bors [Fri, 20 Sep 2013 07:36:11 +0000 (00:36 -0700)]
auto merge of #9320 : chris-morgan/rust/unreachable-macro-part-two-of-two-containing-the-destruction-of-the-unreachable-function, r=alexcrichton

This is the second of two parts of #8991, now possible as a new snapshot
has been made. (The first part implemented the unreachable!() macro; it
was #8992, 6b7b8f2682.)

``std::util::unreachable()`` is removed summarily; any code which used
it should now use the ``unreachable!()`` macro.

Closes #9312.

Closes #8991.

10 years agoauto merge of #9315 : thestinger/rust/doc, r=alexcrichton
bors [Fri, 20 Sep 2013 06:11:19 +0000 (23:11 -0700)]
auto merge of #9315 : thestinger/rust/doc, r=alexcrichton

This also renames the section, as managed vectors cannot be resized
(since it would invalidate the other references).

10 years agoutil: remove unused `with` function
Daniel Micay [Fri, 20 Sep 2013 04:59:02 +0000 (00:59 -0400)]
util: remove unused `with` function

10 years agoauto merge of #9308 : ben0x539/rust/lexer-error-spans, r=alexcrichton
bors [Fri, 20 Sep 2013 04:46:45 +0000 (21:46 -0700)]
auto merge of #9308 : ben0x539/rust/lexer-error-spans, r=alexcrichton

Previously, the lexer calling `rdr.fatal(...)` would report the span of
the last complete token, instead of a span within the erroneous token
(besides one span fixed in 1ac90bb).

This branch adds wrappers around `rdr.fatal(...)` that sets the span
explicilty, so that all fatal errors in `libsyntax/parse/lexer.rs` now
report the offending code more precisely. A number of tests try to
verify that, though the `compile-fail` testing setup can only check that
the spans are on the right lines, and the "unterminated string/block
comment" errors can't have the line marked at all, so that's incomplete.

This closes #9149.

Also, the lexer errors now report the offending code in the error message,
not just via the span, just like other errors do.

10 years agostd::rt: Try stealing from all schedulers
Brian Anderson [Wed, 4 Sep 2013 23:54:05 +0000 (16:54 -0700)]
std::rt: Try stealing from all schedulers

This guarantees that if there is work to do it will be found

10 years agoauto merge of #9285 : sfackler/rust/future, r=alexcrichton
bors [Fri, 20 Sep 2013 02:31:13 +0000 (19:31 -0700)]
auto merge of #9285 : sfackler/rust/future, r=alexcrichton

The `Drop` implementation was used to prevent `Future` from being implicitly copyable. Since `~fn`s are no longer copyable, this is no longer needed. I added a cfail test to make sure that this is actually the case.

I method-ized all of the `Future` creation methods and added a new one, `spawn_with`, which is similar to `task::spawn_with`.

I also got rid of some unused imports in tests.

10 years agofixed another test.
Felix S. Klock II [Fri, 20 Sep 2013 01:15:21 +0000 (03:15 +0200)]
fixed another test.

10 years agofix bug in test.
Felix S. Klock II [Fri, 20 Sep 2013 01:09:57 +0000 (03:09 +0200)]
fix bug in test.

10 years agoResolves third bullet of #4691, and adds tests for it. Fix #4691.
Felix S. Klock II [Fri, 20 Sep 2013 00:59:06 +0000 (02:59 +0200)]
Resolves third bullet of #4691, and adds tests for it.  Fix #4691.

10 years agorestore auto-detection of text files
Daniel Micay [Thu, 19 Sep 2013 23:06:05 +0000 (19:06 -0400)]
restore auto-detection of text files

We force the usage of LF line endings, but *only* in text files.

10 years agoauto merge of #9342 : alexcrichton/rust/ignore-libuv-signal-tests, r=brson
bors [Thu, 19 Sep 2013 22:56:04 +0000 (15:56 -0700)]
auto merge of #9342 : alexcrichton/rust/ignore-libuv-signal-tests, r=brson

They're causing syscalls to get interrupted, and std::io doesn't correctly
handle EINTR

10 years agoClean up unused imports
Steven Fackler [Wed, 18 Sep 2013 07:12:22 +0000 (00:12 -0700)]
Clean up unused imports

10 years agoAdd Future::spawn_with
Steven Fackler [Wed, 18 Sep 2013 06:56:02 +0000 (23:56 -0700)]
Add Future::spawn_with

10 years agoModernize extra::future API
Steven Fackler [Wed, 18 Sep 2013 06:48:56 +0000 (23:48 -0700)]
Modernize extra::future API

10 years agoFix unresolved symbol error for the crate_map in libstd on os x.
Luqman Aden [Thu, 19 Sep 2013 21:22:59 +0000 (17:22 -0400)]
Fix unresolved symbol error for the crate_map in libstd on os x.

10 years agoIgnore io::process tests
Alex Crichton [Thu, 19 Sep 2013 22:17:29 +0000 (15:17 -0700)]
Ignore io::process tests

They're causing syscalls to get interrupted, and std::io doesn't correctly
handle EINTR

10 years agolexer: further slight improvements to lexer errors
Benjamin Herr [Thu, 19 Sep 2013 20:34:31 +0000 (22:34 +0200)]
lexer: further slight improvements to lexer errors

10 years agoUpdate rustpkg manpage to add init.
Steve Klabnik [Thu, 19 Sep 2013 19:58:29 +0000 (12:58 -0700)]
Update rustpkg manpage to add init.

I didn't update the manpage when I added the init command. Whoops.

10 years agoFix usage for rustpkg init
Steve Klabnik [Thu, 19 Sep 2013 19:53:38 +0000 (12:53 -0700)]
Fix usage for rustpkg init

When I took out the ability to make a new project by name, I forgot to
update the usage to reflect the changes.

10 years agoauto merge of #9295 : alexcrichton/rust/fix-lang-items, r=thestinger
bors [Thu, 19 Sep 2013 18:11:01 +0000 (11:11 -0700)]
auto merge of #9295 : alexcrichton/rust/fix-lang-items, r=thestinger

Also add a test to help prevent this from getting out of sync again.

10 years agopacified test/run-pass/core-run-destroy on Win7x64
Evgeny Sologubov [Thu, 19 Sep 2013 17:23:04 +0000 (21:23 +0400)]
pacified test/run-pass/core-run-destroy on Win7x64

10 years agoauto merge of #9279 : erickt/rust/master, r=alexcrichton
bors [Thu, 19 Sep 2013 16:55:59 +0000 (09:55 -0700)]
auto merge of #9279 : erickt/rust/master, r=alexcrichton

`Some(5).or_{default,zero}` can be easily replaced with `Some(Some(5).unwrap_or_default())`.

10 years agoRemoved future's destructor
Steven Fackler [Wed, 18 Sep 2013 06:23:20 +0000 (23:23 -0700)]
Removed future's destructor

It was only there to prevent Future from being copyable, but it's
noncopyable anyways since it contains a ~fn.

10 years agoClarify that snapshots are automatically retrieved.
Lars Bergstrom [Thu, 19 Sep 2013 15:58:26 +0000 (10:58 -0500)]
Clarify that snapshots are automatically retrieved.

10 years agoauto merge of #9313 : brson/rust/relnotes, r=thestinger
bors [Thu, 19 Sep 2013 15:40:59 +0000 (08:40 -0700)]
auto merge of #9313 : brson/rust/relnotes, r=thestinger

10 years agoFix broken tutorial link
NiccosSystem [Thu, 19 Sep 2013 15:18:40 +0000 (17:18 +0200)]
Fix broken tutorial link

10 years agolexer: report problematic chars verbatim or as escape sequence
Benjamin Herr [Thu, 19 Sep 2013 14:21:29 +0000 (16:21 +0200)]
lexer: report problematic chars verbatim or as escape sequence

... instead of giving their numeric codepoint, following the lead of
fdaae34. So the error message for, say, '\_' mentions _ instead of 95,
and '\●' now mentions \u25cf.

10 years agolexer: show correct span on lexical errors
Benjamin Herr [Thu, 19 Sep 2013 14:11:23 +0000 (16:11 +0200)]
lexer: show correct span on lexical errors

Previously, the lexer calling `rdr.fatal(...)` would report the span of
the last complete token, instead of a span within the erroneous token
(besides one span fixed in 1ac90bb).

This commit adds a wrapper around `rdr.fatal(...)` that sets the span
explicilty, so that all fatal errors in `libsyntax/parse/lexer.rs` now
report the offending code more precisely. A number of tests try to
verify that, though the `compile-fail` testing setup can only check that
the spans are on the right lines, and the "unterminated string/block
comment" errors can't have the line marked at all, so that's incomplete.

Closes #9149.

10 years agowill not copy trait_callee on stack if it's source expr is a plain borrowed ref
U-NOV2010\eugals [Wed, 18 Sep 2013 12:55:39 +0000 (16:55 +0400)]
will not copy trait_callee on stack if it's source expr is a plain borrowed ref

10 years agominor Type::opaque_trait code cleanup
U-NOV2010\eugals [Tue, 17 Sep 2013 09:36:47 +0000 (13:36 +0400)]
minor Type::opaque_trait code cleanup

10 years agooptimized trans_to_datum::auto_borrow_obj code generation in case some trivial cases...
U-NOV2010\eugals [Tue, 17 Sep 2013 09:33:36 +0000 (13:33 +0400)]
optimized trans_to_datum::auto_borrow_obj code generation in case some trivial cases where simple copying can be applied

10 years agoauto merge of #9299 : alexcrichton/rust/fmt-trailing-comma, r=huonw
bors [Thu, 19 Sep 2013 14:06:04 +0000 (07:06 -0700)]
auto merge of #9299 : alexcrichton/rust/fmt-trailing-comma, r=huonw

This is more consistent with other parts of the language and it also makes it
easier to use in situations where format string is massive.

10 years agoRename the NaN and is_NaN methods to lowercase.
Chris Morgan [Thu, 19 Sep 2013 05:37:34 +0000 (15:37 +1000)]
Rename the NaN and is_NaN methods to lowercase.

This is for consistency in naming conventions.

- ``std::num::Float::NaN()`` is changed to ``nan()``;
- ``std::num::Float.is_NaN()`` is changed to ``is_nan()``; and
- ``std::num::strconv::NumStrConv::NaN()`` is changed to ``nan()``.

Fixes #9319.