Commit Graph

19873 Commits

Author SHA1 Message Date
Felix S. Klock II
3896d46c0a Fix #5270: another test I did not update properly. 2013-07-11 16:56:49 +02:00
Felix S. Klock II
db0a13b986 Switch over to new range_rev semantics; fix #5270. 2013-07-10 09:35:35 +02:00
Felix S. Klock II
3c19f1bca8 Refactored int/uint range code in preparation for change to range_rev semantics.
Also added unit tests of range code to test refactoring.  The
num-range-rev.rs test will need to be updated when the range_rev
semantics change.
2013-07-10 09:35:35 +02:00
bors
41dcec2fe1 auto merge of #7265 : brson/rust/io-upstream, r=brson
r? @graydon, @nikomatsakis, @pcwalton, or @catamorphism

Sorry this is so huge, but it's been accumulating for about a month. There's lots of stuff here, mostly oriented toward enabling multithreaded scheduling and improving compatibility between the old and new runtimes. Adds task pinning so that we can create the 'platform thread' in servo.

[Here](e1555f9b56/src/libstd/rt/mod.rs (L201)) is the current runtime setup code.

About half of this has already been reviewed.
2013-07-09 18:28:46 -07:00
Brian Anderson
413d51e32d std::rt: Ignore 0-byte udp reads 2013-07-09 16:54:56 -07:00
Brian Anderson
6fb92f8cab std::rt: Do local tests in a bare thread to not interfere with the scheduler 2013-07-09 15:48:22 -07:00
bors
137d1fb210 auto merge of #7657 : thestinger/rust/rollup, r=thestinger
d3be8ab r=brson
05eb3cf r=thestinger
c80f4e1 r=huonw
8c27af1 r=huonw
0eee0b6 r=cmr
ea2756a r=thestinger
2013-07-09 15:13:40 -07:00
Brian Anderson
2c1315719d rt: Make the old rand builtins work with newsched 2013-07-09 15:05:43 -07:00
Alex Crichton
31114acdd7 Require extern "Rust" fn main() exactly 2013-07-09 16:56:16 -04:00
Daniel Micay
b727b9efd7 rm silly compile-fail test
it's a test to make sure a feature is *not* implemented, but it is now
implemented
2013-07-09 16:56:16 -04:00
Kevin Ballard
a7e3f06257 Fix typo in docs for MutableCloneableVector 2013-07-09 16:56:16 -04:00
Lenny222
ed54999065 bright white for the message, similar to clang 2013-07-09 16:56:16 -04:00
Brendan Zabarauskas
763d846dd3 Impl Not for bool 2013-07-09 16:35:56 -04:00
Andrew Paseltiner
f2bd4416fa std: Implement Iterator::size_hint method for Option iterators 2013-07-09 16:35:56 -04:00
Daniel Micay
a4af0960bd remove the unused exchange_malloc align parameter
`malloc` already returns memory correctly aligned for every possible
type in standard C, and that's enough for all types in Rust too
2013-07-09 16:35:56 -04:00
bors
e388a80c23 auto merge of #7117 : jensnockert/rust/freestanding, r=cmr
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16,
u32, u64, float, int, and uint are replaced with generic functions in
num instead.

This means that instead of having to know everywhere what the type is, like

~~~
f64::sin(x)
~~~

You can simply write code that uses the type-generic versions in num instead, this works for all types that implement the corresponding trait in num.

~~~
num::sin(x)
~~~

Note 1: If you were previously using any of those functions, just replace them
with the corresponding function with the same name in num.

Note 2: If you were using a function that corresponds to an operator, use the
operator instead.

Note 3: This is just https://github.com/mozilla/rust/pull/7090 reopened against master.
2013-07-09 13:34:50 -07:00
Brian Anderson
07e52eb7fc std: Make os::set_exit_status work with newsched 2013-07-09 13:29:05 -07:00
Brian Anderson
ec6d4a1733 std::rt: size_t, not u64 2013-07-09 11:05:57 -07:00
bors
5aa0ca9b2e auto merge of #7528 : indutny/rust/feature/memory-api, r=cmr
@cmr this is still WIP and I haven't tested it on windows, but anyway.
2013-07-09 10:22:37 -07:00
Jens Nockert
20a2fbd055 I forgot the changes to the docs as well
Apparently yesterday wasn't my day, and I forgot to add the changes to
all the tests apparently, and in the end forgot the docs extra much.
Please documentation, forgive me, I really do love you, I hope you
forgive me.

Next time we'll meet tutorial, I promise to bring cookies and tea. I
really want to be best-friends-forever with you, <3.

XOXO
2013-07-09 18:24:30 +02:00
bors
0a1fc4561c auto merge of #7665 : chris-morgan/rust/better-vim-support, r=cmr
General tweaks for Vim support, especially proper indenting.
2013-07-09 08:43:32 -07:00
Chris Morgan
121ae82be0 Do indentation properly in Vim.
The cases that this improves are clearly documented inside the
committed file, so this commit message is comparatively brief.
2013-07-10 01:33:30 +10:00
Chris Morgan
cf65870962 Add a Vim filetype plugin with useful tweaks.
This improves things like doc comment handling when you press Enter and
making using `gf` or `<C-W>f` work on a `use x;` statement in the
current directory.
2013-07-10 01:30:32 +10:00
Chris Morgan
3fa4cef876 A few slight tweaks to the Vim syntax file.
- Add fold support (NOT turned on by default)
- Highlight `::` by default
- Support the common `NOTE` as an important note
- Highlight `assert!` and `fail!` differently
- Don't highlight `deriving(...)` except in `#[...]`
2013-07-10 01:27:35 +10:00
Fedor Indutny
db24ee9db0 os: introduce cross-platform MemoryMap bindings
Basically, one may just do:

    MemoryMap::new(16, ~[
      MapExecutable,
      MapReadable,
      MapWritable
    ])

