Revert "remove alias analysis and replace with borrowck"

18s perf regression compiling rustc with opts

This reverts commit 7f6ee0ce0d.
This commit is contained in:
Brian Anderson 2012-06-07 19:42:22 -07:00
parent c058f1d992
commit 7ef825bb60
51 changed files with 1134 additions and 31 deletions

View file

@ -52,6 +52,7 @@ export decode_inlined_item;
type maps = {
mutbl_map: middle::borrowck::mutbl_map,
root_map: middle::borrowck::root_map,
copy_map: middle::alias::copy_map,
last_use_map: middle::liveness::last_use_map,
impl_map: middle::resolve::impl_map,
method_map: middle::typeck::method_map,
@ -830,6 +831,12 @@ fn encode_side_tables_for_id(ecx: @e::encode_ctxt,
}
}
option::iter(maps.copy_map.find(id)) {|_m|
ebml_w.tag(c::tag_table_copy) {||
ebml_w.id(id);
}
}
option::iter(maps.last_use_map.find(id)) {|m|
ebml_w.tag(c::tag_table_last_use) {||
ebml_w.id(id);
@ -936,6 +943,8 @@ fn decode_side_tables(xcx: extended_decode_ctxt,
if tag == (c::tag_table_mutbl as uint) {
dcx.maps.mutbl_map.insert(id, ());
} else if tag == (c::tag_table_copy as uint) {
dcx.maps.copy_map.insert(id, ());
} else {
let val_doc = entry_doc[c::tag_table_val];
let val_dsr = ebml::ebml_deserializer(val_doc);