Commit Graph

29649 Commits

Author SHA1 Message Date
Valerii Hiora
3446f28879 Updated compiler-rt
Previous update unfortunately included changes which
broke Android compilation. This update fixes it and
should allow correct compilation of SjLj for iOS and
all builtins for Android.
2014-06-14 21:48:12 +03:00
Valerii Hiora
41522aaf72 There should be no metadata to read on iOS 2014-06-13 11:41:00 +03:00
Valerii Hiora
ebc6474668 Cosmetic fixes & comments 2014-06-13 10:18:12 +03:00
Valerii Hiora
70a79a9e05 Better dylib skipping based on Alex Crichton code 2014-06-12 21:15:14 +03:00
Valerii Hiora
a49b765f9a Basic iOS support 2014-06-12 21:15:14 +03:00
Valerii Hiora
0c10c68682 Disable generating split-stack code
Allows to compile for archs which do not have (or have limited)
segmented stack support like embedded.
2014-06-12 20:24:08 +03:00
Valerii Hiora
d730ae2fb0 Runtime support for arm on iOS 2014-06-12 20:24:08 +03:00
Valerii Hiora
9e90a5e72c Platform configuration
FIXME: avoid using Xcode build and switch to a patched libuv
2014-06-12 20:24:07 +03:00
Valerii Hiora
9ece0510b1 Updated deps 2014-06-12 20:20:12 +03:00
bors
c0a6f72e8b auto merge of #14805 : zzmp/rust/patch-1, r=alexcrichton
The guide previously stated:

> The compiler will automatically convert a box box point to a reference like &point.

This fixes the doubled word `box`, so the statement reads

> The compiler will automatically convert a box point to a reference like &point.

The code it is referring to is `compute_distance(&on_the_stack, on_the_heap);`, so a single `box` is appropriate.
2014-06-12 14:17:13 +00:00
bors
87bf47a0f7 auto merge of #14801 : pcwalton/rust/name-shadowing-in-one-pattern, r=alexcrichton
bindings and function arguments.

Issue #14581.

To fix code that this breaks, give the pattern identifiers different names.

[breaking-change]

r? @brson
2014-06-12 12:32:13 +00:00
bors
614e448b02 auto merge of #14800 : reem/rust/patch-1, r=alexcrichton
According to #14767 and the grammar right above this documentation, nested comments are supported.
2014-06-12 10:47:03 +00:00
bors
eaabca6aeb auto merge of #14792 : alexcrichton/rust/local-jemalloc, r=brson
This configures the makefiles to copy a local jemalloc/libuv library into place instead of building the local copy of one. Additionally, this switches our travis builds to using the system-provided jemalloc instead of a custom-built jemalloc to exercise this functionality.
2014-06-12 02:02:08 -07:00
Alex Crichton
fa7b7bcdcb mk: Allow using a locally compiled libuv.a
Closes #5563
2014-06-12 00:29:58 -07:00
Alex Crichton
46014c7b14 travis: Use a pre-installed jemalloc 2014-06-12 00:28:01 -07:00
Alex Crichton
145e415fab mk: Allow usage of a local jemalloc install
This adds a new configure option, --jemalloc-root, which will specify a location
at which libjemalloc_pic.a must live. This library is then used for the build
triple as the jemalloc library to link.
2014-06-12 00:28:01 -07:00
bors
fce98e5262 auto merge of #14799 : mcreinhard/rust/tilde-fix, r=alexcrichton
Replaced `~Drawable` with `Box<Drawable>` in tutorial
2014-06-11 22:02:00 -07:00
bors
f03863ae7d auto merge of #14713 : darnuria/rust/Improve_std_os_documentation_#2, r=alexcrichton
Improving documentation, consistency, removes evils empty lines etc...
2014-06-11 19:06:58 -07:00
Axel Viala
6dc06249d7 Improve docs and refactore std::os. 2014-06-12 02:17:52 +02:00
bors
ceaeb667b3 auto merge of #14703 : alexcrichton/rust/no-more-owned-vectors, r=brson
The following features have been removed

* `box [a, b, c]`
* `~[a, b, c]`
* `box [a, ..N]`
* `~[a, ..N]`
* `~[T]` (as a type)
* deprecated_owned_vector lint

All users of ~[T] should move to using Vec<T> instead.
2014-06-11 15:36:59 -07:00
Alex Crichton
3316b1eb7c rustc: Remove ~[T] from the language
The following features have been removed

* box [a, b, c]
* ~[a, b, c]
* box [a, ..N]
* ~[a, ..N]
* ~[T] (as a type)
* deprecated_owned_vector lint

All users of ~[T] should move to using Vec<T> instead.
2014-06-11 15:02:17 -07:00
Patrick Walton
c23748c59c librustc: Forbid identifiers that shadow in the same pattern in let
bindings and function arguments.

Issue #14581.

