rustc: rename CodeExtent to Scope and RegionMaps to ScopeTree.

This commit is contained in:
Eduard-Mihai Burtescu 2017-08-31 21:37:38 +03:00
parent f861b6ee46
commit 8bdfd8a003
65 changed files with 673 additions and 659 deletions

View file

@ -22,16 +22,16 @@ fn main() {
// START rustc.node4.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// let _1: i32;
// let _2: &'10_1rce i32;
// let _2: &'10_1rs i32;
//
// bb0: {
// StorageLive(_1);
// _1 = const 3i32;
// StorageLive(_2);
// _2 = &'10_1rce _1;
// _2 = &'10_1rs _1;
// _0 = ();
// StorageDead(_2);
// EndRegion('10_1rce);
// EndRegion('10_1rs);
// StorageDead(_1);
// return;
// }

View file

@ -27,8 +27,8 @@ fn main() {
// START rustc.node4.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// let _2: bool;
// let _3: &'23_1rce bool;
// let _7: &'23_3rce bool;
// let _3: &'23_1rs bool;
// let _7: &'23_3rs bool;
// let mut _4: ();
// let mut _5: bool;
// bb0: {
@ -38,7 +38,7 @@ fn main() {
// StorageLive(_2);
// _2 = const true;
// StorageLive(_3);
// _3 = &'23_1rce _2;
// _3 = &'23_1rs _2;
// StorageLive(_5);
// _5 = _2;
// switchInt(_5) -> [0u8: bb3, otherwise: bb2];
@ -47,19 +47,19 @@ fn main() {
// _0 = ();
// StorageDead(_5);
// StorageDead(_3);
// EndRegion('23_1rce);
// EndRegion('23_1rs);
// StorageDead(_2);
// return;
// }
// bb3: {
// StorageDead(_5);
// StorageLive(_7);
// _7 = &'23_3rce _2;
// _7 = &'23_3rs _2;
// _1 = ();
// StorageDead(_7);
// EndRegion('23_3rce);
// EndRegion('23_3rs);
// StorageDead(_3);
// EndRegion('23_1rce);
// EndRegion('23_1rs);
// StorageDead(_2);
// goto -> bb1;
// }

View file

@ -28,8 +28,8 @@ fn main() {
// START rustc.node4.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// let mut _1: bool;
// let _3: &'26_1rce bool;
// let _7: &'26_3rce bool;
// let _3: &'26_1rs bool;
// let _7: &'26_3rs bool;
// let mut _2: ();
// let mut _4: ();
// let mut _5: bool;
@ -41,7 +41,7 @@ fn main() {
// bb1: {
// _1 = const true;
// StorageLive(_3);
// _3 = &'26_1rce _1;
// _3 = &'26_1rs _1;
// StorageLive(_5);
// _5 = _1;
// switchInt(_5) -> [0u8: bb3, otherwise: bb2];
@ -50,7 +50,7 @@ fn main() {
// _0 = ();
// StorageDead(_5);
// StorageDead(_3);
// EndRegion('26_1rce);
// EndRegion('26_1rs);
// StorageDead(_1);
// return;
// }
@ -58,12 +58,12 @@ fn main() {
// _4 = ();
// StorageDead(_5);
// StorageLive(_7);
// _7 = &'26_3rce _1;
// _7 = &'26_3rs _1;
// _2 = ();
// StorageDead(_7);
// EndRegion('26_3rce);
// EndRegion('26_3rs);
// StorageDead(_3);
// EndRegion('26_1rce);
// EndRegion('26_1rs);
// goto -> bb1;
// }
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir

View file

@ -33,8 +33,8 @@ fn foo(i: i32) {
// let mut _0: ();
// let _1: D;
// let _2: i32;
// let _3: &'26_2rce i32;
// let _6: &'26_4rce i32;
// let _3: &'26_2rs i32;
// let _6: &'26_4rs i32;
// let mut _4: ();
// let mut _5: i32;
// bb0: {
@ -43,7 +43,7 @@ fn foo(i: i32) {
// StorageLive(_2);
// _2 = const 0i32;
// StorageLive(_3);
// _3 = &'26_2rce _2;
// _3 = &'26_2rs _2;
// StorageLive(_5);
// _5 = (*_3);
// _4 = const foo(_5) -> [return: bb1, unwind: bb3];
@ -51,12 +51,12 @@ fn foo(i: i32) {
// bb1: {
// StorageDead(_5);
// StorageLive(_6);
// _6 = &'26_4rce _2;
// _6 = &'26_4rs _2;
// _0 = ();
// StorageDead(_6);
// EndRegion('26_4rce);
// EndRegion('26_4rs);
// StorageDead(_3);
// EndRegion('26_2rce);
// EndRegion('26_2rs);
// StorageDead(_2);
// drop(_1) -> bb4;
// }
@ -64,7 +64,7 @@ fn foo(i: i32) {
// resume;
// }
// bb3: {
// EndRegion('26_2rce);
// EndRegion('26_2rs);
// drop(_1) -> bb2;
// }
// bb4: {

View file

@ -31,21 +31,21 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// let mut _0: ();
// let _1: D;
// let mut _2: ();
// let mut _3: [closure@NodeId(18) d:&'14mce D];
// let mut _4: &'14mce D;
// let mut _3: [closure@NodeId(18) d:&'14s D];
// let mut _4: &'14s D;
// bb0: {
// StorageLive(_1);
// _1 = D::{{constructor}}(const 0i32,);
// StorageLive(_3);
// StorageLive(_4);
// _4 = &'14mce _1;
// _4 = &'14s _1;
// _3 = [closure@NodeId(18)] { d: _4 };
// StorageDead(_4);
// _2 = const foo(_3) -> [return: bb1, unwind: bb3];
// }
// bb1: {
// StorageDead(_3);
// EndRegion('14mce);
// EndRegion('14s);
// _0 = ();
// drop(_1) -> bb4;
// }
@ -53,7 +53,7 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// resume;
// }
// bb3: {
// EndRegion('14mce);
// EndRegion('14s);
// drop(_1) -> bb2;
// }
// bb4: {
@ -64,13 +64,13 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir
// START rustc.node18.SimplifyCfg-qualify-consts.after.mir
// fn main::{{closure}}(_1: [closure@NodeId(18) d:&'14mce D]) -> i32 {
// fn main::{{closure}}(_1: [closure@NodeId(18) d:&'14s D]) -> i32 {
// let mut _0: i32;
// let mut _2: i32;
//
// bb0: {
// StorageLive(_2);
// _2 = ((*(_1.0: &'14mce D)).0: i32);
// _2 = ((*(_1.0: &'14s D)).0: i32);
// _0 = _2;
// StorageDead(_2);
// return;

View file

@ -31,21 +31,21 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// let mut _0: ();
// let _1: D;
// let mut _2: ();
// let mut _3: [closure@NodeId(22) d:&'19mce D];
// let mut _4: &'19mce D;
// let mut _3: [closure@NodeId(22) d:&'19s D];
// let mut _4: &'19s D;
// bb0: {
// StorageLive(_1);
// _1 = D::{{constructor}}(const 0i32,);
// StorageLive(_3);
// StorageLive(_4);
// _4 = &'19mce _1;
// _4 = &'19s _1;
// _3 = [closure@NodeId(22)] { d: _4 };
// StorageDead(_4);
// _2 = const foo(_3) -> [return: bb1, unwind: bb3];
// }
// bb1: {
// StorageDead(_3);
// EndRegion('19mce);
// EndRegion('19s);
// _0 = ();
// drop(_1) -> bb4;
// }
@ -53,7 +53,7 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// resume;
// }
// bb3: {
// EndRegion('19mce);
// EndRegion('19s);
// drop(_1) -> bb2;
// }
// bb4: {
@ -63,20 +63,20 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir
// START rustc.node22.SimplifyCfg-qualify-consts.after.mir
// fn main::{{closure}}(_1: [closure@NodeId(22) d:&'19mce D]) -> i32 {
// fn main::{{closure}}(_1: [closure@NodeId(22) d:&'19s D]) -> i32 {
// let mut _0: i32;
// let _2: &'15_0rce D;
// let _2: &'15_0rs D;
// let mut _3: i32;
//
// bb0: {
// StorageLive(_2);
// _2 = &'15_0rce (*(_1.0: &'19mce D));
// _2 = &'15_0rs (*(_1.0: &'19s D));
// StorageLive(_3);
// _3 = ((*_2).0: i32);
// _0 = _3;
// StorageDead(_3);
// StorageDead(_2);
// EndRegion('15_0rce);
// EndRegion('15_0rs);
// return;
// }
// END rustc.node22.SimplifyCfg-qualify-consts.after.mir

View file

@ -74,18 +74,18 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// START rustc.node22.SimplifyCfg-qualify-consts.after.mir
// fn main::{{closure}}(_1: [closure@NodeId(22) d:D]) -> i32 {
// let mut _0: i32;
// let _2: &'15_0rce D;
// let _2: &'15_0rs D;
// let mut _3: i32;
//
// bb0: {
// StorageLive(_2);
// _2 = &'15_0rce (_1.0: D);
// _2 = &'15_0rs (_1.0: D);
// StorageLive(_3);
// _3 = ((*_2).0: i32);
// _0 = _3;
// StorageDead(_3);
// StorageDead(_2);
// EndRegion('15_0rce);
// EndRegion('15_0rs);
// drop(_1) -> bb1;
// }
// bb1: {

View file

@ -31,15 +31,15 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// fn main() -> () {
// let mut _0: ();
// let _1: D;
// let _2: &'21_1rce D;
// let _2: &'21_1rs D;
// let mut _3: ();
// let mut _4: [closure@NodeId(22) r:&'21_1rce D];
// let mut _5: &'21_1rce D;
// let mut _4: [closure@NodeId(22) r:&'21_1rs D];
// let mut _5: &'21_1rs D;
// bb0: {
// StorageLive(_1);
// _1 = D::{{constructor}}(const 0i32,);
// StorageLive(_2);
// _2 = &'21_1rce _1;
// _2 = &'21_1rs _1;
// StorageLive(_4);
// StorageLive(_5);
// _5 = _2;
@ -51,14 +51,14 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// StorageDead(_4);
// _0 = ();
// StorageDead(_2);
// EndRegion('21_1rce);
// EndRegion('21_1rs);
// drop(_1) -> bb4;
// }
// bb2: {
// resume;
// }
// bb3: {
// EndRegion('21_1rce);
// EndRegion('21_1rs);
// drop(_1) -> bb2;
// }
// bb4: {
@ -69,13 +69,13 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// END rustc.node4.SimplifyCfg-qualify-consts.after.mir
// START rustc.node22.SimplifyCfg-qualify-consts.after.mir
// fn main::{{closure}}(_1: [closure@NodeId(22) r:&'21_1rce D]) -> i32 {
// fn main::{{closure}}(_1: [closure@NodeId(22) r:&'21_1rs D]) -> i32 {
// let mut _0: i32;
// let mut _2: i32;
//
// bb0: {
// StorageLive(_2);
// _2 = ((*(_1.0: &'21_1rce D)).0: i32);
// _2 = ((*(_1.0: &'21_1rs D)).0: i32);
// _0 = _2;
// StorageDead(_2);
// return;

View file

@ -42,7 +42,7 @@ fn main() {
// let mut _0: ();
// let mut _1: bool;
// let _2: i32;
// let mut _4: &'13_0rce i32;
// let mut _4: &'13_0rs i32;
// let mut _3: ();
// let mut _5: !;
// let mut _6: ();
@ -68,14 +68,14 @@ fn main() {
// _0 = ();
// StorageDead(_7);
// StorageDead(_4);
// EndRegion('13_0rce);
// EndRegion('13_0rs);
// StorageDead(_2);
// StorageDead(_1);
// return;
// }
//
// bb3: {
// _4 = &'13_0rce _2;
// _4 = &'13_0rs _2;
// _6 = ();
// StorageDead(_7);
// _1 = const true;

View file

@ -30,14 +30,14 @@ fn main() { }
// scope 1 {
// let _2: std::cell::RefCell<i32>;
// }
// let mut _3: std::cell::RefMut<'17dce, i32>;
// let mut _4: &'17dce std::cell::RefCell<i32>;
// let mut _3: std::cell::RefMut<'17ds, i32>;
// let mut _4: &'17ds std::cell::RefCell<i32>;
//
// bb0: {
// StorageLive(_2);
// _2 = _1;
// StorageLive(_4);
// _4 = &'17dce _2;
// _4 = &'17ds _2;
// _3 = const <std::cell::RefCell<T>>::borrow_mut(_4) -> bb1;
// }
//
@ -47,7 +47,7 @@ fn main() { }
//
// bb2: {
// StorageDead(_4);
// EndRegion('17dce);
// EndRegion('17ds);
// _0 = ();
// StorageDead(_2);
// return;

View file

@ -37,19 +37,19 @@ fn main() {
// START rustc.node23.EraseRegions.after.mir
// fn main() -> () {
// bb0: {
// Validate(Suspend(ReScope(Misc(ItemLocalId(10)))), [_1: i32]);
// Validate(Suspend(ReScope(Node(ItemLocalId(10)))), [_1: i32]);
// _6 = &ReErased mut _1;
// Validate(Acquire, [(*_6): i32/ReScope(Misc(ItemLocalId(10)))]);
// Validate(Suspend(ReScope(Misc(ItemLocalId(10)))), [(*_6): i32/ReScope(Misc(ItemLocalId(10)))]);
// Validate(Acquire, [(*_6): i32/ReScope(Node(ItemLocalId(10)))]);
// Validate(Suspend(ReScope(Node(ItemLocalId(10)))), [(*_6): i32/ReScope(Node(ItemLocalId(10)))]);
// _5 = &ReErased mut (*_6);
// Validate(Acquire, [(*_5): i32/ReScope(Misc(ItemLocalId(10)))]);
// Validate(Release, [_2: (), _3: &ReScope(Misc(ItemLocalId(10))) Test, _5: &ReScope(Misc(ItemLocalId(10))) mut i32]);
// Validate(Acquire, [(*_5): i32/ReScope(Node(ItemLocalId(10)))]);
// Validate(Release, [_2: (), _3: &ReScope(Node(ItemLocalId(10))) Test, _5: &ReScope(Node(ItemLocalId(10))) mut i32]);
// _2 = const Test::foo(_3, _5) -> bb1;
// }
//
// bb1: {
// Validate(Acquire, [_2: ()]);
// EndRegion(ReScope(Misc(ItemLocalId(10))));
// EndRegion(ReScope(Node(ItemLocalId(10))));
// return;
// }
// }

View file

@ -32,17 +32,17 @@ fn main() {
// fn main() -> () {
// let mut _5: &ReErased i32;
// bb0: {
// Validate(Suspend(ReScope(Misc(ItemLocalId(17)))), [((*_2).0: i32): i32/ReScope(Remainder(BlockRemainder { block: ItemLocalId(19), first_statement_index: 3 })) (imm)]);
// Validate(Suspend(ReScope(Node(ItemLocalId(17)))), [((*_2).0: i32): i32/ReScope(Remainder(BlockRemainder { block: ItemLocalId(19), first_statement_index: 3 })) (imm)]);
// _5 = &ReErased ((*_2).0: i32);
// Validate(Acquire, [(*_5): i32/ReScope(Misc(ItemLocalId(17))) (imm)]);
// Validate(Suspend(ReScope(Misc(ItemLocalId(17)))), [(*_5): i32/ReScope(Misc(ItemLocalId(17))) (imm)]);
// Validate(Acquire, [(*_5): i32/ReScope(Node(ItemLocalId(17))) (imm)]);
// Validate(Suspend(ReScope(Node(ItemLocalId(17)))), [(*_5): i32/ReScope(Node(ItemLocalId(17))) (imm)]);
// _4 = &ReErased (*_5);
// Validate(Acquire, [(*_4): i32/ReScope(Misc(ItemLocalId(17))) (imm)]);
// Validate(Release, [_3: (), _4: &ReScope(Misc(ItemLocalId(17))) i32]);
// Validate(Acquire, [(*_4): i32/ReScope(Node(ItemLocalId(17))) (imm)]);
// Validate(Release, [_3: (), _4: &ReScope(Node(ItemLocalId(17))) i32]);
// _3 = const foo(_4) -> bb1;
// }
// bb1: {
// EndRegion(ReScope(Misc(ItemLocalId(17))));
// EndRegion(ReScope(Node(ItemLocalId(17))));
// EndRegion(ReScope(Remainder(BlockRemainder { block: ItemLocalId(19), first_statement_index: 3 })));
// return;
// }

View file

@ -50,12 +50,12 @@ fn main() {
// _3 = _2;
// StorageLive(_4);
// StorageLive(_5);
// Validate(Suspend(ReScope(Misc(ItemLocalId(9)))), [(*_3): i32]);
// Validate(Suspend(ReScope(Node(ItemLocalId(9)))), [(*_3): i32]);
// _5 = &ReErased mut (*_3);
// Validate(Acquire, [(*_5): i32/ReScope(Misc(ItemLocalId(9)))]);
// Validate(Acquire, [(*_5): i32/ReScope(Node(ItemLocalId(9)))]);
// _4 = _5 as *mut i32 (Misc);
// StorageDead(_5);
// EndRegion(ReScope(Misc(ItemLocalId(9))));
// EndRegion(ReScope(Node(ItemLocalId(9))));
// Validate(Release, [_0: bool, _4: *mut i32]);
// _0 = const write_42(_4) -> bb1;
// }