From 53d8c38ea3a9e45ff8b45d589ab7c889a81bd1de Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Sat, 12 Aug 2023 15:49:19 -0700 Subject: [PATCH 1/2] Make ExtendedNode and Label public again --- .../org/checkerframework/dataflow/cfg/builder/ExtendedNode.java | 2 +- .../java/org/checkerframework/dataflow/cfg/builder/Label.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/ExtendedNode.java b/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/ExtendedNode.java index 3236658c308..122b6c6b465 100644 --- a/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/ExtendedNode.java +++ b/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/ExtendedNode.java @@ -20,7 +20,7 @@ * */ @SuppressWarnings("nullness") // TODO -/*package-private*/ abstract class ExtendedNode { +abstract class ExtendedNode { /** The basic block this extended node belongs to (as determined in phase two). */ protected BlockImpl block; diff --git a/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/Label.java b/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/Label.java index 535f4709f07..f751073e161 100644 --- a/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/Label.java +++ b/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/Label.java @@ -5,7 +5,7 @@ * Labels get their names either from labeled statements in the source code or from internally * generated unique names. */ -/*package-private*/ class Label { +class Label { /** Unique id counter that incremented in {@code #uniqueName}. */ private static int uid = 0; From a82bbf586126410e6583b94216a1e8316c3a8274 Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Sat, 12 Aug 2023 15:54:16 -0700 Subject: [PATCH 2/2] add comment --- .../checkerframework/dataflow/cfg/builder/ExtendedNode.java | 3 +++ .../java/org/checkerframework/dataflow/cfg/builder/Label.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/ExtendedNode.java b/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/ExtendedNode.java index 122b6c6b465..0d65204d7e8 100644 --- a/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/ExtendedNode.java +++ b/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/ExtendedNode.java @@ -18,6 +18,9 @@ *
  • TWO_TARGET_CONDITIONAL_JUMP: {@link ConditionalJump}. A conditional jump with two * targets for both the 'then' and 'else' branch. * + * + * Note that this class is deliberately public, to enable users of the dataflow library to customize + * CFG construction. */ @SuppressWarnings("nullness") // TODO abstract class ExtendedNode { diff --git a/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/Label.java b/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/Label.java index f751073e161..5834eac7de8 100644 --- a/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/Label.java +++ b/dataflow/src/main/java/org/checkerframework/dataflow/cfg/builder/Label.java @@ -4,6 +4,9 @@ * A label is used to refer to other extended nodes using a mapping from labels to extended nodes. * Labels get their names either from labeled statements in the source code or from internally * generated unique names. + * + *

    Note that this class is deliberately public, to enable users of the dataflow library to + * customize CFG construction. */ class Label {