Changeset 432ce7a for src/Tuples


Ignore:
Timestamp:
Jun 11, 2019, 5:52:50 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
6625727
Parents:
4b7cce6
Message:

Port CandidateFinder::postvisit for UntypedExpr, stub dependencies

Location:
src/Tuples
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/Explode.h

    r4b7cce6 r432ce7a  
    1919#include <utility>                      // for forward
    2020
     21#include "AST/Expr.hpp"
    2122#include "ResolvExpr/Alternative.h"     // for Alternative, AltList
     23#include "ResolvExpr/Candidate.hpp"     // for Candidate, CandidateList
    2224#include "ResolvExpr/ExplodedActual.h"  // for ExplodedActual
     25#include "ResolvExpr/ExplodedArg.hpp"   // for ExplodedArg
    2326#include "SynTree/Expression.h"         // for Expression, UniqueExpr, AddressExpr
    2427#include "SynTree/Type.h"               // for TupleType, Type
    2528#include "Tuples.h"                     // for maybeImpure
     29
     30namespace ast {
     31        class SymbolTable;
     32}
    2633
    2734namespace SymTab {
     
    130137                explode( alts.begin(), alts.end(), indexer, std::forward<Output>(out), isTupleAssign );
    131138        }
     139
     140/// helper function used by explode
     141template< typename Output >
     142void explodeUnique(
     143        const ast::Expr * expr, const ResolvExpr::Candidate & arg, const ast::SymbolTable & symtab,
     144        Output && out, bool isTupleAssign
     145) {
     146        #warning unimplemented
     147        (void)expr; (void)arg; (void)symtab; (void)out; (void)isTupleAssign;
     148        assert(false);
     149}
     150
     151/// expands a tuple-valued candidate into multiple candidates, each with a non-tuple type
     152template< typename Output >
     153void explode(
     154        const ResolvExpr::Candidate & arg, const ast::SymbolTable & symtab, Output && out,
     155        bool isTupleAssign = false
     156) {
     157        explodeUnique( arg.expr, arg, symtab, std::forward< Output >( out ), isTupleAssign );
     158}
     159
    132160} // namespace Tuples
    133161
  • src/Tuples/TupleAssignment.cc

    r4b7cce6 r432ce7a  
    377377                }
    378378        }
     379
     380        void handleTupleAssignment(
     381                ResolvExpr::CandidateFinder & finder, const ast::UntypedExpr * assign,
     382                std::vector< ResolvExpr::CandidateFinder > & args
     383        ) {
     384                #warning unimplmented
     385                (void)finder; (void)assign; (void)args;
     386                assert(false);
     387        }
    379388} // namespace Tuples
    380389
  • src/Tuples/Tuples.h

    r4b7cce6 r432ce7a  
    2626
    2727#include "ResolvExpr/AlternativeFinder.h"
     28#include "ResolvExpr/CandidateFinder.hpp"
    2829
    2930namespace Tuples {
     
    3132        void handleTupleAssignment( ResolvExpr::AlternativeFinder & currentFinder, UntypedExpr * assign,
    3233                std::vector< ResolvExpr::AlternativeFinder >& args );
     34        void handleTupleAssignment(
     35                ResolvExpr::CandidateFinder & finder, const ast::UntypedExpr * assign,
     36                std::vector< ResolvExpr::CandidateFinder > & args );
    3337
    3438        // TupleExpansion.cc
Note: See TracChangeset for help on using the changeset viewer.