--- /dev/null
+package org.simantics.scl.runtime.profiling;
+
+public class BranchPoint {
+ public static final BranchPoint[] EMPTY_ARRAY = new BranchPoint[0];
+
+ public final long location;
+ public final int codeSize;
+ public final BranchPoint[] children;
+
+ public int visitCounter;
+
+ public BranchPoint(long location, int codeSize, BranchPoint[] children) {
+ this.location = location;
+ this.codeSize = codeSize;
+ this.children = children;
+ }
+
+ public void resetVisitCountersRecursively() {
+ visitCounter = 0;
+ for(BranchPoint branchPoint : children)
+ branchPoint.resetVisitCountersRecursively();
+ }
+}