Changeset 0fe4e62 for src/InitTweak


Ignore:
Timestamp:
Nov 17, 2017, 10:56:16 AM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
cdbfab0
Parents:
f5c3b6c (diff), b7f8cb4 (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:

Merge branch 'master' into fix-bug-51

Location:
src/InitTweak
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/GenInit.cc

    rf5c3b6c r0fe4e62  
    214214                }
    215215                // a type is managed if it appears in the map of known managed types, or if it contains any polymorphism (is a type variable or generic type containing a type variable)
    216                 return managedTypes.find( SymTab::Mangler::mangle( type ) ) != managedTypes.end() || GenPoly::isPolyType( type );
     216                return managedTypes.find( SymTab::Mangler::mangleConcrete( type ) ) != managedTypes.end() || GenPoly::isPolyType( type );
    217217        }
    218218
     
    232232                        Type * type = InitTweak::getPointerBase( params.front()->get_type() );
    233233                        assert( type );
    234                         managedTypes.insert( SymTab::Mangler::mangle( type ) );
     234                        managedTypes.insert( SymTab::Mangler::mangleConcrete( type ) );
    235235                }
    236236        }
     
    242242                        if ( ObjectDecl * field = dynamic_cast< ObjectDecl * >( member ) ) {
    243243                                if ( isManaged( field ) ) {
     244                                        // generic parameters should not play a role in determining whether a generic type is constructed - construct all generic types, so that
     245                                        // polymorphic constructors make generic types managed types
    244246                                        StructInstType inst( Type::Qualifiers(), aggregateDecl );
    245                                         managedTypes.insert( SymTab::Mangler::mangle( &inst ) );
     247                                        managedTypes.insert( SymTab::Mangler::mangleConcrete( &inst ) );
    246248                                        break;
    247249                                }
  • src/InitTweak/InitTweak.cc

    rf5c3b6c r0fe4e62  
    9999        class InitExpander::ExpanderImpl {
    100100        public:
     101                virtual ~ExpanderImpl() = default;
    101102                virtual std::list< Expression * > next( std::list< Expression * > & indices ) = 0;
    102103                virtual Statement * buildListInit( UntypedExpr * callExpr, std::list< Expression * > & indices ) = 0;
     
    106107        public:
    107108                InitImpl( Initializer * init ) : init( init ) {}
     109                virtual ~InitImpl() = default;
    108110
    109111                virtual std::list< Expression * > next( __attribute((unused)) std::list< Expression * > & indices ) {
     
    122124        public:
    123125                ExprImpl( Expression * expr ) : arg( expr ) {}
    124 
    125                 ~ExprImpl() { delete arg; }
     126                virtual ~ExprImpl() { delete arg; }
    126127
    127128                virtual std::list< Expression * > next( std::list< Expression * > & indices ) {
Note: See TracChangeset for help on using the changeset viewer.