Ignore:
Timestamp:
Aug 20, 2020, 11:48:15 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
d685cb0
Parents:
67ca73e (diff), 013b028 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

fix conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/TupleAssignment.cc

    r67ca73e re67a82d  
    465465                                        // resolve ctor/dtor for the new object
    466466                                        ast::ptr< ast::Init > ctorInit = ResolvExpr::resolveCtorInit(
    467                                                         InitTweak::genCtorInit( location, ret ), spotter.crntFinder.symtab );
     467                                                        InitTweak::genCtorInit( location, ret ), spotter.crntFinder.localSyms );
    468468                                        // remove environments from subexpressions of stmtExpr
    469469                                        ast::Pass< EnvRemover > rm{ env };
     
    504504
    505505                        std::vector< ast::ptr< ast::Expr > > match() override {
    506                                 static UniqueName lhsNamer( "__massassign_L" );
    507                                 static UniqueName rhsNamer( "__massassign_R" );
     506                                // temporary workaround for new and old ast to coexist and avoid name collision
     507                                static UniqueName lhsNamer( "__massassign_Ln" );
     508                                static UniqueName rhsNamer( "__massassign_Rn" );
    508509                                // empty tuple case falls into this matcher
    509510                                assert( lhs.empty() ? rhs.empty() : rhs.size() <= 1 );
     
    534535
    535536                        std::vector< ast::ptr< ast::Expr > > match() override {
    536                                 static UniqueName lhsNamer( "__multassign_L" );
    537                                 static UniqueName rhsNamer( "__multassign_R" );
     537                                // temporary workaround for new and old ast to coexist and avoid name collision
     538                                static UniqueName lhsNamer( "__multassign_Ln" );
     539                                static UniqueName rhsNamer( "__multassign_Rn" );
    538540
    539541                                if ( lhs.size() != rhs.size() ) return {};
     
    560562                                        // resolve the cast expression so that rhsCand return type is bound by the cast
    561563                                        // type as needed, and transfer the resulting environment
    562                                         ResolvExpr::CandidateFinder finder{ spotter.crntFinder.symtab, env };
     564                                        ResolvExpr::CandidateFinder finder{ spotter.crntFinder.localSyms, env };
    563565                                        finder.find( rhsCand->expr, ResolvExpr::ResolvMode::withAdjustment() );
    564566                                        assert( finder.candidates.size() == 1 );
     
    609611                                        // explode the LHS so that each field of a tuple-valued expr is assigned
    610612                                        ResolvExpr::CandidateList lhs;
    611                                         explode( *lhsCand, crntFinder.symtab, back_inserter(lhs), true );
     613                                        explode( *lhsCand, crntFinder.localSyms, back_inserter(lhs), true );
    612614                                        for ( ResolvExpr::CandidateRef & cand : lhs ) {
    613615                                                // each LHS value must be a reference - some come in with a cast, if not
     
    629631                                                        if ( isTuple( rhsCand->expr ) ) {
    630632                                                                // multiple assignment
    631                                                                 explode( *rhsCand, crntFinder.symtab, back_inserter(rhs), true );
     633                                                                explode( *rhsCand, crntFinder.localSyms, back_inserter(rhs), true );
    632634                                                                matcher.reset(
    633635                                                                        new MultipleAssignMatcher{ *this, expr->location, lhs, rhs } );
     
    648650                                                        // multiple assignment
    649651                                                        ResolvExpr::CandidateList rhs;
    650                                                         explode( rhsCand, crntFinder.symtab, back_inserter(rhs), true );
     652                                                        explode( rhsCand, crntFinder.localSyms, back_inserter(rhs), true );
    651653                                                        matcher.reset(
    652654                                                                new MultipleAssignMatcher{ *this, expr->location, lhs, rhs } );
     
    678680                                )
    679681
    680                                 ResolvExpr::CandidateFinder finder{ crntFinder.symtab, matcher->env };
     682                                ResolvExpr::CandidateFinder finder{ crntFinder.localSyms, matcher->env };
    681683
    682684                                try {
Note: See TracChangeset for help on using the changeset viewer.