Changes in src/Tuples/TupleExpansion.cc [fd642d2:3ca912a]
- File:
-
- 1 edited
-
src/Tuples/TupleExpansion.cc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/TupleExpansion.cc
rfd642d2 r3ca912a 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Fri Jul 19 14:39:00201913 // Update Count : 2 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 13 18:14:12 2019 13 // Update Count : 21 14 14 // 15 15 … … 350 350 } 351 351 352 const TypeInstType * isTtype( const Type * type ) {353 if ( const TypeInstType * inst = dynamic_cast< const TypeInstType * >( type ) ) {354 if ( inst->baseType && inst->baseType->kind == TypeDecl::Ttype ) {355 return inst;356 }357 }358 return nullptr;359 }360 361 352 const ast::TypeInstType * isTtype( const ast::Type * type ) { 362 353 if ( const ast::TypeInstType * inst = dynamic_cast< const ast::TypeInstType * >( type ) ) { … … 373 364 ImpurityDetector( bool ignoreUnique ) : ignoreUnique( ignoreUnique ) {} 374 365 375 void previsit( constApplicationExpr * appExpr ) {366 void previsit( ApplicationExpr * appExpr ) { 376 367 visit_children = false; 377 if ( constDeclarationWithType * function = InitTweak::getFunction( appExpr ) ) {378 if ( function-> linkage== LinkageSpec::Intrinsic ) {379 if ( function-> name == "*?" || function->name== "?[?]" ) {368 if ( DeclarationWithType * function = InitTweak::getFunction( appExpr ) ) { 369 if ( function->get_linkage() == LinkageSpec::Intrinsic ) { 370 if ( function->get_name() == "*?" || function->get_name() == "?[?]" ) { 380 371 // intrinsic dereference, subscript are pure, but need to recursively look for impurity 381 372 visit_children = true; … … 386 377 maybeImpure = true; 387 378 } 388 void previsit( constUntypedExpr * ) { maybeImpure = true; visit_children = false; }389 void previsit( constUniqueExpr * ) {379 void previsit( UntypedExpr * ) { maybeImpure = true; visit_children = false; } 380 void previsit( UniqueExpr * ) { 390 381 if ( ignoreUnique ) { 391 382 // bottom out at unique expression. … … 402 393 } // namespace 403 394 404 bool maybeImpure( constExpression * expr ) {395 bool maybeImpure( Expression * expr ) { 405 396 PassVisitor<ImpurityDetector> detector( false ); 406 397 expr->accept( detector ); … … 408 399 } 409 400 410 bool maybeImpureIgnoreUnique( constExpression * expr ) {401 bool maybeImpureIgnoreUnique( Expression * expr ) { 411 402 PassVisitor<ImpurityDetector> detector( true ); 412 403 expr->accept( detector );
Note:
See TracChangeset
for help on using the changeset viewer.