Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/Tuples.h

    rc6b4432 rb507dcd  
    2121#include "AST/Fwd.hpp"
    2222#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"
    2328#include "ResolvExpr/CandidateFinder.hpp"
    2429
    2530namespace Tuples {
    2631        // TupleAssignment.cc
     32        void handleTupleAssignment( ResolvExpr::AlternativeFinder & currentFinder, UntypedExpr * assign,
     33                std::vector< ResolvExpr::AlternativeFinder >& args );
    2734        void handleTupleAssignment(
    2835                ResolvExpr::CandidateFinder & finder, const ast::UntypedExpr * assign,
     
    3138        // TupleExpansion.cc
    3239        /// 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 );
    3341        void expandMemberTuples( ast::TranslationUnit & translationUnit );
    3442
    3543        /// replaces tuple-related elements, such as TupleType, TupleExpr, TupleAssignExpr, etc.
     44        void expandTuples( std::list< Declaration * > & translationUnit );
    3645        void expandTuples( ast::TranslationUnit & translaionUnit );
    3746
    3847        /// replaces UniqueExprs with a temporary variable and one call
     48        void expandUniqueExpr( std::list< Declaration * > & translationUnit );
    3949        void expandUniqueExpr( ast::TranslationUnit & translationUnit );
    4050
    4151        /// returns VoidType if any of the expressions have Voidtype, otherwise TupleType of the Expression result types
     52        Type * makeTupleType( const std::list< Expression * > & exprs );
    4253        const ast::Type * makeTupleType( const std::vector<ast::ptr<ast::Expr>> & exprs );
    4354
    4455        /// returns a TypeInstType if `type` is a ttype, nullptr otherwise
     56        TypeInstType * isTtype( Type * type );
     57        const TypeInstType * isTtype( const Type * type );
    4558        const ast::TypeInstType * isTtype( const ast::Type * type );
    4659
    4760        /// returns true if the expression may contain side-effects.
     61        bool maybeImpure( const Expression * expr );
    4862        bool maybeImpure( const ast::Expr * expr );
    4963
    5064        /// Returns true if the expression may contain side-effect,
    5165        /// ignoring the presence of unique expressions.
     66        bool maybeImpureIgnoreUnique( const Expression * expr );
    5267        bool maybeImpureIgnoreUnique( const ast::Expr * expr );
    5368} // namespace Tuples
Note: See TracChangeset for help on using the changeset viewer.