Changeset b583113 for src/Virtual


Ignore:
Timestamp:
Apr 21, 2021, 3:44:58 PM (8 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
578c09a
Parents:
7711064
Message:

Recovered the polymorphic CoroutineCancelled? exception. The interface might need a bit of polish.

Location:
src/Virtual
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Virtual/Tables.cc

    r7711064 rb583113  
    1010// Created On       : Mon Aug 31 11:11:00 2020
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Apr  8 15:51:00 2021
    13 // Update Count     : 1
     12// Last Modified On : Wed Apr 21 15:36:00 2021
     13// Update Count     : 2
    1414//
    1515
     
    5050}
    5151
     52std::string concurrentDefaultVTableName() {
     53        return "_default_vtable";
     54}
     55
    5256bool isVTableInstanceName( std::string const & name ) {
    5357        // There are some delicate length calculations here.
     
    5761
    5862static ObjectDecl * makeVtableDeclaration(
     63                std::string const & name,
    5964                StructInstType * type, Initializer * init ) {
    60         std::string const & name = instanceName( type->name );
    6165        Type::StorageClasses storage = noStorageClasses;
    6266        if ( nullptr == init ) {
     
    7377}
    7478
    75 ObjectDecl * makeVtableForward( StructInstType * type ) {
     79ObjectDecl * makeVtableForward( std::string const & name, StructInstType * type ) {
    7680        assert( type );
    77         return makeVtableDeclaration( type, nullptr );
     81        return makeVtableDeclaration( name, type, nullptr );
    7882}
    7983
    8084ObjectDecl * makeVtableInstance(
    81                 StructInstType * vtableType, Type * objectType, Initializer * init ) {
     85                std::string const & name, StructInstType * vtableType,
     86                Type * objectType, Initializer * init ) {
    8287        assert( vtableType );
    8388        assert( objectType );
     
    115120                assert(false);
    116121        }
    117         return makeVtableDeclaration( vtableType, init );
     122        return makeVtableDeclaration( name, vtableType, init );
    118123}
    119124
     
    167172}
    168173
    169 ObjectDecl * makeTypeIdForward() {
    170         return nullptr;
    171 }
    172 
    173174Attribute * linkonce( const std::string & subsection ) {
    174175        const std::string section = ".gnu.linkonce." + subsection;
  • src/Virtual/Tables.h

    r7711064 rb583113  
    1010// Created On       : Mon Aug 31 11:07:00 2020
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Apr  8 15:55:00 2021
    13 // Update Count     : 1
     12// Last Modified On : Wed Apr 21 10:30:00 2021
     13// Update Count     : 2
    1414//
    1515
     
    2727std::string instanceName( std::string const & vtable_name );
    2828std::string vtableInstanceName( std::string const & type_name );
     29std::string concurrentDefaultVTableName();
    2930bool isVTableInstanceName( std::string const & name );
    3031
    31 ObjectDecl * makeVtableForward( StructInstType * vtableType );
     32ObjectDecl * makeVtableForward(
     33        std::string const & name, StructInstType * vtableType );
    3234/* Create a forward declaration of a vtable of the given type.
    3335 * vtableType node is consumed.
    3436 */
    3537
    36 ObjectDecl * makeVtableInstance( StructInstType * vtableType, Type * objectType,
     38ObjectDecl * makeVtableInstance(
     39        std::string const & name,
     40        StructInstType * vtableType, Type * objectType,
    3741        Initializer * init = nullptr );
    3842/* Create an initialized definition of a vtable.
Note: See TracChangeset for help on using the changeset viewer.