Ignore:
Timestamp:
Oct 27, 2016, 3:24:02 PM (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:
3f0c6a5
Parents:
a1e67dd
git-author:
Rob Schluntz <rschlunt@…> (10/27/16 15:11:00)
git-committer:
Rob Schluntz <rschlunt@…> (10/27/16 15:24:02)
Message:

resolve ctor/dtors for UniqueExprs?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/TupleExpansion.cc

    ra1e67dd r77971f6  
    141141
    142142        Expression * UniqueExprExpander::mutate( UniqueExpr * unqExpr ) {
    143                 static UniqueName tempNamer( "_unq_expr_" );
    144143                unqExpr = safe_dynamic_cast< UniqueExpr * > ( Parent::mutate( unqExpr ) );
    145144                if ( ! decls.count( unqExpr->get_id() ) ) {
     
    160159                        // }
    161160
    162                         // xxx - attach a resolved ConstructorInit node?
    163                         // xxx - is it possible to make the objDecl's type const?
    164                         ObjectDecl * objDecl = new ObjectDecl( tempNamer.newName(), DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, unqExpr->get_result()->clone(), nullptr );
    165                         // must be done on two lines because genCtorInit accesses objDecl's fields
    166                         objDecl->set_init( InitTweak::genCtorInit( objDecl ) );
    167 
     161                        ObjectDecl * objDecl = unqExpr->get_object();
     162                        unqExpr->set_object( nullptr );
    168163                        decls[unqExpr->get_id()] = objDecl;
    169164                        addDeclaration( objDecl );
Note: See TracChangeset for help on using the changeset viewer.