Changeset b7b8674 for src/Tuples
- Timestamp:
- Feb 8, 2017, 5:04:20 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- aa9ee19
- Parents:
- 52c14b3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/TupleExpansion.cc
r52c14b3 rb7b8674 29 29 #include "ResolvExpr/typeops.h" 30 30 #include "InitTweak/GenInit.h" 31 #include "InitTweak/InitTweak.h" 31 32 32 33 namespace Tuples { … … 337 338 public: 338 339 typedef Visitor Parent; 339 virtual void visit( ApplicationExpr * appExpr ) { maybeImpure = true; } 340 virtual void visit( ApplicationExpr * appExpr ) { 341 if ( DeclarationWithType * function = InitTweak::getFunction( appExpr ) ) { 342 if ( function->get_linkage() == LinkageSpec::Intrinsic ) { 343 if ( function->get_name() == "*?" || function->get_name() == "?[?]" ) { 344 // intrinsic dereference, subscript are pure, but need to recursively look for impurity 345 Parent::visit( appExpr ); 346 return; 347 } 348 } 349 } 350 maybeImpure = true; 351 } 340 352 virtual void visit( UntypedExpr * untypedExpr ) { maybeImpure = true; } 341 353 bool maybeImpure = false;
Note: See TracChangeset
for help on using the changeset viewer.