Commit Graph

1318 Commits

Author SHA1 Message Date
Andrea Canciani
9ef62a4490 Fix generator.py to avoid pathological inlining
Commit 9104a902c0 fixed the generated
files, but that change would be lost (or require additional manual
intervention) if they are re-generated of if new architectures are
added.

cc #28273
2015-09-12 09:28:53 +02:00
bors
d2a5b117c1 Auto merge of #28246 - huonw:lang-tracking-issues, r=alexcrichton
This is similar to the libs version, which allow an `issue` field in the
`#[unstable]` attribute.

cc #28244
2015-09-08 01:02:06 +00:00
Huon Wilson
31310f5b65 Allow tracking issues for lang features.
This is similar to the libs version, which allow an `issue` field in the
`#[unstable]` attribute.

cc #28244
2015-09-08 11:01:42 +10:00
Huon Wilson
67aa4c775a Add some fancier AArch64 load/store instructions. 2015-09-04 09:14:13 -07:00
Huon Wilson
7241ae9112 Support return aggregates in platform intrinsics.
This also involved adding `[TYPE;N]` syntax and aggregate indexing
support to the generator script: it's the only way to be able to have a
parameterised intrinsic that returns an aggregate, since one can't refer
to previous elements of the current aggregate (and that was harder to
implement).
2015-09-04 09:14:13 -07:00
Huon Wilson
c19e7b629b Add various pointer & void-using x86 intrinsics. 2015-09-04 09:14:13 -07:00
Huon Wilson
2b45a9ab54 Support bitcasts in platform intrinsic generator. 2015-09-04 09:14:13 -07:00
Huon Wilson
62e346af4b Support void in platform intrinsic generator. 2015-09-04 09:14:13 -07:00
Huon Wilson
add04307f9 Support non-return value references in platform intrinsic generator. 2015-09-04 09:14:13 -07:00
Huon Wilson
d12135a70d Add support for pointers to generator.py. 2015-09-04 09:14:12 -07:00
Huon Wilson
787a21fe7c Fix some typos in SSE-AVX intrinsics.
I believe everything that doesn't take a constant integer up to SSE4.2
should now be correct (I don't have any reason to believe that those
that do take constant integers are wrong; they're just more complicated
and I just haven't tested them in detail).
2015-08-31 18:33:55 -07:00
Huon Wilson
29dcff3aa2 Support different scalar integer widths in Rust v. LLVM.
Some x86 C intrinsics are declared to take `int ...` (i.e. exposed in
Rust as `i32`), but LLVM implements them by taking `i8` instead.
2015-08-29 20:11:23 -07:00
Huon Wilson
daf8bdca57 Fix typos in some x86 and arm intrinsics. 2015-08-29 20:11:23 -07:00
Huon Wilson
3e9b726576 Style the generator script more PEP8y. 2015-08-29 19:26:48 -07:00
Huon Wilson
24416a2151 Autogenerate most x86 platform intrinsics. 2015-08-29 15:36:17 -07:00
Huon Wilson
5a167bdb4c Allow unused imports in the generator. 2015-08-29 15:36:17 -07:00
Huon Wilson
bea3f096ee Add support for arbitrary metadata for numbers and widths.
This means that each platform has total control over the formatting info
it needs.
2015-08-29 15:36:16 -07:00
Huon Wilson
083f613044 Autogenerate most ARM platform intrinsics. 2015-08-29 15:36:16 -07:00
Huon Wilson
3ef610b627 Autogenerate most AArch64 platform intrinsics. 2015-08-29 15:36:16 -07:00
Huon Wilson
73811917f4 Add the platform intrinsic generator script.
This python script will consume an appropriately formatted JSON file and
output either a Rust file for use in librustc_platform_intrinsics, or an
extern block for importing the intrinsics in an external library.

The --help flag has details.
2015-08-29 15:36:16 -07:00
bors
82b89645fb Auto merge of #27684 - alexcrichton:remove-deprecated, r=aturon
This commit removes all unstable and deprecated functions in the standard
library. A release was recently cut (1.3) which makes this a good time for some
spring cleaning of the deprecated functions.
2015-08-13 23:32:30 +00:00
bors
bb954cfa75 Auto merge of #27307 - rkruppe:dec2flt, r=pnkfelix
Completely rewrite the conversion of decimal strings to `f64` and `f32`. The code is intended to be absolutely positively completely 100% accurate (when it doesn't give up). To the best of my knowledge, it achieves that goal. Any input that is not rejected is converted to the floating point number that is closest to the true value of the input. This includes overflow, subnormal numbers, and underflow to zero. In other words, the rounding error is less than or equal to 0.5 units in the last place. Half-way cases (exactly 0.5 ULP error) are handled with half-to-even rounding, also known as banker's rounding.

This code implements the algorithms from the paper [How to Read Floating Point Numbers Accurately][paper] by William D. Clinger, with extensions to handle underflow, overflow and subnormals, as well as some algorithmic optimizations.

# Correctness

With such a large amount of tricky code, many bugs are to be expected. Indeed tracking down the obscure causes of various rounding errors accounts for the bulk of the development time. Extensive tests (taking in the order of hours to run through to completion) are included in `src/etc/test-float-parse`: Though exhaustively testing all possible inputs is impossible, I've had good success with generating millions of instances from various "classes" of inputs. These tests take far too long to be run by @bors so contributors who touch this code need the discipline to run them. There are `#[test]`s, but they don't even cover every stupid mistake I made in course of writing this.

Another aspect is *integer* overflow. Extreme (or malicious) inputs could cause overflow both in the machine-sized integers used for bookkeeping throughout the algorithms (e.g., the decimal exponent) as well as the arbitrary-precision arithmetic. There is input validation to reject all such cases I know of, and I am quite sure nobody will *accidentally* cause this code to go out of range. Still, no guarantees.

# Limitations

Noticed the weasel words "(when it doesn't give up)" at the beginning? Some otherwise well-formed decimal strings are rejected because spelling out the value of the input requires too many digits, i.e., `digits * 10^abs(exp)` can't be stored in a bignum. This only applies if the value is not "obviously" zero or infinite, i.e., if you take a near-infinity or near-zero value and add many pointless fractional digits. At least with the algorithm used here, computing the precise value would require computing the full value as a fraction, which would overflow. The precise limit is `number_of_digits + abs(exp) > 375` but could be raised almost arbitrarily. In the future, another algorithm might lift this restriction entirely.

This should not be an issue for any realistic inputs. Still, the code does reject inputs that would result in a finite float when evaluated with unlimited precision. Some of these inputs are even regressions that the old code (mostly) handled, such as `0.333...333` with 400+ `3`s. Thus this might qualify as [breaking-change].

# Performance

Benchmarks results are... tolerable. Short numbers that hit the fast paths (`f64` multiplication or shortcuts to zero/inf) have performance in the same order of magnitude as the old code tens of nanoseconds. Numbers that are delegated to Algorithm Bellerophon (using floats with 64 bit significand, implemented in software) are slower, but not drastically so (couple hundred nanoseconds).

Numbers that need the AlgorithmM fallback (for `f64`, roughly everything below 1e-305 and above 1e305) take far, far longer, hundreds of microseconds. Note that my implementation is not quite as naive as the expository version in the paper (it needs one to four division instead of ~1000), but division is fundamentally pretty expensive and my implementation of it is extremely simple and slow.

All benchmarks run on a mediocre laptop with a i5-4200U CPU under light load.

# Binary size

Unfortunately the implementation needs to duplicate almost all code: Once for `f32` and once for `f64`. Before you ask, no, this cannot be avoided, at least not completely (but see the Future Work section). There's also a precomputed table of powers of ten, weighing in at about six kilobytes.

Running a stage1 `rustc` over a stand-alone program that simply parses pi to `f32` and `f64` and outputs both results reveals that the overhead vs. the old parsing code is about 44 KiB normally and about 28 KiB with LTO. It's presumably half of that + 3 KiB when only one of the two code paths is exercised.

| rustc options                 | old       | new       | delta         |
|---------------------------    |---------  |---------  |-----------    |
| [nothing]                     | 2588375   | 2633828   | 44.39 KiB     |
| -O                            | 2585211   | 2630688   | 44.41 KiB     |
| -O -C lto                     | 1026353   | 1054981   | 27.96 KiB     |
| -O -C lto -C link-args=-s     | 414208    | 442368    | 27.5 KiB      |

# Future Work

## Directory layout

The `dec2flt` code uses some types embedded deeply in the `flt2dec` module hierarchy, even though nothing about them it formatting-specific. They should be moved to a more conversion-direction-agnostic location at some point.

## Performance

It could be much better, especially for large inputs. Some low-hanging fruit has been picked but much more work could be done. Some specific ideas are jotted down in `FIXME`s all over the code.

## Binary size

One could try to compress the table further, though I am skeptical. Another avenue would be reducing the code duplication from basically everything being generic over `T: RawFloat`. Perhaps one can reduce the magnitude of the duplication by pushing the parts that don't need to know the target type into separate functions, but this is finicky and probably makes some code read less naturally.

## Other bases

This PR leaves `f{32,64}::from_str_radix` alone. It only replaces `FromStr` (and thus `.parse()`). I am convinced that `from_str_radix` should not exist, and have proposed its [deprecation and speedy removal][deprecate-radix]. Whatever the outcome of that discussion, it is independent from, and out of scope for, this PR.

Fixes #24557
Fixes #14353

r? @pnkfelix

cc @lifthrasiir @huonw 

[paper]: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.45.4152
[deprecate-radix]: https://internals.rust-lang.org/t/deprecate-f-32-64-from-str-radix/2405
2015-08-13 13:29:38 +00:00
Alex Crichton
8d90d3f368 Remove all unstable deprecated functionality
This commit removes all unstable and deprecated functions in the standard
library. A release was recently cut (1.3) which makes this a good time for some
spring cleaning of the deprecated functions.
2015-08-12 14:55:17 -07:00
bors
d07d465cf6 Auto merge of #27690 - vadimcn:no-windres, r=alexcrichton
Fix #26803
2015-08-12 19:13:52 +00:00
Vadim Chugunov
31be146ba0 Fix #26803 2015-08-11 23:20:19 -07:00
Alex Crichton
b6b4f5a0e7 trans: Re-enable unwinding on 64-bit MSVC
This commit leverages the runtime support for DWARF exception info added
in #27210 to enable unwinding by default on 64-bit MSVC. This also additionally
adds a few minor fixes here and there in the test harness and such to get
`make check` entirely passing on 64-bit MSVC:

* The invocation of `maketest.py` now works with spaces/quotes in CC
* debuginfo tests are disabled on MSVC
* A link error for librustc was hacked around (see #27438)
2015-08-11 16:45:02 -07:00
Robin Kruppe
82dbc2ea61 Add optional, external tests for floating point parsing.
Running these tests takes hours, so they are not run by @bors.
2015-08-09 14:17:39 +02:00
Robin Kruppe
b7e39a1c2d Script for generating the powers-of-ten tables necessary for correct and
fast decimal-to-float conversions.
2015-08-08 17:15:25 +02:00
Chris Morgan
aede1c73bd Update the ctags rules and targets.
As there’s no C++ runtime any more there’s really no point in having
anything but Rust tags being made.

I’ve also taken the liberty of excluding the compiler parts of this in
the `librust%,,` pattern substitution. Whether or not this is “correct”
will depend on whether you want tags for the compiler or for general
use. For myself, I want it for general use.

I’m not sure how much people use the tags files anyway. I definitely do,
but with Racer existing the tags files aren’t quite so necessary.
2015-07-30 06:35:42 +10:00
Alexis Beingessner
b0ee1ebef4 fix pretty printers to handle new Vec 2015-07-17 10:43:58 -07:00
Nick Hamann
4630fc75a7 Add comments. 2015-07-12 21:19:19 -05:00
Nick Hamann
4bc8369a26 Skip diagnostic codes occurring inside a long diagnostic in errorck. 2015-07-12 02:23:33 -05:00
Tamir Duberstein
158fcbbdd6 llconfig is llvm-config 2015-07-06 08:40:40 -04:00
Tamir Duberstein
155c8f9fa8 Simplify 2015-07-06 08:40:40 -04:00
Alex Newman
0b7c4f57f6 Add netbsd amd64 support 2015-07-01 19:09:14 -07:00
Simon Sapin
32b7b50baf Remove char::to_titlecase. Fix #26555
I added it because it was easy (same a `char::to_lowercase`,
just a different table), but it doesn’t make sense to have this
in std but not str::to_titlecase, which would require
https://github.com/unicode-rs/unicode-segmentation

At some point in the future this feature will be available
(both on char and str) in a crates.io crate.
2015-06-24 22:16:25 -07:00
Brian Anderson
13bba763f5 Add src/etc/add-authors.sh script for managing the AUTHORS.txt file
This is the kind of dumb task that gets done a different way every
time and is easily automated.
2015-06-17 16:32:01 -07:00
Simon Sapin
f901086b0d Correctly map upper-case Sigma to lower-case in word-final position. Fix #26035. 2015-06-06 12:37:11 +02:00
Simon Sapin
d316487ec1 Add char::to_titlecase
But not str::to_titlecase which would require UAX#29 Unicode Text Segmentation
which we decided not to include in of `std`:
https://github.com/rust-lang/rfcs/pull/1054
2015-06-06 12:37:11 +02:00
Simon Sapin
addaa5b1ff Add complex (but unconditional) Unicode case mapping. Fix #25800
As a result, the iterator returned by `char::to_uppercase` sometimes
yields two or three `char`s instead of just one.
2015-06-06 12:37:10 +02:00
Simon Sapin
66af12721a to_lowercase/to_uppercase: also map chars not in Lu/Ll categories.
This adds 120 mappings:

Dž dž
Dž DŽ
Lj lj
Lj LJ
Nj nj
Nj NJ
Dz dz
Dz DZ
 Ι
ᾈ ᾀ
ᾉ ᾁ
ᾊ ᾂ
ᾋ ᾃ
ᾌ ᾄ
ᾍ ᾅ
ᾎ ᾆ
ᾏ ᾇ
ᾘ ᾐ
ᾙ ᾑ
ᾚ ᾒ
ᾛ ᾓ
ᾜ ᾔ
ᾝ ᾕ
ᾞ ᾖ
ᾟ ᾗ
ᾨ ᾠ
ᾩ ᾡ
ᾪ ᾢ
ᾫ ᾣ
ᾬ ᾤ
ᾭ ᾥ
ᾮ ᾦ
ᾯ ᾧ
ᾼ ᾳ
ῌ ῃ
ῼ ῳ
Ⅰ ⅰ
Ⅱ ⅱ
Ⅲ ⅲ
Ⅳ ⅳ
Ⅴ ⅴ
Ⅵ ⅵ
Ⅶ ⅶ
Ⅷ ⅷ
Ⅸ ⅸ
Ⅹ ⅹ
Ⅺ ⅺ
Ⅻ ⅻ
Ⅼ ⅼ
Ⅽ ⅽ
Ⅾ ⅾ
Ⅿ ⅿ
ⅰ Ⅰ
ⅱ Ⅱ
ⅲ Ⅲ
ⅳ Ⅳ
ⅴ Ⅴ
ⅵ Ⅵ
ⅶ Ⅶ
ⅷ Ⅷ
ⅸ Ⅸ
ⅹ Ⅹ
ⅺ Ⅺ
ⅻ Ⅻ
ⅼ Ⅼ
ⅽ Ⅽ
ⅾ Ⅾ
ⅿ Ⅿ
Ⓐ ⓐ
Ⓑ ⓑ
Ⓒ ⓒ
Ⓓ ⓓ
Ⓔ ⓔ
Ⓕ ⓕ
Ⓖ ⓖ
Ⓗ ⓗ
Ⓘ ⓘ
Ⓙ ⓙ
Ⓚ ⓚ
Ⓛ ⓛ
Ⓜ ⓜ
Ⓝ ⓝ
Ⓞ ⓞ
Ⓟ ⓟ
Ⓠ ⓠ
Ⓡ ⓡ
Ⓢ ⓢ
Ⓣ ⓣ
Ⓤ ⓤ
Ⓥ ⓥ
Ⓦ ⓦ
Ⓧ ⓧ
Ⓨ ⓨ
Ⓩ ⓩ
ⓐ Ⓐ
ⓑ Ⓑ
ⓒ Ⓒ
ⓓ Ⓓ
ⓔ Ⓔ
ⓕ Ⓕ
ⓖ Ⓖ
ⓗ Ⓗ
ⓘ Ⓘ
ⓙ Ⓙ
ⓚ Ⓚ
ⓛ Ⓛ
ⓜ Ⓜ
ⓝ Ⓝ
ⓞ Ⓞ
ⓟ Ⓟ
ⓠ Ⓠ
ⓡ Ⓡ
ⓢ Ⓢ
ⓣ Ⓣ
ⓤ Ⓤ
ⓥ Ⓥ
ⓦ Ⓦ
ⓧ Ⓧ
ⓨ Ⓨ
ⓩ Ⓩ
2015-06-06 12:37:10 +02:00
bors
c800b22e95 Auto merge of #25905 - michaelwoerister:lldb-pp-strings, r=brson
GDB and LLDB pretty printers have some common functionality and also access some common information, such as the layout of standard library types. So far, this information has been duplicated in the two pretty printing python modules. This PR introduces a common module used by both debuggers.

This PR also implements proper rendering of `String` and `&str` values in LLDB.
2015-06-02 13:07:41 +00:00
bors
f813f97797 Auto merge of #25654 - petrochenkov:encenv, r=alexcrichton
Fixes https://github.com/rust-lang/rust/issues/25268 and a couple of similar test errors

r? @alexcrichton
2015-06-02 02:08:17 +00:00
petrochenkov
a40bca29a8 Fix platform detection 2015-06-01 20:50:35 +03:00
Michael Woerister
d136714e04 debuginfo: Create common debugger pretty printer module.
GDB and LLDB pretty printers have some common functionality
and also access some common information, such as the layout of
standard library types. So far, this information has been
duplicated in the two pretty printing python modules. This
commit introduces a common module used by both debuggers.
2015-05-30 20:06:08 +02:00
petrochenkov
8c86f8ff8c Warn if the test suite is run on Windows in console with non-UTF-8 code page 2015-05-30 19:22:12 +03:00
Richo Healey
96d7400b1a etc: use codecs in featureck
this asserts that source is valid utf8 on both python3 and python2
2015-05-26 12:11:46 -07:00
Richo Healey
d1082aa3a1 etc: work around utf8 text in rust sources on py3 in featureck 2015-05-24 05:42:10 -07:00
Richo Healey
4decc408dc etc: py3 compat for tidy.py 2015-05-24 05:42:10 -07:00
Richo Healey
93a02d3507 etc: py3 compat for featureck
Also rewrite most of the string formatting to be a bit more idiomatic
2015-05-24 05:42:10 -07:00
Richo Healey
9ecc5a95fc etc: py3 compat for errorck.py 2015-05-24 05:22:00 -07:00
Richo Healey
24bae2e300 etc: py3 compat for check-summary.py 2015-05-24 05:12:40 -07:00
Richo Healey
6bcdd9ed2c etc: Delete unused helper script 2015-05-24 05:08:53 -07:00
Alex Crichton
b538189ba0 mk: Generate a .def file for rustc_llvm on MSVC
Windows needs explicit exports of functions from DLLs but LLVM does not mention
any of its symbols as being export-able from a DLL. The compiler, however,
relies on being able to use LLVM symbols across DLL boundaries so we need to
force many of LLVM's symbols to be exported from `rustc_llvm.dll`. This commit
adds support for generation of a `rustc_llvm.def` file which is passed along to
the linker when generating `rustc_llvm.dll` which should keep all these symbols
exportable and usable.
2015-05-19 10:53:07 -07:00
Alex Crichton
d97b4af153 mklldeps: Don't link stdc++/c++ on MSVC
These libraries don't exist! The linker for MSVC is highly likely to not pass
`/NODEFAULTLIB` in which case the right standard library will automatically be
selected.
2015-05-19 10:53:06 -07:00
bors
c44d84da98 Auto merge of #25266 - richo:windows-resource-sancheck, r=steveklabnik
This avoids a crash on windows

Closes #25265
2015-05-11 06:42:25 +00:00
Steve Klabnik
371eb87771 Rollup merge of #24948 - derhuerst:patch-1, r=steveklabnik
I've written a small [EditorConfig](http://editorconfig.org) file for Rust development.
2015-05-10 16:44:22 -04:00
Richo Healey
c4b72a88ef sancheck: import resource inside of the posix check
This avoids a crash on windows
2015-05-10 02:08:48 -07:00
Carol (Nichols || Goulding)
92d49cf6c5 Remove unused extract_grammar.py
This script used to be used to extract the grammar sections from the
reference, but there is now a separate src/doc/grammar.md where the
grammar sections that used to be in the reference live, so there is
no longer a need to extract the grammar from the reference.
2015-05-03 17:45:37 -04:00
Jannis Redmann
6f3641de83 distinction between official and community plugins 2015-04-29 18:53:36 +02:00
Jannis Redmann
a4c133777e link to .editorconfig for Rust files
I've written a small [EditorConfig](http://editorconfig.org) file for Rust development.
2015-04-29 17:55:14 +02:00
Tamir Duberstein
ba276adab5 LLVM < 3.5 is unsupported since bb18a3c 2015-04-21 07:20:48 -07:00
kwantam
f14d289d71 optimize Unicode tables
Apply optimization described in
https://github.com/rust-lang/regex/pull/73#issuecomment-93777126
to rust's copy of `unicode.py`.

This shrinks librustc_unicode's tables.rs from 479kB to 456kB,
and should improve performance slightly for related operations
(e.g., is_alphabetic(), is_xid_start(), etc).

In addition, pull in fix from @dscorbett's commit
d25c39f86568a147f9b7080c25711fb1f98f056a in regex, which
makes `load_properties()` more tolerant of whitespace
in the Unicode tables. (This fix does not result in any
changes to tables.rs, but could if the Unicode tables
change in the future.)
2015-04-18 13:20:57 -04:00
kwantam
29d1252e4d deprecate Unicode functions that will be moved to crates.io
This patch
1. renames libunicode to librustc_unicode,
2. deprecates several pieces of libunicode (see below), and
3. removes references to deprecated functions from
   librustc_driver and libsyntax. This may change pretty-printed
   output from these modules in cases involving wide or combining
   characters used in filenames, identifiers, etc.

The following functions are marked deprecated:

1. char.width() and str.width():
   --> use unicode-width crate

2. str.graphemes() and str.grapheme_indices():
   --> use unicode-segmentation crate

3. str.nfd_chars(), str.nfkd_chars(), str.nfc_chars(), str.nfkc_chars(),
   char.compose(), char.decompose_canonical(), char.decompose_compatible(),
   char.canonical_combining_class():
   --> use unicode-normalization crate
2015-04-16 17:03:05 -04:00
bors
b9ed9e2a32 Auto merge of #24351 - michaelwoerister:named-tuple-fields, r=alexcrichton
This PR makes `rustc` emit field names for tuple fields in DWARF. Formerly there was no way of directly accessing the fields of a tuple in GDB and LLDB since there is no C/C++ equivalent to this. Now, the debugger sees the name `__{field-index}` for tuple fields. So you can type for example `some_tuple_val.__2` to get the third tuple component.
When pretty printers are used (e.g. via `rust-gdb` or `rust-lldb`) these artificial field names will not clutter tuple rendering (which was the main motivation for not doing this in the past).

Solves #21948.
2015-04-13 12:39:49 +00:00
Chris Wong
5308ac939a Remove regex module from libunicode
The regex crate keeps its own tables now (rust-lang/regex#41) so we
don't need them here.

[breaking-change]
2015-04-13 10:30:10 +12:00
Michael Woerister
03f9269496 Add a name for tuple fields in debuginfo so that they can be accessed in debuggers. 2015-04-12 20:44:25 +02:00
Manish Goregaokar
719ad518ff Rollup merge of #24285 - brson:rustup, r=alexcrichton
Now lives at https://github.com/rust-lang/rustup

r? @alexcrichton
2015-04-11 19:03:20 +05:30
Brian Anderson
a0f832da52 Remove rustup.sh.
Now lives at https://github.com/rust-lang/rustup
2015-04-10 10:01:04 -07:00
bors
c897ac04e2 Auto merge of #24177 - alexcrichton:rustdoc, r=aturon
This commit series starts out with more official test harness support for rustdoc tests, and then each commit afterwards adds a test (where appropriate). Each commit should also test and finish independently of all others (they're all pretty separable).

I've uploaded a [copy of the documentation](http://people.mozilla.org/~acrichton/doc/std/) generated after all these commits were applied, and a double check on issues being closed would be greatly appreciated! I'll also browse the docs a bit and make sure nothing regressed too horribly.
2015-04-10 16:18:44 +00:00
bors
e57410cd92 Auto merge of #24171 - rillian:rustup, r=brson
The idea here is if you don't want rust in /usr/local
you can put something like this is your .profile:

```
export RUSTUP_PREFIX=$HOME/.local/rust
export PATH=$PATH:${RUSTUP_PREFIX}/bin
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:${RUSTUP_PREFIX}/lib
```
Then when you run rustup, it will update the install
in ${RUSTUP_PREFIX} without having to remember to pass
an explicit --prefix argument every time.
2015-04-09 07:49:26 +00:00
Alex Crichton
9ad133b4a1 rustdoc: Add a primitive page for raw pointers
Closes #15318
2015-04-07 17:54:33 -07:00
Ralph Giles
9a51c63a2f rustup: let RUSTUP_PREFIX env override default prefix.
The idea here is if you don't want rust in /usr/local
you can put something like this is your .profile:

export RUSTUP_PREFIX=$HOME/.local/rust
export PATH=$PATH:${RUSTUP_PREFIX}/bin
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:${RUSTUP_PREFIX}/lib

Then when you run rustup, it will update the install
in ${RUSTUP_PREFIX} without having to remember to pass
an explicit --prefix argument every time.
2015-04-07 14:05:02 -07:00
kwantam
bef00ab2b8 use normative source for Grapheme class data
@mahkoh points out in #15628 that unicode.py does not use
normative data for Grapheme classes. This pr fixes that issue.

In addition, GC_RegionalIndicator is renamed GC_Regional_Indicator
in order to stay in line with the Unicode class name definitions.
I have updated refs in u_str.rs, and verified that there are no
refs elsewhere in the codebase. However, in principle someone
using the unicode tables for their own purposes might see breakage
from this.
2015-04-06 19:46:48 -04:00
Richo Healey
971c355bad rustup: Fix typo in nightly 2015-04-01 13:18:25 -07:00
Alex Crichton
63f3d7f0fa rustup: Default to the beta channel
Switches rustup to using the beta channel by default
2015-04-01 11:04:03 -07:00
Alex Crichton
c054ae2fa4 Merge branch 'fix-rustup' of https://github.com/richo/rust 2015-04-01 10:30:11 -07:00
bors
d754722a04 Auto merge of #23678 - richo:check-flightcheck, r=alexcrichton
Rationale for this, is that I lurked `ulimit -c unlimited` into my .profile to debug an unrelated crash, that I kept forgetting to set before hand. I then ran the test suite and discovered that I had 150 gigs of core dumps in `/cores`.

Very open to another approach, or to setting the limit to something higher than 0, but I think it would be nice if the build system tried to save you from yourself here.
2015-03-31 18:26:20 +00:00
Richo Healey
ee3dffac49 Add support for channel selection 2015-03-28 19:58:26 -07:00
Richo Healey
fb78ca8b76 rustup: Fix comment about Darwin's uname -m 2015-03-28 19:58:26 -07:00
Vadim Petrochenkov
1accaa9f86 Fix some typos 2015-03-28 18:09:51 +03:00
Richo Healey
4af204ddee check: Reword the warning to be more prescriptive 2015-03-27 17:03:47 -07:00
Richo Healey
146264c6ae check: Name the sentinal variable more sanely 2015-03-27 16:54:46 -07:00
Richo Healey
e4f9ce8cbf check: Fix the check for platform formatting 2015-03-27 16:50:37 -07:00
Richo Healey
93fc804b85 check: Run the rlimit_core check on *BSD 2015-03-27 16:50:37 -07:00
Richo Healey
c40ec080ff check: Add license 2015-03-27 16:50:37 -07:00
Richo Healey
7a4615e447 check: Warn users with nonzero RLIMIT_CORE 2015-03-27 16:50:37 -07:00
Nicholas Mazzuca
a9b31969dc Add the other S_I(RWX)(GRP/OTH) for posix creat 2015-03-24 03:25:48 -07:00
Tamir Duberstein
f5765793b6 Strip trailing whitespace 2015-03-15 11:25:43 -07:00
Tamir Duberstein
d51047ded0 Strip all leading/trailing newlines 2015-03-15 09:08:21 -07:00
Manish Goregaokar
6354387e42 Rollup merge of #23310 - michaelwoerister:gdb-std-pp, r=alexcrichton
```rust
Rust:  let slice: &[i32] = &[0, 1, 2, 3];
GDB:   $1 = &[i32](len: 4) = {0, 1, 2, 3}

Rust:  let vec = vec![4, 5, 6, 7];
GDB:   $2 = Vec<u64>(len: 4, cap: 4) = {4, 5, 6, 7}

Rust:  let str_slice = \"IAMA string slice!\";
GDB:   $3 = \"IAMA string slice!\"

Rust:  let string = \"IAMA string!\".to_string();
GDB:   $4 = \"IAMA string!\"
```
Neat!
2015-03-13 18:11:13 +05:30
Michael Woerister
90fc28d0f2 debuginfo: Add GDB pretty printers for slices, Vec<>, and String. 2015-03-12 17:05:44 +01:00
Michael Woerister
07240d6026 debuginfo: Make LLDB pretty printer correctly handle zero-sized fields. 2015-03-12 12:18:15 +01:00
Manish Goregaokar
bb459bf95b Rollup merge of #23000 - Florob:unicode-FL, r=brson
This handles the ranges contained in UnicodeData.txt.
Counterintuitively this actually makes the tables shorter.
2015-03-05 12:37:48 +05:30
Manish Goregaokar
d693ec17a5 Rollup merge of #22029 - iKevinY:tidy-changes, r=brson
Currently, the list of files linted in `tidy.py` is unordered. It seems more appropriate for more frequently appearing files (like `.rs`) to appear at the top of the list and for \"other files\" to appear at the very end. This PR also changes the wildcard import of `check_license()` into an explicit one.

```
Before:                     After:
* linted 4 .sh files        * linted 5034 .rs files
* linted 4 .h files         * linted 29 .c files
* linted 29 .c files        * linted 28 .py files
* linted 2 .js files        * linted 4 .sh files
* linted 0 other files      * linted 4 .h files
* linted 28 .py files       * linted 2 .js files
* linted 5034 .rs files     * linted 0 other files
```

r? @brson
2015-03-05 12:37:48 +05:30
Florian Zeitz
c9e2de42b5 unicode: Properly parse ranges in UnicodeData.txt
This handles the ranges contained in UnicodeData.txt.
Counterintuitively this actually makes the tables shorter.
2015-03-03 20:04:55 +01:00
Florian Zeitz
f35f973cb7 Use consts instead of statics where appropriate
This changes the type of some public constants/statics in libunicode.
Notably some `&'static &'static [(char, char)]` have changed
to `&'static [(char, char)]`. The regexp crate seems to be the
sole user of these, yet this is technically a [breaking-change]
2015-03-02 17:11:51 +01:00
Seo Sanghyeon
5e1d4fffff Add a way to assert the number of occurrences to htmldocck 2015-02-27 00:27:57 +09:00
Kevin Yap
956969162d Refactor code in tidy.py
- Replace wildcard import with explicit import of `check_license`
- Move more logic outside of the `try` block.
- Group all helper functions together.
- Define `interesting_exts` and `uninteresting_files` at start of file
  (with the rest of the constant declarations).
2015-02-23 21:15:34 -08:00
Kevin Yap
f1eebb8f37 Order list of linted files by frequency
Since it makes more sense for .rs files to appear at the top of the
list of linted files and "other" files to appear at the end, this
commit moves the "other" count outside of the `file_counts` dictionary
and sorts the remaining "interesting" files by decreasing frequency.
2015-02-23 21:14:51 -08:00