Commit Graph

24208 Commits

Author SHA1 Message Date
Alex Crichton
17a951c7bf Remove unused upcalls
The main one removed is rust_upcall_reset_stack_limit (continuation of #10156),
and this also removes the upcall_trace function. The was hidden behind a
`-Z trace` flag, but if you attempt to use this now you'll get a linker error
because there is no implementation of the 'upcall_trace' function. Due to this
no longer working, I decided to remove it entirely from the compiler (I'm also a
little unsure on what it did in the first place).
2013-12-05 16:29:16 -08:00
Alex Crichton
6b34ba242d Update LLVM and jettison jit support
LLVM's JIT has been updated numerous times, and we haven't been tracking it at
all. The existing LLVM glue code no longer compiles, and the JIT isn't used for
anything currently.

This also rebases out the FixedStackSegment support which we have added to LLVM.
None of this is still in use by the compiler, and there's no need to keep this
functionality around inside of LLVM.

This is needed to unblock #10708 (where we're tripping an LLVM assertion).
2013-12-05 09:15:54 -08:00
bors
b5bab85c1a auto merge of #10796 : kballard/rust/revert-new-naming, r=alexcrichton
Rename the `*::init()` functions back to `*::new()`, since `new` is not
going to become a keyword.
2013-12-04 23:26:19 -08:00
Kevin Ballard
b1705714d5 Rename std::rt::deque::*::init() to *::new() 2013-12-04 22:33:53 -08:00
Kevin Ballard
2c4a1b55e6 Rename extra::json::*::init() constructors to *::new() 2013-12-04 22:33:53 -08:00
Kevin Ballard
408dc5ad1b Revert "libstd: Change Path::new to Path::init."
This reverts commit c54427ddfb.

Leave the #[ignores] in that were added to rustpkg tests.

Conflicts:
	src/librustc/driver/driver.rs
	src/librustc/metadata/creader.rs
2013-12-04 22:33:53 -08:00
bors
10c8409c78 auto merge of #10804 : alexcrichton/rust/less-dup, r=pcwalton
This is just an implementation detail of using libuv, so move the libuv-specific
logic into librustuv.
2013-12-04 22:11:22 -08:00
bors
bd5305fbc8 auto merge of #10799 : TeXitoi/rust/shootout-reverse-complement-resurected, r=alexcrichton
This version is inspired by the best version in C by Mr Ledrug,
but without the parallelisation.
2013-12-04 20:46:23 -08:00
bors
64bcfd246c auto merge of #10803 : vmx/rust/integer-decode, r=cmr
The `integer_decode()` function decodes a float (f32/f64)
into integers containing the mantissa, exponent and sign.

It's needed for `rationalize()` implementation of #9838.

The code got ported from ABCL [1].

[1] http://abcl.org/trac/browser/trunk/abcl/src/org/armedbear/lisp/FloatFunctions.java?rev=14465#L94

I got the permission to use this code for Rust from Peter Graves (the ABCL copyright holder) . If there's any further IP clearance needed, let me know.
2013-12-04 18:46:21 -08:00
bors
edb9e85ce2 auto merge of #10690 : thestinger/rust/doc, r=alexcrichton
This begins a rewrite of some sections the tutorial as an introduction
to concepts through the implementation of a simple data structure. I
think this would be a good way to introduce references, generics, traits
and many other concepts too. For example, the section introducing
alternatives to ownership can demonstrate a persistent list.
2013-12-04 16:51:23 -08:00
Daniel Micay
c1eb20b5f8 rewrite part of the tutorial
This begins a rewrite of some sections the tutorial as an introduction
to concepts through the implementation of a simple data structure. I
think this would be a good way to introduce references, traits and many
other concepts too. For example, the section introducing alternatives to
ownership can demonstrate a persistent list.
2013-12-04 16:55:03 -05:00
bors
ad58e2c31c auto merge of #10792 : kballard/rust/parse_sugary_call_expr-comments, r=alexcrichton
The comments on this function date back from when it was used for `for`
expressions in addition to `do` expressions.
2013-12-04 13:31:45 -08:00
bors
9b9cf9892b auto merge of #10701 : huonw/rust/rm-from_utf8, r=brson
This function had type &[u8] -> ~str, i.e. it allocates a string
internally, even though the non-allocating version that take &[u8] ->
&str and ~[u8] -> ~str are all that is necessary in most circumstances.
2013-12-04 11:32:23 -08:00
Guillaume Pinot
e76e83cb10 rewrite of shootout-reverse-complement.rs
This version is inspired by the best version in C by Mr Ledrug,
but without the parallelisation.
2013-12-04 18:15:53 +01:00
Alex Crichton
e0264ff192 Don't dup the stdio file descriptors.
This is just an implementation detail of using libuv, so move the libuv-specific
logic into librustuv.
2013-12-04 08:51:47 -08:00
bors
5fa6bd526e auto merge of #10788 : alexcrichton/rust/fixes, r=pcwalton
I used the wrong condition where I was looking for "is this method public or is
this implementation a trait" rather than what was being checked.
2013-12-04 08:12:11 -08:00
Volker Mische
30a9c6e490 Decode a float into integers
The `integer_decode()` function decodes a float (f32/f64)
into integers containing the mantissa, exponent and sign.

It's needed for `rationalize()` implementation of #9838.

The code got ported from ABCL [1].

[1] http://abcl.org/trac/browser/trunk/abcl/src/org/armedbear/lisp/FloatFunctions.java?rev=14465#L94
2013-12-04 16:11:39 +01:00
bors
91695797c2 auto merge of #10794 : alexcrichton/rust/issue-10790, r=alexcrichton
Note entirely sure how this is passing at all today, but regardless this fixes
the problems seen in #10790 

Closes #10790
2013-12-04 05:26:35 -08:00
bors
1191ae87db auto merge of #10793 : chris-morgan/rust/2013-12-04-vim-updates, r=Aatch
- Implement comment nesting (the implementation is quite ugly at present
  and is not quite correct; note the big comment in that area).

- Highlight invalid escape sequences as errors.

- Fix up various inconsistencies and incorrectnesses in number
  highlighting.

- Update prelude items (``std::io::{Buffer, Writer, Reader, Seek}``).

- Highlight the ``proc`` keyword.

- Remove %-formatting sequence highlighting (a relic of old formatting).

- Don't highlight TODO in strings (it's unconventional).
2013-12-04 04:11:26 -08:00
Huon Wilson
b0426edc0a std::str: s/from_utf8_slice/from_utf8/, to make the basic case shorter. 2013-12-04 22:35:53 +11:00
Huon Wilson
9d64e46013 std::str: remove from_utf8.
This function had type &[u8] -> ~str, i.e. it allocates a string
internally, even though the non-allocating version that take &[u8] ->
&str and ~[u8] -> ~str are all that is necessary in most circumstances.
2013-12-04 22:35:53 +11:00
bors
9635c763ba auto merge of #10783 : sfackler/rust/drop, r=alexcrichton
It's a more fitting name for the most common use case of this function.
2013-12-04 01:36:29 -08:00
bors
63c9522c27 auto merge of #10776 : alexcrichton/rust/issue-9725, r=pcwalton
Closes #9725
2013-12-03 23:56:25 -08:00
bors
c22f6d8d44 auto merge of #10785 : alexcrichton/rust/omg-i-hate-windows, r=pcwalton
Turns out LLVM only builds libfoo.a libraries, so we're going to need this logic
to statically link librustc
2013-12-03 21:11:26 -08:00
Steven Fackler
a243360401 Move std::util::ignore to std::prelude::drop
It's a more fitting name for the most common use case of this function.
2013-12-03 20:40:38 -08:00
Alex Crichton
0cd79ee18a Don't infinitely recurse in a process test
Note entirely sure how this is passing at all today, but regardless this fixes
the problems seen in #10790
2013-12-03 19:17:45 -08:00
bors
50e9d4f889 auto merge of #10752 : dhodder/rust/master, r=pcwalton 2013-12-03 18:31:36 -08:00
Chris Morgan
c9eed5742e Improve various Vim syntax highlighting things.
- Implement comment nesting (the implementation is quite ugly at present
  and is not quite correct; note the big comment in that area).

