]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoadd feature gate for managed boxes
Daniel Micay [Fri, 18 Oct 2013 05:14:47 +0000 (01:14 -0400)]
add feature gate for managed boxes

I'll flip this on after doing a snapshot. This syntax may or may not
stay around, and managed boxes are currently not very useful. They have
the same overall performance characteristics as `std::rc::Rc`, but are
significantly slower, allocate larger boxes and hold onto the memory
beyond when it is needed due to lacking move semantics.

There are currently two useful aspects of the type:

* the dereference sugar, which we should implement for `Rc`
* the annihilator freeing cycles at the end of the task

10 years agoauto merge of #10002 : catamorphism/rust/bug-report-docs, r=alexcrichton
bors [Tue, 22 Oct 2013 15:11:52 +0000 (08:11 -0700)]
auto merge of #10002 : catamorphism/rust/bug-report-docs, r=alexcrichton

r? @alexcrichton And also reference the bug report HOWTO in CONTRIBUTING.md

10 years agoauto merge of #10009 : LeoTestard/rust/asm-feature-gated, r=huonw
bors [Tue, 22 Oct 2013 11:46:22 +0000 (04:46 -0700)]
auto merge of #10009 : LeoTestard/rust/asm-feature-gated, r=huonw

Suite of #9991

10 years agoActivate checking code for ASM feature gate. Fix tests
Léo Testard [Mon, 21 Oct 2013 23:18:57 +0000 (01:18 +0200)]
Activate checking code for ASM feature gate. Fix tests

10 years agoauto merge of #10003 : alexcrichton/rust/issue-fixes, r=brson
bors [Tue, 22 Oct 2013 08:31:24 +0000 (01:31 -0700)]
auto merge of #10003 : alexcrichton/rust/issue-fixes, r=brson

Commits have all the fun details.

10 years agoauto merge of #9992 : astrieanna/rust/rm_rusti, r=alexcrichton
bors [Tue, 22 Oct 2013 04:41:25 +0000 (21:41 -0700)]
auto merge of #9992 : astrieanna/rust/rm_rusti, r=alexcrichton

It seems like rusti has been removed, except for one reference in one Makefile. This reference breaks building rust on my computer because the "all-target" rule has rusti as a target.

~~~~
make: *** No rule to make target `x86_64-unknown-linux-gnu/stage2/bin/rusti', needed by `all-target-x86_64-unknown-linux-gnu-host-x86_64-unknown-linux-gnu'.  Stop.
~~~~

Removing this line fixes things for me.

10 years agoauto merge of #9982 : danluu/rust/local_delc_xfail, r=brson
bors [Tue, 22 Oct 2013 02:26:19 +0000 (19:26 -0700)]
auto merge of #9982 : danluu/rust/local_delc_xfail, r=brson

This patch is trivial, but it comes with a question. Does Mozilla need to own the copyright on code submitted to Rust?

The reason I ask is that, since the last time I submitted anything to a Mozilla project, I started working at Google, and they (by default) own the copyright on code that I write (even in my spare time). There's a process to assign copyright to another entity, and it should be a formality for something like this, but I'd still have to go through it if that's a requirement for Rust.

Anyway, I'm submitting this incredibly trivial thing because, if I have to go through that process for the first time, I'd like it to be for something that's trivial, so I can see how much of a hassle it is (if any) without having invested much time up front.

I didn't see anything about copyright in the Mozilla contributor's agreement, but I could have easily missed something somewhere else.

10 years agoauto merge of #9960 : adridu59/rust/patch-doc-limited, r=alexcrichton
bors [Tue, 22 Oct 2013 01:06:34 +0000 (18:06 -0700)]
auto merge of #9960 : adridu59/rust/patch-doc-limited, r=alexcrichton

This is #9868 but doesn't move css files to a separate subfolder, which was causing errors on the Rust buildbot.

@alexcrichton

10 years agoauto merge of #9937 : brson/rust/log_str, r=alexcrichton
bors [Mon, 21 Oct 2013 22:46:23 +0000 (15:46 -0700)]
auto merge of #9937 : brson/rust/log_str, r=alexcrichton

10 years agoauto merge of #9936 : madjar/rust/master, r=alexcrichton
bors [Mon, 21 Oct 2013 21:21:54 +0000 (14:21 -0700)]
auto merge of #9936 : madjar/rust/master, r=alexcrichton

This should close #9468.

I removed the test stating that nested comments should not be implemented.

I had a little chicken-and-egg problem because a comment of the std contains "/*", and adding support for nested comment creates a backward incompatibility in that case, so I had to use a dirty hack to get stage1 and stage2 to compile. This part should be revert when this commit lands in a snapshot.

