From 8081e8debf63726865e869aaacbd040755285a51 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sat, 4 May 2013 14:25:41 -0700 Subject: Register snapshots --- src/libsyntax/ast.rs | 31 ------------------------------- src/libsyntax/codemap.rs | 15 --------------- src/libsyntax/ext/base.rs | 11 ----------- src/libsyntax/opt_vec.rs | 9 --------- 4 files changed, 66 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 77e79866160..2216226ecb3 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -70,22 +70,6 @@ pub type Name = uint; // with a macro expansion pub type Mrk = uint; -#[cfg(stage0)] -impl Encodable for ident { - fn encode(&self, s: &S) { - unsafe { - let intr = - match task::local_data::local_data_get(interner_key!()) { - None => fail!(~"encode: TLS interner not set up"), - Some(intr) => intr - }; - - s.emit_str(*(*intr).get(*self)); - } - } -} - -#[cfg(not(stage0))] impl Encodable for ident { fn encode(&self, s: &mut S) { unsafe { @@ -100,21 +84,6 @@ impl Encodable for ident { } } -#[cfg(stage0)] -impl Decodable for ident { - fn decode(d: &D) -> ident { - let intr = match unsafe { - task::local_data::local_data_get(interner_key!()) - } { - None => fail!(~"decode: TLS interner not set up"), - Some(intr) => intr - }; - - (*intr).intern(@d.read_str()) - } -} - -#[cfg(not(stage0))] impl Decodable for ident { fn decode(d: &mut D) -> ident { let intr = match unsafe { diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index bbb390e9dc9..66ed52f0352 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -125,13 +125,6 @@ impl cmp::Eq for span { fn ne(&self, other: &span) -> bool { !(*self).eq(other) } } -#[cfg(stage0)] -impl Encodable for span { - /* Note #1972 -- spans are encoded but not decoded */ - fn encode(&self, _s: &S) { _s.emit_nil() } -} - -#[cfg(not(stage0))] impl Encodable for span { /* Note #1972 -- spans are encoded but not decoded */ fn encode(&self, s: &mut S) { @@ -139,14 +132,6 @@ impl Encodable for span { } } -#[cfg(stage0)] -impl Decodable for span { - fn decode(_d: &D) -> span { - dummy_sp() - } -} - -#[cfg(not(stage0))] impl Decodable for span { fn decode(_d: &mut D) -> span { dummy_sp() diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index db4912d2131..e56dab6db20 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -451,17 +451,6 @@ impl MapChain{ // ugh: can't get this to compile with mut because of the // lack of flow sensitivity. - #[cfg(stage0)] - fn get_map(&self) -> &'self HashMap { - match *self { - BaseMapChain (~ref map) => map, - ConsMapChain (~ref map,_) => map - } - } - - // ugh: can't get this to compile with mut because of the - // lack of flow sensitivity. - #[cfg(not(stage0))] fn get_map<'a>(&'a self) -> &'a HashMap { match *self { BaseMapChain (~ref map) => map, diff --git a/src/libsyntax/opt_vec.rs b/src/libsyntax/opt_vec.rs index 6cf7bba600e..600ab964e52 100644 --- a/src/libsyntax/opt_vec.rs +++ b/src/libsyntax/opt_vec.rs @@ -61,15 +61,6 @@ impl OptVec { } } - #[cfg(stage0)] - fn get(&self, i: uint) -> &'self T { - match *self { - Empty => fail!(fmt!("Invalid index %u", i)), - Vec(ref v) => &v[i] - } - } - - #[cfg(not(stage0))] fn get<'a>(&'a self, i: uint) -> &'a T { match *self { Empty => fail!(fmt!("Invalid index %u", i)), -- cgit 1.4.1-3-g733a5