Changeset 3bb195cb
- Timestamp:
- Aug 8, 2016, 3:44:56 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, 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:
- ce76eb9
- Parents:
- 752dc70
- Location:
- src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/GenPoly/Box.cc ¶
r752dc70 r3bb195cb 104 104 Type *replaceWithConcrete( ApplicationExpr *appExpr, Type *type, bool doClone = true ); 105 105 /// wraps a function application returning a polymorphic type with a new temporary for the out-parameter return value 106 Expression *add PolyRetParam( ApplicationExpr *appExpr, FunctionType *function, ReferenceToType *polyType, std::list< Expression *>::iterator &arg );106 Expression *addDynRetParam( ApplicationExpr *appExpr, FunctionType *function, ReferenceToType *polyType, std::list< Expression *>::iterator &arg ); 107 107 Expression *applyAdapter( ApplicationExpr *appExpr, FunctionType *function, std::list< Expression *>::iterator &arg, const TyVarMap &exprTyVars ); 108 108 void boxParam( Type *formal, Expression *&arg, const TyVarMap &exprTyVars ); … … 661 661 // process polymorphic return value 662 662 retval = 0; 663 if ( is PolyRet( functionDecl->get_functionType() ) && functionDecl->get_linkage() == LinkageSpec::Cforall ) {663 if ( isDynRet( functionDecl->get_functionType() ) && functionDecl->get_linkage() == LinkageSpec::Cforall ) { 664 664 retval = functionDecl->get_functionType()->get_returnVals().front(); 665 665 … … 868 868 } 869 869 870 Expression *Pass1::add PolyRetParam( ApplicationExpr *appExpr, FunctionType *function, ReferenceToType *polyType, std::list< Expression *>::iterator &arg ) {870 Expression *Pass1::addDynRetParam( ApplicationExpr *appExpr, FunctionType *function, ReferenceToType *dynType, std::list< Expression *>::iterator &arg ) { 871 871 assert( env ); 872 Type *concrete = replaceWithConcrete( appExpr, polyType );872 Type *concrete = replaceWithConcrete( appExpr, dynType ); 873 873 // add out-parameter for return value 874 874 return addRetParam( appExpr, function, concrete, arg ); … … 877 877 Expression *Pass1::applyAdapter( ApplicationExpr *appExpr, FunctionType *function, std::list< Expression *>::iterator &arg, const TyVarMap &tyVars ) { 878 878 Expression *ret = appExpr; 879 if ( ! function->get_returnVals().empty() && isPolyType( function->get_returnVals().front()->get_type(), tyVars ) ) { 879 // if ( ! function->get_returnVals().empty() && isPolyType( function->get_returnVals().front()->get_type(), tyVars ) ) { 880 if ( isDynRet( function, tyVars ) ) { 880 881 ret = addRetParam( appExpr, function, function->get_returnVals().front()->get_type(), arg ); 881 882 } // if … … 968 969 // actually make the adapter type 969 970 FunctionType *adapter = adaptee->clone(); 970 if ( ! adapter->get_returnVals().empty() && isPolyType( adapter->get_returnVals().front()->get_type(), tyVars ) ) { 971 // if ( ! adapter->get_returnVals().empty() && isPolyType( adapter->get_returnVals().front()->get_type(), tyVars ) ) { 972 if ( isDynRet( adapter, tyVars ) ) { 971 973 makeRetParm( adapter ); 972 974 } // if … … 1030 1032 addAdapterParams( adapteeApp, arg, param, adapterType->get_parameters().end(), realParam, tyVars ); 1031 1033 bodyStmt = new ExprStmt( noLabels, adapteeApp ); 1032 } else if ( isPolyType( adaptee->get_returnVals().front()->get_type(), tyVars ) ) { 1034 // } else if ( isPolyType( adaptee->get_returnVals().front()->get_type(), tyVars ) ) { 1035 } else if ( isDynType( adaptee->get_returnVals().front()->get_type(), tyVars ) ) { 1033 1036 // return type T 1034 1037 if ( (*param)->get_name() == "" ) { … … 1277 1280 TyVarMap exprTyVars( (TypeDecl::Kind)-1 ); 1278 1281 makeTyVarMap( function, exprTyVars ); 1279 ReferenceToType * polyRetType = isPolyRet( function);1280 1281 if ( polyRetType ) {1282 ret = add PolyRetParam( appExpr, function, polyRetType, arg );1282 ReferenceToType *dynRetType = isDynRet( function, exprTyVars ); 1283 1284 if ( dynRetType ) { 1285 ret = addDynRetParam( appExpr, function, dynRetType, arg ); 1283 1286 } else if ( needsAdapter( function, scopeTyVars ) ) { 1284 1287 // std::cerr << "needs adapter: "; … … 1290 1293 arg = appExpr->get_args().begin(); 1291 1294 1292 passTypeVars( appExpr, polyRetType, arg, exprTyVars );1295 passTypeVars( appExpr, dynRetType, arg, exprTyVars ); 1293 1296 addInferredParams( appExpr, function, arg, exprTyVars ); 1294 1297 … … 1577 1580 1578 1581 // move polymorphic return type to parameter list 1579 if ( is PolyRet( funcType ) ) {1582 if ( isDynRet( funcType ) ) { 1580 1583 DeclarationWithType *ret = funcType->get_returnVals().front(); 1581 1584 ret->set_type( new PointerType( Type::Qualifiers(), ret->get_type() ) ); … … 2051 2054 2052 2055 DeclClass *ret = static_cast< DeclClass *>( Mutator::mutate( decl ) ); 2053 ScrubTyVars::scrub ( decl, scopeTyVars );2056 ScrubTyVars::scrubDynamic( decl, scopeTyVars ); 2054 2057 2055 2058 scopeTyVars.endScope(); -
TabularUnified src/GenPoly/GenPoly.cc ¶
r752dc70 r3bb195cb 23 23 24 24 namespace GenPoly { 25 bool needsAdapter( FunctionType *adaptee, const TyVarMap &tyVars ) {26 if ( ! adaptee->get_returnVals().empty() && isPolyType( adaptee->get_returnVals().front()->get_type(), tyVars ) ) {27 return true;28 } // if29 for ( std::list< DeclarationWithType* >::const_iterator innerArg = adaptee->get_parameters().begin(); innerArg != adaptee->get_parameters().end(); ++innerArg ) {30 if ( isPolyType( (*innerArg)->get_type(), tyVars ) ) {31 return true;32 } // if33 } // for34 return false;35 }36 37 ReferenceToType *isPolyRet( FunctionType *function ) {38 if ( ! function->get_returnVals().empty() ) {39 TyVarMap forallTypes( (TypeDecl::Kind)-1 );40 makeTyVarMap( function, forallTypes );41 return (ReferenceToType*)isPolyType( function->get_returnVals().front()->get_type(), forallTypes );42 } // if43 return 0;44 }45 46 25 namespace { 47 26 /// Checks a parameter list for polymorphic parameters; will substitute according to env if present … … 64 43 return false; 65 44 } 45 46 /// Checks a parameter list for dynamic-layout parameters from tyVars; will substitute according to env if present 47 bool hasDynParams( std::list< Expression* >& params, const TyVarMap &tyVars, const TypeSubstitution *env ) { 48 for ( std::list< Expression* >::iterator param = params.begin(); param != params.end(); ++param ) { 49 TypeExpr *paramType = dynamic_cast< TypeExpr* >( *param ); 50 assert(paramType && "Aggregate parameters should be type expressions"); 51 if ( isDynType( paramType->get_type(), tyVars, env ) ) return true; 52 } 53 return false; 54 } 66 55 } 67 56 … … 101 90 } 102 91 return 0; 92 } 93 94 Type *isDynType( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env ) { 95 type = replaceTypeInst( type, env ); 96 97 if ( TypeInstType *typeInst = dynamic_cast< TypeInstType * >( type ) ) { 98 auto var = tyVars.find( typeInst->get_name() ); 99 if ( var != tyVars.end() && var->second == TypeDecl::Any ) { 100 return type; 101 } 102 } else if ( StructInstType *structType = dynamic_cast< StructInstType* >( type ) ) { 103 if ( hasDynParams( structType->get_parameters(), tyVars, env ) ) return type; 104 } else if ( UnionInstType *unionType = dynamic_cast< UnionInstType* >( type ) ) { 105 if ( hasDynParams( unionType->get_parameters(), tyVars, env ) ) return type; 106 } 107 return 0; 108 } 109 110 ReferenceToType *isDynRet( FunctionType *function, const TyVarMap &forallTypes ) { 111 if ( function->get_returnVals().empty() ) return 0; 112 113 return (ReferenceToType*)isDynType( function->get_returnVals().front()->get_type(), forallTypes ); 114 } 115 116 ReferenceToType *isDynRet( FunctionType *function ) { 117 if ( function->get_returnVals().empty() ) return 0; 118 119 TyVarMap forallTypes( (TypeDecl::Kind)-1 ); 120 makeTyVarMap( function, forallTypes ); 121 return (ReferenceToType*)isDynType( function->get_returnVals().front()->get_type(), forallTypes ); 122 } 123 124 bool needsAdapter( FunctionType *adaptee, const TyVarMap &tyVars ) { 125 // if ( ! adaptee->get_returnVals().empty() && isPolyType( adaptee->get_returnVals().front()->get_type(), tyVars ) ) { 126 // return true; 127 // } // if 128 if ( isDynRet( adaptee, tyVars ) ) return true; 129 130 for ( std::list< DeclarationWithType* >::const_iterator innerArg = adaptee->get_parameters().begin(); innerArg != adaptee->get_parameters().end(); ++innerArg ) { 131 // if ( isPolyType( (*innerArg)->get_type(), tyVars ) ) { 132 if ( isDynType( (*innerArg)->get_type(), tyVars ) ) { 133 return true; 134 } // if 135 } // for 136 return false; 103 137 } 104 138 -
TabularUnified src/GenPoly/GenPoly.h ¶
r752dc70 r3bb195cb 31 31 namespace GenPoly { 32 32 typedef ErasableScopedMap< std::string, TypeDecl::Kind > TyVarMap; 33 34 /// A function needs an adapter if it returns a polymorphic value or if any of its35 /// parameters have polymorphic type36 bool needsAdapter( FunctionType *adaptee, const TyVarMap &tyVarr );37 38 /// true iff function has polymorphic return type39 ReferenceToType *isPolyRet( FunctionType *function );40 33 41 34 /// Replaces a TypeInstType by its referrent in the environment, if applicable … … 47 40 /// returns polymorphic type if is polymorphic type in tyVars, NULL otherwise; will look up substitution in env if provided 48 41 Type *isPolyType( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env = 0 ); 42 43 /// returns dynamic-layout type if is dynamic-layout type in tyVars, NULL otherwise; will look up substitution in env if provided 44 Type *isDynType( Type *type, const TyVarMap &tyVars, const TypeSubstitution *env = 0 ); 45 46 /// true iff function has dynamic-layout return type under the given type variable map 47 ReferenceToType *isDynRet( FunctionType *function, const TyVarMap &tyVars ); 48 49 /// true iff function has dynamic-layout return type under the type variable map generated from its forall-parameters 50 ReferenceToType *isDynRet( FunctionType *function ); 51 52 /// A function needs an adapter if it returns a dynamic-layout value or if any of its parameters have dynamic-layout type 53 bool needsAdapter( FunctionType *adaptee, const TyVarMap &tyVarr ); 49 54 50 55 /// returns polymorphic type if is pointer to polymorphic type, NULL otherwise; will look up substitution in env if provided -
TabularUnified src/GenPoly/InstantiateGeneric.cc ¶
r752dc70 r3bb195cb 24 24 #include "GenPoly.h" 25 25 #include "ScopedMap.h" 26 #include "ScopedSet.h" 26 27 27 28 #include "ResolvExpr/typeops.h" … … 122 123 } 123 124 }; 125 126 /// Possible options for a given specialization of a generic type 127 enum class genericType { 128 dtypeStatic, ///< Concrete instantiation based solely on {d,f}type-to-void conversions 129 concrete, ///< Concrete instantiation requiring at least one parameter type 130 dynamic ///< No concrete instantiation 131 }; 132 133 genericType& operator |= ( genericType& gt, const genericType& ht ) { 134 switch ( gt ) { 135 case genericType::dtypeStatic: 136 gt = ht; 137 break; 138 case genericType::concrete: 139 if ( ht == genericType::dynamic ) { gt = genericType::dynamic; } 140 break; 141 case genericType::dynamic: 142 // nothing possible 143 break; 144 } 145 return gt; 146 } 124 147 125 148 /// Mutator pass that replaces concrete instantiations of generic types with actual struct declarations, scoped appropriately … … 127 150 /// Map of (generic type, parameter list) pairs to concrete type instantiations 128 151 InstantiationMap< AggregateDecl, AggregateDecl > instantiations; 152 /// Set of types which are dtype-only generic (and therefore have static layout) 153 ScopedSet< AggregateDecl* > dtypeStatics; 129 154 /// Namer for concrete types 130 155 UniqueName typeNamer; 131 156 132 157 public: 133 GenericInstantiator() : DeclMutator(), instantiations(), typeNamer("_conc_") {}158 GenericInstantiator() : DeclMutator(), instantiations(), dtypeStatics(), typeNamer("_conc_") {} 134 159 135 160 virtual Type* mutate( StructInstType *inst ); … … 147 172 /// Wrap instantiation insertion for unions 148 173 void insert( UnionInstType *inst, const std::list< TypeExpr* > &typeSubs, UnionDecl *decl ) { instantiations.insert( inst->get_baseUnion(), typeSubs, decl ); } 174 175 /// If this is an instance of a type already determined to be dtype-static, strips the instances's type parameters and returns true 176 bool stripInstParams( AggregateDecl *base, ReferenceToType *inst ); 177 178 /// Strips a dtype-static aggregate decl of its type parameters, marks it as stripped 179 void stripDtypeParams( AggregateDecl *base, std::list< TypeDecl* >& baseParams, const std::list< TypeExpr* >& typeSubs ); 149 180 }; 150 181 … … 154 185 } 155 186 156 //////////////////////////////////////// GenericInstantiator ////////////////////////////////////////////////// 157 158 /// Possible options for a given specialization of a generic type 159 enum class genericType { 160 dtypeStatic, ///< Concrete instantiation based solely on {d,f}type-to-void conversions 161 concrete, ///< Concrete instantiation requiring at least one parameter type 162 dynamic ///< No concrete instantiation 163 }; 164 165 genericType& operator |= ( genericType& gt, const genericType& ht ) { 166 switch ( gt ) { 167 case genericType::dtypeStatic: 168 gt = ht; 169 break; 170 case genericType::concrete: 171 if ( ht == genericType::dynamic ) { gt = genericType::dynamic; } 172 break; 173 case genericType::dynamic: 174 // nothing possible 175 break; 176 } 177 return gt; 178 } 179 180 /// Makes substitutions of params into baseParams; returns true if all parameters substituted for a concrete type 187 /// Makes substitutions of params into baseParams; returns dtypeStatic if there is a concrete instantiation based only on {d,f}type-to-void conversions, 188 /// concrete if there is a concrete instantiation requiring at least one parameter type, and dynamic if there is no concrete instantiation 181 189 genericType makeSubstitutions( const std::list< TypeDecl* >& baseParams, const std::list< Expression* >& params, std::list< TypeExpr* >& out ) { 182 190 genericType gt = genericType::dtypeStatic; … … 223 231 } 224 232 233 /// Substitutes types of members according to baseParams => typeSubs, working in-place 234 void substituteMembers( std::list< Declaration* >& members, const std::list< TypeDecl* >& baseParams, const std::list< TypeExpr* >& typeSubs ) { 235 // substitute types into new members 236 TypeSubstitution subs( baseParams.begin(), baseParams.end(), typeSubs.begin() ); 237 for ( std::list< Declaration* >::iterator member = members.begin(); member != members.end(); ++member ) { 238 subs.apply(*member); 239 } 240 } 241 242 bool GenericInstantiator::stripInstParams( AggregateDecl *base, ReferenceToType *inst ) { 243 if ( dtypeStatics.find( base ) == dtypeStatics.end() ) return false; 244 245 deleteAll( inst->get_parameters() ); 246 inst->get_parameters().clear(); 247 248 return true; 249 } 250 251 void GenericInstantiator::stripDtypeParams( AggregateDecl *base, std::list< TypeDecl* >& baseParams, const std::list< TypeExpr* >& typeSubs ) { 252 substituteMembers( base->get_members(), baseParams, typeSubs ); 253 254 deleteAll( baseParams ); 255 baseParams.clear(); 256 257 dtypeStatics.insert( base ); 258 } 259 225 260 Type* GenericInstantiator::mutate( StructInstType *inst ) { 226 261 // mutate subtypes … … 231 266 // exit early if no need for further mutation 232 267 if ( inst->get_parameters().empty() ) return inst; 268 269 // check for an already-instantiatiated dtype-static type 270 if ( stripInstParams( inst->get_baseStruct(), inst ) ) return inst; 271 272 // check if type can be concretely instantiated; put substitutions into typeSubs 233 273 assert( inst->get_baseParameters() && "Base struct has parameters" ); 234 235 // check if type can be concretely instantiated; put substitutions into typeSubs236 274 std::list< TypeExpr* > typeSubs; 237 275 genericType gt = makeSubstitutions( *inst->get_baseParameters(), inst->get_parameters(), typeSubs ); 238 276 switch ( gt ) { 239 case genericType::dtypeStatic: // TODO strip params off original decl and reuse here 240 case genericType::concrete: 241 { 277 case genericType::dtypeStatic: 278 stripDtypeParams( inst->get_baseStruct(), *inst->get_baseParameters(), typeSubs ); 279 break; 280 281 case genericType::concrete: { 242 282 // make concrete instantiation of generic type 243 283 StructDecl *concDecl = lookup( inst, typeSubs ); … … 274 314 // exit early if no need for further mutation 275 315 if ( inst->get_parameters().empty() ) return inst; 316 317 // check for an already-instantiatiated dtype-static type 318 if ( stripInstParams( inst->get_baseUnion(), inst ) ) return inst; 319 320 // check if type can be concretely instantiated; put substitutions into typeSubs 276 321 assert( inst->get_baseParameters() && "Base union has parameters" ); 277 278 // check if type can be concretely instantiated; put substitutions into typeSubs279 322 std::list< TypeExpr* > typeSubs; 280 323 genericType gt = makeSubstitutions( *inst->get_baseParameters(), inst->get_parameters(), typeSubs ); 281 324 switch ( gt ) { 282 case genericType::dtypeStatic: // TODO strip params off original decls and reuse here 325 case genericType::dtypeStatic: 326 stripDtypeParams( inst->get_baseUnion(), *inst->get_baseParameters(), typeSubs ); 327 break; 328 283 329 case genericType::concrete: 284 330 { … … 311 357 DeclMutator::doBeginScope(); 312 358 instantiations.beginScope(); 359 dtypeStatics.beginScope(); 313 360 } 314 361 … … 316 363 DeclMutator::doEndScope(); 317 364 instantiations.endScope(); 365 dtypeStatics.endScope(); 318 366 } 319 367 -
TabularUnified src/GenPoly/ScrubTyVars.cc ¶
r752dc70 r3bb195cb 45 45 46 46 Type * ScrubTyVars::mutateAggregateType( Type *ty ) { 47 if ( isPolyType( ty, tyVars) ) {47 if ( shouldScrub( ty ) ) { 48 48 PointerType *ret = new PointerType( Type::Qualifiers(), new VoidType( ty->get_qualifiers() ) ); 49 49 delete ty; … … 63 63 Expression * ScrubTyVars::mutate( SizeofExpr *szeof ) { 64 64 // sizeof( T ) => _sizeof_T parameter, which is the size of T 65 if ( Type * polyType = isPolyType( szeof->get_type() ) ) {66 Expression *expr = new NameExpr( sizeofName( mangleType( polyType ) ) );65 if ( Type *dynType = shouldScrub( szeof->get_type() ) ) { 66 Expression *expr = new NameExpr( sizeofName( mangleType( dynType ) ) ); 67 67 return expr; 68 68 } else { … … 73 73 Expression * ScrubTyVars::mutate( AlignofExpr *algnof ) { 74 74 // alignof( T ) => _alignof_T parameter, which is the alignment of T 75 if ( Type * polyType = isPolyType( algnof->get_type() ) ) {76 Expression *expr = new NameExpr( alignofName( mangleType( polyType ) ) );75 if ( Type *dynType = shouldScrub( algnof->get_type() ) ) { 76 Expression *expr = new NameExpr( alignofName( mangleType( dynType ) ) ); 77 77 return expr; 78 78 } else { … … 82 82 83 83 Type * ScrubTyVars::mutate( PointerType *pointer ) { 84 if ( Type *polyType = isPolyType( pointer->get_base(), tyVars ) ) { 85 Type *ret = polyType->acceptMutator( *this ); 84 // // special case of shouldScrub that takes all TypeInstType pointer bases, even if they're not dynamic 85 // Type *base = pointer->get_base(); 86 // Type *dynType = 0; 87 // if ( dynamicOnly ) { 88 // if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( base ) ) { 89 // if ( tyVars.find( typeInst->get_name() ) != tyVars.end() ) { dynType = typeInst; } 90 // } else { 91 // dynType = isDynType( base, tyVars ); 92 // } 93 // } else { 94 // dynType = isPolyType( base, tyVars ); 95 // } 96 // if ( dynType ) { 97 if ( Type *dynType = shouldScrub( pointer->get_base() ) ) { 98 Type *ret = dynType->acceptMutator( *this ); 86 99 ret->get_qualifiers() += pointer->get_qualifiers(); 87 100 pointer->set_base( 0 ); -
TabularUnified src/GenPoly/ScrubTyVars.h ¶
r752dc70 r3bb195cb 27 27 class ScrubTyVars : public Mutator { 28 28 public: 29 ScrubTyVars( const TyVarMap &tyVars ): tyVars( tyVars) {}29 ScrubTyVars( const TyVarMap &tyVars, bool dynamicOnly = false ): tyVars( tyVars ), dynamicOnly( dynamicOnly ) {} 30 30 31 31 /// For all polymorphic types with type variables in `tyVars`, replaces generic types, dtypes, and ftypes with the appropriate void type, … … 33 33 template< typename SynTreeClass > 34 34 static SynTreeClass *scrub( SynTreeClass *target, const TyVarMap &tyVars ); 35 36 /// For all dynamic-layout types with type variables in `tyVars`, replaces generic types, dtypes, and ftypes with the appropriate void type, 37 /// and sizeof/alignof expressions with the proper variable 38 template< typename SynTreeClass > 39 static SynTreeClass *scrubDynamic( SynTreeClass *target, const TyVarMap &tyVars ); 35 40 36 41 virtual Type* mutate( TypeInstType *typeInst ); … … 42 47 43 48 private: 49 /// Returns the type if it should be scrubbed, NULL otherwise. 50 Type* shouldScrub( Type *ty ) { 51 return dynamicOnly ? isDynType( ty, tyVars ) : isPolyType( ty, tyVars ); 52 // if ( ! dynamicOnly ) return isPolyType( ty, tyVars ); 53 // 54 // if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( ty ) ) { 55 // return tyVars.find( typeInst->get_name() ) != tyVars.end() ? ty : 0; 56 // } 57 // 58 // return isDynType( ty, tyVars ); 59 } 60 44 61 /// Mutates (possibly generic) aggregate types appropriately 45 62 Type* mutateAggregateType( Type *ty ); 46 63 47 const TyVarMap &tyVars; 64 const TyVarMap &tyVars; ///< Type variables to scrub 65 bool dynamicOnly; ///< only scrub the types with dynamic layout? [false] 48 66 }; 49 67 50 /* static class method */51 68 template< typename SynTreeClass > 52 69 SynTreeClass * ScrubTyVars::scrub( SynTreeClass *target, const TyVarMap &tyVars ) { 53 70 ScrubTyVars scrubber( tyVars ); 71 return static_cast< SynTreeClass * >( target->acceptMutator( scrubber ) ); 72 } 73 74 template< typename SynTreeClass > 75 SynTreeClass * ScrubTyVars::scrubDynamic( SynTreeClass *target, const TyVarMap &tyVars ) { 76 ScrubTyVars scrubber( tyVars, true ); 54 77 return static_cast< SynTreeClass * >( target->acceptMutator( scrubber ) ); 55 78 } -
TabularUnified src/SymTab/Autogen.cc ¶
r752dc70 r3bb195cb 174 174 175 175 void makeStructMemberOp( ObjectDecl * dstParam, Expression * src, DeclarationWithType * field, FunctionDecl * func, TypeSubstitution & genericSubs, bool isDynamicLayout, bool forward = true ) { 176 if ( isDynamicLayout && src ) {177 genericSubs.apply( src );178 }176 // if ( isDynamicLayout && src ) { 177 // genericSubs.apply( src ); 178 // } 179 179 180 180 ObjectDecl * returnVal = NULL;
Note: See TracChangeset
for help on using the changeset viewer.