Changeset be945ac for src/GenPoly
- Timestamp:
- Jun 2, 2016, 11:51:07 AM (10 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, stuck-waitfor-destruct, with_gc
- Children:
- 2edd5502
- Parents:
- f1b1e4c (diff), 4df85197 (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
-
src/GenPoly/GenPoly.cc (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/GenPoly.cc
rf1b1e4c rbe945ac 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.