Changes in src/InitTweak/InitTweak.cc [549c006:7fc7cdb]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
r549c006 r7fc7cdb 270 270 } 271 271 272 Type * getT ypeofThis( FunctionType * ftype ) {273 assertf( ftype, "getT ypeofThis: nullptr ftype" );274 ObjectDecl * thisParam = get ParamThis( ftype );272 Type * getThisType( FunctionType * ftype ) { 273 assertf( ftype, "getThisType: nullptr ftype" ); 274 ObjectDecl * thisParam = getThisParam( ftype ); 275 275 ReferenceType * refType = strict_dynamic_cast< ReferenceType * >( thisParam->type ); 276 276 return refType->base; 277 277 } 278 278 279 ObjectDecl * get ParamThis( FunctionType * ftype ) {280 assertf( ftype, "get ParamThis: nullptr ftype" );279 ObjectDecl * getThisParam( FunctionType * ftype ) { 280 assertf( ftype, "getThisParam: nullptr ftype" ); 281 281 auto & params = ftype->parameters; 282 assertf( ! params.empty(), "get ParamThis: ftype with 0 parameters: %s", toString( ftype ).c_str() );282 assertf( ! params.empty(), "getThisParam: ftype with 0 parameters: %s", toString( ftype ).c_str() ); 283 283 return strict_dynamic_cast< ObjectDecl * >( params.front() ); 284 284 }
Note: See TracChangeset
for help on using the changeset viewer.