Commit Graph

21565 Commits

Author SHA1 Message Date
Ben Blum
5796e9e49c Add tests for self type using builtin kinds. (#7083) 2013-08-20 15:56:34 -04:00
Ben Blum
cdbdfe88a5 Allow the Self type to benefit from builtin-kinds-as-supertraits (#7083). 2013-08-20 15:56:34 -04:00
bors
a8c3fe45c6 auto merge of #8328 : alexcrichton/rust/llvm-head, r=brson
The first commit message is pretty good, but whomever reviews this should probably also at least glance at the changes I made in LLVM. I basically reorganized our pending patch queue to be a bit more organized and clearer in what needs to go where. After this, our queue would be:

* Add the `no-split-stack` attribute
* Add the `fixedstacksegment` attribute
* Add split-stacks for arm android
* Add split-stacks for arm linux
* Add split stacks for mips

Then there's a patch which I added to get rust to build at all on LLVM-head, and I'm not quite sure why it's there, but nothing seems to be crashing for now! (famous last words).

Otherwise, I just updated code to reflect the changes I made in LLVM with the only major change being the advent of the new `no_split_stack` attribute. This is work towards #1226, but someone more familiar with the code should probably actually assign the attribute to the appropriate functions.

Also as a bonus, I've verified that this closes #5774
2013-08-20 11:31:59 -07:00
Ben Blum
dd406365e1 Add assert_once_ever macro. Close #7748. (fixme cf #8472) 2013-08-20 13:28:59 -04:00
Ben Blum
4fd404f2ca Fixup style of test cases for #7083 2013-08-20 13:28:51 -04:00
Ben Blum
95089d3793 Add tests for super-builtin-kind capabilities (#7083) 2013-08-20 13:28:50 -04:00
Ben Blum
3c3bfb4c3c Add more capabilities to typarams bounded by traits with super-builtin-kinds. Close #7083. 2013-08-20 13:28:50 -04:00
Ben Blum
4ca2e55adb Add tests for #7083. 2013-08-20 13:28:50 -04:00
Ben Blum
69322d9410 Allow traits to use builtin kinds as supertraits for #7083. 2013-08-20 13:28:50 -04:00
Ben Blum
369f7fa169 Prevent Send, Freeze, and Sized from being manually implemented. Close #8517. 2013-08-20 13:28:50 -04:00
Eric Reed
a909144b1c Moved .sleep() to Timer. 2013-08-20 09:53:02 -07:00
bors
67c954e365 auto merge of #8566 : toddaaro/rust/idle-opt+cleaning, r=catamorphism,brson
Instead of a furious storm of idle callbacks we just have one. This is a major performance gain - around 40% on my machine for the ping pong bench.

Also in this PR is a cleanup commit for the scheduler code. Was previously up as a separate PR, but bors load + imminent merge hell led me to roll them together. Was #8549.
2013-08-20 09:42:00 -07:00
Alex Crichton
7f91e7740d Fix LLVM compilation issues and use the new attrs
This implements #[no_split_stack] and also changes #[fast_ffi] to using the new
"fixedstacksegment" string attribute instead of integer attribute.
2013-08-20 08:33:52 -07:00
bors
7f26812895 auto merge of #8463 : brson/rust/borrowck, r=nmatsakis,nikomatsakis
r? @nikomatsakis
2013-08-20 06:41:58 -07:00
bors
5e9dff90c9 auto merge of #8638 : pnkfelix/rust/fsk-visitor-vpar-defaults-step5, r=huonw
"non-mechanical" : there was lots more hacking than the other more-mechanical ports Felix did.

r? @huonw.  (Or @nikomatsakis ; I just want someone to sanity-check this.  Its not a thing of beauty.)

Followup to #8623.  (See #8527, which was step 1 of 5, for the full outline.  Part of #7081.)

Notes on the change follow.

There's also a strange pattern that I hacked in to accommodate the
Outer/Inner traversal structure of the existing code (which was
previously encoding this by untying the Y-combinator style knot of the
vtable, and then retying it but superimposing new methods that "stop
at items").  I hope either I or someone else can come back in the
future and replace this ugliness with something more natural.

Added boilerplate macro; all the OuterLint definitions are the same
(but must be abstracted over implementing struct, thus the macro).

Revised lint.rs use declarations to make ast references explicit.
Also removed unused imports.
2013-08-20 03:52:01 -07:00
Felix S. Klock II
9b82d50f6d add line break post dbaupp review. 2013-08-20 12:25:34 +02:00
Seo Sanghyeon
0276fe471a Android: Run benchmarks and copy metrics 2013-08-20 19:07:36 +09:00
Felix S. Klock II
213d89b6da remove trailing whitespace to placate make tidy. 2013-08-20 11:09:47 +02:00
Felix S. Klock II
c709c0a3ab Port lint.rs from oldvisit to <V:Visit> trait API. Less mechanical port.
That is, there was lots more hacking than the other more-mechanical
ports Felix did.

There's also a strange pattern that I hacked in to accommodate the
Outer/Inner traversal structure of the existing code (which was
previously encoding this by untying the Y-combinator style knot of the
vtable, and then retying it but superimposing new methods that "stop
at items").  I hope either I or someone else can come back in the
future and replace this ugliness with something more natural.

Added boilerplate macro; all the OuterLint definitions are the same
(but must be abstracted over implementing struct, thus the macro).

Revised lint.rs use declarations to make ast references explicit.
Also removed unused imports.
2013-08-20 10:45:40 +02:00
Alex Crichton
d1e4815255 Upgrade llvm to current HEAD
* This has one workaround patch (everything's testing just fine...)
* I reworked the fixedstacksegment attribute to be specified with a string
  rather than using a keyword and an integer and modifying the parser
* I added a "no-split-stack" attribute along the same lines as the
  "fixedstacksegment" attribute for #1226
2013-08-20 01:12:47 -07:00
Seo Sanghyeon
5e87f2f89e Android: Change directory before running tests 2013-08-20 16:50:45 +09:00
bors
c099242a1a auto merge of #8548 : catamorphism/rust/unignore-rustpkg-tests, r=catamorphism
r? @brson This necessitated some cleanup to how we parse library filenames
when searching for libraries, since rustpkg may now create filenames
that contain '-' characters. Also cleaned up how rustpkg passes the
sysroot to a custom build script.
2013-08-19 23:41:55 -07:00
Brian Anderson
0f9ab93642 std: Restore dynamic borrow tracking 2013-08-19 20:39:39 -07:00
bors
5034792c88 auto merge of #8584 : thestinger/rust/jemalloc, r=graydon
This reverts commit 371a316ec9.

Closes #7217
2013-08-19 20:21:58 -07:00
Vadim Chugunov
c8354ff958 Rename functional-struct-update.rs to avoid tripping Windows installer detector.
(The "update" keyword in the test name makes Windows want to run it with elevated privileges, which fails of course)
2013-08-19 18:45:09 -07:00
Daniel Micay
ef436637ea jemalloc: use $(AR), not ar 2013-08-19 20:53:02 -04:00
Graydon Hoare
517e611271 regenerate configure 2013-08-19 20:48:11 -04:00
bors
2ec9b8ce2f auto merge of #8500 : graydon/rust/2013-08-13-self-rollup, r=thestinger
close #8424 r=brson
close #8173 r=brson
close #8209 r=strcat
2013-08-19 17:42:35 -07:00
Graydon Hoare
ef5d537010 doc: add condition tutorial 2013-08-19 16:48:48 -07:00
Eric Reed
35e844ffc1 Make IO thread-safe.
Each IO handle has a home event loop, which created it.
When a task wants to use an IO handle, it must first make sure it is on that home event loop.
It uses the scheduler handle in the IO handle to send itself there before starting the IO action.
Once the IO action completes, the task restores its previous home state.
If it is an AnySched task, then it will be executed on the new scheduler.
If it has a normal home, then it will return there before executing any more code after the IO action.
2013-08-19 16:31:21 -07:00
Eric Reed
d09412ab89 Homed UDP sockets 2013-08-19 16:26:50 -07:00
Eric Reed
d7b6fcba29 Working homing UDP socket prototype. 2013-08-19 16:26:50 -07:00
Eric Reed
88f718341e Instruct event loops to ignore SIGPIPE when constructed.
libuv does not always catch SIGPIPE.
2013-08-19 16:26:50 -07:00
Eric Reed
f68514c128 Do not execute the callback before cleaning up resources. 2013-08-19 16:26:50 -07:00
Eric Reed
97555e865c Derive Clone for IpAddr and SocketAddr 2013-08-19 16:26:50 -07:00
Graydon Hoare
2c7164595f rt: make jemalloc header conform to android signature. 2013-08-19 16:09:46 -07:00
Kevin Ballard
aeb06f2fb1 Fix broken rusti
Commit 0932ab336 accidentally broke rusti by making it parse the binary
name as the input, instead of parsing what the user typed.
2013-08-19 16:00:33 -07:00
Tim Chevalier
d9293d1d87 rustpkg: Un-ignore most of the remaining tests
This necessitated some cleanup to how we parse library filenames
when searching for libraries, since rustpkg may now create filenames
that contain '-' characters. Also cleaned up how rustpkg passes the
sysroot to a custom build script.
2013-08-19 15:27:21 -07:00
Graydon Hoare
610b2b58ec compiletest: do not run tests in sub-threads if on valgrind. 2013-08-19 15:09:20 -07:00
Graydon Hoare
19f4ae1415 Try to fix mac valgrind bot by disabling thread-heavy activities. 2013-08-19 15:09:20 -07:00
Graydon Hoare
29a449aae3 Add tests for cross-crate condition handling. Close #5446. 2013-08-19 15:09:20 -07:00
Graydon Hoare
eaa378033c test: add testcase, close #4929 which was already fixed. 2013-08-19 15:09:20 -07:00
Graydon Hoare
8c78311e81 test: un-xfail now working run-pass/foreign-struct.rs, close #2334. 2013-08-19 15:09:19 -07:00
bors
e6e678fac7 auto merge of #8623 : pnkfelix/rust/fsk-visitor-vpar-defaults-step4, r=nmatsakis
Follow up to #8619 (step 3 of 5).

(See #8527, which was step 1 of 5, for the full outline.)

Part of #7081.
2013-08-19 15:02:07 -07:00
Kevin Ballard
8aa47990da Don't skip token after @'static
Fixes #8615.
2013-08-19 14:55:35 -07:00
bors
4bdceb9c00 auto merge of #8459 : thestinger/rust/checked, r=graydon 2013-08-19 12:42:48 -07:00
toddaaro
e5ccf13668 clean whitespace :/ 2013-08-19 12:01:13 -07:00
Jed Davis
46672d2b06 Remove discriminant symbols.
Given that bootstrapping and running the testsuite works without
exporting discriminant values as global constants, I conclude that
they're unused and can be removed.
2013-08-19 11:34:43 -07:00
Michael Sullivan
6a6d3b600f Make supertrait methods callable on object types.
This requires changes to method search and to codegen. We now emit a
vtable for objects that includes methods from all supertraits.
Closes #4100.

Also, actually populate the cache for vtables, and also key it by type
so that it actually works.
2013-08-19 11:08:07 -07:00
Michael Sullivan
dc9b3e37e2 Rangechange the log message truncation limit. 2013-08-19 09:35:51 -07:00