Changeset 83de11e for src/GenPoly
- Timestamp:
- Jun 1, 2016, 5:58:15 PM (9 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, with_gc
- Children:
- 4df85197
- Parents:
- 677c1be
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/GenPoly/GenPoly.cc ¶
r677c1be r83de11e 64 64 return false; 65 65 } 66 66 67 67 /// Replaces a TypeInstType by its referrent in the environment, if applicable 68 68 Type* replaceTypeInst( Type* type, const TypeSubstitution* env ) { … … 78 78 Type *isPolyType( Type *type, const TypeSubstitution *env ) { 79 79 type = replaceTypeInst( type, env ); 80 80 81 81 if ( TypeInstType *typeInst = dynamic_cast< TypeInstType * >( type ) ) { 82 82 return type; … … 91 91 Type *isPolyType( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env ) { 92 92 type = replaceTypeInst( type, env ); 93 93 94 94 if ( TypeInstType *typeInst = dynamic_cast< TypeInstType * >( type ) ) { 95 95 if ( tyVars.find( typeInst->get_name() ) != tyVars.end() ) { … … 106 106 Type *isPolyPtr( Type *type, const TypeSubstitution *env ) { 107 107 type = replaceTypeInst( type, env ); 108 108 109 109 if ( PointerType *ptr = dynamic_cast< PointerType *>( type ) ) { 110 110 return isPolyType( ptr->get_base(), env ); … … 115 115 Type *isPolyPtr( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env ) { 116 116 type = replaceTypeInst( type, env ); 117 117 118 118 if ( PointerType *ptr = dynamic_cast< PointerType *>( type ) ) { 119 119 return isPolyType( ptr->get_base(), tyVars, env ); … … 129 129 while ( true ) { 130 130 type = replaceTypeInst( type, env ); 131 131 132 132 if ( PointerType *ptr = dynamic_cast< PointerType *>( type ) ) { 133 133 type = ptr->get_base(); … … 146 146 while ( true ) { 147 147 type = replaceTypeInst( type, env ); 148 148 149 149 if ( PointerType *ptr = dynamic_cast< PointerType *>( type ) ) { 150 150 type = ptr->get_base();
Note: See TracChangeset
for help on using the changeset viewer.