- Highlight invalid escape sequences as errors.

- Fix up various inconsistencies and incorrectnesses in number
  highlighting.

- Update prelude items (``std::io::{Buffer, Writer, Reader, Seek}``).

- Highlight the ``proc`` keyword.

- Remove %-formatting sequence highlighting (a relic of old formatting).

- Don't highlight TODO in strings (it's unconventional).
2013-12-04 12:41:56 +11:00
Kevin Ballard
c00837e90a Fix the comments for libsyntax::parse::parser::parse_sugary_call_expr
The comments on this function date back from when it was used for `for`
expressions in addition to `do` expressions.
2013-12-03 16:55:00 -08:00
Alex Crichton
7a2415f0e4 Fix a bug in exporting trait implementations
I used the wrong condition where I was looking for "is this method public or is
this implementation a trait" rather than what was being checked.
2013-12-03 15:15:17 -08:00
bors
693ec73b9b auto merge of #10747 : alexcrichton/rust/snapshots, r=cmr
This registers new snapshots after the landing of #10528, and then goes on to tweak the build process to build a monolithic `rustc` binary for use in future snapshots. This mainly involved dropping the dynamic dependency on `librustllvm`, so that's now built as a static library (with a dynamically generated rust file listing LLVM dependencies).

This currently doesn't actually make the snapshot any smaller (24MB => 23MB), but I noticed that the executable has 11MB of metadata so once progress is made on #10740 we should have a much smaller snapshot.

