Changeset 4156 for proto/s2k


Ignore:
Timestamp:
Sep 13, 2014, 3:13:28 AM (5 years ago)
Author:
ksherdy
Message:

Updated Symbol Table logic.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/s2k/trunk/framework/src/toolchain/s2k/transformer/visitors/S2K2S2K/CombineScopes.java

    r3822 r4156  
    22 * Creates a single function-level scope.
    33 *
    4  * (1) Substitutes mangled name for each non-mangled name.
    5  * (2) Splits variable declarations with initialisations.
    6  * (3) Moves block-level variable declarations to the function-level scope.
     4 * (1) Splits variable declarations with initialisations.
     5 * (2) Installs Symbol Tables.
     6 * (3) Substitutes mangled name for each non-mangled name.
     7 * (4) Moves block-level variable declarations to the function-level scope.
    78 *     
    8  * TODO - KH: Move to b2k on implementation. Applied at each level.
     9 * TODO - KH: Move to b2k on implementation? Applied at each level.
    910 *
    1011 * @author Ken Herdy <ksherdy at sfu dot ca>
     
    118119       
    119120        public void visitLeave(IdentifierNode node) {
    120             // KH: logic, if hasMangledName, substitute mangled name for normal name
    121             if(node.getParent() instanceof FilterDefNode) {
     121            // KH: logic, if hasMangledName, substitute mangled name for normal name
     122            if(node.getParent() instanceof GraphDefNode) {
     123                // no action               
     124            } else if(node.getParent() instanceof StructDeclNode) {
     125                // no action
     126            } else if(node.getParent() instanceof FilterDeclNode) {
     127                // no action
     128            } else if(node.getParent() instanceof AddFilterStmtNode) {
     129                // no action
     130            } else if(node.getParent() instanceof AddFilterArgListNode) {
     131                // no action
     132            } else if(node.getParent() instanceof FilterTypeNode) {
     133                // no action
     134            } else if(node.getParent() instanceof FilterDefNode) {
    122135                // no action
    123136            } else if (node.getParent() instanceof FilterParameterNode) {
     
    133146            } else if (node.getParent() instanceof FuncCallNode) {
    134147                // no action
    135             } else if (Accessors.name(node).startsWith("carry_set")) {  // TODO - KH: remove on move of Semantic Analysis to b2k
    136                 // no action
    137             } else if (Accessors.name(node).equals("EOF_mask")) {       // TODO - KH: remove on move of Semantic Analysis to b2k
     148            } else if (Accessors.name(node).startsWith("carry_set")) {  // TODO - KH: remove and move of Semantic Analysis to b2k
     149                // no action
     150            } else if (Accessors.name(node).equals("EOF_mask")) {       // TODO - KH: remove and move of Semantic Analysis to b2k
    138151                // no action
    139152            } else {
Note: See TracChangeset for help on using the changeset viewer.