Skip to content

Commit

Permalink
Merge remote-tracking branch 'fork/master' into upstream-update
Browse files Browse the repository at this point in the history
  • Loading branch information
JustusAdam committed Aug 30, 2023
2 parents f3b27bb + 2a2d981 commit 570b634
Show file tree
Hide file tree
Showing 36 changed files with 874 additions and 720 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-04-12
toolchain: nightly-2023-08-25
components: rust-src, rustc-dev, llvm-tools-preview
target: ${{ matrix.target }}
profile: minimal
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
members = ["crates/*"]
exclude = ["ide/src/tests/mock_project"]
resolver = "2"

[profile.bench]
debug = true
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ The documentation is published here: https://willcrichton.net/flowistry/flowistr
## Usage

Note that the latest Flowistry has a [**Maximum** Supported Rust Version](https://github.com/cognitive-engineering-lab/rustc_plugin/tree/main#maximum-supported-rust-version) of **Rust 1.69**.
Flowistry is not guaranteed to work with features implemented after 1.69.
Note that the latest Flowistry has a [**Maximum** Supported Rust Version](https://github.com/cognitive-engineering-lab/rustc_plugin/tree/main#maximum-supported-rust-version) of **Rust 1.73**.
Flowistry is not guaranteed to work with features implemented after 1.73.

### Startup

Expand Down Expand Up @@ -182,7 +182,7 @@ If rustup fails, especially with an error like "could not rename downloaded file
To solve the issue, go to the command line and run:

```
rustup toolchain install nightly-2023-04-12 -c rust-src -c rustc-dev -c llvm-tools-preview
rustup toolchain install nightly-2023-08-25 -c rust-src -c rustc-dev -c llvm-tools-preview
```

Then go back to VSCode and click "Continue" to let Flowistry continue installing.
Expand Down
4 changes: 2 additions & 2 deletions crates/flowistry/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "flowistry"
version = "0.5.36"
version = "0.5.39"
edition = "2021"
authors = ["Will Crichton <[email protected]>"]
description = "Modular information flow analysis"
Expand All @@ -20,7 +20,7 @@ log = "0.4"
fluid-let = "1.0"
cfg-if = "1.0"
serde = {version = "1", features = ["derive"]}
rustc_utils = "0.6.0-nightly-2023-04-12"
rustc_utils = "0.7.0-nightly-2023-08-25"

# For local debugging
html-escape = {version = "0.2", optional = true}
Expand Down
13 changes: 9 additions & 4 deletions crates/flowistry/benches/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ extern crate rustc_driver;
extern crate rustc_hir;
extern crate rustc_interface;
extern crate rustc_middle;
use std::process::Command;
use std::{env::consts::DLL_SUFFIX, process::Command};

use anyhow::{Context, Result};
use criterion::{
criterion_group, criterion_main, measurement::WallTime, BenchmarkGroup, Criterion,
};
use flowistry::infoflow::Direction;
use glob::glob;
use rustc_borrowck::BodyWithBorrowckFacts;
use rustc_borrowck::consumers::BodyWithBorrowckFacts;
use rustc_hir::{BodyId, ItemKind};
use rustc_middle::{
mir::{Location, Place},
Expand Down Expand Up @@ -132,7 +132,7 @@ fn criterion_benchmark(c: &mut Criterion) {
let test_dir = curr_dir.join("../../../crates/flowistry/benches/tests");

// The shared object for the bench_utils crate should also be in deps/
let bench_crate_pattern = curr_dir.join("*libbench_utils*.so");
let bench_crate_pattern = curr_dir.join(format!("*libbench_utils*{}", DLL_SUFFIX));

let print_sysroot = Command::new("rustc")
.args(&["--print", "sysroot"])
Expand All @@ -144,7 +144,12 @@ fn criterion_benchmark(c: &mut Criterion) {
// Find bench_utils .so file
let shared_object = glob(bench_crate_pattern.to_str().unwrap())?
.nth(0)
.context("Failed to find bench_utils shared object")??;
.with_context(|| {
format!(
"Failed to find bench_utils shared object in dir {}",
curr_dir.display()
)
})??;

let mut run_bench = |test: (&str, &str)| {
// Stress types correspond to bench files within ./tests/
Expand Down
2 changes: 1 addition & 1 deletion crates/flowistry/examples/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern crate rustc_span;
use std::process::Command;

use flowistry::{indexed::impls::LocationOrArg, infoflow::Direction};
use rustc_borrowck::BodyWithBorrowckFacts;
use rustc_borrowck::consumers::BodyWithBorrowckFacts;
use rustc_hir::{BodyId, ItemKind};
use rustc_middle::{
mir::{Local, Place},
Expand Down
7 changes: 2 additions & 5 deletions crates/flowistry/src/indexed/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//! Therefore if we want to encode a set of locations (e.g. for the [`FlowDomain`](crate::infoflow::FlowDomain)),
//! then we can assign each `Location` a numeric index and use a compact bit-set instead of, say,
//! a hash set. Concretely, this means:
//! 1. Defining a type `LocationOrArgIndex` that implements the [`Idx`](rustc_index::vec::Idx) trait.
//! 1. Defining a type `LocationOrArgIndex` that implements the [`Idx`](rustc_index::Idx) trait.
//! 2. Creating a mapping ("domain") from `Location`s to `LocationOrArgIndex`.
//! 3. Constructing a `LocationSet` out of a [`BitSet`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_index/bit_set/struct.BitSet.html)`<LocationOrArgIndex>`.
//!
Expand All @@ -35,10 +35,7 @@ use std::{
};

use rustc_data_structures::fx::FxHashMap as HashMap;
use rustc_index::{
bit_set::BitSet,
vec::{Idx, IndexVec},
};
use rustc_index::{bit_set::BitSet, Idx, IndexVec};
use rustc_mir_dataflow::{fmt::DebugWithContext, JoinSemiLattice};

pub mod impls;
Expand Down
Loading

0 comments on commit 570b634

Please sign in to comment.