Skip to content

Commit 4f8c894

Browse files
committed
Rebased with parallel passes
1 parent e909f92 commit 4f8c894

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/graph/builder/Fluent.kt

-4
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,13 @@ fun LanguageFrontend<*, *>.translationResult(
5050
node.addComponent(component)
5151
init(node)
5252

53-
<<<<<<< HEAD
5453
if (ctx.config.useParallelPasses) {
5554
for (list in ctx.config.registeredPasses) {
5655
executePassesInParallel(list, ctx, node, listOf())
5756
}
5857
} else {
5958
ctx.config.registeredPasses.flatten().forEach { executePass(it, ctx, node, listOf()) }
6059
}
61-
=======
62-
ctx.config.registeredPasses.flatten().forEach { executePassSequential(it, ctx, node, listOf()) }
63-
>>>>>>> 0dc5b459c (Experimental support to run passes in parallel)
6460

6561
return node
6662
}

Diff for: cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/ControlFlowSensitiveDFGPass.kt

+6-2
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,17 @@ open class ControlFlowSensitiveDFGPass(ctx: TranslationContext) : EOGStarterPass
111111
// elements. We have the indices here, so it's amazing.
112112
key.elements.forEachIndexed { i, element ->
113113
element.addAllPrevDFG(
114-
value.elements.filterNot { it is VariableDeclaration && key == it },
114+
value.elements.filterNot {
115+
(it is VariableDeclaration || it is ParameterDeclaration) && key == it
116+
},
115117
mutableMapOf(Properties.INDEX to i)
116118
)
117119
}
118120
} else {
119121
key.addAllPrevDFG(
120-
value.elements.filterNot { it is VariableDeclaration && key == it }
122+
value.elements.filterNot {
123+
(it is VariableDeclaration || it is ParameterDeclaration) && key == it
124+
}
121125
)
122126
}
123127
}

0 commit comments

Comments
 (0)