Skip to content

Commit faa4336

Browse files
committed
---
yaml --- r: 155582 b: refs/heads/try2 c: 60b859a h: refs/heads/master v: v3
1 parent 78dbc68 commit faa4336

31 files changed

+44
-441
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: b224dfe1a6ff1b392fd68004cf7a0a04dfec9975
8+
refs/heads/try2: 60b859ab8ac8c48b7adbefe81d0e5d3c772b080a
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/compiletest/compiletest.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,10 @@
1111
#![crate_type = "bin"]
1212
#![feature(phase)]
1313

14-
// we use our own (green) start below; do not link in libnative; issue #13247.
15-
#![no_start]
16-
1714
#![deny(warnings)]
1815

1916
extern crate test;
2017
extern crate getopts;
21-
extern crate green;
22-
extern crate rustuv;
2318
#[phase(plugin, link)] extern crate log;
2419

2520
extern crate regex;
@@ -41,11 +36,6 @@ pub mod runtest;
4136
pub mod common;
4237
pub mod errors;
4338

44-
#[start]
45-
fn start(argc: int, argv: *const *const u8) -> int {
46-
green::start(argc, argv, rustuv::event_loop, main)
47-
}
48-
4939
pub fn main() {
5040
let args = os::args();
5141
let config = parse_config(args);

branches/try2/src/doc/guide-runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ To create a pool of green tasks which have no I/O support, you may shed the
240240
`rustuv::event_loop`. All tasks will have no I/O support, but they will still be
241241
able to deschedule/reschedule (use channels, locks, etc).
242242

243-
~~~{.rust}
243+
~~~{.ignore}
244244
extern crate green;
245245
extern crate rustuv;
246246

branches/try2/src/libgreen/lib.rs

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -128,35 +128,6 @@
128128
//! > **Note**: This `main` function in this example does *not* have I/O
129129
//! > support. The basic event loop does not provide any support
130130
//!
131-
//! # Starting with I/O support in libgreen
132-
//!
133-
//! ```rust
134-
//! extern crate green;
135-
//! extern crate rustuv;
136-
//!
137-
//! #[start]
138-
//! fn start(argc: int, argv: *const *const u8) -> int {
139-
//! green::start(argc, argv, rustuv::event_loop, main)
140-
//! }
141-
//!
142-
//! fn main() {
143-
//! // this code is running in a pool of schedulers all powered by libuv
144-
//! }
145-
//! ```
146-
//!
147-
//! The above code can also be shortened with a macro from libgreen.
148-
//!
149-
//! ```
150-
//! #![feature(phase)]
151-
//! #[phase(plugin)] extern crate green;
152-
//!
153-
//! green_start!(main)
154-
//!
155-
//! fn main() {
156-
//! // run inside of a green pool
157-
//! }
158-
//! ```
159-
//!
160131
//! # Using a scheduler pool
161132
//!
162133
//! This library adds a `GreenTaskBuilder` trait that extends the methods
@@ -165,17 +136,13 @@
165136
//!
166137
//! ```rust
167138
//! extern crate green;
168-
//! extern crate rustuv;
169139
//!
170140
//! # fn main() {
171141
//! use std::task::TaskBuilder;
172142
//! use green::{SchedPool, PoolConfig, GreenTaskBuilder};
173143
//!
174144
//! let mut config = PoolConfig::new();
175145
//!
176-
//! // Optional: Set the event loop to be rustuv's to allow I/O to work
177-
//! config.event_loop_factory = rustuv::event_loop;
178-
//!
179146
//! let mut pool = SchedPool::new(config);
180147
//!
181148
//! // Spawn tasks into the pool of schedulers
@@ -221,7 +188,6 @@
221188
#![allow(deprecated)]
222189

223190
#[cfg(test)] #[phase(plugin, link)] extern crate log;
224-
#[cfg(test)] extern crate rustuv;
225191
extern crate libc;
226192
extern crate alloc;
227193

@@ -253,33 +219,6 @@ pub mod sleeper_list;
253219
pub mod stack;
254220
pub mod task;
255221

256-
/// A helper macro for booting a program with libgreen
257-
///
258-
/// # Example
259-
///
260-
/// ```
261-
/// #![feature(phase)]
262-
/// #[phase(plugin)] extern crate green;
263-
///
264-
/// green_start!(main)
265-
///
266-
/// fn main() {
267-
/// // running with libgreen
268-
/// }
269-
/// ```
270-
#[macro_export]
271-
macro_rules! green_start( ($f:ident) => (
272-
mod __start {
273-
extern crate green;
274-
extern crate rustuv;
275-
276-
#[start]
277-
fn start(argc: int, argv: *const *const u8) -> int {
278-
green::start(argc, argv, rustuv::event_loop, super::$f)
279-
}
280-
}
281-
) )
282-
283222
/// Set up a default runtime configuration, given compiler-supplied arguments.
284223
///
285224
/// This function will block until the entire pool of M:N schedulers have

branches/try2/src/libgreen/sched.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,8 +1024,6 @@ fn new_sched_rng() -> XorShiftRng {
10241024

10251025
#[cfg(test)]
10261026
mod test {
1027-
use rustuv;
1028-
10291027
use std::rt::task::TaskOpts;
10301028
use std::rt::task::Task;
10311029
use std::rt::local::Local;
@@ -1277,28 +1275,6 @@ mod test {
12771275
// }
12781276
//}
12791277

1280-
#[test]
1281-
fn test_io_callback() {
1282-
use std::io::timer;
1283-
1284-
let mut pool = SchedPool::new(PoolConfig {
1285-
threads: 2,
1286-
event_loop_factory: rustuv::event_loop,
1287-
});
1288-
1289-
// This is a regression test that when there are no schedulable tasks in
1290-
// the work queue, but we are performing I/O, that once we do put
1291-
// something in the work queue again the scheduler picks it up and
1292-
// doesn't exit before emptying the work queue
1293-
pool.spawn(TaskOpts::new(), proc() {
1294-
spawn(proc() {
1295-
timer::sleep(Duration::milliseconds(10));
1296-
});
1297-
});
1298-
1299-
pool.shutdown();
1300-
}
1301-
13021278
#[test]
13031279
fn wakeup_across_scheds() {
13041280
let (tx1, rx1) = channel();

branches/try2/src/libgreen/task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ mod tests {
506506
fn spawn_opts(opts: TaskOpts, f: proc():Send) {
507507
let mut pool = SchedPool::new(PoolConfig {
508508
threads: 1,
509-
event_loop_factory: ::rustuv::event_loop,
509+
event_loop_factory: super::super::basic::event_loop,
510510
});
511511
pool.spawn(opts, f);
512512
pool.shutdown();

branches/try2/src/librustc/driver/driver.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ pub fn phase_2_configure_and_expand(sess: &Session,
291291
crate_name: crate_name.to_string(),
292292
deriving_hash_type_parameter: sess.features.borrow().default_type_params,
293293
enable_quotes: sess.features.borrow().quote,
294-
recursion_limit: sess.recursion_limit.get(),
295294
};
296295
let ret = syntax::ext::expand::expand_crate(&sess.parse_sess,
297296
cfg,

branches/try2/src/libstd/lib.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,6 @@
116116

117117
#![reexport_test_harness_main = "test_main"]
118118

119-
// When testing libstd, bring in libuv as the I/O backend so tests can print
120-
// things and all of the std::io tests have an I/O interface to run on top
121-
// of
122-
#[cfg(test)] extern crate rustuv;
123-
#[cfg(test)] extern crate native;
124119
#[cfg(test)] extern crate green;
125120
#[cfg(test)] extern crate debug;
126121
#[cfg(test)] #[phase(plugin, link)] extern crate log;
@@ -187,12 +182,6 @@ pub use unicode::char;
187182

188183
pub use core_sync::comm;
189184

190-
// Run tests with libgreen instead of libnative.
191-
#[cfg(test)] #[start]
192-
fn start(argc: int, argv: *const *const u8) -> int {
193-
green::start(argc, argv, rustuv::event_loop, test_main)
194-
}
195-
196185
/* Exported macros */
197186

198187
pub mod macros;

branches/try2/src/libsyntax/ext/base.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,6 @@ pub struct ExtCtxt<'a> {
463463
pub exported_macros: Vec<P<ast::Item>>,
464464

465465
pub syntax_env: SyntaxEnv,
466-
pub recursion_count: uint,
467466
}
468467

469468
impl<'a> ExtCtxt<'a> {
@@ -479,7 +478,6 @@ impl<'a> ExtCtxt<'a> {
479478
trace_mac: false,
480479
exported_macros: Vec::new(),
481480
syntax_env: env,
482-
recursion_count: 0,
483481
}
484482
}
485483

@@ -554,13 +552,6 @@ impl<'a> ExtCtxt<'a> {
554552
return v;
555553
}
556554
pub fn bt_push(&mut self, ei: ExpnInfo) {
557-
self.recursion_count += 1;
558-
if self.recursion_count > self.ecfg.recursion_limit {
559-
self.span_fatal(ei.call_site,
560-
format!("Recursion limit reached while expanding the macro `{}`",
561-
ei.callee.name).as_slice());
562-
}
563-
564555
let mut call_site = ei.call_site;
565556
call_site.expn_id = self.backtrace;
566557
self.backtrace = self.codemap().record_expansion(ExpnInfo {
@@ -572,7 +563,6 @@ impl<'a> ExtCtxt<'a> {
572563
match self.backtrace {
573564
NO_EXPANSION => self.bug("tried to pop without a push"),
574565
expn_id => {
575-
self.recursion_count -= 1;
576566
self.backtrace = self.codemap().with_expn_info(expn_id, |expn_info| {
577567
expn_info.map_or(NO_EXPANSION, |ei| ei.call_site.expn_id)
578568
});

branches/try2/src/libsyntax/ext/expand.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,6 @@ pub struct ExpansionConfig {
10691069
pub crate_name: String,
10701070
pub deriving_hash_type_parameter: bool,
10711071
pub enable_quotes: bool,
1072-
pub recursion_limit: uint,
10731072
}
10741073

10751074
impl ExpansionConfig {
@@ -1078,7 +1077,6 @@ impl ExpansionConfig {
10781077
crate_name: crate_name,
10791078
deriving_hash_type_parameter: false,
10801079
enable_quotes: false,
1081-
recursion_limit: 64,
10821080
}
10831081
}
10841082
}

branches/try2/src/test/bench/rt-spawn-rate.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#![no_start]
1212

1313
extern crate green;
14-
extern crate rustuv;
1514

1615
use std::task::spawn;
1716
use std::os;
@@ -22,7 +21,7 @@ use std::uint;
2221

2322
#[start]
2423
fn start(argc: int, argv: *const *const u8) -> int {
25-
green::start(argc, argv, rustuv::event_loop, main)
24+
green::start(argc, argv, green::basic::event_loop, main)
2625
}
2726

2827
fn main() {

branches/try2/src/test/bench/shootout-chameneos-redux.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,9 @@
4040

4141
// no-pretty-expanded
4242

43-
#![feature(phase)]
44-
#[phase(plugin)] extern crate green;
45-
4643
use std::string::String;
4744
use std::fmt;
4845

49-
green_start!(main)
50-
5146
fn print_complements() {
5247
let all = [Blue, Red, Yellow];
5348
for aa in all.iter() {

branches/try2/src/test/bench/shootout-meteor.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,8 @@
4040

4141
// no-pretty-expanded FIXME #15189
4242

43-
#![feature(phase)]
44-
#[phase(plugin)] extern crate green;
45-
4643
use std::sync::Arc;
4744

48-
green_start!(main)
49-
5045
//
5146
// Utilities.
5247
//

branches/try2/src/test/bench/shootout-spectralnorm.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,14 @@
4040

4141
// no-pretty-expanded FIXME #15189
4242

43-
#![feature(phase)]
4443
#![allow(non_snake_case)]
45-
#[phase(plugin)] extern crate green;
4644

4745
use std::from_str::FromStr;
4846
use std::iter::count;
4947
use std::cmp::min;
5048
use std::os;
5149
use std::sync::{Arc, RWLock};
5250

53-
green_start!(main)
54-
5551
fn A(i: uint, j: uint) -> f64 {
5652
((i + j) * (i + j + 1) / 2 + i + 1) as f64
5753
}

branches/try2/src/test/bench/shootout-threadring.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
3939
// OF THE POSSIBILITY OF SUCH DAMAGE.
4040

41-
#![feature(phase)]
42-
#[phase(plugin)] extern crate green;
43-
green_start!(main)
44-
4541
fn start(n_tasks: int, token: int) {
4642
let (tx, mut rx) = channel();
4743
tx.send(token);

branches/try2/src/test/bench/silly-test-spawn.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,13 @@
99
// except according to those terms.
1010

1111
// This is (hopefully) a quick test to get a good idea about spawning
12-
// performance in libgreen. Note that this uses the rustuv event loop rather
13-
// than the basic event loop in order to get a better real world idea about the
14-
// performance of a task spawn.
12+
// performance in libgreen.
1513

1614
extern crate green;
17-
extern crate rustuv;
1815

1916
#[start]
2017
fn start(argc: int, argv: *const *const u8) -> int {
21-
green::start(argc, argv, rustuv::event_loop, main)
18+
green::start(argc, argv, green::basic::event_loop, main)
2219
}
2320

2421
fn main() {

branches/try2/src/test/compile-fail/infinite-macro-expansion.rs

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)