To fix code that this breaks, give the pattern identifiers different names.

[breaking-change]
2014-06-11 13:23:04 -07:00
bors
f9260d41d6 auto merge of #14746 : alexcrichton/rust/libsync, r=brson
This commit is the final step in the libstd facade, #13851. The purpose of this
commit is to move libsync underneath the standard library, behind the facade.
This will allow core primitives like channels, queues, and atomics to all live
in the same location.

There were a few notable changes and a few breaking changes as part of this
movement:

* The `Vec` and `String` types are reexported at the top level of libcollections
* The `unreachable!()` macro was copied to libcore
* The `std::rt::thread` module was moved to librustrt, but it is still
  reexported at the same location.
* The `std::comm` module was moved to libsync
* The `sync::comm` module was moved under `sync::comm`, and renamed to `duplex`.
  It is now a private module with types/functions being reexported under
  `sync::comm`. This is a breaking change for any existing users of duplex
  streams.
* All concurrent queues/deques were moved directly under libsync. They are also
  all marked with #![experimental] for now if they are public.
* The `task_pool` and `future` modules no longer live in libsync, but rather
  live under `std::sync`. They will forever live at this location, but they may
  move to libsync if the `std::task` module moves as well.

[breaking-change]
2014-06-11 11:47:04 -07:00
bors
f0f9095f1d auto merge of #14250 : alexcrichton/rust/gc, r=brson
This commit removes `@T` from the compiler by moving the AST to using `Gc<T>`. This also starts treating `Gc<T>` as `@T` in the same way that `Box<T>` is the same as `~T` in the compiler.

After this hits a snapshot, the `@T` syntax should be able to be removed completely.
2014-06-11 10:02:04 -07:00
Alex Crichton
b1c9ce9c6f sync: Move underneath libstd
This commit is the final step in the libstd facade, #13851. The purpose of this
commit is to move libsync underneath the standard library, behind the facade.
This will allow core primitives like channels, queues, and atomics to all live
in the same location.

There were a few notable changes and a few breaking changes as part of this
movement:

* The `Vec` and `String` types are reexported at the top level of libcollections
* The `unreachable!()` macro was copied to libcore
* The `std::rt::thread` module was moved to librustrt, but it is still
  reexported at the same location.
* The `std::comm` module was moved to libsync
* The `sync::comm` module was moved under `sync::comm`, and renamed to `duplex`.
  It is now a private module with types/functions being reexported under
  `sync::comm`. This is a breaking change for any existing users of duplex
  streams.
* All concurrent queues/deques were moved directly under libsync. They are also
  all marked with #![experimental] for now if they are public.
* The `task_pool` and `future` modules no longer live in libsync, but rather
  live under `std::sync`. They will forever live at this location, but they may
  move to libsync if the `std::task` module moves as well.

[breaking-change]
2014-06-11 10:00:43 -07:00
Alex Crichton
54c2a1e1ce rustc: Move the AST from @T to Gc<T> 2014-06-11 09:51:37 -07:00
Alex Crichton
53ad426e92 syntax: Move the AST from @T to Gc<T> 2014-06-11 09:11:40 -07:00
Alex Crichton
531ed3d599 rustc: Update how Gc<T> is recognized
This commit uses the same trick as ~/Box to map Gc<T> to @T internally inside
the compiler. This moves a number of implementations of traits to the `gc`
module in the standard library.

This removes functions such as `Gc::new`, `Gc::borrow`, and `Gc::ptr_eq` in
favor of the more modern equivalents, `box(GC)`, `Deref`, and pointer equality.

The Gc pointer itself should be much more useful now, and subsequent commits
will move the compiler away from @T towards Gc<T>

[breaking-change]
2014-06-11 09:11:40 -07:00
bors
c54ce27b39 auto merge of #14789 : aochagavia/rust/prelude, r=alexcrichton 2014-06-11 07:42:07 -07:00
bors
ea41101b35 auto merge of #14788 : Sawyer47/rust/issue-13214, r=huonw
Closes #13214
2014-06-11 06:02:10 -07:00
bors
db9e0a1142 auto merge of #14787 : alexcrichton/rust/issue-14784, r=pcwalton
This is another case of #13246. The RAII lock wasn't being destroyed until after
the allocation was free'd due to destructor scheduling.

Closes #14784
2014-06-11 04:22:02 -07:00
bors
4fdc27e55e auto merge of #14786 : pcwalton/rust/enum-to-float-casts, r=alexcrichton
If this breaks your code, take a deep breath, go for a walk, and
consider why you're relying on the sign extension semantics of
enum-to-float casts.

[breaking-change]

Closes #8230.
2014-06-10 23:37:06 -07:00
bors
c690191a84 auto merge of #14777 : alexcrichton/rust/issue-14747, r=huonw
When generating documentation, rustdoc has the ability to generate relative
links within the current distribution of crates to one another. To do this, it
must recognize when a crate's documentation is in the same output directory. The
current threshold for "local documentation for crate X being available" is
whether the directory "doc/X" exists.

