Changeset ffec1bf for src/InitTweak


Ignore:
Timestamp:
Jul 25, 2022, 2:23:28 PM (2 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
4c48be0, 5cf1228, def751f
Parents:
9e23b446 (diff), 1f950c3b (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' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/InitTweak
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/GenInit.cc

    r9e23b446 rffec1bf  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // GenInit.cc --
     7// GenInit.cc -- Generate initializers, and other stuff.
    88//
    99// Author           : Rob Schluntz
     
    642642
    643643ast::ConstructorInit * genCtorInit( const CodeLocation & loc, const ast::ObjectDecl * objDecl ) {
    644         // call into genImplicitCall from Autogen.h to generate calls to ctor/dtor for each 
     644        // call into genImplicitCall from Autogen.h to generate calls to ctor/dtor for each
    645645        // constructable object
    646646        InitExpander_new srcParam{ objDecl->init }, nullParam{ (const ast::Init *)nullptr };
    647647        ast::ptr< ast::Expr > dstParam = new ast::VariableExpr(loc, objDecl);
    648        
    649         ast::ptr< ast::Stmt > ctor = SymTab::genImplicitCall( 
     648
     649        ast::ptr< ast::Stmt > ctor = SymTab::genImplicitCall(
    650650                srcParam, dstParam, loc, "?{}", objDecl );
    651         ast::ptr< ast::Stmt > dtor = SymTab::genImplicitCall( 
    652                 nullParam, dstParam, loc, "^?{}", objDecl, 
     651        ast::ptr< ast::Stmt > dtor = SymTab::genImplicitCall(
     652                nullParam, dstParam, loc, "^?{}", objDecl,
    653653                SymTab::LoopBackward );
    654        
     654
    655655        // check that either both ctor and dtor are present, or neither
    656656        assert( (bool)ctor == (bool)dtor );
    657657
    658658        if ( ctor ) {
    659                 // need to remember init expression, in case no ctors exist. If ctor does exist, want to 
     659                // need to remember init expression, in case no ctors exist. If ctor does exist, want to
    660660                // use ctor expression instead of init.
    661                 ctor.strict_as< ast::ImplicitCtorDtorStmt >(); 
     661                ctor.strict_as< ast::ImplicitCtorDtorStmt >();
    662662                dtor.strict_as< ast::ImplicitCtorDtorStmt >();
    663663
  • src/InitTweak/GenInit.h

    r9e23b446 rffec1bf  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // GenInit.h --
     7// GenInit.h -- Generate initializers, and other stuff.
    88//
    99// Author           : Rodolfo G. Esteves
     
    2929        void genInit( ast::TranslationUnit & translationUnit );
    3030
    31         /// Converts return statements into copy constructor calls on the hidden return variable
     31        /// Converts return statements into copy constructor calls on the hidden return variable.
     32        /// This pass must happen before auto-gen.
    3233        void fixReturnStatements( std::list< Declaration * > & translationUnit );
    3334        void fixReturnStatements( ast::TranslationUnit & translationUnit );
Note: See TracChangeset for help on using the changeset viewer.