This is my first non-typo contribution, so I'm open to any comment.

10 years agoauto merge of #10000 : cmr/rust/snapshot, r=alexcrichton
bors [Mon, 21 Oct 2013 20:11:37 +0000 (13:11 -0700)]
auto merge of #10000 : cmr/rust/snapshot, r=alexcrichton

10 years agoAdd support for nested comments
Georges Dubus [Fri, 18 Oct 2013 20:51:57 +0000 (22:51 +0200)]
Add support for nested comments

Fixes #9468.

10 years agosyntax: Add the Bug Report HOWTO URL to the ICE message
Tim Chevalier [Mon, 21 Oct 2013 19:10:57 +0000 (12:10 -0700)]
syntax: Add the Bug Report HOWTO URL to the ICE message

And also reference the bug report HOWTO in CONTRIBUTING.md

10 years agoauto merge of #9997 : thestinger/rust/float, r=thestinger
bors [Mon, 21 Oct 2013 19:01:34 +0000 (12:01 -0700)]
auto merge of #9997 : thestinger/rust/float, r=thestinger

10 years agostd: Move sys::log_str to repr::repr_to_str. Further work on #2240.
Brian Anderson [Fri, 18 Oct 2013 22:16:18 +0000 (15:16 -0700)]
std: Move sys::log_str to repr::repr_to_str. Further work on #2240.

10 years agorustdoc: Render default methods for impls as well
Alex Crichton [Mon, 21 Oct 2013 18:33:04 +0000 (11:33 -0700)]
rustdoc: Render default methods for impls as well

This does not work for cross-crate implementations of traits. Cross-crate
implementations are a separate issue that should be addressed separately.
Basically when an implementation of an external trait is detected, the trait
would have to be loaded at that time (or possibly sooner...). Rustdoc currently
doesn't have the proper infrastructure for adding this.

Closes #9985
cc #9999

10 years agoRegister snapshots
Corey Richardson [Mon, 21 Oct 2013 18:18:34 +0000 (14:18 -0400)]
Register snapshots

10 years agofix the new floating point intrinsics
Daniel Micay [Mon, 21 Oct 2013 18:09:42 +0000 (14:09 -0400)]
fix the new floating point intrinsics

10 years agoauto merge of #9736 : catamorphism/rust/rustpkg-issue-8520, r=cmr
bors [Mon, 21 Oct 2013 17:51:29 +0000 (10:51 -0700)]
auto merge of #9736 : catamorphism/rust/rustpkg-issue-8520, r=cmr

r? @cmr As per #8520, find crates in the current working directory even
if it's not a workspace.

Closes #8520

10 years agorustdoc: Don't overflow long type/module names
Alex Crichton [Mon, 21 Oct 2013 17:48:57 +0000 (10:48 -0700)]
rustdoc: Don't overflow long type/module names

Closes #9862

10 years agorustpkg: Search for crates in the current directory
Tim Chevalier [Sun, 6 Oct 2013 02:14:10 +0000 (22:14 -0400)]
rustpkg: Search for crates in the current directory

As per #8520, find crates in the current working directory even
if it's not a workspace.

Closes #8520

10 years agoPropagate reachability through reexported impls
Alex Crichton [Mon, 21 Oct 2013 17:37:36 +0000 (10:37 -0700)]
Propagate reachability through reexported impls

When re-exporting a trait/structure/enum, then we need to propagate the
reachability of the type through the methods that are defined on it.

Closes #9906
Closes #9968

10 years agoRemove rusti reference from pp.mk
Leah Hanson [Mon, 21 Oct 2013 11:13:47 +0000 (06:13 -0500)]
Remove rusti reference from pp.mk

10 years agoauto merge of #9986 : thestinger/rust/float, r=cmr
bors [Mon, 21 Oct 2013 15:56:28 +0000 (08:56 -0700)]
auto merge of #9986 : thestinger/rust/float, r=cmr

copysign, ring, nearbyint, round

10 years agoMake fn pub for windows compatibility
Dan Luu [Mon, 21 Oct 2013 12:45:16 +0000 (07:45 -0500)]
Make fn pub for windows compatibility

10 years agoauto merge of #9991 : LeoTestard/rust/asm-feature-gate, r=huonw
bors [Mon, 21 Oct 2013 12:21:27 +0000 (05:21 -0700)]
auto merge of #9991 : LeoTestard/rust/asm-feature-gate, r=huonw

Fixes #9882
Note that the actual checking code is inside a if false in order to compile libstd properly.
libstd uses asm! in rt. If we put ```#[feature(asm)]``` in libstd, it fails to build at stage0 beacause the
asm feature is not known yet by the snapshot compiler.
We must wait that this PR arrives into the snapshot in order to actually activate the checking code.

