Skip to content

Instantly share code, notes, and snippets.

@nikomatsakis
Created April 10, 2018 00:37
Show Gist options
  • Save nikomatsakis/f9310391430983869d6fcdbc6dbb2065 to your computer and use it in GitHub Desktop.
Save nikomatsakis/f9310391430983869d6fcdbc6dbb2065 to your computer and use it in GitHub Desktop.
pub(super) fn timely_dataflow(all_facts: AllFacts) -> LiveBorrowResults {
timely::execute_from_args(vec![].into_iter(), {
let result = result.clone();
move |worker| {
worker.dataflow::<(), _, _>(|scope| {
macro_rules! make_collections {
($($facts:expr,)*) => {
(
$(Collection::<_, _, isize>::new(
$facts
.to_stream(scope)
.map(|datum| (datum, Default::default(), 1)),
),)*
)
}
}
let (borrow_region, next_statement, goto, region_live_on_entry, killed, outlives) = make_collections! {
my_facts.borrow_region,
my_facts.next_statement,
my_facts.goto,
my_facts.region_live_on_entry,
my_facts.killed,
my_facts.outlives,
};
});
}
}).unwrap();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment