Changeset 2435


Ignore:
Timestamp:
Oct 11, 2012, 4:37:05 PM (7 years ago)
Author:
ksherdy
Message:

Updated vistors to reflect current helpers.

Location:
proto/pablo/src/compiler/visitors
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/pablo/src/compiler/visitors/AdvanceCombiner.java

    r2415 r2435  
    7979        // given that node is an advance, what is the stream being advanced?
    8080        private ASTNode streamBeingAdvanced(FunctionInvocationNode node) {
    81                 assert isAdvance(node);
     81                assert Builtins.isAdvance(node);
    8282                return node.child(1);
    8383        }
    8484
    8585        private int advanceAmount(FunctionInvocationNode node) {
    86                 assert isAdvance(node);
     86                assert Builtins.isAdvance(node);
    8787                if(node.nChildren()==2) {
    8888                        return 1;
     
    9393       
    9494        private boolean isAdvanceOfAdvance(ASTNode node) {
    95                 if(!isAdvance(node))
     95                if(!Builtins.isAdvance(node))
    9696                        return false;
    9797       
    9898                ASTNode child = streamBeingAdvanced((FunctionInvocationNode) node);
    99                 return isAdvance(child);
    100         }
    101         private boolean isAdvance(ASTNode node) {
    102                 return Builtins.isAdvance(node);
     99                return Builtins.isAdvance(child);
    103100        }
    104101       
  • proto/pablo/src/compiler/visitors/AdvanceNCounter.java

    r2415 r2435  
    11package compiler.visitors;
    22
    3 import compiler.ast.Accessors;
    43import compiler.lang.pablo.builtins.Builtins;
    54import ast.*;
     
    2625
    2726                public void visitLeave(FunctionInvocationNode node) {
    28                         if(Builtins.isAdvanceN(node)) {
     27                        if(Builtins.isCarryN(node)) {
    2928                            this.advNCount += 1;
    3029                        }
Note: See TracChangeset for help on using the changeset viewer.