10 years agoAdd a feature flag for ASM
Léo Testard [Mon, 21 Oct 2013 09:16:58 +0000 (11:16 +0200)]
Add a feature flag for ASM

10 years agoauto merge of #9979 : alexcrichton/rust/print-no-alloc, r=huonw
bors [Mon, 21 Oct 2013 09:26:24 +0000 (02:26 -0700)]
auto merge of #9979 : alexcrichton/rust/print-no-alloc, r=huonw

Instead use format_args! to pass around a struct to pass along into std::fmt

10 years agoexpose new floating point intrinsics
Daniel Micay [Mon, 21 Oct 2013 06:21:39 +0000 (02:21 -0400)]
expose new floating point intrinsics

copysign, ring, nearbyint, round

10 years agoauto merge of #9976 : thestinger/rust/typo, r=thestinger
bors [Mon, 21 Oct 2013 04:11:19 +0000 (21:11 -0700)]
auto merge of #9976 : thestinger/rust/typo, r=thestinger

10 years agodoc: fix links to comply with the new rustdoc
Adrien Tétar [Fri, 18 Oct 2013 15:57:52 +0000 (17:57 +0200)]
doc: fix links to comply with the new rustdoc

Closes #9911.

10 years agorustdoc: nitpicks & cleanup
Adrien Tétar [Mon, 14 Oct 2013 19:32:12 +0000 (21:32 +0200)]
rustdoc: nitpicks & cleanup

10 years agodoc: expand tutorial/manual CSS
Adrien Tétar [Mon, 14 Oct 2013 19:36:23 +0000 (21:36 +0200)]
doc: expand tutorial/manual CSS

Cleanup, edit, add some Bootstrap v3.0.0 elements.

10 years agodoc: tidy and cleanup CSS deps, add tutorial PDF generation
Adrien Tétar [Fri, 11 Oct 2013 18:21:46 +0000 (20:21 +0200)]
doc: tidy and cleanup CSS deps, add tutorial PDF generation

10 years agoUse updated local declaration syntax.
Dan Luu [Sun, 20 Oct 2013 22:54:53 +0000 (17:54 -0500)]
Use updated local declaration syntax.

10 years agoDon't allocate a string when calling println
Alex Crichton [Sun, 20 Oct 2013 22:42:24 +0000 (15:42 -0700)]
Don't allocate a string when calling println

Instead use format_args! to pass around a struct to pass along into std::fmt

10 years agofix typo
Daniel Micay [Sun, 20 Oct 2013 18:46:28 +0000 (14:46 -0400)]
fix typo

10 years agoauto merge of #9812 : HNO3/rust/windows-utf8, r=alexcrichton
bors [Sun, 20 Oct 2013 17:31:17 +0000 (10:31 -0700)]
auto merge of #9812 : HNO3/rust/windows-utf8, r=alexcrichton

This fixes #9418 and #9618, and potential problems related to directory walking.

10 years agoauto merge of #9973 : huonw/rust/7580, r=luqmana
bors [Sun, 20 Oct 2013 09:26:17 +0000 (02:26 -0700)]
auto merge of #9973 : huonw/rust/7580, r=luqmana

Fixed by the privacy changes that allowed the `mod std {}` at the top
level of `std` to be non-`pub`.

10 years agotestsuite: test for fixed issue. Closes #7580.
Huon Wilson [Sun, 20 Oct 2013 09:17:13 +0000 (20:17 +1100)]
testsuite: test for fixed issue. Closes #7580.

Fixed by the privacy changes that allowed the `mod std {}` at the top
level of `std` to be non-`pub`.

10 years agoFix unicode errors on Windows in path_is_dir, path_exists, getcwd and rust_localtime.
LEE Wondong [Sun, 20 Oct 2013 06:02:03 +0000 (15:02 +0900)]
Fix unicode errors on Windows in path_is_dir, path_exists, getcwd and rust_localtime.

This make these functions use wchar_t version of APIs, instead of char version.

10 years agoauto merge of #9956 : sfackler/rust/more-more-visibility, r=alexcrichton
bors [Sat, 19 Oct 2013 21:01:10 +0000 (14:01 -0700)]
auto merge of #9956 : sfackler/rust/more-more-visibility, r=alexcrichton

10 years agoauto merge of #9952 : huonw/rust/fmt-doc, r=alexcrichton
bors [Sat, 19 Oct 2013 19:11:13 +0000 (12:11 -0700)]
auto merge of #9952 : huonw/rust/fmt-doc, r=alexcrichton

