]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/profiling/BranchPoint.java
77b8f80ef7f99abf25fd83062c17331b9d60b26c
[simantics/platform.git] / bundles / org.simantics.scl.runtime / src / org / simantics / scl / runtime / profiling / BranchPoint.java
1 package org.simantics.scl.runtime.profiling;
2
3 public class BranchPoint {
4     public static final BranchPoint[] EMPTY_ARRAY = new BranchPoint[0];
5     
6     public final long location;
7     public final int codeSize;
8     public final BranchPoint[] children;
9     
10     public int visitCounter;
11
12     public BranchPoint(long location, int codeSize, BranchPoint[] children) {
13         this.location = location;
14         this.codeSize = codeSize;
15         this.children = children;
16     }
17     
18     public void resetVisitCountersRecursively() {
19         visitCounter = 0;
20         for(BranchPoint branchPoint : children)
21             branchPoint.resetVisitCountersRecursively();
22     }
23 }