Ignore:
Timestamp:
Apr 25, 2018, 3:42:34 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env, with_gc
Children:
1cdfa82
Parents:
5af7306
Message:

Assorted GC bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/GcTracer.h

    r5af7306 r2efe4b8  
    2020#include "BaseSyntaxNode.h"
    2121#include "Expression.h"
     22#include "Label.h"
    2223#include "Type.h"
    2324
     
    5354        }
    5455
     56        void postvisit( AggregateDecl* decl ) {
     57                acceptAll( decl->attributes, *visitor );
     58        }
     59
    5560        void postvisit( DeclarationWithType* decl ) {
    5661                maybeAccept( decl->asmName, *visitor );
     
    7378        }
    7479
     80        void postvisit( UniqueExpr* expr ) {
     81                postvisit( static_cast<Expression*>(expr) );
     82                maybeAccept( expr->object, *visitor );
     83                maybeAccept( expr->var, *visitor );
     84        }
     85
    7586        void postvisit( UntypedExpr* expr ) {
    7687                postvisit( static_cast<Expression*>(expr) );
     
    8192                postvisit( static_cast<Expression*>(expr) );
    8293                maybeAccept( expr->var, *visitor );  // not in PassVisitor because it causes cycle
     94        }
     95
     96private:
     97        void visit( Label& lbl ) {
     98                acceptAll( lbl.get_attributes(), *visitor );
     99                maybeAccept( lbl.get_statement(), *visitor );  // xxx - not sure this is needed...
     100        }
     101
     102public:
     103        void postvisit( Statement* stmt ) {
     104                for ( Label& l : stmt->labels ) {
     105                        visit( l );
     106                }
    83107        }
    84108
Note: See TracChangeset for help on using the changeset viewer.