Skip to content

Commit

Permalink
librustc: Update the serializer to work properly with INHTWAMA, remov…
Browse files Browse the repository at this point in the history
…ing mutable fields in the process
  • Loading branch information
pcwalton committed May 3, 2013
1 parent 6f2e429 commit dc5df61
Show file tree
Hide file tree
Showing 20 changed files with 5,381 additions and 595 deletions.
9 changes: 9 additions & 0 deletions src/librustc/metadata/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,21 @@ fn item_ty_param_defs(item: ebml::Doc, tcx: ty::ctxt, cdata: cmd,
@bounds
}

#[cfg(stage0)]
fn item_ty_region_param(item: ebml::Doc) -> Option<ty::region_variance> {
reader::maybe_get_doc(item, tag_region_param).map(|doc| {
Decodable::decode(&reader::Decoder(*doc))
})
}

#[cfg(not(stage0))]
fn item_ty_region_param(item: ebml::Doc) -> Option<ty::region_variance> {
reader::maybe_get_doc(item, tag_region_param).map(|doc| {
let mut decoder = reader::Decoder(*doc);
Decodable::decode(&mut decoder)
})
}

fn item_ty_param_count(item: ebml::Doc) -> uint {
let mut n = 0u;
reader::tagged_docs(item, tag_items_data_item_ty_param_bounds,
Expand Down
Loading

5 comments on commit dc5df61

@bors
Copy link
Contributor

@bors bors commented on dc5df61 May 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from graydon
at pcwalton@dc5df61

@bors
Copy link
Contributor

@bors bors commented on dc5df61 May 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging pcwalton/rust/inhtwama-serializer = dc5df61 into auto

@bors
Copy link
Contributor

@bors bors commented on dc5df61 May 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pcwalton/rust/inhtwama-serializer = dc5df61 merged ok, testing candidate = b37a685

@bors
Copy link
Contributor

@bors bors commented on dc5df61 May 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on dc5df61 May 3, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = b37a685

Please sign in to comment.