]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agocmp: switch `min` and `max` to `TotalOrd`
Daniel Micay [Sat, 8 Mar 2014 06:10:32 +0000 (01:10 -0500)]
cmp: switch `min` and `max` to `TotalOrd`

The `Float` trait provides correct `min` and `max` methods on floating
point types, providing a consistent result regardless of the order the
parameters are passed.

These generic functions do not take the necessary performance hit to
correctly support a partial order, so the true requirement should be
given as a type bound.

Closes #12712

10 years agoauto merge of #12238 : ktt3ja/rust/lifetime-error-msg, r=nikomatsakis
bors [Thu, 13 Mar 2014 16:41:35 +0000 (09:41 -0700)]
auto merge of #12238 : ktt3ja/rust/lifetime-error-msg, r=nikomatsakis

For the following code snippet:

```rust
struct Foo { bar: int }
fn foo1(x: &Foo) -> &int {
    &x.bar
}
```

This PR generates the following error message:

```rust
test.rs:2:1: 4:2 note: consider using an explicit lifetime parameter as shown: fn foo1<'a>(x: &'a Foo) -> &'a int
test.rs:2 fn foo1(x: &Foo) -> &int {
test.rs:3     &x.bar
test.rs:4 }
test.rs:3:5: 3:11 error: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements
test.rs:3     &x.bar
              ^~~~~~
```

Currently it does not support methods.

10 years agoauto merge of #12852 : itdaniher/rust/master, r=alexcrichton
bors [Thu, 13 Mar 2014 15:26:40 +0000 (08:26 -0700)]
auto merge of #12852 : itdaniher/rust/master, r=alexcrichton

This enables the lowering of llvm 64b intrinsics to hardware ops, resolving issues around `__kernel_cmpxchg64` on older kernels on ARM devices, and also enables use of the hardware floating point unit, resolving https://github.com/mozilla/rust/issues/10482.

10 years agoauto merge of #12849 : nick29581/rust/doubles, r=alexcrichton
bors [Thu, 13 Mar 2014 14:11:41 +0000 (07:11 -0700)]
auto merge of #12849 : nick29581/rust/doubles, r=alexcrichton

10 years agoauto merge of #12610 : eddyb/rust/deref-now-auto, r=nikomatsakis
bors [Thu, 13 Mar 2014 12:51:40 +0000 (05:51 -0700)]
auto merge of #12610 : eddyb/rust/deref-now-auto, r=nikomatsakis

Enables the dereference overloads introduced by #12491 to be applied wherever automatic dereferences would be used (field accesses, method calls and indexing).

10 years agoTweak comments
Niko Matsakis [Wed, 12 Mar 2014 17:38:17 +0000 (13:38 -0400)]
Tweak comments

10 years agocompile-fail: Beef up borrowck test to include some scenarios where we borrow mutably...
Niko Matsakis [Wed, 12 Mar 2014 17:31:00 +0000 (13:31 -0400)]
compile-fail: Beef up borrowck test to include some scenarios where we borrow mutably twice in a row

10 years agoRegion + borrow checker support and tests for overloaded autoderef.
Eduard Burtescu [Tue, 11 Mar 2014 20:27:55 +0000 (22:27 +0200)]
Region + borrow checker support and tests for overloaded autoderef.

10 years agoApply @nikomatsakis' nits and comments patch.
Eduard Burtescu [Sat, 8 Mar 2014 16:33:39 +0000 (18:33 +0200)]
Apply @nikomatsakis' nits and comments patch.

10 years agoIntroduce a common recursion limit for auto-dereference and monomorphization.
Eduard Burtescu [Thu, 6 Mar 2014 18:37:24 +0000 (20:37 +0200)]
Introduce a common recursion limit for auto-dereference and monomorphization.

10 years agoImplement automatic overloaded dereference.
Eduard Burtescu [Thu, 6 Mar 2014 17:24:11 +0000 (19:24 +0200)]
Implement automatic overloaded dereference.
Closes #7141.

10 years agoRemove Rc's borrow method to avoid conflicts with RefCell's borrow in Rc<RefCell...
Eduard Burtescu [Thu, 27 Feb 2014 22:02:27 +0000 (00:02 +0200)]
Remove Rc's borrow method to avoid conflicts with RefCell's borrow in Rc<RefCell<T>>.

10 years agoauto merge of #12845 : eddyb/rust/vec-no-drop-flag, r=thestinger
bors [Thu, 13 Mar 2014 11:36:36 +0000 (04:36 -0700)]
auto merge of #12845 : eddyb/rust/vec-no-drop-flag, r=thestinger

10 years agoauto merge of #12602 : alexcrichton/rust/backtrace, r=brson
bors [Thu, 13 Mar 2014 08:11:39 +0000 (01:11 -0700)]
auto merge of #12602 : alexcrichton/rust/backtrace, r=brson

Whenever a failure happens, if a program is run with
`RUST_LOG=std::rt::backtrace` a backtrace will be printed to the task's stderr
handle. Stack traces are uncondtionally printed on double-failure and
rtabort!().

This ended up having a nontrivial implementation, and here's some highlights of
it:

* We're bundling libbacktrace for everything but OSX and Windows
* We use libgcc_s and its libunwind apis to get a backtrace of instruction
  pointers
* On OSX we use dladdr() to go from an instruction pointer to a symbol
* On unix that isn't OSX, we use libbacktrace to get symbols
* Windows, as usual, has an entirely separate implementation

Lots more fun details and comments can be found in the source itself.

Closes #10128

10 years agoAdd basic backtrace functionality
Alex Crichton [Wed, 5 Feb 2014 23:19:40 +0000 (15:19 -0800)]
Add basic backtrace functionality

Whenever a failure happens, if a program is run with
`RUST_LOG=std::rt::backtrace` a backtrace will be printed to the task's stderr
handle. Stack traces are uncondtionally printed on double-failure and
rtabort!().

This ended up having a nontrivial implementation, and here's some highlights of
it:

* We're bundling libbacktrace for everything but OSX and Windows
* We use libgcc_s and its libunwind apis to get a backtrace of instruction
  pointers
* On OSX we use dladdr() to go from an instruction pointer to a symbol
* On unix that isn't OSX, we use libbacktrace to get symbols
* Windows, as usual, has an entirely separate implementation

Lots more fun details and comments can be found in the source itself.

Closes #10128

10 years agoauto merge of #12414 : DaGenix/rust/failing-iterator-wrappers, r=alexcrichton
bors [Thu, 13 Mar 2014 06:51:40 +0000 (23:51 -0700)]
auto merge of #12414 : DaGenix/rust/failing-iterator-wrappers, r=alexcrichton