Cf. the concern raised in https://github.com/mozilla/rust/pull/9938#issuecomment-26648696.

10 years agodoc/rust.HTML: proper version box
Adrien Tétar [Fri, 11 Oct 2013 18:08:52 +0000 (20:08 +0200)]
doc/rust.HTML: proper version box

10 years agodoc: switch pandoc to html5
Adrien Tétar [Fri, 11 Oct 2013 17:18:43 +0000 (19:18 +0200)]
doc: switch pandoc to html5

10 years agoauto merge of #9949 : Heather/rust/driver-rs-cleanup-pullrequest, r=thestinger
bors [Sat, 19 Oct 2013 17:56:15 +0000 (10:56 -0700)]
auto merge of #9949 : Heather/rust/driver-rs-cleanup-pullrequest, r=thestinger

10 years agoauto merge of #9834 : alexcrichton/rust/morestack, r=brson
bors [Sat, 19 Oct 2013 16:46:18 +0000 (09:46 -0700)]
auto merge of #9834 : alexcrichton/rust/morestack, r=brson

This commit re-introduces the functionality of __morestack in a way that it was
not originally anticipated. Rust does not currently have segmented stacks,
rather just large stack segments. We do not detect when these stack segments are
overrun currently, but this commit leverages __morestack in order to check this.

This commit purges a lot of the old __morestack and stack limit C++
functionality, migrating the necessary chunks to rust. The stack limit is now
entirely maintained in rust, and the "main logic bits" of __morestack are now
also implemented in rust as well.

I put my best effort into validating that this currently builds and runs successfully on osx and linux 32/64 bit, but I was unable to get this working on windows. We never did have unwinding through __morestack frames, and although I tried poking at it for a bit, I was unable to understand why we don't get unwinding right now.

A focus of this commit is to implement as much of the logic in rust as possible. This involved some liberal usage of `no_split_stack` in various locations, along with some use of the `asm!` macro (scary). I modified a bit of C++ to stop calling `record_sp_limit` because this is no longer defined in C++, rather in rust.

Another consequence of this commit is that `thread_local_storage::{get, set}` must both be flagged with `#[rust_stack]`. I've briefly looked at the implementations on osx/linux/windows to ensure that they're pretty small stacks, and I'm pretty sure that they're definitely less than 20K stacks, so we probably don't have a lot to worry about.

Other things worthy of note:
* The default stack size is now 4MB instead of 2MB. This is so that when we request 2MB to call a C function you don't immediately overflow because you have consumed any stack at all.
* `asm!` is actually pretty cool, maybe we could actually define context switching with it?
* I wanted to add links to the internet about all this jazz of storing information in TLS, but I was only able to find a link for the windows implementation. Otherwise my suggestion is just "disassemble on that arch and see what happens"
* I put my best effort forward on arm/mips to tweak __morestack correctly, we have no ability to test this so an extra set of eyes would be useful on these spots.
* This is all really tricky stuff, so I tried to put as many comments as I thought were necessary, but if anything is still unclear (or I completely forgot to take something into account), I'm willing to write more!

10 years agoUse __morestack to detect stack overflow
Alex Crichton [Thu, 17 Oct 2013 08:40:33 +0000 (01:40 -0700)]
Use __morestack to detect stack overflow

This commit resumes management of the stack boundaries and limits when switching
between tasks. This additionally leverages the __morestack function to run code
on "stack overflow". The current behavior is to abort the process, but this is
probably not the best behavior in the long term (for deails, see the comment I
wrote up in the stack exhaustion routine).

10 years agostd::fmt: fix markdown peculiarity, unicodify some arrows, ` some trait names.
Huon Wilson [Sat, 19 Oct 2013 12:07:18 +0000 (23:07 +1100)]
std::fmt: fix markdown peculiarity, unicodify some arrows, ` some trait names.

10 years agoauto merge of #9946 : sfackler/rust/enum-doc, r=alexcrichton
bors [Sat, 19 Oct 2013 12:06:17 +0000 (05:06 -0700)]
auto merge of #9946 : sfackler/rust/enum-doc, r=alexcrichton

Struct fields with inherited visibility were previously stripped.

Closes #9899

10 years agoauto merge of #9941 : alexcrichton/rust/rustdoc, r=huonw
bors [Sat, 19 Oct 2013 10:56:19 +0000 (03:56 -0700)]
auto merge of #9941 : alexcrichton/rust/rustdoc, r=huonw

Beforehand the id of a method was the id of the 'self' argument, but this is not
the id which privacy was using (the id of the ast::method) struct, so by moving
the ids over to the privacy-target ones the methods are now stripped correctly.

