Ignore:
Timestamp:
Oct 29, 2019 1:59:02 PM (7 weeks ago)
Author:
jwedin
Message:

Changed so that node count dumping is done on the root node instead of statically on ASTNode. Refactored some fields to no longer be static. Changed so that DSSets are given their id in the constructor. #5865

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-jw-2590/Compiler/ModelicaMiddleEnd/src/jastadd/structural/DynamicStates.jrag

    r13357 r13900  
    263263    public class IndexReductionBiPGraph {
    264264        public static class DSSet {
    265             private static Enumerator e = new Enumerator();
    266265            public final Set<IndexReductionEq> eqns = new LinkedHashSet<IndexReductionEq>();
    267266            public final Set<IndexReductionVar> vars = new LinkedHashSet<IndexReductionVar>();
    268             public final int id = e.next();
     267            public final int id;
    269268            public FExp[][] coefficients;
     269
     270            public DSSet(int id) {
     271                this.id = id;
     272            }
    270273           
    271274            public String toString() {
     
    309312                worklist.add(eqn);
    310313        }
     314
     315        Enumerator enumerator = new Enumerator();
    311316        while (!worklist.isEmpty()) {
    312317            IndexReductionEq eqn = worklist.poll();
     
    324329            DSSet set = dsLookup.get(eqn);
    325330            if (set == null)
    326                 set = new DSSet();
     331                set = new DSSet(enumerator.next());
    327332            Collection<IndexReductionEq> otherEqns = new ArrayList<IndexReductionEq>();
    328333            ASTNode.log.debug("    Path not found, set %d", set.id);
Note: See TracChangeset for help on using the changeset viewer.