Most IO related functions return an IoResult so that the caller can handle failure in whatever way is appropriate. However, the `lines`, `bytes`, and `chars` iterators all supress errors. This means that code that needs to handle errors can't use any of these iterators. All three of these iterators were updated to produce IoResults.

Fixes #12368

10 years agoauto merge of #12823 : alexcrichton/rust/issue-12666, r=pcwalton
bors [Thu, 13 Mar 2014 05:36:40 +0000 (22:36 -0700)]
auto merge of #12823 : alexcrichton/rust/issue-12666, r=pcwalton

If a TTY fails to get initialized, it still needs to have uv_close invoked on
it. This fixes the problem by constructing the TtyWatcher struct before the call
to uv_tty_init. The struct has a destructor on it which will close the handle
properly.

Closes #12666

10 years agoauto merge of #12822 : erickt/rust/cleanup, r=acrichto
bors [Thu, 13 Mar 2014 04:21:44 +0000 (21:21 -0700)]
auto merge of #12822 : erickt/rust/cleanup, r=acrichto

This PR makes `std::io::FileStat` hashable, and `Path` serializable as a byte array.

10 years agoUpdate io iterators to produce IoResults
Palmer Cox [Thu, 20 Feb 2014 02:53:46 +0000 (21:53 -0500)]
Update io iterators to produce IoResults

Most IO related functions return an IoResult so that the caller can handle failure
in whatever way is appropriate. However, the `lines`, `bytes`, and `chars` iterators all
supress errors. This means that code that needs to handle errors can't use any of these
iterators. All three of these iterators were updated to produce IoResults.

Fixes #12368

10 years agoauto merge of #12756 : pongad/rust/remove_owned_str_pat, r=alexcrichton
bors [Thu, 13 Mar 2014 02:21:44 +0000 (19:21 -0700)]
auto merge of #12756 : pongad/rust/remove_owned_str_pat, r=alexcrichton

match-drop-strs-issue-4541.rs deleted as it's the same with issue-4541.rs

10 years agosyntax: change the #[deriving(Hash)] typaram variable name
Erick Tryzelaar [Wed, 12 Mar 2014 03:07:42 +0000 (20:07 -0700)]
syntax: change the #[deriving(Hash)] typaram variable name

10 years agoserialize: make Paths serializable
Erick Tryzelaar [Tue, 11 Mar 2014 03:47:47 +0000 (20:47 -0700)]
serialize: make Paths serializable

10 years agostd: allow io::File* structs to be hashable
Erick Tryzelaar [Tue, 11 Mar 2014 03:47:25 +0000 (20:47 -0700)]
std: allow io::File* structs to be hashable

10 years agoauto merge of #12081 : cgaebel/rust/robinhood-hashing, r=alexcrichton
bors [Thu, 13 Mar 2014 01:06:47 +0000 (18:06 -0700)]
auto merge of #12081 : cgaebel/rust/robinhood-hashing, r=alexcrichton

Partially addresses #11783.

Previously, rust's hashtable was totally unoptimized. It used an Option
per key-value pair, and used very naive open allocation.

The old hashtable had very high variance in lookup time. For an example,
see the 'find_nonexisting' benchmark below. This is fixed by keys in
'lucky' spots with a low probe sequence length getting their good spots
stolen by keys with long probe sequence lengths. This reduces hashtable
probe length variance, while maintaining the same mean.

Also, other optimization liberties were taken. Everything is as cache
aware as possible, and this hashtable should perform extremely well for
both large and small keys and values.

Benchmarks:

```
comprehensive_old_hashmap         378 ns/iter (+/- 8)
comprehensive_new_hashmap         206 ns/iter (+/- 4)
1.8x faster

old_hashmap_as_queue              238 ns/iter (+/- 8)
new_hashmap_as_queue              119 ns/iter (+/- 2)
2x faster

old_hashmap_insert                172 ns/iter (+/- 8)
new_hashmap_insert                146 ns/iter (+/- 11)
1.17x faster

old_hashmap_find_existing         50 ns/iter (+/- 12)
new_hashmap_find_existing         35 ns/iter (+/- 6)
1.43x faster

old_hashmap_find_notexisting      49 ns/iter (+/- 49)
new_hashmap_find_notexisting      34 ns/iter (+/- 4)
1.44x faster

Memory usage of old hashtable (64-bit assumed):

aligned(8+sizeof(Option)+sizeof(K)+sizeof(V))/0.75 + 48ish bytes

Memory usage of new hashtable:

(aligned(sizeof(K))
+ aligned(sizeof(V))
+ 8)/0.9 + 112ish bytes

Timing of building librustc:

compile_and_link: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc
time: 0.457 s   parsing
time: 0.028 s   gated feature checking
time: 0.000 s   crate injection
time: 0.108 s   configuration 1
time: 1.049 s   expansion
time: 0.219 s   configuration 2
time: 0.222 s   maybe building test harness
time: 0.223 s   prelude injection
time: 0.268 s   assinging node ids and indexing ast
time: 0.075 s   external crate/lib resolution
time: 0.026 s   language item collection
time: 1.016 s   resolution
time: 0.038 s   lifetime resolution
time: 0.000 s   looking for entry point
time: 0.030 s   looking for macro registrar
time: 0.061 s   freevar finding
time: 0.138 s   region resolution
time: 0.110 s   type collecting
time: 0.072 s   variance inference
time: 0.126 s   coherence checking
time: 9.110 s   type checking
time: 0.186 s   const marking
time: 0.049 s   const checking
time: 0.418 s   privacy checking
time: 0.057 s   effect checking
time: 0.033 s   loop checking
time: 1.293 s   compute moves
time: 0.182 s   match checking
time: 0.242 s   liveness checking
time: 0.866 s   borrow checking
time: 0.150 s   kind checking
time: 0.013 s   reachability checking
time: 0.175 s   death checking
time: 0.461 s   lint checking
time: 13.112 s  translation
  time: 4.352 s llvm function passes
  time: 96.702 s    llvm module passes
  time: 50.574 s    codegen passes
time: 154.611 s LLVM passes
  time: 2.821 s running linker
time: 15.750 s  linking

compile_and_link: x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc
time: 0.422 s   parsing
time: 0.031 s   gated feature checking
time: 0.000 s   crate injection
time: 0.126 s   configuration 1
time: 1.014 s   expansion
time: 0.251 s   configuration 2
time: 0.249 s   maybe building test harness
time: 0.273 s   prelude injection
time: 0.279 s   assinging node ids and indexing ast
time: 0.076 s   external crate/lib resolution
time: 0.033 s   language item collection
time: 1.028 s   resolution
time: 0.036 s   lifetime resolution
time: 0.000 s   looking for entry point
time: 0.029 s   looking for macro registrar
time: 0.063 s   freevar finding
time: 0.133 s   region resolution
time: 0.111 s   type collecting
time: 0.077 s   variance inference
time: 0.565 s   coherence checking
time: 8.953 s   type checking
time: 0.176 s   const marking
time: 0.050 s   const checking
time: 0.401 s   privacy checking
time: 0.063 s   effect checking
time: 0.032 s   loop checking
time: 1.291 s   compute moves
time: 0.172 s   match checking
time: 0.249 s   liveness checking
time: 0.831 s   borrow checking
time: 0.121 s   kind checking
time: 0.013 s   reachability checking
time: 0.179 s   death checking
time: 0.503 s   lint checking
time: 14.385 s  translation
  time: 4.495 s llvm function passes
  time: 92.234 s    llvm module passes
  time: 51.172 s    codegen passes
time: 150.809 s LLVM passes
  time: 2.542 s running linker
time: 15.109 s  linking
```