10 years agoauto merge of #9939 : sinma/rust/doc, r=alexcrichton
bors [Sat, 19 Oct 2013 09:46:25 +0000 (02:46 -0700)]
auto merge of #9939 : sinma/rust/doc, r=alexcrichton

Recently, the float type, and the rust and rusti tools have been removed from master.

float replaced by f64 in code examples, removed mentions of float, f suffix, rust and rusti in explanations.

(+ some stupid things like rust -> Rust)

10 years agodoc (en & ja): remove mentions of type float, rust and rusti tools
Sébastien Chauvel [Sat, 19 Oct 2013 23:00:22 +0000 (01:00 +0200)]
doc (en & ja): remove mentions of type float, rust and rusti tools

10 years agoremove rust and rusti from driver.rs
Heather [Sat, 19 Oct 2013 09:31:39 +0000 (13:31 +0400)]
remove rust and rusti from driver.rs

10 years agoauto merge of #9932 : alexcrichton/rust/better-fmt-errors, r=cmr
bors [Sat, 19 Oct 2013 08:31:21 +0000 (01:31 -0700)]
auto merge of #9932 : alexcrichton/rust/better-fmt-errors, r=cmr

Instead of just saying "unterminated format string" and friends, instead print
information about what was expected and what was found.

Closes #9931

10 years agoCheck unnecessary visibility for struct variants
Steven Fackler [Sat, 19 Oct 2013 05:43:16 +0000 (22:43 -0700)]
Check unnecessary visibility for struct variants

10 years agoFix struct field visibility and add enum field doc
Steven Fackler [Sat, 19 Oct 2013 05:00:08 +0000 (22:00 -0700)]
Fix struct field visibility and add enum field doc

Struct fields with inherited visibility were previously stripped.

Closes #9899

10 years agoTry to improve format! error messages
Alex Crichton [Fri, 18 Oct 2013 17:30:40 +0000 (10:30 -0700)]
Try to improve format! error messages

Instead of just saying "unterminated format string" and friends, instead print
information about what was expected and what was found.

Closes #9931

10 years agoauto merge of #9938 : alexcrichton/rust/fmtdox, r=huonw
bors [Sat, 19 Oct 2013 04:21:22 +0000 (21:21 -0700)]
auto merge of #9938 : alexcrichton/rust/fmtdox, r=huonw

Closes #9865
Closes #9808

10 years agoauto merge of #9437 : catamorphism/rust/rustpkg-dates, r=alexcrichton
bors [Sat, 19 Oct 2013 02:36:22 +0000 (19:36 -0700)]
auto merge of #9437 : catamorphism/rust/rustpkg-dates, r=alexcrichton

r? @alexcrichton On most platforms, the time granularity is 1 sec or more, so comparing
dates in tests that check whether rebuilding did or didn't happen leads
to spurious failures. Instead, test the same thing by making an output
file read-only and trapping attempts to write to it.

10 years agorustpkg: invoke touch with a portable set of args
Tim Chevalier [Fri, 18 Oct 2013 22:55:28 +0000 (15:55 -0700)]
rustpkg: invoke touch with a portable set of args

10 years agorustc: Check that the output file is writeable before linking
Tim Chevalier [Thu, 3 Oct 2013 01:17:46 +0000 (18:17 -0700)]
rustc: Check that the output file is writeable before linking

This is because on Linux, the linker will silently overwrite
a read-only file.

10 years agorustpkg: Make rustpkg tests stop comparing dates
Tim Chevalier [Thu, 26 Sep 2013 19:15:54 +0000 (12:15 -0700)]
rustpkg: Make rustpkg tests stop comparing dates

Instead of scrutinizing modification times in rustpkg tests,
change output files to be read-only and detect attempts to write
to them (hack suggested by Jack). This avoids time granularity problems.

As part of this change, I discovered that some dependencies weren't
getting written correctly (involving built executables and library
files), so this patch fixes that too.

This partly addresses #9441, but one test (test_rebuild_when_needed)
is still ignored on Linux.

10 years agoauto merge of #9919 : alexcrichton/rust/fmt-begone, r=huonw
bors [Sat, 19 Oct 2013 01:26:23 +0000 (18:26 -0700)]
auto merge of #9919 : alexcrichton/rust/fmt-begone, r=huonw

It lived a good life, but its time has come. The groundwork is set for the
official transition after the next snapshot (removal of XXX2 macros)

10 years agorustdoc: Strip methods correctly based on privacy
Alex Crichton [Sat, 19 Oct 2013 01:16:38 +0000 (18:16 -0700)]
rustdoc: Strip methods correctly based on privacy

