Changeset 7f62b708 for src/ResolvExpr


Ignore:
Timestamp:
Jul 5, 2021, 4:57:41 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
8f1a99e
Parents:
e84ab3d
Message:

Step 2 of $thread to thread$ Missed some of the source

Location:
src/ResolvExpr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AlternativeFinder.cc

    re84ab3d r7f62b708  
    13021302
    13031303                try {
    1304                         // Attempt 1 : turn (thread&)X into ($thread&)X.__thrd
     1304                        // Attempt 1 : turn (thread&)X into (thread$&)X.__thrd
    13051305                        // Clone is purely for memory management
    13061306                        std::unique_ptr<Expression> tech1 { new UntypedMemberExpr(new NameExpr(castExpr->concrete_target.field), castExpr->arg->clone()) };
     
    13131313                } catch(SemanticErrorException & ) {}
    13141314
    1315                 // Fallback : turn (thread&)X into ($thread&)get_thread(X)
     1315                // Fallback : turn (thread&)X into (thread$&)get_thread(X)
    13161316                std::unique_ptr<Expression> fallback { UntypedExpr::createDeref( new UntypedExpr(new NameExpr(castExpr->concrete_target.getter), { castExpr->arg->clone() })) };
    13171317                // don't prune here, since it's guaranteed all alternatives will have the same type
  • src/ResolvExpr/CandidateFinder.cpp

    re84ab3d r7f62b708  
    11801180
    11811181                        try {
    1182                                 // Attempt 1 : turn (thread&)X into ($thread&)X.__thrd
     1182                                // Attempt 1 : turn (thread&)X into (thread$&)X.__thrd
    11831183                                // Clone is purely for memory management
    11841184                                std::unique_ptr<const ast::Expr> tech1 { new ast::UntypedMemberExpr(loc, new ast::NameExpr(loc, castExpr->concrete_target.field), castExpr->arg) };
     
    11911191                        } catch(SemanticErrorException & ) {}
    11921192
    1193                         // Fallback : turn (thread&)X into ($thread&)get_thread(X)
     1193                        // Fallback : turn (thread&)X into (thread$&)get_thread(X)
    11941194                        std::unique_ptr<const ast::Expr> fallback { ast::UntypedExpr::createDeref(loc,  new ast::UntypedExpr(loc, new ast::NameExpr(loc, castExpr->concrete_target.getter), { castExpr->arg })) };
    11951195                        // don't prune here, since it's guaranteed all alternatives will have the same type
Note: See TracChangeset for help on using the changeset viewer.