BUT accesses are much more cache friendly. In fact, if the probe
sequence length is below 8, only two cache lines worth of hashes will be
pulled into cache. This is unlike the old version which would have to
stride over the stoerd keys and values, and would be more cache
unfriendly the bigger the stored values got.

And did you notice the higher load factor? We can now reasonably get a
load factor of 0.9 with very good performance.

Please review this very closely. This is my first major contribution to Rust. Sorry for the ugly diff!

10 years agorustuv: Fix a use-after-free in TTY failure
Alex Crichton [Tue, 11 Mar 2014 04:27:34 +0000 (21:27 -0700)]
rustuv: Fix a use-after-free in TTY failure

If a TTY fails to get initialized, it still needs to have uv_close invoked on
it. This fixes the problem by constructing the TtyWatcher struct before the call
to uv_tty_init. The struct has a destructor on it which will close the handle
properly.

Closes #12666

10 years agorustc: Remove matching on ~str from the language
Michael Darakananda [Fri, 7 Mar 2014 21:15:50 +0000 (16:15 -0500)]
rustc: Remove matching on ~str from the language

The `~str` type is not long for this world as it will be superseded by the
soon-to-come DST changes for the language. The new type will be
`~Str`, and matching over the allocation will no longer be supported.
Matching on `&str` will continue to work, in both a pre and post DST world.

10 years agoPerformance-oriented hashtable.
Clark Gaebel [Sat, 1 Mar 2014 03:23:53 +0000 (22:23 -0500)]
Performance-oriented hashtable.

Previously, rust's hashtable was totally unoptimized. It used an Option
per key-value pair, and used very naive open allocation.

The old hashtable had very high variance in lookup time. For an example,
see the 'find_nonexisting' benchmark below. This is fixed by keys in
'lucky' spots with a low probe sequence length getting their good spots
stolen by keys with long probe sequence lengths. This reduces hashtable
probe length variance, while maintaining the same mean.

Also, other optimization liberties were taken. Everything is as cache
aware as possible, and this hashtable should perform extremely well for
both large and small keys and values.

Benchmarks:

comprehensive_old_hashmap         378 ns/iter (+/- 8)
comprehensive_new_hashmap         206 ns/iter (+/- 4)
1.8x faster

old_hashmap_as_queue              238 ns/iter (+/- 8)
new_hashmap_as_queue              119 ns/iter (+/- 2)
2x faster

old_hashmap_insert                172 ns/iter (+/- 8)
new_hashmap_insert                146 ns/iter (+/- 11)
1.17x faster

old_hashmap_find_existing         50 ns/iter (+/- 12)
new_hashmap_find_existing         35 ns/iter (+/- 6)
1.43x faster

old_hashmap_find_notexisting      49 ns/iter (+/- 49)
new_hashmap_find_notexisting      34 ns/iter (+/- 4)
1.44x faster

Memory usage of old hashtable (64-bit assumed):

aligned(8+sizeof(K)+sizeof(V))/0.75 + 6 words

Memory usage of new hashtable:

(aligned(sizeof(K))
+ aligned(sizeof(V))
+ 8)/0.9 + 6.5 words

BUT accesses are much more cache friendly. In fact, if the probe
sequence length is below 8, only two cache lines worth of hashes will be
pulled into cache. This is unlike the old version which would have to
stride over the stoerd keys and values, and would be more cache
unfriendly the bigger the stored values got.

And did you notice the higher load factor? We can now reasonably get a
load factor of 0.9 with very good performance.

10 years agoauto merge of #12848 : alexcrichton/rust/rollup, r=alexcrichton
bors [Wed, 12 Mar 2014 22:07:06 +0000 (15:07 -0700)]
auto merge of #12848 : alexcrichton/rust/rollup, r=alexcrichton

10 years agoTest fixes from rolling up PRs
Alex Crichton [Wed, 12 Mar 2014 17:31:52 +0000 (10:31 -0700)]
Test fixes from rolling up PRs

Closes #12803 (std: Relax an assertion in oneshot selection) r=brson
Closes #12818 (green: Fix a scheduler assertion on yielding) r=brson
Closes #12819 (doc: discuss try! in std::io) r=alexcrichton
Closes #12820 (Use generic impls for `Hash`) r=alexcrichton
Closes #12826 (Remove remaining nolink usages) r=alexcrichton
Closes #12835 (Emacs: always jump the cursor if needed on indent) r=brson
Closes #12838 (Json method cleanup) r=alexcrichton
Closes #12843 (rustdoc: whitelist the headers that get a § on hover) r=alexcrichton
Closes #12844 (docs: add two unlisted libraries to the index page) r=pnkfelix
Closes #12846 (Added a test that checks that unary structs can be mutably borrowed) r=sfackler
Closes #12847 (mk: Fix warnings about duplicated rules) r=nmatsakis

10 years agomk: Fix warnings about duplicated rules
Alex Crichton [Wed, 12 Mar 2014 17:35:17 +0000 (10:35 -0700)]
mk: Fix warnings about duplicated rules

The footer.tex rule didn't depend on $(1) of the macro it was being defined in,
so it was getting duplicated, causing many warnings.

10 years agoAdded a test that checks that unary structs can be mutably borrowed.
Dmitry Promsky [Wed, 12 Mar 2014 15:54:43 +0000 (19:54 +0400)]
Added a test that checks that unary structs can be mutably borrowed.

Closes #11267

10 years agodocs: add two unlisted libraries to the index page.
Huon Wilson [Wed, 12 Mar 2014 12:19:09 +0000 (23:19 +1100)]
docs: add two unlisted libraries to the index page.