Beforehand the id of a method was the id of the 'self' argument, but this is not
the id which privacy was using (the id of the ast::method) struct, so by moving
the ids over to the privacy-target ones the methods are now stripped correctly.

10 years agoauto merge of #9856 : alexcrichton/rust/privacy-errors, r=huonw
bors [Sat, 19 Oct 2013 00:11:25 +0000 (17:11 -0700)]
auto merge of #9856 : alexcrichton/rust/privacy-errors, r=huonw

This stops labeling everything as "is private" when in fact the destination may
be public. Instead, the clause "is inaccessible" is used and the private part of
the flag is called out with a "is private" message.

Closes #9793

10 years agoRemove the fmt! syntax extension
Alex Crichton [Fri, 18 Oct 2013 23:01:40 +0000 (16:01 -0700)]
Remove the fmt! syntax extension

It lived a good life, but its time has come. The groundwork is set for the
official transition after the next snapshot (removal of XXX2 macros)

10 years agoDocument traits and Default about format! better
Alex Crichton [Fri, 18 Oct 2013 22:55:28 +0000 (15:55 -0700)]
Document traits and Default about format! better

Closes #9865
Closes #9808

10 years agoauto merge of #9933 : alexcrichton/rust/no-jemalloc, r=brson
bors [Fri, 18 Oct 2013 22:26:24 +0000 (15:26 -0700)]
auto merge of #9933 : alexcrichton/rust/no-jemalloc, r=brson

As discovered in #9925, it turns out that we weren't using jemalloc on most
platforms. Additionally, on some platforms we were using it incorrectly and
mismatching the libc version of malloc with the jemalloc version of malloc.

Additionally, it's not clear that using jemalloc is indeed a large performance
win in particular situtations. This could be due to building jemalloc
incorrectly, or possibly due to using jemalloc incorrectly, but it is unclear at
this time.

Until jemalloc can be confirmed to integrate correctly on all platforms and has
verifiable large performance wins on platforms as well, it shouldn't be part of
the default build process. It should still be available for use via the
LD_PRELOAD trick on various architectures, but using it as the default allocator
for everything would require guaranteeing that it works in all situtations,
which it currently doesn't.

Closes #9925

10 years agoauto merge of #9935 : reedlepee123/rust/my_new_branch, r=bstrie
bors [Fri, 18 Oct 2013 21:16:26 +0000 (14:16 -0700)]
auto merge of #9935 : reedlepee123/rust/my_new_branch, r=bstrie

10 years agoMake fields in std::comm private
chitra [Fri, 18 Oct 2013 18:48:17 +0000 (00:18 +0530)]
Make fields in std::comm private

10 years agoauto merge of #9930 : alexcrichton/rust/refcount-tests, r=thestinger
bors [Fri, 18 Oct 2013 18:31:31 +0000 (11:31 -0700)]
auto merge of #9930 : alexcrichton/rust/refcount-tests, r=thestinger

This fixes a bug I accidentally introduced in #9922

10 years agoRemove jemalloc from the runtime
Alex Crichton [Fri, 18 Oct 2013 17:33:40 +0000 (10:33 -0700)]
Remove jemalloc from the runtime

As discovered in #9925, it turns out that we weren't using jemalloc on most
platforms. Additionally, on some platforms we were using it incorrectly and
mismatching the libc version of malloc with the jemalloc version of malloc.

Additionally, it's not clear that using jemalloc is indeed a large performance
win in particular situtations. This could be due to building jemalloc
incorrectly, or possibly due to using jemalloc incorrectly, but it is unclear at
this time.

Until jemalloc can be confirmed to integrate correctly on all platforms and has
verifiable large performance wins on platforms as well, it shouldn't be part of
the default build process. It should still be available for use via the
LD_PRELOAD trick on various architectures, but using it as the default allocator
for everything would require guaranteeing that it works in all situtations,
which it currently doesn't.

Closes #9925

10 years agoauto merge of #9851 : alexcrichton/rust/include_bin, r=huonw
bors [Fri, 18 Oct 2013 16:41:33 +0000 (09:41 -0700)]
auto merge of #9851 : alexcrichton/rust/include_bin, r=huonw

Previously an ExprLit was created *per byte* causing a huge increase in memory
bloat. This adds a new `lit_binary` to contain a literal of binary data, which
is currently only used by the include_bin! syntax extension. This massively
speeds up compilation times of the shootout-k-nucleotide-pipes test

    before:
        time: 469s
        memory: 6GB
        assertion failure in LLVM (section too large)

    after:
        time: 2.50s
        memory: 124MB

Closes #2598

10 years agoFix an off-by-one in managed::refcount
Alex Crichton [Fri, 18 Oct 2013 16:22:03 +0000 (09:22 -0700)]
Fix an off-by-one in managed::refcount