There's not really a super-compelling reason to distribute just a binary because we have all the infrastructure for dealing with a directory structure, but to me it seems "more correct" that a snapshot compiler is just a `rustc` binary.
2013-12-03 14:36:59 -08:00
Alex Crichton
acc5e32e53 Register new snapshots 2013-12-03 14:31:54 -08:00
bors
69186efc19 auto merge of #10768 : Blei/rust/logging-enabled-macros, r=alexcrichton
This is useful when the information that is needed to do useful logging
is expensive to produce.
2013-12-03 12:11:25 -08:00
bors
899217c11b auto merge of #10757 : TeXitoi/rust/mut-split-iter, r=alexcrichton
I've renamed `MutableVector::mut_split(at)` to `MutableVector::mut_split_at(at)` to be coherent with ImmutableVector.  As specified in the commit log, The `size_hint` method is not optimal because of #9629.
2013-12-03 10:11:25 -08:00
Alex Crichton
cb823b09df Search for libfoo.a on windows as well as foo.lib
Turns out LLVM only builds libfoo.a libraries, so we're going to need this logic
to statically link librustc
2013-12-03 08:59:09 -08:00
Guillaume Pinot
44fc3c6ea8 add MutableVector::mut_split(self, pred) -> DoubleEndedIterator<&mut [T]>
This method is the mutable version of ImmutableVector::split.  It is
a DoubleEndedIterator, making mut_rsplit irrelevent.  The size_hint
method is not optimal because of #9629.

At the same time, clarify *split* iterator doc.
2013-12-03 17:31:15 +01:00
bors
e2d192c9f4 auto merge of #10777 : alexcrichton/rust/issue-10743, r=luqmana
Commit messages have the fun details, the focus of this is closing #10743 though
2013-12-03 08:21:26 -08:00
Alex Crichton
0dc9f62779 Resume propagation of linking to native dylibs
The reasons for this are outlined in issue #10743 as well as the comment I have
now placed in the code.

Closes #10743
2013-12-03 08:19:33 -08:00
Alex Crichton
6437122e64 Tidy up a few problems with run-make tests
Use the correct set of dependencies as well as CFG_PYTHON instead of assuming
'python' is the right one.
2013-12-03 08:13:00 -08:00
Alex Crichton
2bd80758a2 Continue tightening holes in reachability
* Don't flag any address_insignificant statics as reachable because the whole
  point of the address_insignificant optimization is that the static is not
  reachable. Additionally, there's no need for it to be reachable because LLVM
  optimizes it away.

* Be sure to not leak external node ids into our reachable set, this can
  spuriously cause local items to be considered reachable if the node ids just
  happen to line up
2013-12-03 08:13:00 -08:00
bors
6a9db409e5 auto merge of #10782 : alexcrichton/rust/rustdoc-lib, r=thestinger
This makes sure that when generating documentation we don't waste time doing
things like looking for a main function.
2013-12-03 01:51:26 -08:00
bors
f1ef36ea2f auto merge of #10773 : jvns/rust/patch-1, r=cmr
The section on closure types was missing, so I added one. I'm new to Rust, so there are probably important things to say about closure types that I'm missing here.

I tested the example with the latest Rust nightly.
2013-12-02 23:32:33 -08:00
Philipp Brüschweiler
a68917190b Add test to check for debug logging disabled at compile time 2013-12-03 07:44:46 +01:00
bors
18084be316 auto merge of #10772 : alexcrichton/rust/issue-3053, r=alexcrichton
Rebasing #10446 with a `pub fn main`
2013-12-02 21:32:38 -08:00
Alex Crichton
6600ba97c3 rustdoc: Tell rustc we're building a library
This makes sure that when generating documentation we don't waste time doing
things like looking for a main function.
2013-12-02 21:26:40 -08:00
bors
fc3b7c1450 auto merge of #10770 : alexcrichton/rust/static-librustrt, r=alexcrichton
This wasn't uncovered during testing because the librustrt is available locally
in the build directory (and it needs to be for all the tests to link against it
as well).

Closes #10765
2013-12-02 20:16:51 -08:00
bors
8cb59d3868 auto merge of #10771 : pnkfelix/rust/fix-make-check-for-ccacheless-clang, r=acrichto
This fixes a problem with `make check` clang -Werror failing due to an unused -Llib arg.
2013-12-02 19:02:07 -08:00
bors
3a3ffab69b auto merge of #10759 : SiegeLord/rust/placeholder, r=cmr
This makes the search bar more visible.
2013-12-02 17:31:42 -08:00
bors
0e66baf013 auto merge of #10736 : Blei/rust/fix_c_vec, r=alexcrichton
Controversial change: make the constructors safe, but instead mark the
setters and getters as unsafe. This follows the tradition that construction
of *T is safe, but the access is unsafe instead.
2013-12-02 16:06:40 -08:00
Alex Crichton
80055dee3a Disallow duplicate bindings of struct fields
Closes #9725
2013-12-02 14:20:27 -08:00