Changeset f1e012b


Ignore:
Timestamp:
Jan 19, 2016, 1:28:25 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, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
ca1c11f
Parents:
71f4e4f
Message:

added intrinsic ctor/dtors to prelude, modified MakeLibCfa? to build prelude ctor/dtors, added ctor/dtor to polymorphic object type constraints, rudimentary fallback on initializer nodes if chosen ctor is intrinsic, remove intrinsic destructor statements to reduce output pollution

Location:
src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r71f4e4f rf1e012b  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jan 13 16:26:59 2016
    13 // Update Count     : 234
     12// Last Modified On : Tue Jan 19 13:15:44 2016
     13// Update Count     : 251
    1414//
    1515
     
    258258
    259259                                  case OT_CALL:
    260                                   case OT_CTOR:
    261                                   case OT_DTOR:
    262260                                        // there are no intrinsic definitions of the function call operator or constructors or destructors
    263261                                        assert( false );
    264262                                        break;
     263
     264                                  case OT_CTOR:
     265                                  // intrinsic constructors should never be called directly - they should be transformed back into Initializer nodes
     266                                  assert(false);
     267                                  break;
     268
     269                                  case OT_DTOR:
     270                                  // intrinsic destructors do nothing - don't generate any code
     271                                  output << " // " << dynamic_cast<VariableExpr*>(applicationExpr->get_function())->get_var()->get_name() << endl;
     272                                  break;
    265273
    266274                                  case OT_PREFIX:
     
    279287                                        output << opInfo.symbol;
    280288                                        break;
     289
    281290
    282291                                  case OT_INFIX:
     
    324333
    325334                                  case OT_CALL:
     335                                        assert( false );
     336
    326337                                        case OT_CTOR:
    327338                                        case OT_DTOR:
    328                                         assert( false );
     339                                        // intrinsic constructors should never be called
     340                                        // intrinsic destructors do nothing
    329341                                        break;
    330342
  • src/GenPoly/Specialize.cc

    r71f4e4f rf1e012b  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Specialize.cc -- 
     7// Specialize.cc --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Sep 22 14:04:13 2015
    13 // Update Count     : 15
     12// Last Modified On : Tue Jan 19 10:40:37 2016
     13// Update Count     : 23
    1414//
    1515
     
    140140                return new AddressExpr( new VariableExpr( thunkFunc ) );
    141141        }
    142        
     142
    143143        Expression * Specialize::doSpecialization( Type *formalType, Expression *actual, InferredParams *inferParams ) {
     144                assert( actual->get_results().size() >= 1 ); // using front, should have this assert
    144145                if ( needsSpecialization( formalType, actual->get_results().front(), env ) ) {
    145146                        FunctionType *funType;
     
    197198
    198199        Expression * Specialize::mutate( CastExpr *castExpr ) {
     200                assert( castExpr->get_results().size() >= 1 && "Check that functions with void return aren't returning a value" );
    199201                castExpr->get_arg()->acceptMutator( *this );
    200202                Expression *specialized = doSpecialization( castExpr->get_results().front(), castExpr->get_arg() );
  • src/InitTweak/FixInit.cc

    r71f4e4f rf1e012b  
    1010// Created On       : Wed Jan 13 16:29:30 2016
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jan 13 16:45:37 2016
    13 // Update Count     : 17
     12// Last Modified On : Tue Jan 19 13:25:13 2016
     13// Update Count     : 27
    1414//
    1515
     
    3535
    3636                virtual ObjectDecl * mutate( ObjectDecl *objDecl );
     37
     38                virtual CompoundStmt * mutate( CompoundStmt * compoundStmt );
    3739        };
    3840
     
    5052        ObjectDecl *FixInit::mutate( ObjectDecl *objDecl ) {
    5153                if ( ConstructorInit * ctorInit = dynamic_cast< ConstructorInit * >( objDecl->get_init() ) ) {
    52                         // a decision should have been made by the resolver, so either ctor is NULL or init is NULL
     54                        // a decision should have been made by the resolver, so ctor and init are not both non-NULL
    5355                        assert( ! ctorInit->get_ctor() || ! ctorInit->get_init() );
    5456                        if ( Expression * ctor = ctorInit->get_ctor() ) {
     
    6163                                ctorInit->set_init( NULL );
    6264                        } else {
    63                                 // one of them should be non-NULL
    64                                 assert( ctorInit->get_ctor() || ctorInit->get_init() );
     65                                // no constructor and no initializer, which is okay
     66                                objDecl->set_init( NULL );
    6567                        }
    6668                        delete ctorInit;
     
    6870                return objDecl;
    6971        }
     72
     73        CompoundStmt * FixInit::mutate( CompoundStmt * compoundStmt ) {
     74                std::list< Statement * > & statements = compoundStmt->get_kids();
     75                for ( std::list< Statement * >::iterator it = statements.begin(); it != statements.end(); ++it ) {
     76                        // remove if instrinsic destructor statement
     77                        // xxx - test user manually calling intrinsic functions - what happens?
     78                        if ( ExprStmt * exprStmt = dynamic_cast< ExprStmt * >( *it ) ) {
     79                                if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( exprStmt->get_expr() ) ) {
     80                                        if ( VariableExpr * function = dynamic_cast< VariableExpr * >( appExpr->get_function() ) ) {
     81                                                if ( function->get_var()->get_name() == "^?{}" && function->get_var()->get_linkage() == LinkageSpec::Intrinsic ) {
     82                                                        statements.erase(it++);
     83                                                }
     84                                        }
     85                                }
     86                        }
     87                }
     88                // mutate non-destructor statements
     89                return Mutator::mutate( compoundStmt );
     90        }
     91
    7092} // namespace InitTweak
    7193
  • src/InitTweak/RemoveInit.cc

    r71f4e4f rf1e012b  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jan 13 15:19:35 2016
    13 // Update Count     : 154
     12// Last Modified On : Tue Jan 19 11:12:49 2016
     13// Update Count     : 165
    1414//
    1515
     
    5959                static void generateCtorDtor( std::list< Declaration * > &translationUnit );
    6060
     61                CtorDtor() : inFunction( false ) {}
     62
    6163                virtual ObjectDecl * mutate( ObjectDecl * );
    6264                virtual DeclarationWithType * mutate( FunctionDecl *functionDecl );
     
    7173
    7274          protected:
     75                bool inFunction;
    7376
    7477                // to be added before block ends - use push_front so order is correct
     
    9396                if (objDecl->get_init() && dynamic_cast<TypeInstType*>(objDecl->get_type())) {
    9497                        if (SingleInit * single = dynamic_cast<SingleInit*>(objDecl->get_init())) {
    95                                 UntypedExpr *assign = new UntypedExpr( new NameExpr( "?=?" ) );
     98                                // xxx this can be more complicated - consider ListInit
     99                                UntypedExpr *assign = new UntypedExpr( new NameExpr( "?{}" ) );
    96100                                assign->get_args().push_back( new AddressExpr (new NameExpr( objDecl->get_name() ) ) );
    97101                                assign->get_args().push_back( single->get_value()->clone() );
     
    107111                // hands off if the function returns an lvalue - we don't want to allocate a temporary if a variable's address
    108112                // is being returned
     113                // xxx - this should construct rather than assign
    109114                if ( returnStmt->get_expr() && returnVals.size() == 1 && funcName != "?=?" && ! returnVals.front()->get_type()->get_isLvalue()  ) {
    110115                        ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), DeclarationNode::NoStorageClass, LinkageSpec::C, 0, returnVals.front()->get_type()->clone(), 0 );
     
    186191                // hands off if designated or if @=
    187192                if ( tryConstruct( objDecl ) ) {
    188                         Expression * ctor = makeCtorDtorExpr( "?{}", objDecl, makeInitList( objDecl->get_init() ) );
    189                         Expression * dtor = makeCtorDtorExpr( "^?{}", objDecl, std::list< Expression * >() );
    190 
    191                         // need to remember init expression, in case no ctors exist
    192                         // if ctor does exist, want to use ctor expression instead of init
    193                         // push this decision to the resolver
    194                         objDecl->set_init( new ConstructorInit( ctor, objDecl->get_init() ) );
    195                         destructorStmts.push_front( new ExprStmt( noLabels, dtor ) );
     193                        if ( inFunction ) {
     194                                Expression * ctor = makeCtorDtorExpr( "?{}", objDecl, makeInitList( objDecl->get_init() ) );
     195                                Expression * dtor = makeCtorDtorExpr( "^?{}", objDecl, std::list< Expression * >() );
     196
     197                                // need to remember init expression, in case no ctors exist
     198                                // if ctor does exist, want to use ctor expression instead of init
     199                                // push this decision to the resolver
     200                                objDecl->set_init( new ConstructorInit( ctor, objDecl->get_init() ) );
     201                                destructorStmts.push_front( new ExprStmt( noLabels, dtor ) );
     202                        } else {
     203                                // xxx - find a way to construct/destruct globals
     204                                // hack: implicit "static" initialization routine for each struct type? or something similar?
     205                                // --ties into module system
     206                        }
    196207                }
    197208                return objDecl;
     
    200211        DeclarationWithType * CtorDtor::mutate( FunctionDecl *functionDecl ) {
    201212                // parameters should not be constructed and destructed, so don't mutate FunctionType
     213                bool oldInFunc = inFunction;
    202214                mutateAll( functionDecl->get_oldDecls(), *this );
     215                inFunction = true;
    203216                functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
     217                inFunction = oldInFunc;
    204218                return functionDecl;
    205219        }
  • src/MakeLibCfa.cc

    r71f4e4f rf1e012b  
    1010// Created On       : Sat May 16 10:33:33 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Jan 07 13:34:39 2016
    13 // Update Count     : 20
     12// Last Modified On : Tue Jan 19 13:20:26 2016
     13// Update Count     : 40
    1414//
    1515
     
    5454                assert( param != funcDecl->get_functionType()->get_parameters().end() );
    5555
    56                 if ( (*param)->get_name() == "" ) {
    57                         (*param)->set_name( paramNamer.newName() );
    58                         (*param)->set_linkage( LinkageSpec::C );
    59                 } // if
     56                for ( ; param != funcDecl->get_functionType()->get_parameters().end(); ++param ) {
     57                        if ( (*param)->get_name() == "" ) {
     58                                (*param)->set_name( paramNamer.newName() );
     59                                (*param)->set_linkage( LinkageSpec::C );
     60                        }
     61                        newExpr->get_args().push_back( new VariableExpr( *param ) );
     62                } // for
     63
     64                funcDecl->set_statements( new CompoundStmt( std::list< Label >() ) );
     65                newDecls.push_back( funcDecl );
    6066
    6167                switch ( opInfo.type ) {
     
    6571                  case CodeGen::OT_POSTFIX:
    6672                  case CodeGen::OT_INFIX:
    67                         newExpr->get_args().push_back( new VariableExpr( *param ) );
    68                         break;
    6973                  case CodeGen::OT_PREFIXASSIGN:
    7074                  case CodeGen::OT_POSTFIXASSIGN:
    7175                  case CodeGen::OT_INFIXASSIGN:
    72                         {
    73                                 newExpr->get_args().push_back( new VariableExpr( *param ) );
    74                                 // UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) );
    75                                 // deref->get_args().push_back( new VariableExpr( *param ) );
    76                                 // newExpr->get_args().push_back( deref );
     76                                funcDecl->get_statements()->get_kids().push_back( new ReturnStmt( std::list< Label >(), newExpr ) );
    7777                                break;
    78                         }
    7978                  case CodeGen::OT_CTOR:
     79                        // ctors don't return a value
     80                        if ( funcDecl->get_functionType()->get_parameters().size() == 1 ) {
     81                                // intrinsic default constructors should do nothing
     82                                // delete newExpr;
     83                                break;
     84                        } else {
     85                                assert( funcDecl->get_functionType()->get_parameters().size() == 2 );
     86                                // anything else is a single parameter constructor that is effectively a C-style assignment
     87                                // delete newExpr->get_function();
     88                                assert(newExpr->get_args().size()==2);
     89                                newExpr->set_function( new NameExpr( "?=?" ) );
     90                                funcDecl->get_statements()->get_kids().push_back( new ExprStmt( std::list< Label >(), newExpr ) );
     91                        }
     92                        break;
    8093                  case CodeGen::OT_DTOR:
     94                        // intrinsic destructors should do nothing
     95                        // delete newExpr;
     96                        break;
    8197                  case CodeGen::OT_CONSTANT:
    8298                  case CodeGen::OT_LABELADDRESS:
     
    84100                        assert( false );
    85101                } // switch
    86 
    87                 for ( param++; param != funcDecl->get_functionType()->get_parameters().end(); ++param ) {
    88                         if ( (*param)->get_name() == "" ) {
    89                                 (*param)->set_name( paramNamer.newName() );
    90                                 (*param)->set_linkage( LinkageSpec::C );
    91                         }
    92                         newExpr->get_args().push_back( new VariableExpr( *param ) );
    93                 } // for
    94                 funcDecl->set_statements( new CompoundStmt( std::list< Label >() ) );
    95                 funcDecl->get_statements()->get_kids().push_back( new ReturnStmt( std::list< Label >(), newExpr ) );
    96                 newDecls.push_back( funcDecl );
    97102        }
    98103
     
    107112        }
    108113} // namespace LibCfa
    109 
    110 // Local Variables: //
    111 // tab-width: 4 //
    112 // mode: c++ //
    113 // compile-command: "make install" //
    114 // End: //
  • src/Parser/TypeData.cc

    r71f4e4f rf1e012b  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypeData.cc -- 
     7// TypeData.cc --
    88//
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 15:12:51 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 14 14:57:23 2015
    13 // Update Count     : 32
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Thu Jan 14 10:43:42 2016
     13// Update Count     : 36
    1414//
    1515
     
    436436        for ( std::list< TypeDecl* >::iterator i = outputList.begin(); i != outputList.end(); ++i ) {
    437437                if ( (*i)->get_kind() == TypeDecl::Any ) {
     438                        // add assertion parameters to `type' tyvars
     439                        // add:  T * ?=?(T *, T)
    438440                        FunctionType *assignType = new FunctionType( Type::Qualifiers(), false );
    439441                        assignType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
     
    441443                        assignType->get_returnVals().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ), 0 ) );
    442444                        (*i)->get_assertions().push_front( new FunctionDecl( "?=?", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, assignType, 0, false, false ) );
     445
     446                        // add:  void ?{}(T *)
     447                        FunctionType *ctorType = new FunctionType( Type::Qualifiers(), false );
     448                        ctorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
     449                        (*i)->get_assertions().push_front( new FunctionDecl( "?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, ctorType, 0, false, false ) );
     450
     451                        // add:  void ^?{}(T *)
     452                        FunctionType *dtorType = new FunctionType( Type::Qualifiers(), false );
     453                        dtorType->get_parameters().push_back( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name(), *i ) ), 0 ) );
     454                        (*i)->get_assertions().push_front( new FunctionDecl( "^?{}", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, dtorType, 0, false, false ) );
    443455                } // if
    444456        } // for
  • src/ResolvExpr/Resolver.cc

    r71f4e4f rf1e012b  
    1010// Created On       : Sun May 17 12:17:01 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jan 13 16:23:51 2016
    13 // Update Count     : 186
     12// Last Modified On : Thu Jan 14 16:45:32 2016
     13// Update Count     : 203
    1414//
    1515
     
    6060          void resolveAggrInit( AggregateDecl *, InitIterator &, InitIterator & );
    6161          void resolveSingleAggrInit( Declaration *, InitIterator &, InitIterator & );
     62          void fallbackInit( ConstructorInit * ctorInit );
    6263
    6364                std::list< Type * > functionReturn;
     
    467468        }
    468469
     470        // ConstructorInit - fall back on C-style initializer
     471        void Resolver::fallbackInit( ConstructorInit * ctorInit ) {
     472                // could not find valid constructor, or found an intrinsic constructor
     473                // fall back on C-style initializer
     474                delete ctorInit->get_ctor();
     475                ctorInit->set_ctor( NULL );
     476                maybeAccept( ctorInit->get_init(), *this );
     477        }
     478
    469479        void Resolver::visit( ConstructorInit *ctorInit ) {
    470480                TypeEnvironment env;
    471481                AlternativeFinder finder( *this, env );
    472482                finder.find( ctorInit->get_ctor() );
     483
    473484                if ( finder.get_alternatives().size() == 0 ) {
    474                         // could not find valid constructor
    475                         delete ctorInit->get_ctor();
    476                         ctorInit->set_ctor( NULL );
    477 
    478                         maybeAccept( ctorInit->get_init(), *this );
     485                        fallbackInit( ctorInit );
    479486                } else if ( finder.get_alternatives().size() == 1 ) {
     487                        Alternative &choice = finder.get_alternatives().front();
     488                        if ( ApplicationExpr * appExpr = dynamic_cast< ApplicationExpr * >( choice.expr ) ) {
     489                                if ( VariableExpr * function = dynamic_cast< VariableExpr * > ( appExpr->get_function() ) ) {
     490                                        if ( function->get_var()->get_linkage() == LinkageSpec::Intrinsic ) {
     491                                                // if the constructor that was found is intrinsic, reset to C-style
     492                                                // initializer so that code generation is easy to handle
     493                                                fallbackInit( ctorInit );
     494                                                return;
     495                                        }
     496                                }
     497                        }
    480498                        // found a constructor - can get rid of C-style initializer
    481                         Alternative &choice = finder.get_alternatives().front();
    482499                        Expression *newExpr = choice.expr->clone();
    483500                        finishExpr( newExpr, choice.env );
  • src/libcfa/prelude.cf

    r71f4e4f rf1e012b  
    1 //                               -*- Mode: C -*- 
    2 // 
     1//                               -*- Mode: C -*-
     2//
    33// Copyright (C) Glen Ditchfield 1994, 1999
    4 // 
     4//
    55// prelude.cf -- Standard Cforall Preample for C99
    6 // 
     6//
    77// Author           : Glen Ditchfield
    88// Created On       : Sat Nov 29 07:23:41 2014
     
    116116forall( ftype FT ) lvalue FT             *?( FT * );
    117117
    118 _Bool                   +?( _Bool ),                    -?( _Bool ),                    ~?( _Bool );         
    119 signed int              +?( signed int ),               -?( signed int ),               ~?( signed int );           
    120 unsigned int            +?( unsigned int ),             -?( unsigned int ),             ~?( unsigned int );         
    121 signed long int         +?( signed long int ),          -?( signed long int ),          ~?( signed long int );       
    122 unsigned long int       +?( unsigned long int ),        -?( unsigned long int ),        ~?( unsigned long int );             
    123 signed long long int    +?( signed long long int ),     -?( signed long long int ),     ~?( signed long long int );   
    124 unsigned long long int  +?( unsigned long long int ),   -?( unsigned long long int ),   ~?( unsigned long long int ); 
     118_Bool                   +?( _Bool ),                    -?( _Bool ),                    ~?( _Bool );
     119signed int              +?( signed int ),               -?( signed int ),               ~?( signed int );
     120unsigned int            +?( unsigned int ),             -?( unsigned int ),             ~?( unsigned int );
     121signed long int         +?( signed long int ),          -?( signed long int ),          ~?( signed long int );
     122unsigned long int       +?( unsigned long int ),        -?( unsigned long int ),        ~?( unsigned long int );
     123signed long long int    +?( signed long long int ),     -?( signed long long int ),     ~?( signed long long int );
     124unsigned long long int  +?( unsigned long long int ),   -?( unsigned long long int ),   ~?( unsigned long long int );
    125125float                   +?( float ),                    -?( float );
    126126double                  +?( double ),                   -?( double );
     
    626626                        ?+=?( long double _Complex *, long double _Complex ), ?+=?( volatile long double _Complex *, long double _Complex ),
    627627                        ?-=?( long double _Complex *, long double _Complex ), ?-=?( volatile long double _Complex *, long double _Complex );
     628
     629
     630
     631
     632
     633// ------------------------------------------------------------
     634//
     635// Section ??? Constructors and Destructors
     636//
     637// ------------------------------------------------------------
     638
     639// default ctor
     640void    ?{}( _Bool * ),                         ?{}( volatile _Bool * );
     641void    ?{}( unsigned char * ),                 ?{}( volatile unsigned char * );
     642void    ?{}( signed int * ),                    ?{}( volatile signed int * );
     643void    ?{}( unsigned int * ),                  ?{}( volatile unsigned int * );
     644void    ?{}( signed long int * ),               ?{}( volatile signed long int * );
     645void    ?{}( unsigned long int * ),             ?{}( volatile unsigned long int * );
     646void    ?{}( signed long long int * ),          ?{}( volatile signed long long int * );
     647void    ?{}( unsigned long long int * ),        ?{}( volatile unsigned long long int * );
     648void    ?{}( float * ),                         ?{}( volatile float * );
     649void    ?{}( double * ),                        ?{}( volatile double * );
     650void    ?{}( long double * ),                   ?{}( volatile long double * );
     651void    ?{}( float _Complex * ),                ?{}( volatile float _Complex * );
     652void    ?{}( double _Complex * ),               ?{}( volatile double _Complex * );
     653void    ?{}( long double _Complex * ),          ?{}( volatile long double _Complex * );
     654
     655// copy ctor
     656void    ?{}( _Bool *, _Bool ),                                  ?{}( volatile _Bool *, _Bool );
     657void    ?{}( unsigned char *, unsigned char ),                  ?{}( volatile unsigned char *, unsigned char );
     658void    ?{}( signed int *, signed int),                         ?{}( volatile signed int *, signed int );
     659void    ?{}( unsigned int *, unsigned int),                     ?{}( volatile unsigned int *, unsigned int );
     660void    ?{}( signed long int *, signed long int),               ?{}( volatile signed long int *, signed long int );
     661void    ?{}( unsigned long int *, unsigned long int),           ?{}( volatile unsigned long int *, unsigned long int );
     662void    ?{}( signed long long int *, signed long long int),     ?{}( volatile signed long long int *, signed long long int );
     663void    ?{}( unsigned long long int *, unsigned long long int), ?{}( volatile unsigned long long int *, unsigned long long int );
     664void    ?{}( float *, float),                                   ?{}( volatile float *, float );
     665void    ?{}( double *, double),                                 ?{}( volatile double *, double );
     666void    ?{}( long double *, long double),                       ?{}( volatile long double *, long double );
     667void    ?{}( float _Complex *, float _Complex),                 ?{}( volatile float _Complex *, float _Complex );
     668void    ?{}( double _Complex *, double _Complex),               ?{}( volatile double _Complex *, double _Complex );
     669void    ?{}( long double _Complex *, long double _Complex),     ?{}( volatile long double _Complex *, long double _Complex );
     670
     671// dtor
     672void    ^?{}( _Bool * ),                        ^?{}( volatile _Bool * );
     673void    ^?{}( signed int * ),                   ^?{}( volatile signed int * );
     674void    ^?{}( unsigned int * ),                 ^?{}( volatile unsigned int * );
     675void    ^?{}( signed long int * ),              ^?{}( volatile signed long int * );
     676void    ^?{}( unsigned long int * ),            ^?{}( volatile unsigned long int * );
     677void    ^?{}( signed long long int * ),         ^?{}( volatile signed long long int * );
     678void    ^?{}( unsigned long long int * ),       ^?{}( volatile unsigned long long int * );
     679void    ^?{}( float * ),                        ^?{}( volatile float * );
     680void    ^?{}( double * ),                       ^?{}( volatile double * );
     681void    ^?{}( long double * ),                  ^?{}( volatile long double * );
     682void    ^?{}( float _Complex * ),               ^?{}( volatile float _Complex * );
     683void    ^?{}( double _Complex * ),              ^?{}( volatile double _Complex * );
     684void    ^?{}( long double _Complex * ),         ^?{}( volatile long double _Complex * );
     685
     686// // default ctor
     687// forall( dtype DT ) void       ?{}(                DT ** );
     688// forall( dtype DT ) void       ?{}( const          DT ** );
     689// forall( dtype DT ) void       ?{}(       volatile DT ** );
     690// forall( dtype DT ) void       ?{}( const volatile DT ** );
     691
     692// // copy ctor
     693// forall( dtype DT ) void       ?{}(                DT **, DT* );
     694// forall( dtype DT ) void       ?{}( const          DT **, DT* );
     695// forall( dtype DT ) void       ?{}(       volatile DT **, DT* );
     696// forall( dtype DT ) void       ?{}( const volatile DT **, DT* );
     697
     698// // dtor
     699// forall( dtype DT ) void      ^?{}(                DT ** );
     700// forall( dtype DT ) void      ^?{}( const          DT ** );
     701// forall( dtype DT ) void      ^?{}(       volatile DT ** );
     702// forall( dtype DT ) void      ^?{}( const volatile DT ** );
     703
     704// copied from assignment section
     705// copy constructors
     706forall( ftype FT ) void ?{}( FT **, FT * );
     707forall( ftype FT ) void ?{}( FT * volatile *, FT * );
     708
     709forall( dtype DT ) void ?{}(                 DT *          *,                   DT * );
     710forall( dtype DT ) void ?{}(                 DT * volatile *,                   DT * );
     711forall( dtype DT ) void ?{}( const           DT *          *,                   DT * );
     712forall( dtype DT ) void ?{}( const           DT * volatile *,                   DT * );
     713forall( dtype DT ) void ?{}( const           DT *          *, const             DT * );
     714forall( dtype DT ) void ?{}( const           DT * volatile *, const             DT * );
     715forall( dtype DT ) void ?{}(       volatile  DT *          *,                   DT * );
     716forall( dtype DT ) void ?{}(       volatile  DT * volatile *,                   DT * );
     717forall( dtype DT ) void ?{}(       volatile  DT *          *,       volatile    DT * );
     718forall( dtype DT ) void ?{}(       volatile  DT * volatile *,       volatile    DT * );
     719
     720forall( dtype DT ) void ?{}( const volatile  DT *          *,                   DT * );
     721forall( dtype DT ) void ?{}( const volatile  DT * volatile *,                   DT * );
     722forall( dtype DT ) void ?{}( const volatile  DT *          *, const             DT * );
     723forall( dtype DT ) void ?{}( const volatile  DT * volatile *, const             DT * );
     724forall( dtype DT ) void ?{}( const volatile  DT *          *,       volatile    DT * );
     725forall( dtype DT ) void ?{}( const volatile  DT * volatile *,       volatile    DT * );
     726forall( dtype DT ) void ?{}( const volatile  DT *          *, const volatile    DT * );
     727forall( dtype DT ) void ?{}( const volatile  DT * volatile *, const volatile    DT * );
     728
     729forall( dtype DT ) void ?{}(                 DT *          *,                   void * );
     730forall( dtype DT ) void ?{}(                 DT * volatile *,                   void * );
     731forall( dtype DT ) void ?{}( const           DT *          *,                   void * );
     732forall( dtype DT ) void ?{}( const           DT * volatile *,                   void * );
     733forall( dtype DT ) void ?{}( const           DT *          *, const             void * );
     734forall( dtype DT ) void ?{}( const           DT * volatile *, const             void * );
     735forall( dtype DT ) void ?{}(       volatile  DT *          *,                   void * );
     736forall( dtype DT ) void ?{}(       volatile  DT * volatile *,                   void * );
     737forall( dtype DT ) void ?{}(       volatile  DT *          *,       volatile    void * );
     738forall( dtype DT ) void ?{}(       volatile  DT * volatile *,       volatile    void * );
     739
     740forall( dtype DT ) void ?{}( const volatile  DT *          *,                   void * );
     741forall( dtype DT ) void ?{}( const volatile  DT * volatile *,                   void * );
     742forall( dtype DT ) void ?{}( const volatile  DT *          *, const             void * );
     743forall( dtype DT ) void ?{}( const volatile  DT * volatile *, const             void * );
     744forall( dtype DT ) void ?{}( const volatile  DT *          *,       volatile    void * );
     745forall( dtype DT ) void ?{}( const volatile  DT * volatile *,       volatile    void * );
     746forall( dtype DT ) void ?{}( const volatile  DT *          *, const volatile    void * );
     747forall( dtype DT ) void ?{}( const volatile  DT * volatile *, const volatile    void * );
     748
     749forall( dtype DT ) void ?{}(                 void *          *,                 DT * );
     750forall( dtype DT ) void ?{}(                 void * volatile *,                 DT * );
     751forall( dtype DT ) void ?{}( const           void *          *,                 DT * );
     752forall( dtype DT ) void ?{}( const           void * volatile *,                 DT * );
     753forall( dtype DT ) void ?{}( const           void *          *, const           DT * );
     754forall( dtype DT ) void ?{}( const           void * volatile *, const           DT * );
     755forall( dtype DT ) void ?{}(        volatile void *          *,                 DT * );
     756forall( dtype DT ) void ?{}(        volatile void * volatile *,                 DT * );
     757forall( dtype DT ) void ?{}(        volatile void *          *,       volatile  DT * );
     758forall( dtype DT ) void ?{}(        volatile void * volatile *,       volatile  DT * );
     759forall( dtype DT ) void ?{}( const volatile void *           *,                 DT * );
     760forall( dtype DT ) void ?{}( const volatile void * volatile *,                  DT * );
     761forall( dtype DT ) void ?{}( const volatile void *           *, const           DT * );
     762forall( dtype DT ) void ?{}( const volatile void * volatile *, const            DT * );
     763forall( dtype DT ) void ?{}( const volatile void *           *,       volatile  DT * );
     764forall( dtype DT ) void ?{}( const volatile void * volatile *,        volatile  DT * );
     765forall( dtype DT ) void ?{}( const volatile void *           *, const volatile  DT * );
     766forall( dtype DT ) void ?{}( const volatile void * volatile *, const volatile   DT * );
     767
     768void    ?{}(                void *          *,                void * );
     769void    ?{}(                void * volatile *,                void * );
     770void    ?{}( const          void *          *,                void * );
     771void    ?{}( const          void * volatile *,                void * );
     772void    ?{}( const          void *          *, const          void * );
     773void    ?{}( const          void * volatile *, const          void * );
     774void    ?{}(       volatile void *          *,                void * );
     775void    ?{}(       volatile void * volatile *,                void * );
     776void    ?{}(       volatile void *          *,       volatile void * );
     777void    ?{}(       volatile void * volatile *,       volatile void * );
     778void    ?{}( const volatile void *          *,                void * );
     779void    ?{}( const volatile void * volatile *,                void * );
     780void    ?{}( const volatile void *          *, const          void * );
     781void    ?{}( const volatile void * volatile *, const          void * );
     782void    ?{}( const volatile void *          *,       volatile void * );
     783void    ?{}( const volatile void * volatile *,       volatile void * );
     784void    ?{}( const volatile void *          *, const volatile void * );
     785void    ?{}( const volatile void * volatile *, const volatile void * );
     786
     787//forall( dtype DT ) void ?{}(              DT *          *, forall( dtype DT2 ) const DT2 * );
     788//forall( dtype DT ) void ?{}(              DT * volatile *, forall( dtype DT2 ) const DT2 * );
     789forall( dtype DT ) void ?{}( const          DT *          *, forall( dtype DT2 ) const DT2 * );
     790forall( dtype DT ) void ?{}( const          DT * volatile *, forall( dtype DT2 ) const DT2 * );
     791//forall( dtype DT ) void ?{}( volatile     DT *          *, forall( dtype DT2 ) const DT2 * );
     792//forall( dtype DT ) void ?{}( volatile     DT * volatile *, forall( dtype DT2 ) const DT2 * );
     793forall( dtype DT ) void ?{}( const volatile DT *          *, forall( dtype DT2 ) const DT2 * );
     794forall( dtype DT ) void ?{}( const volatile DT * volatile *, forall( dtype DT2 ) const DT2 * );
     795
     796forall( ftype FT ) void ?{}( FT *          *, forall( ftype FT2 ) FT2 * );
     797forall( ftype FT ) void ?{}( FT * volatile *, forall( ftype FT2 ) FT2 * );
     798
     799// default ctors
     800forall( ftype FT ) void ?{}( FT *          * );
     801forall( ftype FT ) void ?{}( FT * volatile * );
     802
     803forall( dtype DT ) void ?{}(                 DT *          *);
     804forall( dtype DT ) void ?{}(                 DT * volatile *);
     805forall( dtype DT ) void ?{}( const           DT *          *);
     806forall( dtype DT ) void ?{}( const           DT * volatile *);
     807forall( dtype DT ) void ?{}(       volatile  DT *          *);
     808forall( dtype DT ) void ?{}(       volatile  DT * volatile *);
     809forall( dtype DT ) void ?{}( const volatile  DT *          *);
     810forall( dtype DT ) void ?{}( const volatile  DT * volatile *);
     811
     812void    ?{}(                void *          *);
     813void    ?{}(                void * volatile *);
     814void    ?{}( const          void *          *);
     815void    ?{}( const          void * volatile *);
     816void    ?{}(       volatile void *          *);
     817void    ?{}(       volatile void * volatile *);
     818void    ?{}( const volatile void *          *);
     819void    ?{}( const volatile void * volatile *);
     820
     821// dtors
     822forall( ftype FT ) void ^?{}( FT *         * );
     823forall( ftype FT ) void ^?{}( FT * volatile * );
     824
     825forall( dtype DT ) void ^?{}(                DT *          *);
     826forall( dtype DT ) void ^?{}(                DT * volatile *);
     827forall( dtype DT ) void ^?{}( const          DT *          *);
     828forall( dtype DT ) void ^?{}( const          DT * volatile *);
     829forall( dtype DT ) void ^?{}(      volatile  DT *          *);
     830forall( dtype DT ) void ^?{}(      volatile  DT * volatile *);
     831forall( dtype DT ) void ^?{}( const volatile  DT *         *);
     832forall( dtype DT ) void ^?{}( const volatile  DT * volatile *);
     833
     834void    ^?{}(               void *          *);
     835void    ^?{}(               void * volatile *);
     836void    ^?{}( const         void *          *);
     837void    ^?{}( const         void * volatile *);
     838void    ^?{}(      volatile void *          *);
     839void    ^?{}(      volatile void * volatile *);
     840void    ^?{}( const volatile void *         *);
     841void    ^?{}( const volatile void * volatile *);
  • src/main.cc

    r71f4e4f rf1e012b  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jan 13 16:47:25 2016
    13 // Update Count     : 181
     12// Last Modified On : Tue Jan 19 13:16:23 2016
     13// Update Count     : 185
    1414//
    1515
     
    247247                OPTPRINT( "fixNames" )
    248248                CodeGen::fixNames( translationUnit );
    249                 OPTPRINT( "tweak" )
     249                OPTPRINT( "tweakInit" )
    250250                InitTweak::tweak( translationUnit );
    251251
     
    266266                }
    267267
     268                OPTPRINT( "fixInit" )
    268269                // fix ObjectDecl - replaces ConstructorInit nodes
    269270                InitTweak::fix( translationUnit );
Note: See TracChangeset for help on using the changeset viewer.