This fixes a bug I accidentally introduced in #9922

10 years agoOptimize include_bin! for large inputs
Alex Crichton [Mon, 14 Oct 2013 15:24:17 +0000 (08:24 -0700)]
Optimize include_bin! for large inputs

Previously an ExprLit was created *per byte* causing a huge increase in memory
bloat. This adds a new `lit_binary` to contain a literal of binary data, which
is currently only used by the include_bin! syntax extension. This massively
speeds up compilation times of the shootout-k-nucleotide-pipes test

    before:
        time: 469s
        memory: 6GB
        assertion failure in LLVM (section too large)

    after:
        time: 2.50s
        memory: 124MB

Closes #2598

10 years agoauto merge of #9929 : chris-morgan/rust/2013-10-19-vim-updates, r=sanxiyn
bors [Fri, 18 Oct 2013 15:31:24 +0000 (08:31 -0700)]
auto merge of #9929 : chris-morgan/rust/2013-10-19-vim-updates, r=sanxiyn

- Update prelude items specially highlighted.
- Highlight `

10 years agoauto merge of #9927 : chris-morgan/rust/fix-url-to_str-so-it-includes-the-port, r...
bors [Fri, 18 Oct 2013 14:21:25 +0000 (07:21 -0700)]
auto merge of #9927 : chris-morgan/rust/fix-url-to_str-so-it-includes-the-port, r=huonw

Fixes #9451.
Fixes chris-morgan/rust-http#16.

10 years agoHighlight \0 in strings and chars in Vim.
Chris Morgan [Fri, 18 Oct 2013 13:56:41 +0000 (00:56 +1100)]
Highlight \0 in strings and chars in Vim.

10 years agoUpdate prelude items in Vim syntax.
Chris Morgan [Fri, 18 Oct 2013 13:55:52 +0000 (00:55 +1100)]
Update prelude items in Vim syntax.

10 years agoFix extra::url::to_str to include the port.
Chris Morgan [Fri, 18 Oct 2013 13:25:03 +0000 (00:25 +1100)]
Fix extra::url::to_str to include the port.

Fixes #9451.
Fixes chris-morgan/rust-http#16.

10 years agoauto merge of #9926 : Kimundi/rust/future_result_bad_sig, r=huonw
bors [Fri, 18 Oct 2013 13:11:18 +0000 (06:11 -0700)]
auto merge of #9926 : Kimundi/rust/future_result_bad_sig, r=huonw

10 years agoMade `std::task::TaskBuilder::future_result()` easier to use
Marvin Löbel [Fri, 18 Oct 2013 08:38:46 +0000 (10:38 +0200)]
Made `std::task::TaskBuilder::future_result()` easier to use

10 years agoauto merge of #9924 : metajack/rust/fix-starts-with-ends-with, r=huonw
bors [Fri, 18 Oct 2013 07:26:19 +0000 (00:26 -0700)]
auto merge of #9924 : metajack/rust/fix-starts-with-ends-with, r=huonw

d4a32386f3b6 broke these since slice_to() and slice_from() must get character
boundaries, and arbitrary needle lengths don't necessarily map to character
boundaries of the haystack.

This also adds new tests that would have caught this bug.

10 years agoauto merge of #9850 : eddyb/rust/inline-asm-constraints, r=luqmana
bors [Fri, 18 Oct 2013 06:16:22 +0000 (23:16 -0700)]
auto merge of #9850 : eddyb/rust/inline-asm-constraints, r=luqmana

I've implemented analysis support for the [GCC '=' write-only inline asm constraint modifier](http://gcc.gnu.org/onlinedocs/gcc/Modifiers.html). I had more changes, for '+' (read+write) as well, but it turns out LLVM doesn't support '+' at all.

I've removed the need for wrapping each output in ExprAddrOf, as that would require unwrapping almost everywhere and it was harder to reason about in borrowck than ExprAssign's LHS.

With this change, rustc will treat (in respect to validity of accessing a local) code like this:
```rust
let x: int;
unsafe {
    asm!("mov $1, $0" : "=r"(x) : "r"(5u));
}
```
as if it were this:
```rust
let x : int;
x = 5;
```

Previously, the local was required to be both mutable and initialized, and the write effect wasn't recorded.

10 years agoFix starts_with() and ends_with().
Jack Moffitt [Fri, 18 Oct 2013 05:32:46 +0000 (23:32 -0600)]
Fix starts_with() and ends_with().

d4a32386f3b6 broke these since slice_to() and slice_from() must get character
boundaries, and arbitrary needle lengths don't necessarily map to character
boundaries of the haystack.

This also adds new tests that would have caught this bug.

10 years agoauto merge of #9922 : alexcrichton/rust/less-sys, r=thestinger
bors [Fri, 18 Oct 2013 05:06:22 +0000 (22:06 -0700)]
auto merge of #9922 : alexcrichton/rust/less-sys, r=thestinger

More progress on #2240

10 years agoHandle inline asm outputs as write-only in liveness, borrowck and trans.
Eduard Burtescu [Thu, 17 Oct 2013 18:24:41 +0000 (21:24 +0300)]
Handle inline asm outputs as write-only in liveness, borrowck and trans.

10 years agoMove sys::refcount to managed::refcount
Alex Crichton [Fri, 18 Oct 2013 04:13:56 +0000 (21:13 -0700)]
Move sys::refcount to managed::refcount

More progress on #2240

10 years agoauto merge of #9921 : sp3d/rust/master, r=alexcrichton
bors [Fri, 18 Oct 2013 03:56:18 +0000 (20:56 -0700)]
auto merge of #9921 : sp3d/rust/master, r=alexcrichton

Refactors parsing of numerical literals to make it more readable.
Removes 'float'/the 'f' literal suffix and invalid character literals ''' and '\'.
Also makes attribute highlighting more robust and allows urls in attributes to be recognized.

10 years agotrack language changes, improve attr handling in GtkSourceView language-spec
sp3d [Fri, 18 Oct 2013 03:35:26 +0000 (03:35 +0000)]
track language changes, improve attr handling in GtkSourceView language-spec

Refactors parsing of numerical literals to make it more readable.
Removes 'float'/the 'f' literal suffix and invalid character literals ''' and '\'.
Also makes attribute highlighting more robust and allows urls in attributes to be recognized.

10 years agoauto merge of #9896 : brson/rust/stdmem, r=alexcrichton
bors [Fri, 18 Oct 2013 02:11:19 +0000 (19:11 -0700)]
auto merge of #9896 : brson/rust/stdmem, r=alexcrichton

This is progress toward removing std::sys.

10 years agoauto merge of #9916 : alexcrichton/rust/issue-9861, r=brson
bors [Fri, 18 Oct 2013 01:01:22 +0000 (18:01 -0700)]
auto merge of #9916 : alexcrichton/rust/issue-9861, r=brson

This was just incorrectly handled before, the path component shouldn't be looked
at at all (we used absolute paths everywhere instead of relative to the current
module location).

Closes #9861

10 years agostd: Move size/align functions to std::mem. #2240
Brian Anderson [Thu, 17 Oct 2013 01:34:01 +0000 (18:34 -0700)]
std: Move size/align functions to std::mem. #2240

10 years agorustdoc: Don't treat "super" specially for urls
Alex Crichton [Fri, 18 Oct 2013 00:15:42 +0000 (17:15 -0700)]
rustdoc: Don't treat "super" specially for urls

This was just incorrectly handled before, the path component shouldn't be looked
at at all (we used absolute paths everywhere instead of relative to the current
module location).

Closes #9861

10 years agoauto merge of #9915 : thestinger/rust/rusti, r=thestinger
bors [Thu, 17 Oct 2013 23:51:20 +0000 (16:51 -0700)]
auto merge of #9915 : thestinger/rust/rusti, r=thestinger

10 years agorm rusti from `Makefile.in`
Daniel Micay [Thu, 17 Oct 2013 23:47:24 +0000 (19:47 -0400)]
rm rusti from `Makefile.in`

10 years agoauto merge of #9902 : thestinger/rust/immediate, r=nikomatsakis
bors [Thu, 17 Oct 2013 20:56:23 +0000 (13:56 -0700)]
auto merge of #9902 : thestinger/rust/immediate, r=nikomatsakis

The code generation previously assumed a reference could not alter the
value in a way the destructor would notice. This is an incorrect
assumption for `&mut`, and is also incorrect for an `&` pointer to a
non-`Freeze` type.

Closes #7972

10 years agopartially fix immediate rvalues
Daniel Micay [Thu, 17 Oct 2013 07:43:22 +0000 (03:43 -0400)]
partially fix immediate rvalues

The code generation previously assumed a reference could not alter the
value in a way the destructor would notice. This is an incorrect
assumption for `&mut`, and is also incorrect for an `&` pointer to a
non-`Freeze` type.

Closes #7972

10 years agoauto merge of #9908 : alexcrichton/rust/snapshots, r=thestinger
bors [Thu, 17 Oct 2013 18:06:31 +0000 (11:06 -0700)]
auto merge of #9908 : alexcrichton/rust/snapshots, r=thestinger