Changeset d40555e for libcfa/src


Ignore:
Timestamp:
Mar 9, 2023, 10:58:59 AM (22 months ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
0f275f7
Parents:
dd16dd5
Message:

fixed matrix.cfa test error by reworking globals to avoid spurious dtor calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/actor.hfa

    rdd16dd5 rd40555e  
    681681// assigned at creation to __base_msg_finished to avoid unused message warning
    682682message __base_msg_finished @= { .allocation_ : Finished };
    683 struct __DeleteMsg { inline message; } DeleteMsg = __base_msg_finished;
    684 struct __DestroyMsg { inline message; } DestroyMsg = __base_msg_finished;
    685 struct __FinishedMsg { inline message; } FinishedMsg = __base_msg_finished;
    686 void ?{}( __DeleteMsg & this, Allocation status ) { ((message &) this){ status }; }
    687 void ?{}( __DestroyMsg & this, Allocation status ) { ((message &) this){ status }; }
    688 void ?{}( __FinishedMsg & this, Allocation status ) { ((message &) this){ status }; }
     683struct __DeleteMsg { inline message; };
     684struct __DestroyMsg { inline message; };
     685struct __FinishedMsg { inline message; };
     686
     687// These are needed so that the compiler doesn't make a temporary when initializing below
     688static inline void ?{}( __DeleteMsg & this, message & other ) { this.allocation_ = other.allocation_; }
     689static inline void ?{}( __DestroyMsg & this, message & other ) { this.allocation_ = other.allocation_; }
     690static inline void ?{}( __FinishedMsg & this, message & other ) { this.allocation_ = other.allocation_; }
     691
     692__DeleteMsg DeleteMsg = __base_msg_finished;
     693__DestroyMsg DestroyMsg = __base_msg_finished;
     694__FinishedMsg FinishedMsg = __base_msg_finished;
    689695
    690696Allocation receive( actor & this, __DeleteMsg & msg ) { return Delete; }
Note: See TracChangeset for help on using the changeset viewer.