Changeset ab8c6a6 for src/GenPoly


Ignore:
Timestamp:
Oct 26, 2020, 12:17:28 PM (4 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
342be43
Parents:
912cc7d7
Message:

Thread Cancellation, a test for it and a required fix to Specialization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Specialize.cc

    r912cc7d7 rab8c6a6  
    321321        }
    322322
     323        // Fold it into Specialize if we find a good way.
     324        struct StaticThunks final : public WithShortCircuiting {
     325                void previsit( Declaration * ) {
     326                        visit_children = false;
     327                }
     328                void postvisit( FunctionDecl * decl ) {
     329                        if ( isPrefix( decl->name, "_thunk" ) ) {
     330                                decl->storageClasses.is_static = true;
     331                        }
     332                }
     333        };
     334
    323335        void convertSpecializations( std::list< Declaration* >& translationUnit ) {
    324336                PassVisitor<Specialize> spec;
    325337                mutateAll( translationUnit, spec );
     338                PassVisitor<StaticThunks> staticThunks;
     339                acceptAll( translationUnit, staticThunks );
    326340        }
    327341} // namespace GenPoly
Note: See TracChangeset for help on using the changeset viewer.