This change modifies the build system to have new dependencies for each
directory of upstream crates for a rustdoc invocation. This will ensure that
when building documentation that all the crates in the standard distribution are
guaranteed to have relative links to one another.

This change is prompted by guaranteeing that offline docs always work with one
another. Before this change, races could mean that some docs were built before
others, and hence may have http links when relative links would suffice.

Closes #14747
2014-06-10 19:52:05 -07:00
bors
f92a8facf9 auto merge of #14768 : riccieri/rust/detransmute-arena, r=alexcrichton
**Update**

I've reimplemented this using `Cell` and `RefCell`, as suggested by @alexcrichton. By taking care with the duration of the borrows, I was able to maintain the recursive allocation feature (now covered by a test) without the use of `Unsafe`, and without breaking the non-aliasing `&mut` invariant.

**Original**

Changes both `Arena` and `TypedArena` to contain an inner struct wrapped in a `Unsafe`, and change field access to go through those instead of transmuting `&self` to `&mut self`.

Part of #13933
2014-06-10 18:07:07 -07:00
Zach Pomerantz
782c52a924 Removed doubled wording.
The guide previously stated:

> The compiler will automatically convert a box box point to a reference like &amp;point.

This fixes the doubled word `box`, so the statement reads

> The compiler will automatically convert a box point to a reference like &amp;point.

The code it is referring to is `compute_distance(&on_the_stack, on_the_heap);`, so a single `box` is appropriate.
2014-06-10 16:53:04 -07:00
Jonathan Reem
e5ebdb4c07 Remove outdated info about nested block comments. Fixes #14767 2014-06-10 15:58:54 -07:00
bors
b1302f9c4f auto merge of #14764 : jbcrail/rust/fix-more-comments, r=alexcrichton 2014-06-10 15:17:01 -07:00
Michael Reinhard
a0eca23786 Fix deprecated use of ~ 2014-06-10 14:44:27 -07:00
bors
7f777a5ba4 auto merge of #14752 : jakub-/rust/issue-11940, r=alexcrichton
Fixes #8315
Fixes #11940
2014-06-10 13:17:10 -07:00
bors
9bb8f88d3a auto merge of #14696 : jakub-/rust/dead-struct-fields, r=alexcrichton
This uncovered some dead code, most notably in middle/liveness.rs, which I think suggests there must be something fishy with that part of the code.

The #[allow(dead_code)] annotations on some of the fields I am not super happy about but as I understand, marker type may disappear at some point.
2014-06-10 09:49:29 -07:00
Joseph Crail
c2c9946372 Fix more misspelled comments and strings. 2014-06-10 11:24:17 -04:00
Adolfo Ochagavía
02866e6fe2 Pub use CheckedDiv in the prelude 2014-06-10 10:01:49 +02:00
Piotr Jawniak
9bead9b3f1 Add test for issue #13214
Closes #13214
2014-06-10 09:26:49 +02:00
bors
0ee6a8e8a5 auto merge of #14606 : pcwalton/rust/fn-trait-sugar, r=alexcrichton
r? @alexcrichton
2014-06-09 23:41:53 -07:00
bors
5bc2d03955 auto merge of #14783 : alexcrichton/rust/rollup, r=alexcrichton
Closes #14611 (std: Remove the as_utf16_p functions)
Closes #14694 (Num cleanup)
Closes #14760 (Add --color to test binary options)
Closes #14763 (std: Move dynamic_lib from std::unstable to std)
Closes #14766 (Add test for issue #13446)
Closes #14769 (collections: Add missing Default impls)
Closes #14773 (General nits)
Closes #14776 (rustdoc: Correctly classify enums/typedefs)
2014-06-09 21:57:09 -07:00
Alex Crichton
5ede96c2fd Test fixes from rollup 2014-06-09 21:52:37 -07:00
Alex Crichton
4fecc503ee rustrt: Fix invalid reads caught by valgrind
This is another case of #13246. The RAII lock wasn't being destroyed until after
the allocation was free'd due to destructor scheduling.

Closes #14784
2014-06-09 20:57:55 -07:00
Patrick Walton
1a381fa2d2 librustc: Use *signed* extension when converting enums to floats.
Previously, constants used unsigned extension, while non-constants used
signed extension. This unifies both paths to use signed extension.

If this breaks your code, take a deep breath, go for a walk, and
consider why you're relying on the sign extension semantics of
enum-to-float casts.

Closes #8230.

[breaking-change]
2014-06-09 20:55:38 -07:00
Renato Zannon
47b72e388d Remove & -> &mut transmute from TypedArena 2014-06-10 00:41:44 -03:00
Renato Zannon
a535cfb1f0 Remove & -> &mut transmute from Arena 2014-06-10 00:29:42 -03:00