SSA: Add locations to ease debugging

This commit is contained in:
Tom Hvitved
2023-11-21 20:27:14 +01:00
parent 2c5ce3216e
commit 1a6886cf99
15 changed files with 61 additions and 42 deletions

View File

@@ -61,11 +61,9 @@ private predicate closureFlowStep(Expr e1, Expr e2) {
)
}
private module CaptureInput implements VariableCapture::InputSig {
private module CaptureInput implements VariableCapture::InputSig<Location> {
private import java as J
class Location = J::Location;
class BasicBlock instanceof J::BasicBlock {
string toString() { result = super.toString() }
@@ -146,7 +144,7 @@ class CapturedVariable = CaptureInput::CapturedVariable;
class CapturedParameter = CaptureInput::CapturedParameter;
module CaptureFlow = VariableCapture::Flow<CaptureInput>;
module CaptureFlow = VariableCapture::Flow<Location, CaptureInput>;
private CaptureFlow::ClosureNode asClosureNode(Node n) {
result = n.(CaptureNode).getSynthesizedCaptureNode()