Changeset ab94c37 for src


Ignore:
Timestamp:
Feb 5, 2025, 5:06:45 PM (8 weeks ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
301e9f7
Parents:
d3d54b3
Message:

Change in actor ?|? function generation. It looks accessive (and in a sense it is) but this makes it constent with the general return pattern that makes sure the assignment is called. This removes a lot of warnings, but nodebug builds of the actor still fail because of another warning.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/Concurrency/Actors.cpp

    rd3d54b3 rab94c37  
    401401                        ));
    402402
    403                         // Generates: return receiver;
    404                         sendBody->push_back( new ReturnStmt( decl->location, new NameExpr( decl->location, "receiver" ) ) );
     403                        // Generates: &receiver_ret = &receiver; return receiver_ret;
     404                        // Note: This is the general pattern used as a "return convention".
     405                        sendBody->push_back( new ExprStmt( decl->location,
     406                                ast::UntypedExpr::createAssign( decl->location,
     407                                        new AddressExpr( new NameExpr( decl->location, "receiver_ret" ) ),
     408                                        new AddressExpr( new NameExpr( decl->location, "receiver" ) )
     409                                )
     410                        ) );
     411                        sendBody->push_back( new ReturnStmt( decl->location,
     412                                new NameExpr( decl->location, "receiver_ret" ) ) );
    405413
    406414                        // put it all together into the complete function decl from above
Note: See TracChangeset for help on using the changeset viewer.