10 years agorustdoc: whitelist the headers that get a § on hover.
Huon Wilson [Wed, 12 Mar 2014 12:09:03 +0000 (23:09 +1100)]
rustdoc: whitelist the headers that get a § on hover.

Previously the :hover rules were making the links to the traits/types in
something like

    impl<K: Hash + Eq, V> ... { ... }

be displayed with a trailing `§` when hovered over. This commit
restricts that behaviour to specific headers, i.e. those that are known
to be section headers (like those rendered in markdown doc-comments, and
the "Modules", "Functions" etc. headings).

10 years agoCloses #12829. Names changed for consistency, find_path optimized, method impls refac...
zslayton [Wed, 12 Mar 2014 03:04:36 +0000 (23:04 -0400)]
Closes #12829. Names changed for consistency, find_path optimized, method impls refactored to reduce repitition.

Fixed formatting, reworked find_path to use fewer Options.

Removed stray tab.

10 years agoEmacs: always jump the cursor if needed on indent
Micah Chalmer [Wed, 12 Mar 2014 00:23:32 +0000 (20:23 -0400)]
Emacs: always jump the cursor if needed on indent

The rust-mode-indent-line function had a check, which ran after all the
calculations for how to indent had already happened, that skipped
actually performing the indent if the line was already at the right
indentation.

Because of that, the cursor did not jump to the indentation if the line
wasn't changing.  This was particularly annoying if there was nothing
but spaces on the line and you were at the beginning of it--it looked
like the indent just wasn't working.

This removes the check and adds test cases to cover this.

10 years agoRemove remaining nolink usages.(fixes #12810)
lpy [Tue, 11 Mar 2014 13:39:26 +0000 (21:39 +0800)]
Remove remaining nolink usages.(fixes #12810)

10 years agoenable mutex lowering and hardware floating point on gnueabihf. closes #10482
Ian Daniher [Wed, 12 Mar 2014 20:55:28 +0000 (16:55 -0400)]
enable mutex lowering and hardware floating point on gnueabihf. closes #10482

10 years agoUse generic impls for `Hash`
Erick Tryzelaar [Tue, 25 Feb 2014 16:03:41 +0000 (08:03 -0800)]
Use generic impls for `Hash`

10 years agodoc: discuss try! in std::io
Peter Marheine [Mon, 10 Mar 2014 23:30:23 +0000 (19:30 -0400)]
doc: discuss try! in std::io

10 years agogreen: Fix a scheduler assertion on yielding
Alex Crichton [Mon, 10 Mar 2014 22:10:56 +0000 (15:10 -0700)]
green: Fix a scheduler assertion on yielding

This commit fixes a small bug in the green scheduler where a scheduler task
calling `maybe_yield` would trip the assertion that `self.yield_check_count > 0`

This behavior was seen when a scheduler task was scheduled many times
successively, sending messages in a loop (via the channel `send` method), which
in turn invokes `maybe_yield`. Yielding on a sched task doesn't make sense
because as soon as it's done it will implicitly do a yield, and for this reason
the yield check is just skipped if it's a sched task.

I am unable to create a reliable test for this behavior, as there's no direct
way to have control over the scheduler tasks.

cc #12666, I discovered this when investigating that issue

10 years agostd: Relax an assertion in oneshot selection
Alex Crichton [Mon, 10 Mar 2014 06:20:05 +0000 (23:20 -0700)]
std: Relax an assertion in oneshot selection

The assertion was erroneously ensuring that there was no data on the port when
the port had selection aborted on it. This assertion was written in error
because it's possible for data to be waiting on a port, even after it was
disconnected. When aborting selection, if we see that there's data on the port,
then we return true that data is available on the port.

Closes #12802

10 years agoSuggest explicit lifetime parameter on some errors
Kiet Tran [Sat, 15 Feb 2014 06:26:51 +0000 (01:26 -0500)]
Suggest explicit lifetime parameter on some errors

Some types of error are caused by missing lifetime parameter on function
or method declaration. In such cases, this commit generates some
suggestion about what the function declaration could be. This does not
support method declaration yet.

10 years agoUpdate last_span in replace_token
Nick Cameron [Wed, 12 Mar 2014 19:20:18 +0000 (12:20 -0700)]
Update last_span in replace_token

10 years agoVec: remove the drop flag to make it no larger than (*T, uint, uint).
Eduard Burtescu [Wed, 12 Mar 2014 20:01:33 +0000 (22:01 +0200)]
Vec: remove the drop flag to make it no larger than (*T, uint, uint).

10 years agoAdd shift and remove methods for Vec
Kiet Tran [Tue, 11 Mar 2014 04:53:23 +0000 (00:53 -0400)]
Add shift and remove methods for Vec

10 years agoauto merge of #12797 : pczarn/rust/str_safety, r=huonw
bors [Wed, 12 Mar 2014 19:12:05 +0000 (12:12 -0700)]
auto merge of #12797 : pczarn/rust/str_safety, r=huonw

Along the lines of `shift_ref` and `pop_ref`.

10 years agoauto merge of #12816 : michaelwoerister/rust/limited-debuginfo, r=alexcrichton
bors [Wed, 12 Mar 2014 14:42:03 +0000 (07:42 -0700)]
auto merge of #12816 : michaelwoerister/rust/limited-debuginfo, r=alexcrichton

Fixes #12811 as described in the issue.

10 years agoauto merge of #12807 : pnkfelix/rust/fsk-issue5121-fns-with-early-lifetime-params...
bors [Wed, 12 Mar 2014 13:27:03 +0000 (06:27 -0700)]
auto merge of #12807 : pnkfelix/rust/fsk-issue5121-fns-with-early-lifetime-params, r=pnkfelix

Fix issue #5121: Add proper support for early/late distinction for lifetime bindings.

There are some little refactoring cleanups as separate commits; the real meat that has the actual fix is in the final commit.

The original author of the work was @nikomatsakis; I have reviewed it, revised it slightly, refactored it into these separate commits, and done some rebasing work.

10 years agoauto merge of #12839 : alexcrichton/rust/fix-snap, r=huonw
bors [Wed, 12 Mar 2014 07:32:03 +0000 (00:32 -0700)]
auto merge of #12839 : alexcrichton/rust/fix-snap, r=huonw

This test is blocking a snapshot. Apparently the snapshot bot doesn't print
'limited-debuginfo::main()' but rather just 'main()'. Who knew?

10 years agoAdd proper support for early/late distinction for lifetime bindings.
Felix S. Klock II [Fri, 7 Mar 2014 07:43:39 +0000 (08:43 +0100)]
Add proper support for early/late distinction for lifetime bindings.
Uses newly added Vec::partition method to simplify resolve_lifetime.

10 years agoChanged lists of lifetimes in ast and ty to use Vec instead of OptVec.
Felix S. Klock II [Fri, 7 Mar 2014 15:50:40 +0000 (16:50 +0100)]
Changed lists of lifetimes in ast and ty to use Vec instead of OptVec.

There is a broader revision (that does this across the board) pending
in #12675, but that is awaiting the arrival of more data (to decide
whether to keep OptVec alive by using a non-Vec internally).

For this code, the representation of lifetime lists needs to be the
same in both ScopeChain and in the ast and ty structures.  So it
seemed cleanest to just use `vec_ng::Vec`, now that it has a cheaper
empty representation than the current `vec` code.

10 years agoIntroduce Scope<'a> shorthand for &'a ScopeChain<'a>.
Felix S. Klock II [Wed, 26 Feb 2014 13:59:49 +0000 (14:59 +0100)]
Introduce Scope<'a> shorthand for &'a ScopeChain<'a>.

10 years agoalpha-rename .ident to .name in Lifetime, including in rustdoc.
Felix S. Klock II [Fri, 7 Mar 2014 02:10:52 +0000 (03:10 +0100)]
alpha-rename .ident to .name in Lifetime, including in rustdoc.

10 years agotest: Relax a debuginfo test
Alex Crichton [Wed, 12 Mar 2014 06:59:56 +0000 (23:59 -0700)]
test: Relax a debuginfo test

This test is blocking a snapshot. Apparently the snapshot bot doesn't print
'limited-debuginfo::main()' but rather just 'main()'. Who knew?

10 years agoAlpha-rename `.ident` fields of type `Name` to `.name`.
Felix S. Klock II [Wed, 5 Mar 2014 05:59:35 +0000 (06:59 +0100)]
Alpha-rename `.ident` fields of type `Name` to `.name`.

10 years agoPort partition method from ~[T] to Vec<T>, for use early-late lifetime code.
Felix S. Klock II [Thu, 6 Mar 2014 22:33:46 +0000 (23:33 +0100)]
Port partition method from ~[T] to Vec<T>, for use early-late lifetime code.

10 years agoBundle libbacktrace with the compiler
Alex Crichton [Sat, 1 Mar 2014 19:57:52 +0000 (11:57 -0800)]
Bundle libbacktrace with the compiler

This will soon be used to print backtraces on failure

10 years agoauto merge of #12774 : alexcrichton/rust/proc-bounds, r=pcwalton
bors [Wed, 12 Mar 2014 03:51:56 +0000 (20:51 -0700)]
auto merge of #12774 : alexcrichton/rust/proc-bounds, r=pcwalton

This is needed to make progress on #10296 as the default bounds will no longer
include Send. I believe that this was the originally intended syntax for procs,
and it just hasn't been necessary up until now.

10 years agoauto merge of #12650 : huonw/rust/librand, r=alexcrichton
bors [Wed, 12 Mar 2014 02:31:57 +0000 (19:31 -0700)]
auto merge of #12650 : huonw/rust/librand, r=alexcrichton

Move std::rand to a separate rand crate

This functionality is not super-core and so doesn't need to be included
in std. It's possible that std may need rand (it does a little bit now,
for io::test) in which case the functionality required could be moved to
a secret hidden module and reexposed by librand.

