Ignore:
Timestamp:
Aug 8, 2016, 4:20:29 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, 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:
0853178
Parents:
242d458
Message:

generate a field constructor for union types and some refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r242d458 ra465caf  
    550550                }
    551551
    552                 // xxx - todo
    553                 // if ( InitTweak::isIntrinsicCallStmt( ctorInit->get_ctor() ) ) {
    554                 //      // can reduce the constructor down to a SingleInit using the
    555                 //      // second argument from the ctor call
    556                 // }
    557 
    558552                if ( InitTweak::isIntrinsicSingleArgCallStmt( ctorInit->get_dtor() ) ) {
    559553                        delete ctorInit->get_dtor();
    560554                        ctorInit->set_dtor( NULL );
    561555                }
     556
     557                // xxx - todo -- what about arrays?
     558                // if ( dtor == NULL && InitTweak::isIntrinsicCallStmt( ctorInit->get_ctor() ) ) {
     559                //      // can reduce the constructor down to a SingleInit using the
     560                //      // second argument from the ctor call, since
     561                //      delete ctorInit->get_ctor();
     562                //      ctorInit->set_ctor( NULL );
     563
     564                //      Expression * arg =
     565                //      ctorInit->set_init( new SingleInit( arg ) );
     566                // }
    562567        }
    563568} // namespace ResolvExpr
Note: See TracChangeset for help on using the changeset viewer.