Changeset f5ef08c


Ignore:
Timestamp:
Mar 18, 2016, 1:56:41 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:
6943f051
Parents:
dac0aa9
Message:

added missing char ctor/dtors to prelude

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Autogen.cc

    rdac0aa9 rf5ef08c  
    261261                                if ( parameter != params.end() ) {
    262262                                        // matching parameter, initialize field with copy ctor
    263                                         std::cerr << "matching parameter - copy ctor" << std::endl;
    264263                                        Expression *srcselect = new VariableExpr(*parameter);
    265264                                        makeStructMemberOp( dstParam, srcselect, field, func, genericSubs, isGeneric );
    266265                                        ++parameter;
    267266                                } else {
    268                                         std::cerr << "no matching parameter - default ctor" << std::endl;
    269267                                        // no matching parameter, initialize field with default ctor
    270268                                        makeStructMemberOp( dstParam, NULL, field, func, genericSubs, isGeneric );
     
    320318
    321319                // create constructors which take each member type as a parameter.
    322                 // we might be able to eventually collapse this into a single function
    323                 // which uses default parameters
     320                // for example, for struct A { int x, y; }; generate
     321                // void ?{}(A *, int) and void ?{}(A *, int, int)
    324322                std::list<Declaration *> memCtors;
    325323                FunctionType * memCtorType = ctorType->clone();
  • src/libcfa/prelude.cf

    rdac0aa9 rf5ef08c  
    639639// default ctor
    640640void    ?{}( _Bool * ),                         ?{}( volatile _Bool * );
    641 void    ?{}( unsigned char * ),                 ?{}( volatile unsigned char * );
     641void    ?{}( char * ),  ?{}( volatile char * );
     642void    ?{}( unsigned char * ), ?{}( volatile unsigned char * );
     643void    ?{}( char signed * ),                   ?{}( volatile char signed * );
     644void    ?{}( int short * ),                             ?{}( volatile int short * );
     645void    ?{}( int short unsigned * ),    ?{}( volatile int short unsigned * );
    642646void    ?{}( signed int * ),                    ?{}( volatile signed int * );
    643647void    ?{}( unsigned int * ),                  ?{}( volatile unsigned int * );
     
    655659// copy ctor
    656660void    ?{}( _Bool *, _Bool ),                                  ?{}( volatile _Bool *, _Bool );
     661void    ?{}( char *, char ),    ?{}( volatile char *, char );
    657662void    ?{}( unsigned char *, unsigned char ),                  ?{}( volatile unsigned char *, unsigned char );
     663void    ?{}( char signed *, char signed ),                      ?{}( volatile char signed *, char signed );
     664void    ?{}( int short *, int short ),                          ?{}( volatile int short *, int short );
     665void    ?{}( int short unsigned *, int short unsigned ),        ?{}( volatile int short unsigned *, int short unsigned );
    658666void    ?{}( signed int *, signed int),                         ?{}( volatile signed int *, signed int );
    659667void    ?{}( unsigned int *, unsigned int),                     ?{}( volatile unsigned int *, unsigned int );
     
    671679// dtor
    672680void    ^?{}( _Bool * ),                        ^?{}( volatile _Bool * );
     681void    ^?{}( char * ), ^?{}( volatile char * );
     682void    ^?{}( char unsigned * ),                        ^?{}( volatile char unsigned * );
     683void    ^?{}( char signed * ),                  ^?{}( volatile char signed * );
     684void    ^?{}( int short * ),                            ^?{}( volatile int short * );
     685void    ^?{}( int short unsigned * ),   ^?{}( volatile int short unsigned * );
    673686void    ^?{}( signed int * ),                   ^?{}( volatile signed int * );
    674687void    ^?{}( unsigned int * ),                 ^?{}( volatile unsigned int * );
Note: See TracChangeset for help on using the changeset viewer.