Register snapshots

This commit is contained in:
Brian Anderson
2013-05-04 14:25:41 -07:00
parent b872900a5b
commit 8081e8debf
47 changed files with 16 additions and 5720 deletions

View File

@@ -70,22 +70,6 @@ pub type Name = uint;
// with a macro expansion
pub type Mrk = uint;
#[cfg(stage0)]
impl<S:Encoder> Encodable<S> 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<S:Encoder> Encodable<S> for ident {
fn encode(&self, s: &mut S) {
unsafe {
@@ -100,21 +84,6 @@ impl<S:Encoder> Encodable<S> for ident {
}
}
#[cfg(stage0)]
impl<D:Decoder> Decodable<D> 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<D:Decoder> Decodable<D> for ident {
fn decode(d: &mut D) -> ident {
let intr = match unsafe {