Changeset e580aa5 for src/Tuples/Tuples.h
- Timestamp:
- Nov 16, 2023, 3:31:57 PM (9 months ago)
- Branches:
- master
- Children:
- b0845f9
- Parents:
- 3f4f30a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/Tuples.h
r3f4f30a re580aa5 24 24 25 25 namespace Tuples { 26 // TupleAssignment.cc27 void handleTupleAssignment(28 ResolvExpr::CandidateFinder & finder, const ast::UntypedExpr * assign,29 std::vector< ResolvExpr::CandidateFinder > & args );30 26 31 // TupleExpansion.cc 32 /// expands z.[a, b.[x, y], c] into [z.a, z.b.x, z.b.y, z.c], inserting UniqueExprs as appropriate 33 void expandMemberTuples( ast::TranslationUnit & translationUnit ); 27 // TupleAssignment.cc 28 void handleTupleAssignment( 29 ResolvExpr::CandidateFinder & finder, const ast::UntypedExpr * assign, 30 std::vector< ResolvExpr::CandidateFinder > & args ); 34 31 35 /// replaces tuple-related elements, such as TupleType, TupleExpr, TupleAssignExpr, etc. 36 void expandTuples( ast::TranslationUnit & translaionUnit ); 32 // TupleExpansion.cc 33 /// Expands z.[a, b.[x, y], c] into [z.a, z.b.x, z.b.y, z.c], inserting UniqueExprs as appropriate. 34 void expandMemberTuples( ast::TranslationUnit & translationUnit ); 37 35 38 /// replaces UniqueExprs with a temporary variable and one call 39 void expandUniqueExpr( ast::TranslationUnit & translationUnit );36 /// Replaces tuple-related elements, such as TupleType, TupleExpr, TupleAssignExpr, etc. 37 void expandTuples( ast::TranslationUnit & translaionUnit ); 40 38 41 /// returns VoidType if any of the expressions have Voidtype, otherwise TupleType of the Expression result types 42 const ast::Type * makeTupleType( const std::vector<ast::ptr<ast::Expr>> & exprs);39 /// Replaces UniqueExprs with a temporary variable and one call. 40 void expandUniqueExpr( ast::TranslationUnit & translationUnit ); 43 41 44 /// returns a TypeInstType if `type` is a ttype, nullptr otherwise 45 const ast::TypeInstType * isTtype( const ast::Type * type);42 /// Returns VoidType if any of the expressions have Voidtype, otherwise TupleType of the Expression result types. 43 const ast::Type * makeTupleType( const std::vector<ast::ptr<ast::Expr>> & exprs ); 46 44 47 /// returns true if the expression may contain side-effects. 48 bool maybeImpure( const ast::Expr * expr);45 /// Returns a TypeInstType if `type` is a ttype, nullptr otherwise 46 const ast::TypeInstType * isTtype( const ast::Type * type ); 49 47 50 /// Returns true if the expression may contain side-effect, 51 /// ignoring the presence of unique expressions. 52 bool maybeImpureIgnoreUnique( const ast::Expr * expr ); 48 /// Returns true if the expression may contain side-effects. 49 bool maybeImpure( const ast::Expr * expr ); 50 51 /// Returns true if the expression may contain side-effect, 52 /// ignoring the presence of unique expressions. 53 bool maybeImpureIgnoreUnique( const ast::Expr * expr ); 54 53 55 } // namespace Tuples 54 56
Note: See TracChangeset
for help on using the changeset viewer.