about summary refs log tree commit diff
path: root/src/libcore/task.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-11-28 12:33:00 -0800
committerBrian Anderson <banderson@mozilla.com>2012-11-28 12:33:00 -0800
commit8179e268efd86ae5c1bcf21b4f8d4e01eea7c193 (patch)
tree7e3fd944a844a195a0ed1bed8717db07a2d8ccc8 /src/libcore/task.rs
parentbe6613e048c889a0aeaff056131c2406259f1fb4 (diff)
downloadrust-8179e268efd86ae5c1bcf21b4f8d4e01eea7c193.tar.gz
rust-8179e268efd86ae5c1bcf21b4f8d4e01eea7c193.zip
Register snapshots
Diffstat (limited to 'src/libcore/task.rs')
-rw-r--r--src/libcore/task.rs64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/libcore/task.rs b/src/libcore/task.rs
index 3a6fa2d3931..a2b5c3229ad 100644
--- a/src/libcore/task.rs
+++ b/src/libcore/task.rs
@@ -43,15 +43,7 @@ pub enum Task {
 }
 
 impl Task : cmp::Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Task) -> bool { *self == *(*other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Task) -> bool { *(*self) == *(*other) }
-    #[cfg(stage0)]
-    pure fn ne(other: &Task) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Task) -> bool { !(*self).eq(other) }
 }
 
@@ -72,25 +64,12 @@ pub enum TaskResult {
 }
 
 impl TaskResult : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &TaskResult) -> bool {
-        match (self, (*other)) {
-            (Success, Success) | (Failure, Failure) => true,
-            (Success, _) | (Failure, _) => false
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &TaskResult) -> bool {
         match ((*self), (*other)) {
             (Success, Success) | (Failure, Failure) => true,
             (Success, _) | (Failure, _) => false
         }
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &TaskResult) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &TaskResult) -> bool { !(*self).eq(other) }
 }
 
@@ -114,43 +93,6 @@ pub enum SchedMode {
 }
 
 impl SchedMode : cmp::Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &SchedMode) -> bool {
-        match self {
-            SingleThreaded => {
-                match (*other) {
-                    SingleThreaded => true,
-                    _ => false
-                }
-            }
-            ThreadPerCore => {
-                match (*other) {
-                    ThreadPerCore => true,
-                    _ => false
-                }
-            }
-            ThreadPerTask => {
-                match (*other) {
-                    ThreadPerTask => true,
-                    _ => false
-                }
-            }
-            ManualThreads(e0a) => {
-                match (*other) {
-                    ManualThreads(e0b) => e0a == e0b,
-                    _ => false
-                }
-            }
-            PlatformThread => {
-                match (*other) {
-                    PlatformThread => true,
-                    _ => false
-                }
-            }
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &SchedMode) -> bool {
         match (*self) {
             SingleThreaded => {
@@ -185,12 +127,6 @@ impl SchedMode : cmp::Eq {
             }
         }
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &SchedMode) -> bool {
-        !self.eq(other)
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &SchedMode) -> bool {
         !(*self).eq(other)
     }