Changes in src/Tuples/Tuples.h [c6b4432:b507dcd]
- File:
-
- 1 edited
-
src/Tuples/Tuples.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/Tuples.h
rc6b4432 rb507dcd 21 21 #include "AST/Fwd.hpp" 22 22 #include "AST/Node.hpp" 23 #include "SynTree/Expression.h" 24 #include "SynTree/Declaration.h" 25 #include "SynTree/Type.h" 26 27 #include "ResolvExpr/AlternativeFinder.h" 23 28 #include "ResolvExpr/CandidateFinder.hpp" 24 29 25 30 namespace Tuples { 26 31 // TupleAssignment.cc 32 void handleTupleAssignment( ResolvExpr::AlternativeFinder & currentFinder, UntypedExpr * assign, 33 std::vector< ResolvExpr::AlternativeFinder >& args ); 27 34 void handleTupleAssignment( 28 35 ResolvExpr::CandidateFinder & finder, const ast::UntypedExpr * assign, … … 31 38 // TupleExpansion.cc 32 39 /// expands z.[a, b.[x, y], c] into [z.a, z.b.x, z.b.y, z.c], inserting UniqueExprs as appropriate 40 void expandMemberTuples( std::list< Declaration * > & translationUnit ); 33 41 void expandMemberTuples( ast::TranslationUnit & translationUnit ); 34 42 35 43 /// replaces tuple-related elements, such as TupleType, TupleExpr, TupleAssignExpr, etc. 44 void expandTuples( std::list< Declaration * > & translationUnit ); 36 45 void expandTuples( ast::TranslationUnit & translaionUnit ); 37 46 38 47 /// replaces UniqueExprs with a temporary variable and one call 48 void expandUniqueExpr( std::list< Declaration * > & translationUnit ); 39 49 void expandUniqueExpr( ast::TranslationUnit & translationUnit ); 40 50 41 51 /// returns VoidType if any of the expressions have Voidtype, otherwise TupleType of the Expression result types 52 Type * makeTupleType( const std::list< Expression * > & exprs ); 42 53 const ast::Type * makeTupleType( const std::vector<ast::ptr<ast::Expr>> & exprs ); 43 54 44 55 /// returns a TypeInstType if `type` is a ttype, nullptr otherwise 56 TypeInstType * isTtype( Type * type ); 57 const TypeInstType * isTtype( const Type * type ); 45 58 const ast::TypeInstType * isTtype( const ast::Type * type ); 46 59 47 60 /// returns true if the expression may contain side-effects. 61 bool maybeImpure( const Expression * expr ); 48 62 bool maybeImpure( const ast::Expr * expr ); 49 63 50 64 /// Returns true if the expression may contain side-effect, 51 65 /// ignoring the presence of unique expressions. 66 bool maybeImpureIgnoreUnique( const Expression * expr ); 52 67 bool maybeImpureIgnoreUnique( const ast::Expr * expr ); 53 68 } // namespace Tuples
Note:
See TracChangeset
for help on using the changeset viewer.