Skip to content

Commit

Permalink
refactor(hydroflow_plus): move rewrites to a submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
shadaj committed Nov 6, 2024
1 parent e4e08b3 commit 0bd71d7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion hydroflow_plus/src/builder/built.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl<'a> BuiltFlow<'a> {
}

pub fn with_default_optimize(self) -> BuiltFlow<'a> {
self.optimize_with(crate::persist_pullup::persist_pullup)
self.optimize_with(crate::rewrites::persist_pullup::persist_pullup)
}

fn into_deploy<D: LocalDeploy<'a>>(mut self) -> DeployFlow<'a, D> {
Expand Down
5 changes: 1 addition & 4 deletions hydroflow_plus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ pub use builder::FlowBuilder;

pub mod ir;

pub mod persist_pullup;
pub mod profiler;

pub mod properties;
pub mod rewrites;

mod staging_util;

Expand Down
3 changes: 3 additions & 0 deletions hydroflow_plus/src/rewrites/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub mod persist_pullup;
pub mod profiler;
pub mod properties;
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ use std::cell::RefCell;
use hydroflow::futures::channel::mpsc::UnboundedSender;
use stageleft::*;

use super::profiler as myself; // TODO(shadaj): stageleft does not support `self::...`
use crate::ir::*;
use crate::{profiler as myself, RuntimeContext};
use crate::RuntimeContext;

pub fn increment_counter(count: &mut u64) {
*count += 1;
Expand Down
File renamed without changes.

0 comments on commit 0bd71d7

Please sign in to comment.