Skip to content

Commit

Permalink
Merge pull request #109 from albins/phase-1-initialization
Browse files Browse the repository at this point in the history
Phase 1 initialization
  • Loading branch information
nikomatsakis authored Jul 8, 2019
2 parents 3f122af + edc196c commit ce3a5c1
Show file tree
Hide file tree
Showing 3,247 changed files with 1,007,702 additions and 1,236 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 4 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polonius"
version = "0.4.0"
version = "0.5.0"
authors = ["The Rust Project Developers", "Polonius Developers"]
description = "Core definition for the Rust borrow checker"
license = "Apache-2.0/MIT"
Expand All @@ -20,7 +20,8 @@ failure = "0.1.1"
rustc-hash = "1.0.0"
structopt = "0.2.8"
clap = "2.31.2"
polonius-engine = {version = "0.8.0", path = "polonius-engine" }
polonius-engine = {version = "0.9.0", path = "polonius-engine" }
log = "0.4"
petgraph = "0.4.13"

[workspace]
17 changes: 17 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# polonius

## v0.6.0

- add a CLI option `--ignore-region-live-at` which ignores those facts and
recompute them using Polonius even if provided.
- missing `region_live_at.facts` is no longer an error.
- consistently use the logging crate for error and warning logging.

## v0.5.0

Add a CLI option `--dump-liveness-graph` to dump a Graphviz file with a
(reduced) liveness-related graph for debugging.

## v0.4.0

- adopt latest polonius-engine
Expand All @@ -17,6 +29,11 @@

# polonius-engine

## v0.9.0

- add the input `var_initialized_on_exit` which indicates if a variable may be
initialized at a given point and is used to compute drop-liveness.

## v0.8.0

- Polonius now performs liveness analysis to calculate `region_live_at`, if it
Expand Down
1 change: 1 addition & 0 deletions inputs/blog-exmple/nll-facts/foo/borrow_region.facts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"\'_#2r" "bw0" "Mid(bb0[4])"
19 changes: 19 additions & 0 deletions inputs/blog-exmple/nll-facts/foo/cfg_edge.facts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"Start(bb0[0])" "Mid(bb0[0])"
"Mid(bb0[0])" "Start(bb0[1])"
"Start(bb0[1])" "Mid(bb0[1])"
"Mid(bb0[1])" "Start(bb0[2])"
"Start(bb0[2])" "Mid(bb0[2])"
"Mid(bb0[2])" "Start(bb0[3])"
"Start(bb0[3])" "Mid(bb0[3])"
"Mid(bb0[3])" "Start(bb0[4])"
"Start(bb0[4])" "Mid(bb0[4])"
"Mid(bb0[4])" "Start(bb0[5])"
"Start(bb0[5])" "Mid(bb0[5])"
"Mid(bb0[5])" "Start(bb0[6])"
"Start(bb0[6])" "Mid(bb0[6])"
"Mid(bb0[6])" "Start(bb0[7])"
"Start(bb0[7])" "Mid(bb0[7])"
"Mid(bb0[7])" "Start(bb0[8])"
"Start(bb0[8])" "Mid(bb0[8])"
"Mid(bb0[8])" "Start(bb0[9])"
"Start(bb0[9])" "Mid(bb0[9])"
3 changes: 3 additions & 0 deletions inputs/blog-exmple/nll-facts/foo/invalidates.facts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"Start(bb0[1])" "bw0"
"Start(bb0[8])" "bw0"
"Start(bb0[9])" "bw0"
1 change: 1 addition & 0 deletions inputs/blog-exmple/nll-facts/foo/killed.facts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"bw0" "Mid(bb0[1])"
1 change: 1 addition & 0 deletions inputs/blog-exmple/nll-facts/foo/outlives.facts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"\'_#2r" "\'_#3r" "Mid(bb0[4])"
Empty file.
2 changes: 2 additions & 0 deletions inputs/blog-exmple/nll-facts/foo/universal_region.facts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"\'_#0r"
"\'_#1r"
7 changes: 7 additions & 0 deletions inputs/blog-exmple/nll-facts/foo/var_defined.facts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"_1" "Mid(bb0[0])"
"_1" "Mid(bb0[1])"
"_2" "Mid(bb0[3])"
"_2" "Mid(bb0[4])"
"_0" "Mid(bb0[6])"
"_2" "Mid(bb0[7])"
"_1" "Mid(bb0[8])"
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions inputs/blog-exmple/nll-facts/foo/var_used.facts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"_1" "Mid(bb0[2])"
"_1" "Mid(bb0[4])"
"_2" "Mid(bb0[5])"
1 change: 1 addition & 0 deletions inputs/blog-exmple/nll-facts/foo/var_uses_region.facts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"_2" "\'_#3r"
Empty file.
7 changes: 7 additions & 0 deletions inputs/blog-exmple/nll-facts/main/cfg_edge.facts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"Start(bb0[0])" "Mid(bb0[0])"
"Mid(bb0[0])" "Start(bb2[0])"
"Mid(bb0[0])" "Start(bb1[0])"
"Start(bb1[0])" "Mid(bb1[0])"
"Start(bb2[0])" "Mid(bb2[0])"
"Mid(bb2[0])" "Start(bb2[1])"
"Start(bb2[1])" "Mid(bb2[1])"
Empty file.
Empty file.
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions inputs/blog-exmple/nll-facts/main/universal_region.facts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"\'_#0r"
"\'_#1r"
2 changes: 2 additions & 0 deletions inputs/blog-exmple/nll-facts/main/var_defined.facts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"_1" "Mid(bb0[0])"
"_0" "Mid(bb2[0])"
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
14 changes: 9 additions & 5 deletions inputs/collect-facts.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#!/bin/bash

RUSTC_RELEASE="stage1"
RUSTC_ARGS="-Znll-facts -Zborrowck=mir -Ztwo-phase-borrows"
INPUT_FOLDERS="drop-liveness drop-may-dangle drop-no-may-dangle enum-drop-access issue-47680 issue-52059-report-when-borrow-and-drop-conflict maybe-initialized-drop maybe-initialized-drop-implicit-fragment-drop maybe-initialized-drop-uninitialized maybe-initialized-drop-with-fragment maybe-initialized-drop-with-uninitialized-fragments smoke-test vec-push-ref"
RUSTC_ARGS="-Znll-facts -Zborrowck=mir"
INPUT_FOLDERS=(drop-liveness drop-may-dangle drop-no-may-dangle enum-drop-access
issue-47680 issue-52059-report-when-borrow-and-drop-conflict
maybe-initialized-drop maybe-initialized-drop-implicit-fragment-drop
maybe-initialized-drop-uninitialized maybe-initialized-drop-with-fragment
maybe-initialized-drop-with-uninitialized-fragments smoke-test vec-push-ref)

for test_folder in $INPUT_FOLDERS;
for test_folder in "${INPUT_FOLDERS[@]}";
do
pushd $test_folder
rustc +$RUSTC_RELEASE $RUSTC_ARGS *.rs -o /dev/null
pushd "$test_folder"
rustc +$RUSTC_RELEASE $RUSTC_ARGS -o /dev/null -- *.rs
popd
done

8 changes: 4 additions & 4 deletions inputs/drop-liveness/nll-facts/main/var_defined.facts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
"_8" "Mid(bb6[1])"
"_6" "Mid(bb6[2])"
"_7" "Mid(bb7[0])"
"_18" "Mid(bb7[1])"
"_20" "Mid(bb7[1])"
"_19" "Mid(bb7[2])"
"_20" "Mid(bb7[3])"
"_18" "Mid(bb7[3])"
"_10" "Mid(bb7[4])"
"_5" "Mid(bb7[5])"
"_28" "Mid(bb7[6])"
Expand Down Expand Up @@ -91,9 +91,9 @@
"_29" "Mid(bb11[1])"
"_27" "Mid(bb11[2])"
"_28" "Mid(bb12[0])"
"_39" "Mid(bb12[1])"
"_41" "Mid(bb12[1])"
"_40" "Mid(bb12[2])"
"_41" "Mid(bb12[3])"
"_39" "Mid(bb12[3])"
"_31" "Mid(bb12[4])"
"_26" "Mid(bb12[5])"
"_0" "Mid(bb12[6])"
Expand Down
Loading

0 comments on commit ce3a5c1

Please sign in to comment.