about summary refs log tree commit diff
path: root/src/test/run-pass/pipe-select-macro.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-07-31 16:10:35 -0700
committerBrian Anderson <banderson@mozilla.com>2013-08-01 12:17:32 -0700
commit4b3e766ac6a6f89430b65a5bc2f55bb29f6290ab (patch)
tree2f02d8a7f30c9998912d9278eefbc8cf3ec4ee29 /src/test/run-pass/pipe-select-macro.rs
parent7daea7c9c107238ba7bfc2e9f0e8955d42ad71ed (diff)
downloadrust-4b3e766ac6a6f89430b65a5bc2f55bb29f6290ab.tar.gz
rust-4b3e766ac6a6f89430b65a5bc2f55bb29f6290ab.zip
Remove the pipes compiler
The pipes compiler produced data types that encoded efficient and safe
bounded message passing protocols between two endpoints. It was also
capable of producing unbounded protocols.

It was useful research but was arguably done before its proper time.

I am removing it for the following reasons:

* In practice we used it only for producing the `oneshot` and `stream`
  unbounded protocols and all communication in Rust use those.
* The interface between the proto! macro and the standard library
  has a large surface area and was difficult to maintain through
  language and library changes.
* It is now written in an old dialect of Rust and generates code
  which would likely be considered non-idiomatic.
* Both the compiler and the runtime are difficult to understand,
  and likewise the relationship between the generated code and
  the library is hard to understand. Debugging is difficult.
* The new scheduler implements `stream` and `oneshot` by hand
  in a way that will be significantly easier to maintain.

This shouldn't be taken as an indication that 'channel protocols'
for Rust are not worth pursuing again in the future.
Diffstat (limited to 'src/test/run-pass/pipe-select-macro.rs')
-rw-r--r--src/test/run-pass/pipe-select-macro.rs62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/test/run-pass/pipe-select-macro.rs b/src/test/run-pass/pipe-select-macro.rs
deleted file mode 100644
index cb126017247..00000000000
--- a/src/test/run-pass/pipe-select-macro.rs
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// FIXME #7303: xfail-test
-
-// Protocols
-proto! foo (
-    foo:recv {
-        do_foo -> foo
-    }
-)
-
-proto! bar (
-    bar:recv {
-        do_bar(int) -> barbar,
-        do_baz(bool) -> bazbar,
-    }
-
-    barbar:send {
-        rebarbar -> bar,
-    }
-
-    bazbar:send {
-        rebazbar -> bar
-    }
-)
-
-fn macros() {
-    include!("select-macro.rs");
-}
-
-// Code
-fn test(+foo: foo::client::foo, +bar: bar::client::bar) {
-    use bar::do_baz;
-
-    select! (
-        foo => {
-            foo::do_foo -> _next {
-            }
-        }
-
-        bar => {
-            bar::do_bar(x) -> _next {
-                info!("%?", x)
-            },
-
-            do_baz(b) -> _next {
-                if b { info!("true") } else { info!("false") }
-            }
-        }
-    )
-}
-
-pub fn main() {
-}