Skip to content

Commit

Permalink
rename regions to origins in dump and program
Browse files Browse the repository at this point in the history
  • Loading branch information
lqd committed Sep 19, 2019
1 parent 9878307 commit 2babd16
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ fn build_outputs_by_point_for_visualization(
),
facts_by_point(
output.restricts.iter(),
|(point, region_to_loans)| (*point, region_to_loans.clone()),
|(point, origin_to_loans)| (*point, origin_to_loans.clone()),
"restricts".to_string(),
0,
intern,
Expand All @@ -465,7 +465,7 @@ fn build_outputs_by_point_for_visualization(
),
facts_by_point(
output.subset.iter(),
|(point, region_to_regions)| (*point, region_to_regions.clone()),
|(point, origin_to_origins)| (*point, origin_to_origins.clone()),
"subset".to_string(),
0,
intern,
Expand Down
14 changes: 7 additions & 7 deletions src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ fn emit_fact(facts: &mut Facts, fact: &Fact, point: Point, tables: &mut Interner
// facts: outlives(Origin, Origin, Point)
Fact::Outlives { ref a, ref b } => {
// outlives: a `outlives` occurs on Mid points
let region_a = tables.origins.intern(a);
let region_b = tables.origins.intern(b);
let origin_a = tables.origins.intern(a);
let origin_b = tables.origins.intern(b);

facts.outlives.insert((region_a, region_b, point));
facts.outlives.insert((origin_a, origin_b, point));
}

// facts: killed(Loan, Point)
Expand Down Expand Up @@ -288,12 +288,12 @@ mod tests {

assert_eq!(facts.outlives.len(), 1);
{
let region_a = tables.origins.untern(facts.outlives[0].0);
let region_b = tables.origins.untern(facts.outlives[0].1);
let origin_a = tables.origins.untern(facts.outlives[0].0);
let origin_b = tables.origins.untern(facts.outlives[0].1);
let point = tables.points.untern(facts.outlives[0].2);

assert_eq!(region_a, "'a");
assert_eq!(region_b, "'b");
assert_eq!(origin_a, "'a");
assert_eq!(origin_b, "'b");
assert_eq!(point, "\"Mid(B1[0])\"");
}

Expand Down

0 comments on commit 2babd16

Please sign in to comment.