Changeset 8bf784a for src/Tuples
- Timestamp:
- Dec 21, 2016, 2:54:31 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:
- e33f321
- Parents:
- 6d4d1a6
- Location:
- src/Tuples
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Tuples/TupleExpansion.cc ¶
r6d4d1a6 r8bf784a 318 318 } 319 319 320 TypeInstType * isTtype( Type * type ) { 321 if ( TypeInstType * inst = dynamic_cast< TypeInstType * >( type ) ) { 322 if ( inst->get_baseType()->get_kind() == TypeDecl::Ttype ) { 323 return inst; 324 } 325 } 326 return nullptr; 327 } 328 320 329 namespace { 321 330 /// determines if impurity (read: side-effects) may exist in a piece of code. Currently gives a very crude approximation, wherein any function call expression means the code may be impure -
TabularUnified src/Tuples/Tuples.h ¶
r6d4d1a6 r8bf784a 42 42 Type * makeTupleType( const std::list< Expression * > & exprs ); 43 43 44 /// returns a TypeInstType if `type` is a ttype, nullptr otherwise 45 TypeInstType * isTtype( Type * type ); 46 44 47 /// returns true if the expression may contain side-effects. 45 48 bool maybeImpure( Expression * expr );
Note: See TracChangeset
for help on using the changeset viewer.