Skip to content

Commit 5742fa1

Browse files
committed
refactor(dfir_lang): remove stratum from chain, chain_first_n
PR: #2967
1 parent 8a2b324 commit 5742fa1

2 files changed

Lines changed: 4 additions & 18 deletions

File tree

dfir_lang/src/graph/ops/chain.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
use crate::graph::PortIndexValue;
2-
31
use super::{
4-
DelayType, OperatorCategory, OperatorConstraints, RANGE_0, RANGE_1
2+
OperatorCategory, OperatorConstraints, RANGE_0, RANGE_1
53
};
64

75
/// > 2 input streams of the same type, 1 output stream of the same type
@@ -32,11 +30,6 @@ pub const CHAIN: OperatorConstraints = OperatorConstraints {
3230
flo_type: None,
3331
ports_inn: None,
3432
ports_out: None,
35-
input_delaytype_fn: |idx| match idx {
36-
PortIndexValue::Int(idx) if idx.value == 0 => {
37-
Some(DelayType::Stratum)
38-
}
39-
_else => None,
40-
},
33+
input_delaytype_fn: |_| None,
4134
write_fn: super::union::UNION.write_fn,
4235
};

dfir_lang/src/graph/ops/chain_first_n.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
use quote::quote_spanned;
22

33
use crate::graph::{
4-
PortIndexValue,
54
ops::{OperatorWriteOutput, WriteContextArgs},
65
};
76

8-
use super::{DelayType, OperatorCategory, OperatorConstraints, RANGE_0, RANGE_1};
7+
use super::{OperatorCategory, OperatorConstraints, RANGE_0, RANGE_1};
98

109
/// > 2 input streams of the same type, 1 output stream of the same type
1110
///
@@ -36,13 +35,7 @@ pub const CHAIN_FIRST_N: OperatorConstraints = OperatorConstraints {
3635
flo_type: None,
3736
ports_inn: None,
3837
ports_out: None,
39-
input_delaytype_fn: |idx| match idx {
40-
PortIndexValue::Int(idx) if idx.value == 0 => {
41-
// will no longer be needed once subgraphs are always DAGs (only run once per tick)
42-
Some(DelayType::Stratum)
43-
}
44-
_else => None,
45-
},
38+
input_delaytype_fn: |_| None,
4639
write_fn: |wc @ &WriteContextArgs {
4740
root,
4841
op_span,

0 commit comments

Comments
 (0)