Changeset 24de7b1 for src/SynTree
- Timestamp:
- Apr 16, 2018, 3:21:17 PM (6 years ago)
- Branches:
- new-env, with_gc
- Children:
- fb97252f
- Parents:
- 6f81db3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/GcTracer.h
r6f81db3 r24de7b1 38 38 void previsit( BaseSyntaxNode * node ) { 39 39 // skip tree if already seen 40 // xxx - this should be uncommented (it breaks object cycles), but at the moment it seems 41 // like the object cycles don't happen and other bugs do 42 // if ( node->mark == gc.mark ) { 43 // visit_children = false; 44 // return; 45 // } 40 if ( node->mark == gc.mark ) { 41 visit_children = false; 42 return; 43 } 46 44 47 45 // mark node … … 50 48 51 49 // add visits left out by PassVisitor 50 51 void postvisit( Constant* con ) { 52 maybeAccept( con->get_type(), *visitor ); 53 } 52 54 53 55 void postvisit( Expression* expr ) { … … 58 60 postvisit( static_cast<Expression*>(expr) ); 59 61 maybeAccept( expr->function, *visitor ); 62 } 63 64 void postvisit( VariableExpr* expr ) { 65 postvisit( static_cast<Expression*>(expr) ); 66 maybeAccept( expr->var, *visitor ); // not in PassVisitor because it causes cycle 60 67 } 61 68
Note: See TracChangeset
for help on using the changeset viewer.