Changeset 4389966 for src/GenPoly/ScrubTyVars.h
- Timestamp:
- Dec 15, 2015, 4:14:01 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 5f6c42c
- Parents:
- cf16f94 (diff), 78dd0da (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/ScrubTyVars.h
rcf16f94 r4389966 17 17 #define _SCRUBTYVARS_H 18 18 19 #include <string> 20 19 21 #include "GenPoly.h" 20 22 … … 26 28 public: 27 29 ScrubTyVars( bool doAll, const TyVarMap &tyVars ): doAll( doAll ), tyVars( tyVars ) {} 28 30 31 /// Like scrub( SynTreeClass* ), but only applies to type variables in `tyVars` 29 32 template< typename SynTreeClass > 30 33 static SynTreeClass *scrub( SynTreeClass *target, const TyVarMap &tyVars ); 34 /// Replaces dtypes and ftypes with the appropriate void type, and sizeof expressions of polymorphic types with the proper variable 31 35 template< typename SynTreeClass > 32 36 static SynTreeClass *scrub( SynTreeClass *target ); … … 34 38 virtual Type* mutate( TypeInstType *typeInst ); 35 39 Expression* mutate( SizeofExpr *szeof ); 40 Expression* mutate( AlignofExpr *algnof ); 36 41 virtual Type* mutate( PointerType *pointer ); 37 42 private: … … 54 59 return static_cast< SynTreeClass* >( target->acceptMutator( scrubber ) ); 55 60 } 61 62 /// Gets the name of the sizeof parameter for the type 63 std::string sizeofName( Type *ty ); 64 65 /// Gets the name of the alignof parameter for the type 66 std::string alignofName( Type *ty ); 56 67 } // namespace GenPoly 57 68
Note: See TracChangeset
for help on using the changeset viewer.