Unfortunately, using #[deprecated] here is hard: there's too much to
mock to make it feasible, since we have to ensure that programs still
typecheck to reach the linting phase.

Also, deprecates/removes `rand::rng` (this time using `#[deprecated]`), since it's too easy to accidentally use inside a loop, making things very slow (have to read randomness from the OS and seed the RNG each time.)

10 years agosyntax: Add support for trait bounds on procs
Alex Crichton [Sun, 9 Mar 2014 02:21:01 +0000 (18:21 -0800)]
syntax: Add support for trait bounds on procs

This is needed to make progress on #10296 as the default bounds will no longer
include Send. I believe that this was the originally intended syntax for procs,
and it just hasn't been necessary up until now.

10 years agorand: deprecate `rng`.
Huon Wilson [Sun, 2 Mar 2014 01:59:35 +0000 (12:59 +1100)]
rand: deprecate `rng`.

This should be called far less than it is because it does expensive OS
interactions and seeding of the internal RNG, `task_rng` amortises this
cost. The main problem is the name is so short and suggestive.

The direct equivalent is `StdRng::new`, which does precisely the same
thing.

The deprecation will make migrating away from the function easier.

10 years agoUpdate users for the std::rand -> librand move.
Huon Wilson [Sun, 2 Mar 2014 00:33:24 +0000 (11:33 +1100)]
Update users for the std::rand -> librand move.

10 years agoRemove the dependence of std::io::test on rand.
Huon Wilson [Sat, 1 Mar 2014 13:36:33 +0000 (00:36 +1100)]
Remove the dependence of std::io::test on rand.

This replaces it with a manual "task rng" using XorShift and a crappy
seeding mechanism. Theoretically good enough for the purposes
though (unique for tests).

10 years agostd: Move rand to librand.
Huon Wilson [Sun, 2 Mar 2014 00:23:04 +0000 (11:23 +1100)]
std: Move rand to librand.

This functionality is not super-core and so doesn't need to be included
in std. It's possible that std may need rand (it does a little bit now,
for io::test) in which case the functionality required could be moved to
a secret hidden module and reexposed by librand.

Unfortunately, using #[deprecated] here is hard: there's too much to
mock to make it feasible, since we have to ensure that programs still
typecheck to reach the linting phase.

10 years agoauto merge of #12783 : adrientetar/rust/more-docs, r=alexcrichton
bors [Tue, 11 Mar 2014 19:36:58 +0000 (12:36 -0700)]
auto merge of #12783 : adrientetar/rust/more-docs, r=alexcrichton

- remove `node.js` dep., it has no effect as of #12747 (1)
- switch between LaTeX compilers, some cleanups
- CSS: fixup the print stylesheet, refactor highlighting code (2)

(1): `prep.js` outputs its own HTML directives, which `pandoc` cannot recognize when converting the document into LaTeX (this is why the PDF docs have never been highlighted as of now).

Note that if we were to add the `.rust` class to snippets, we could probably use pandoc's native highlighting capatibilities i.e. Kate ([here is](http://adrientetar.github.io/rust-tuts/tutorial/tutorial.pdf) an example of that).

(2): the only real highlighting change is for lifetimes which are now brown instead of red, the rest is just refactor of twos shades of red that look the same.
Also I made numbers highlighting for src in rustdoc a tint more clear so that it is less bothering.

@alexcrichton, @huonw

Closes #9873. Closes #12788.