And executable+readable+writable chunk of at least 16 bytes size will be
allocated and freed with the result of `MemoryMap::new`.
2013-07-09 19:20:26 +04:00
bors
62bb843e32 auto merge of #7641 : lucab/rust/lucab/po4a, r=catamorphism
As per https://mail.mozilla.org/pipermail/rust-dev/2013-July/004685.html 

This is the initial machinery to setup the l10n infrastructure for markdown documentation.
A new "docs-l10n" target will take care of generating, updating and then building .pot and .po files, and later on the final .md.

This commit includes the .pot for all current .md docs; they can be feed directly to Mozilla Verbatim if wanted.
Please note that po4a only provides the orig.md -> .pot -> l10n.po -> l10n.md flow. The l10n.md -> l10n.html generation is not currently built in the makefile, as no language has been enabled.
2013-07-09 03:25:29 -07:00
bors
ee102468fa auto merge of #7614 : MarkJr94/rust/smallintmap_enum, r=huonw
Added external iterators as well as tests to SmallIntMap and SmallIntSet. Fixes #7366
2013-07-09 01:22:35 -07:00
bors
ac026e2e69 auto merge of #7578 : alexcrichton/rust/overflow, r=thestinger
This should never cause a segfault, but rather fail somehow. Possibly a condition could be used here, but for now there's not much else to do.
2013-07-08 23:10:35 -07:00
bors
a48ca3290d auto merge of #7262 : nikomatsakis/rust/ref-bindings-in-irrefut-patterns, r=catamorphism
Correct treatment of irrefutable patterns. The old code was wrong in many, many ways. `ref` bindings didn't work, it sometimes copied when it should have moved, the borrow checker didn't even look at such patterns at all, we weren't consistent about preventing values with destructors from being pulled apart, etc.

Fixes #3224.
Fixes #3225.
Fixes #3255.
Fixes #6225.
Fixes #6386.

r? @catamorphism
2013-07-08 18:49:46 -07:00
Brian Anderson
29c9443d85 std: Add a yield implementation for newsched 2013-07-08 18:06:17 -07:00
Brian Anderson
7826651335 Tidy 2013-07-08 17:22:51 -07:00
Brian Anderson
fae3336769 Merge remote-tracking branch 'mozilla/master'
Conflicts:
	src/libextra/test.rs
	src/libstd/rt/global_heap.rs
	src/libstd/unstable/lang.rs
	src/libstd/vec.rs
2013-07-08 16:29:54 -07:00
bors
30c8aac677 auto merge of #7612 : thestinger/rust/utf8, r=huonw 2013-07-08 16:10:53 -07:00
Brian Anderson
b227583dad Merge remote-tracking branch 'anasazi/io'
Conflicts:
	src/libstd/rt/test.rs
2013-07-08 15:53:11 -07:00
Brian Anderson
4282539523 std::rt: Add a hack to allocate different test port ranges to different bots 2013-07-08 14:41:07 -07:00
bors
f503e539bf auto merge of #7608 : glinscott/rust/json_perf, r=pcwalton
Avoids the overhead of read_char for every character.

Benchmark reading example.json 10 times from
https://code.google.com/p/rapidjson/wiki/Performance

Before: 2.55s
After:  0.16s

Regression testing is already done by isrustfastyet.
2013-07-08 14:34:54 -07:00
Eric Reed
5e0be46852 changed .each() to .iter().advance() 2013-07-08 14:19:39 -07:00
Eric Reed
6b2abcaa0f renamed finalize to drop in Drop impl for UvUdpSocket 2013-07-08 14:19:19 -07:00
Eric Reed
cf23292010 Merge remote-tracking branch 'upstream/io' into io
Conflicts:
	src/libstd/rt/uvio.rs
2013-07-08 13:03:18 -07:00
bors
f7b293bc75 auto merge of #7577 : brson/rust/vers, r=cmr 2013-07-08 12:59:21 -07:00
Jens Nockert
2ed1cfc912 And I forgot to run the benchmarks after rebasing 2013-07-08 20:22:19 +02:00
Niko Matsakis
0c6d02f391 Correct merge errors 2013-07-08 13:55:11 -04:00
Niko Matsakis
b5fc4ae918 Correct match-drop-strs-issue-4541 when used in check-fast 2013-07-08 13:55:11 -04:00
Niko Matsakis
a6d64df672 Correct illegal pattern in windows-only code 2013-07-08 13:55:11 -04:00
Niko Matsakis
979d3a54f9 Correct merge failures 2013-07-08 13:55:11 -04:00
Niko Matsakis
ce602c66b8 Add llvm instrumentation 2013-07-08 13:55:11 -04:00
Niko Matsakis
0e81072ded Move stats into an @mut stats 2013-07-08 13:55:11 -04:00
Niko Matsakis
50e95ea481 Fix pretty printer, which was ignoring ref in irrefutable patterns 2013-07-08 13:55:10 -04:00
Niko Matsakis
682e7467dd Patch up some new errors from rustpkg 2013-07-08 13:55:10 -04:00
Niko Matsakis
59083d2c6a Address nits by @catamorphism 2013-07-08 13:55:10 -04:00