librustc: Fix more merge fallout.

This commit is contained in:
Patrick Walton 2013-06-25 19:19:38 -07:00 committed by Corey Richardson
parent bb830558d1
commit 3625781cfe
5 changed files with 24 additions and 13 deletions

View File

@ -229,15 +229,25 @@ impl Arena {
fn alloc_nonpod_inner(&mut self, n_bytes: uint, align: uint)
-> (*u8, *u8) {
unsafe {
let head = transmute_mut_region(&mut self.head);
let start;
let end;
let tydesc_start;
let after_tydesc;
{
let head = transmute_mut_region(&mut self.head);
tydesc_start = head.fill;
after_tydesc = head.fill + sys::size_of::<*TyDesc>();
start = round_up_to(after_tydesc, align);
end = start + n_bytes;
}
let tydesc_start = head.fill;
let after_tydesc = head.fill + sys::size_of::<*TyDesc>();
let start = round_up_to(after_tydesc, align);
let end = start + n_bytes;
if end > at_vec::capacity(self.head.data) {
return self.alloc_nonpod_grow(n_bytes, align);
}
let head = transmute_mut_region(&mut self.head);
head.fill = round_up_to(end, sys::pref_align_of::<*TyDesc>());
//debug!("idx = %u, size = %u, align = %u, fill = %u",

View File

@ -523,10 +523,10 @@ impl<'self> EachItemContext<'self> {
Mod | ForeignMod | Trait | Impl => {
continue = self.each_item_of_module(def_id);
}
Freeze | Struct | UnsafeFn | Fn | PureFn | ForeignFn |
UnsafeStaticMethod | StaticMethod | PureStaticMethod | Type |
ForeignType | Variant | Enum | PublicField | PrivateField |
InheritedField => {}
ImmStatic | MutStatic | Struct | UnsafeFn | Fn | PureFn |
ForeignFn | UnsafeStaticMethod | StaticMethod |
PureStaticMethod | Type | ForeignType | Variant | Enum |
PublicField | PrivateField | InheritedField => {}
}
}

View File

@ -452,7 +452,7 @@ impl mem_categorization_ctxt {
ast::def_trait(_) | ast::def_ty(_) | ast::def_prim_ty(_) |
ast::def_ty_param(*) | ast::def_struct(*) |
ast::def_typaram_binder(*) | ast::def_region(_) |
ast::def_label(_) | ast::def_self_ty(*) => {
ast::def_label(_) | ast::def_self_ty(*) | ast::def_method(*) => {
@cmt_ {
id:id,
span:span,

View File

@ -396,7 +396,8 @@ impl ReachableContext {
// this properly would result in the necessity of computing *type*
// reachability, which might result in a compile time loss.
fn mark_destructors_reachable(&self) {
for self.tcx.destructor_for_type.each |_, destructor_def_id| {
for self.tcx.destructor_for_type.iter().advance
|(_, destructor_def_id)| {
if destructor_def_id.crate == local_crate {
self.reachable_symbols.insert(destructor_def_id.node);
}

View File

@ -3240,8 +3240,8 @@ impl Resolver {
pub fn add_exports_for_module(@mut self,
exports2: &mut ~[Export2],
module_: @mut Module) {
for module_.import_resolutions.iter().advance |ident,
importresolution| {
for module_.import_resolutions.iter().advance |(ident,
importresolution)| {
if importresolution.privacy != Public {
debug!("(computing exports) not reexporting private `%s`",
self.session.str_of(*ident));