10 years agoauto merge of #12780 : zslayton/rust/json-nav, r=alexcrichton
bors [Tue, 11 Mar 2014 18:17:01 +0000 (11:17 -0700)]
auto merge of #12780 : zslayton/rust/json-nav, r=alexcrichton

This is my first non-docs contribution to Rust, so please let me know what I can fix. I probably should've submitted this to the mailing list first for comments, but it didn't take too long to implement so I figured I'd just give it a shot.

These changes are modeled loosely on the [JsonNode API](http://jackson.codehaus.org/1.7.9/javadoc/org/codehaus/jackson/JsonNode.html) provided by the [Jackson JSON processor](http://jackson.codehaus.org/).

Many common use cases for parsing JSON involve pulling one or more fields out of an object, however deeply nested. At present, this requires writing a pyramid of match statements. The added methods in this PR aim to make this a more painless process.

**Edited to reflect final implementation**

Example JSON:
```json
{
    "successful" : true,
    "status" : 200,
    "error" : null,
    "content" : {
        "vehicles" : [
            {"make" : "Toyota", "model" : "Camry", "year" : 1997},
            {"make" : "Honda", "model" : "Accord", "year" : 2003}
        ]
    }
}
```

Accessing "successful":
```rust
 let example_json : Json = from_str("...above json...").unwrap();
 let was_successful: Option<bool> = example_json.find(&~"successful").and_then(|j| j.as_boolean());
```

Accessing "status":
```rust
 let example_json : Json = from_str("...above json...").unwrap();
 let status_code : Option<f64> = example_json.find(&~"status").and_then(|j| j.as_number());
```

Accessing "vehicles":
```rust
 let example_json : Json = from_str("...above json...").unwrap();
 let vehicle_list: Option<List> = example_json.search(&~"vehicles").and_then(|j| j.as_list());
```

Accessing "vehicles" with an explicit path:
```rust
 let example_json : Json = from_str("...above json...").unwrap();
 let vehicle_list: Option<List> = example_json.find_path(&[&~"content", &~"vehicles"]).and_then(|j| j.as_list());
```

Accessing "error", which might be null or a string:
```rust
 let example_json : Json = from_str("...above json...").unwrap();
 let error: Option<Json> = example_json.find(&~"error");
 if error.is_null() { // This would be nicer as a match, I'm just illustrating the boolean test methods
    println!("Error is null, everything's fine.");
 } else if error.is_str(){
    println!("Something went wrong: {}", error.as_string().unwrap());
}
```

Some notes:
* Macros would help to eliminate some of the repetitiveness of the implementation, but I couldn't use them due to #4621. (**Edit**: There is no longer repetitive impl. Methods were simplified to make them more composable.)
* Would it be better to name methods after the Json enum type (e.g. `get_string`) or the associated Rust built-in? (e.g. `get_str`)
* TreeMap requires its keys to be &~str. Because of this, all of the new methods required &~str for their parameters. I'm uncertain what the best approach to fixing this is: neither demanding an owned pointer nor allocating within the methods to appease TreeMap's find() seems desirable. If I were able to take &str, people could put together paths easily with `"foo.bar.baz".split('.').collect();` (**Edit**: Follow on investigation into making TreeMap able to search by Equiv would be worthwhile.)
* At the moment, the `find_<sometype>` methods all find the first match for the provided key and attempt to return that value if it's of the specified type. This makes sense to me, but it's possible that users would interpret a call to `find_boolean("successful")` as looking for the first "successful" item that was a boolean rather than looking for the first "successful" and returning None if it isn't boolean. (**Edit**: No longer relevant.)

I hope this is helpful. Any feedback is appreciated!

10 years agodebuginfo: Improve commandline option handling for debuginfo (fixes #12811)
Michael Woerister [Mon, 10 Mar 2014 19:13:19 +0000 (20:13 +0100)]
debuginfo: Improve commandline option handling for debuginfo (fixes #12811)

The `-g` flag does not take an argument anymore while the argument to `--debuginfo` becomes mandatory. This change makes it possible again to run the compiler like this:

`rustc -g ./file.rs`

This did not work before because `./file.rs` was misinterpreted as the argument to `-g`. In order to get limited debuginfo, one now has to use `--debuginfo=1`.

10 years agoauto merge of #12556 : alexcrichton/rust/weak-linkage, r=brson
bors [Tue, 11 Mar 2014 16:56:57 +0000 (09:56 -0700)]
auto merge of #12556 : alexcrichton/rust/weak-linkage, r=brson

It is often convenient to have forms of weak linkage or other various types of
linkage. Sadly, just using these flavors of linkage are not compatible with
Rust's typesystem and how it considers some pointers to be non-null.

As a compromise, this commit adds support for weak linkage to external symbols,
but it requires that this is only placed on extern statics of type `*T`.
Codegen-wise, we get translations like:

```rust
    // rust code
    extern {
        #[linkage = "extern_weak"]
        static foo: *i32;
    }

    // generated IR
    @foo = extern_weak global i32
    @_some_internal_symbol = internal global *i32 @foo
```

All references to the rust value of `foo` then reference `_some_internal_symbol`
instead of the symbol `_foo` itself. This allows us to guarantee that the
address of `foo` will never be null while the value may sometimes be null.

An example was implemented in `std::rt::thread` to determine if
`__pthread_get_minstack()` is available at runtime, and a test is checked in to
use it for a static value as well. Function pointers a little odd because you
still need to transmute the pointer value to a function pointer, but it's
thankfully better than not having this capability at all.

Thanks to @bnoordhuis for the original patch, most of this work is still his!

10 years agodoc: remove outdated tutorial entry, restore removed Makefile entries
Adrien Tétar [Sun, 9 Mar 2014 12:52:16 +0000 (13:52 +0100)]
doc: remove outdated tutorial entry, restore removed Makefile entries

10 years agodoc: auto-generate LaTeX includes
Adrien Tétar [Sun, 9 Mar 2014 11:41:27 +0000 (12:41 +0100)]
doc: auto-generate LaTeX includes

10 years agoAdded convenience methods and accompanying tests to the Json class.
zslayton [Sun, 9 Mar 2014 06:30:27 +0000 (01:30 -0500)]
Added convenience methods and accompanying tests to the Json class.

Fixed some styling issues with trailing whitespace.

- Removed redundant functions.
- Renamed `get` to `find`
- Renamed `get_path` to `find_path`
- Renamed `find` to `search`
- Changed as_object and as_list to return Object and List
  rather than the underlying implementation types
  of TreeMap<~str,Json> and ~[Json]
- Refactored find_path to use a fold() instead of recursion

Formatting fixes.

Fixed spacing, deleted comment.

Added convenience methods and accompanying tests to the Json class.

Updated tests to expect less pointer indirection.

10 years agorustc: Support various flavors of linkages
Alex Crichton [Wed, 26 Feb 2014 00:15:10 +0000 (16:15 -0800)]
rustc: Support various flavors of linkages

It is often convenient to have forms of weak linkage or other various types of
linkage. Sadly, just using these flavors of linkage are not compatible with
Rust's typesystem and how it considers some pointers to be non-null.

As a compromise, this commit adds support for weak linkage to external symbols,
but it requires that this is only placed on extern statics of type `*T`.
Codegen-wise, we get translations like:

    // rust code
    extern {
        #[linkage = "extern_weak"]
        static foo: *i32;
    }

    // generated IR
    @foo = extern_weak global i32
    @_some_internal_symbol = internal global *i32 @foo

All references to the rust value of `foo` then reference `_some_internal_symbol`
instead of the symbol `_foo` itself. This allows us to guarantee that the
address of `foo` will never be null while the value may sometimes be null.

An example was implemented in `std::rt::thread` to determine if
`__pthread_get_minstack()` is available at runtime, and a test is checked in to
use it for a static value as well. Function pointers a little odd because you
still need to transmute the pointer value to a function pointer, but it's
thankfully better than not having this capability at all.

10 years agoauto merge of #12765 : TeXitoi/rust/fix-shootout-reverse-complement, r=alexcrichton
bors [Tue, 11 Mar 2014 08:51:59 +0000 (01:51 -0700)]
auto merge of #12765 : TeXitoi/rust/fix-shootout-reverse-complement, r=alexcrichton

10 years agofix a bug in shootout-reverse-complement, official tests should pass with it
Guillaume Pinot [Sat, 8 Mar 2014 15:56:07 +0000 (16:56 +0100)]
fix a bug in shootout-reverse-complement, official tests should pass with it

In the "reverse-complement" loop, if there is an odd number of element,
we forget to complement the element in the middle.  For example, if the
input is "ggg", the result before the fix is "CgC" instead of "CCC".

This is because of this bug that the official shootout says that the rust
version is in "Bad Output".  This commit should fix this error.

10 years agoauto merge of #12617 : sfackler/rust/item-modifier, r=alexcrichton
bors [Tue, 11 Mar 2014 07:32:04 +0000 (00:32 -0700)]
auto merge of #12617 : sfackler/rust/item-modifier, r=alexcrichton

Where ItemDecorator creates new items given a single item, ItemModifier
alters the tagged item in place. The expansion rules for this are a bit
weird, but I think are the most reasonable option available.

When an item is expanded, all ItemModifier attributes are stripped from
it and the item is folded through all ItemModifiers. At that point, the
process repeats until there are no ItemModifiers in the new item.

cc @huonw

10 years agoAdd an ItemModifier syntax extension type
Steven Fackler [Fri, 28 Feb 2014 07:49:25 +0000 (23:49 -0800)]
Add an ItemModifier syntax extension type

Where ItemDecorator creates new items given a single item, ItemModifier
alters the tagged item in place. The expansion rules for this are a bit
weird, but I think are the most reasonable option available.

When an item is expanded, all ItemModifier attributes are stripped from
it and the item is folded through all ItemModifiers. At that point, the
process repeats until there are no ItemModifiers in the new item.

10 years agoauto merge of #12793 : brson/rust/installer, r=alexcrichton
bors [Tue, 11 Mar 2014 05:42:02 +0000 (22:42 -0700)]
auto merge of #12793 : brson/rust/installer, r=alexcrichton

Work towards #9876.

Several minor things here:
  * Fix the `need_ok` function in `configure`
  * Install man pages with non-executable permissions
  * Use the correct directory for man pages when installing (this was a recent regression)
  * Put all distributables in a new `dist/` directory in the build directory (there are soon to be significantly more of these)

Finally, this also creates a new, more precise way to install and uninstall Rust's files, the `install.sh` script, and creates a build target (currently `dist-tar-bins`) that creates a binary tarball containing all the installable files, boilerplate and license docs, and `install.sh`.

This binary tarball is the lowest-common denominator way to install Rust on Unix. We'll use it as the default installer on Linux (OS X will use .pkg).

## How `install.sh` works

* First, the makefiles (`prepare.mk` and `dist.mk`) put all the stuff that needs to be installed in a new directory in `dist/`.
* Then it puts `install.sh` in that same directory and a list of all the files to install at `rustlib/manifest`.
* Then the directory can be packaged and distributed.
* When `install.sh` runs it does some sanity checking then copies everything in the manifest to the install prefix, then copies the manifest as well.
* When `install.sh` runs again in the future it first looks for the existing manifest at the install prefix, and if it exists deletes everything in it. This is how the core distribution is upgraded - cargo is responsible for the rest.
* `install.sh --uninstall` will uninstall Rust

## Future work:

  * Modify `install.sh` to accept `--man-dir` etc
  * Rewrite `install.mk` to delegate to `install.sh`
  * Investigate how `install.sh` does or doesn't work with .pkg on Mac
  * Modify `dist.mk` to create `.pkg` files for all hosts
  * Possibly use [makeself](http://www.megastep.org/makeself/) to create self-extracting installers
  * Modify dist-snap bots run on mac as well, uploading binary tarballs and .pkg files for the four combos of linux, mac, x86, and x86_64.
  * Adjust build system to be able to augment versions with '-nightly'
  * Adjust build system to name dist artifacts without version numbers e.g. `rust-nightly-...pkg`. This is so we don't leave a huge trail of old nightly binaries on S3 - they just get overwritten.
  * Create new dist-nightly builder
  * Give the build master a new cron job to push to dist-nightly every night
  * Add docs to distributables
  * Update README.md to reflect the new reality
  * Modernize the website to promote new installers

10 years agoauto merge of #12766 : TeXitoi/rust/fix-shootout-spectralnorm, r=alexcrichton
bors [Tue, 11 Mar 2014 03:07:02 +0000 (20:07 -0700)]
auto merge of #12766 : TeXitoi/rust/fix-shootout-spectralnorm, r=alexcrichton

10 years agoauto merge of #12652 : rcxdude/rust/hexfloatext, r=alexcrichton
bors [Tue, 11 Mar 2014 01:52:03 +0000 (18:52 -0700)]
auto merge of #12652 : rcxdude/rust/hexfloatext, r=alexcrichton

Closes #1433. Implemented after suggestion by @cmr in #12323

This is slightly less flexible than the implementation in #12323 (binary and octal floats aren't supported, nor are underscores in the literal), but is cleaner in that it doesn't modify the core grammar, or require odd syntax for the number itself. The missing features could be added back with relatively little effort (the main awkwardness is parsing the string. Is there a good approach for this in the stdlib currently?)

10 years agoImplement hexadecimal floating point literals via a syntax extension
Douglas Young [Sun, 2 Mar 2014 18:41:17 +0000 (18:41 +0000)]
Implement hexadecimal floating point literals via a syntax extension

closes #1433

10 years agoauto merge of #12733 : edwardw/rust/rw-liveness, r=nikomatsakis
bors [Mon, 10 Mar 2014 20:42:05 +0000 (13:42 -0700)]
auto merge of #12733 : edwardw/rust/rw-liveness, r=nikomatsakis

- Repurposes `MoveData.assignee_ids` to mean only `=` but not `+=`, so
  that borrowck effectively classifies all expressions into assignees,
  uses or both.
- Removes two `span_err` in liveness analysis, which are now borrowck's
  responsibilities.

Closes #12527.

10 years agoauto merge of #12670 : dmski/rust/master, r=nick29581
bors [Mon, 10 Mar 2014 19:27:05 +0000 (12:27 -0700)]
auto merge of #12670 : dmski/rust/master, r=nick29581

CodeMap.span_to_* perform a lookup of a BytePos(sp.hi), which lands into the next filemap if the last byte of range denoted by Span is also the last byte of the filemap, which results in ICEs or incorrect error reports.

        Example:
            ````

            pub fn main() {
                let mut num = 3;
                let refe = &mut num;
                *refe = 5;
                println!("{}", num);
            }````

(note the empty line in the beginning and the absence of newline at the end)

The above would have caused ICE when trying to report where "refe" borrow ends.
The above without an empty line in the beginning would have reported borrow end to be the first line.

Most probably, this is also responsible for (at least some occurrences of) issue #8256.

The issue is fixed by always adding a newline at the end of non-empty filemaps in case there isn't a new line there already.

10 years agolibstd: Update docs for `slice_shift_char` and {shift,pop}_{char,byte}
Piotr Czarnecki [Sun, 9 Mar 2014 21:57:22 +0000 (22:57 +0100)]
libstd: Update docs for `slice_shift_char` and {shift,pop}_{char,byte}

10 years agolibstd: Add unit tests for `slice_shift_char`
Piotr Czarnecki [Sun, 9 Mar 2014 21:56:33 +0000 (22:56 +0100)]
libstd: Add unit tests for `slice_shift_char`

10 years agolibstd: Change `slice_shift_char`, `shift_char`, `pop_char`, `shift_byte` and `pop_by...
Piotr Czarnecki [Sun, 9 Mar 2014 21:55:43 +0000 (22:55 +0100)]
libstd: Change `slice_shift_char`, `shift_char`, `pop_char`, `shift_byte` and `pop_byte` to return an Option instead of failing

10 years agosyntax: fixed ICEs and incorrect line nums when reporting Spans at the end of the...
Dmitry Promsky [Mon, 3 Mar 2014 10:44:43 +0000 (14:44 +0400)]
syntax: fixed ICEs and incorrect line nums when reporting Spans at the end of the file.

CodeMap.span_to_* perform a lookup of a BytePos(sp.hi), which lands into the next filemap if the last byte of range denoted by Span is also the last byte of the filemap, which results in ICEs or incorrect error reports.

    Example:
        ````

        pub fn main() {
            let mut num = 3;
            let refe = &mut num;
            *refe = 5;
            println!("{}", num);
        }````

(note the empty line in the beginning and the absence of newline at the end)

The above would have caused ICE when trying to report where "refe" borrow ends.
The above without an empty line in the beginning would have reported borrow end to be the first line.

Most probably, this is also responsible for (at least some occurrences of) issue #8256.

The issue is fixed by always adding a newline at the end of non-empty filemaps in case there isn't a new line there already.

10 years agoinstall.sh: untabify
Brian Anderson [Sun, 9 Mar 2014 21:56:37 +0000 (14:56 -0700)]
install.sh: untabify

10 years agoinstall.sh: Improve error handling
Brian Anderson [Sun, 9 Mar 2014 21:16:41 +0000 (14:16 -0700)]
install.sh: Improve error handling

10 years agomk: Put all distribution artifacts in dist/
Brian Anderson [Sun, 9 Mar 2014 21:15:33 +0000 (14:15 -0700)]
mk: Put all distribution artifacts in dist/

Also, add license docs to installers

10 years agomk: forcibly delete dest dir when PREPARE_CLEAN
Brian Anderson [Sun, 9 Mar 2014 21:14:34 +0000 (14:14 -0700)]
mk: forcibly delete dest dir when PREPARE_CLEAN

10 years agomk: Tweak the status messages for prepare.mk to say 'prepare', not 'install'
Brian Anderson [Sun, 9 Mar 2014 21:13:48 +0000 (14:13 -0700)]
mk: Tweak the status messages for prepare.mk to say 'prepare', not 'install'

10 years agomk: Use the correct permissions for man pages
Brian Anderson [Sun, 9 Mar 2014 21:12:11 +0000 (14:12 -0700)]
mk: Use the correct permissions for man pages

10 years agoAdd /dist/ to .gitignore
Brian Anderson [Sun, 9 Mar 2014 21:11:24 +0000 (14:11 -0700)]
Add /dist/ to .gitignore

10 years agoconfigure: Create the dist directory
Brian Anderson [Sun, 9 Mar 2014 21:10:42 +0000 (14:10 -0700)]
configure: Create the dist directory

10 years agomk: dist-installer builds a binary installer
Brian Anderson [Sun, 2 Mar 2014 05:38:13 +0000 (21:38 -0800)]
mk: dist-installer builds a binary installer

10 years agomk: Optionally clean the destination when preparing install image
Brian Anderson [Sun, 2 Mar 2014 05:39:55 +0000 (21:39 -0800)]
mk: Optionally clean the destination when preparing install image

10 years agomk: Put man pages in correct directory
Brian Anderson [Sun, 2 Mar 2014 05:39:36 +0000 (21:39 -0800)]
mk: Put man pages in correct directory

10 years agoBugfixes and cleanup to configure script
Brian Anderson [Sun, 2 Mar 2014 05:39:05 +0000 (21:39 -0800)]
Bugfixes and cleanup to configure script

10 years agodoc: CSS fixes
Adrien Tétar [Sun, 9 Mar 2014 11:29:25 +0000 (12:29 +0100)]
doc: CSS fixes

- fixup and refactor highlighting code
- have a proper print stylesheet

10 years agodoc: have a real switch b/w LaTeX compilers
Adrien Tétar [Sun, 9 Mar 2014 10:21:05 +0000 (11:21 +0100)]
doc: have a real switch b/w LaTeX compilers