Changeset 974906e2
- Timestamp:
- Jan 11, 2016, 2:48:05 PM (9 years ago)
- 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:
- a56767c
- Parents:
- 1e9d87b
- Location:
- src
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
r1e9d87b r974906e2 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri Dec 18 14:53:08 201513 // Update Count : 21 712 // Last Modified On : Thu Jan 07 13:40:05 2016 13 // Update Count : 219 14 14 // 15 15 … … 1142 1142 1143 1143 std::list<Expression*> designators; 1144 objectDecl->set_init( new SingleInit( alloc, designators ) );1144 objectDecl->set_init( new SingleInit( alloc, designators, false ) ); // not constructed 1145 1145 } 1146 1146 } -
src/InitTweak/InitModel.cc
r1e9d87b r974906e2 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // InitModel.cc -- 7 // InitModel.cc -- 8 8 // 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : T ue May 19 16:37:08 201513 // Update Count : 111 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Jan 07 13:38:46 2016 13 // Update Count : 5 14 14 // 15 15 … … 198 198 assert(init == 0 && single != 0); 199 199 std::list< Expression * > empty; 200 init = new SingleInit( single->get_expr(), empty );200 init = new SingleInit( single->get_expr(), empty, false ); // cannot be constructed 201 201 return; 202 202 } … … 214 214 } // if 215 215 216 init = new ListInit( contents ); 216 std::list< Expression * > desig; 217 init = new ListInit( contents, desig, false ); // cannot be constructed 217 218 return; 218 219 } -
src/InitTweak/RemoveInit.cc
r1e9d87b r974906e2 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Jan 07 11:34:33 2016 13 // Update Count : 23 14 // 15 12 // Last Modified On : Mon Jan 11 14:41:26 2016 13 // Update Count : 118 14 // 15 16 #include <stack> 17 #include <list> 16 18 #include "RemoveInit.h" 17 19 #include "SynTree/Declaration.h" … … 31 33 public: 32 34 RemoveInit(); 33 virtual ObjectDecl * mutate( ObjectDecl *objDecl);35 virtual ObjectDecl * mutate( ObjectDecl *objDecl ); 34 36 virtual DeclarationWithType * mutate( FunctionDecl *functionDecl ); 35 37 36 38 virtual Statement * mutate( ReturnStmt * returnStmt ); 37 38 virtual CompoundStmt * mutate(CompoundStmt * compoundStmt);39 39 40 40 protected: … … 44 44 }; 45 45 46 class CtorDtor : public GenPoly::PolyMutator { 47 public: 48 // CtorDtor(); 49 50 virtual ObjectDecl * mutate( ObjectDecl * ); 51 52 virtual CompoundStmt * mutate( CompoundStmt * compoundStmt ); 53 54 protected: 55 typedef std::map< std::string, DeclarationWithType * > MMMMAP; 56 std::stack< MMMMAP > constructedObjects; 57 58 // to be added before block ends - use push_front so order is correct 59 std::list< Statement * > destructorStmts; 60 }; 61 46 62 void tweak( std::list< Declaration * > translationUnit ) { 47 63 RemoveInit remover; 64 CtorDtor ctordtor; 48 65 mutateAll( translationUnit, remover ); 66 mutateAll( translationUnit, ctordtor ); 49 67 } 50 68 51 69 RemoveInit::RemoveInit() : tempNamer( "_retVal" ) {} 52 53 CompoundStmt *RemoveInit::mutate(CompoundStmt *compoundStmt) {54 mutateStatementList( compoundStmt->get_kids() );55 return compoundStmt;56 }57 70 58 71 // in the case where an object has an initializer and a polymorphic type, insert an assignment immediately after the … … 101 114 return decl; 102 115 } 116 117 bool tryConstruct( ObjectDecl * objDecl ) { 118 // xxx - handle designations 119 return objDecl->get_init() == NULL || 120 ( objDecl->get_init() != NULL && objDecl->get_init()->get_maybeConstructed() ); 121 } 122 123 ExprStmt * makeCtorDtorStmt( std::string name, ObjectDecl * objDecl, std::list< Expression * > args ) { 124 UntypedExpr * expr = new UntypedExpr( new NameExpr( name ) ); 125 expr->get_args().push_back( new VariableExpr( objDecl ) ); 126 expr->get_args().splice( expr->get_args().end(), args ); 127 return new ExprStmt( noLabels, expr ); 128 } 129 130 // InitExpander ctor/dtor being marked as weak symbols 131 // this is causing a bug - Rodolfo's InitExpander is being constructed and destructed 132 // with different fields, which causes a segfault 133 134 class InitExpander : public Visitor { 135 public: 136 InitExpander() {} 137 // ~InitExpander() {} 138 virtual void visit( SingleInit * singleInit ); 139 virtual void visit( ListInit * listInit ); 140 std::list< Expression * > argList; 141 }; 142 143 void InitExpander::visit( SingleInit * singleInit ) { 144 argList.push_back( singleInit->get_value()->clone() ); 145 } 146 147 void InitExpander::visit( ListInit * listInit ) { 148 // xxx - for now, assume no nested list inits 149 std::list<Initializer*>::iterator it = listInit->begin_initializers(); 150 for ( ; it != listInit->end_initializers(); ++it ) { 151 (*it)->accept( *this ); 152 } 153 } 154 155 std::list< Expression * > makeInitList( Initializer * init ) { 156 if ( init ) { 157 InitExpander expander; 158 // init->accept( expander ); 159 // std::list< Expression * > l = expander.argList; 160 std::list< Expression * > l; 161 return l; 162 } else { 163 std::list< Expression * > l; 164 return l; 165 } 166 } 167 168 ObjectDecl * CtorDtor::mutate( ObjectDecl * objDecl ) { 169 // hands off if designated or if @= 170 if ( tryConstruct( objDecl ) ) { 171 ExprStmt * ctor = makeCtorDtorStmt( "?{}", objDecl, makeInitList( objDecl->get_init() ) ); 172 ExprStmt * dtor = makeCtorDtorStmt( "^?{}", objDecl, std::list< Expression * >() ); 173 174 // set_ctor... 175 // need to remember init expression, in case no ctors exist 176 // if ctor does exist, want to use ctor stmt instead of init 177 objDecl->set_ctor( ctor ); 178 destructorStmts.push_front( dtor ); 179 } 180 return objDecl; 181 } 182 183 CompoundStmt * CtorDtor::mutate( CompoundStmt * compoundStmt ) { 184 CompoundStmt * ret = PolyMutator::mutate( compoundStmt ); 185 std::list< Statement * > &statements = ret->get_kids(); 186 if ( ! destructorStmts.empty() ) { 187 statements.splice( statements.end(), destructorStmts ); 188 } // if 189 return ret; 190 } 191 192 193 103 194 } // namespace InitTweak 104 195 -
src/MakeLibCfa.cc
r1e9d87b r974906e2 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // MakeLibCfa.cc -- 7 // MakeLibCfa.cc -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sat May 16 10:33:33 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri Jul 03 18:11:37 201513 // Update Count : 1814 // 12 // Last Modified On : Thu Jan 07 13:34:39 2016 13 // Update Count : 20 14 // 15 15 16 16 #include "MakeLibCfa.h" … … 29 29 void visit( FunctionDecl* funcDecl ); 30 30 void visit( ObjectDecl* objDecl ); 31 31 32 32 std::list< Declaration* > &get_newDecls() { return newDecls; } 33 33 private: … … 43 43 void MakeLibCfa::visit( FunctionDecl* origFuncDecl ) { 44 44 if ( origFuncDecl->get_linkage() != LinkageSpec::Intrinsic ) return; 45 45 46 46 FunctionDecl *funcDecl = origFuncDecl->clone(); 47 47 CodeGen::OperatorInfo opInfo; … … 99 99 void MakeLibCfa::visit( ObjectDecl* origObjDecl ) { 100 100 if ( origObjDecl->get_linkage() != LinkageSpec::Intrinsic ) return; 101 101 102 102 ObjectDecl *objDecl = origObjDecl->clone(); 103 103 assert( ! objDecl->get_init() ); 104 104 std::list< Expression* > noDesignators; 105 objDecl->set_init( new SingleInit( new NameExpr( objDecl->get_name() ), noDesignators ) );105 objDecl->set_init( new SingleInit( new NameExpr( objDecl->get_name() ), noDesignators, false ) ); // cannot be constructed 106 106 newDecls.push_back( objDecl ); 107 107 } -
src/Parser/DeclarationNode.cc
r1e9d87b r974906e2 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // DeclarationNode.cc -- 7 // DeclarationNode.cc -- 8 8 // 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 12:34:05 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : T ue Jul 14 14:46:32 201513 // Update Count : 1 2611 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Jan 07 13:18:02 2016 13 // Update Count : 130 14 14 // 15 15 … … 96 96 os << endl << string( indent + 2, ' ' ) << "with initializer "; 97 97 initializer->printOneLine( os ); 98 os << " maybe constructed? " << initializer->get_maybeConstructed(); 99 98 100 } // if 99 101 … … 357 359 } // if 358 360 } 359 361 360 362 DeclarationNode *DeclarationNode::addQualifiers( DeclarationNode *q ) { 361 363 if ( q ) { … … 508 510 assert( false ); 509 511 } // switch 510 512 511 513 return this; 512 514 } … … 619 621 assert( a->type->kind == TypeData::Array ); 620 622 TypeData *lastArray = findLast( a->type ); 621 if ( type ) { 623 if ( type ) { 622 624 switch ( type->kind ) { 623 625 case TypeData::Aggregate: … … 663 665 } // if 664 666 } 665 667 666 668 DeclarationNode *DeclarationNode::addIdList( DeclarationNode *ids ) { 667 669 type = addIdListToType( type, ids ); … … 868 870 Type *DeclarationNode::buildType() const { 869 871 assert( type ); 870 872 871 873 switch ( type->kind ) { 872 874 case TypeData::Enum: -
src/Parser/InitializerNode.cc
r1e9d87b r974906e2 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // InitializerNode.cc -- 8 // 7 // InitializerNode.cc -- 8 // 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 13:20:24 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Oct 8 17:18:55 201513 // Update Count : 414 // 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Jan 07 13:32:57 2016 13 // Update Count : 13 14 // 15 15 16 16 #include <cassert> … … 23 23 24 24 InitializerNode::InitializerNode( ExpressionNode *_expr, bool aggrp, ExpressionNode *des ) 25 : expr( _expr ), aggregate( aggrp ), designator( des ), kids( 0 ) {25 : expr( _expr ), aggregate( aggrp ), designator( des ), kids( 0 ), maybeConstructed( true ) { 26 26 if ( aggrp ) 27 27 kids = dynamic_cast< InitializerNode *>( get_link() ); … … 32 32 33 33 InitializerNode::InitializerNode( InitializerNode *init, bool aggrp, ExpressionNode *des ) 34 : expr( 0 ), aggregate( aggrp ), designator( des ), kids( 0 ) {34 : expr( 0 ), aggregate( aggrp ), designator( des ), kids( 0 ), maybeConstructed( true ) { 35 35 if ( init != 0 ) 36 36 set_link(init); … … 91 91 } // if 92 92 93 return new ListInit( initlist, designlist );93 return new ListInit( initlist, designlist, maybeConstructed ); 94 94 } else { 95 95 std::list< Expression *> designators; … … 99 99 100 100 if ( get_expression() != 0) 101 return new SingleInit( get_expression()->build(), designators );101 return new SingleInit( get_expression()->build(), designators, maybeConstructed ); 102 102 } // if 103 103 -
src/Parser/ParseNode.h
r1e9d87b r974906e2 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // ParseNode.h -- 7 // ParseNode.h -- 8 8 // 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Aug 19 15:59:27 201513 // Update Count : 17 412 // Last Modified On : Thu Jan 07 13:17:46 2016 13 // Update Count : 177 14 14 // 15 15 … … 175 175 public: 176 176 enum Type { TupleC, Comma, TupleFieldSel, 177 Cond, NCond, 178 SizeOf, AlignOf, Attr, CompLit, Plus, Minus, Mul, Div, Mod, Or, And, 179 BitOr, BitAnd, Xor, Cast, LShift, RShift, LThan, GThan, LEThan, GEThan, Eq, Neq, 180 Assign, MulAssn, DivAssn, ModAssn, PlusAssn, MinusAssn, LSAssn, RSAssn, AndAssn, 177 Cond, NCond, 178 SizeOf, AlignOf, Attr, CompLit, Plus, Minus, Mul, Div, Mod, Or, And, 179 BitOr, BitAnd, Xor, Cast, LShift, RShift, LThan, GThan, LEThan, GEThan, Eq, Neq, 180 Assign, MulAssn, DivAssn, ModAssn, PlusAssn, MinusAssn, LSAssn, RSAssn, AndAssn, 181 181 ERAssn, OrAssn, Index, FieldSel, PFieldSel, Range, 182 182 UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost, LabelAddress, … … 307 307 ValofExprNode( const ValofExprNode &other ); 308 308 ~ValofExprNode(); 309 309 310 310 virtual ValofExprNode *clone() const { return new ValofExprNode( *this ); } 311 311 … … 330 330 enum TypeClass { Type, Dtype, Ftype }; 331 331 332 static const char *storageName[]; 332 static const char *storageName[]; 333 333 static const char *qualifierName[]; 334 334 static const char *basicTypeName[]; … … 420 420 class StatementNode : public ParseNode { 421 421 public: 422 enum Type { Exp, If, Switch, Case, Default, Choose, Fallthru, 422 enum Type { Exp, If, Switch, Case, Default, Choose, Fallthru, 423 423 While, Do, For, 424 424 Goto, Continue, Break, Return, Throw, … … 518 518 ExpressionNode *get_designators() const { return designator; } 519 519 520 InitializerNode *set_maybeConstructed( bool value ) { maybeConstructed = value; return this; } 521 bool get_maybeConstructed() const { return maybeConstructed; } 522 520 523 InitializerNode *next_init() const { return kids; } 521 524 … … 529 532 ExpressionNode *designator; // may be list 530 533 InitializerNode *kids; 534 bool maybeConstructed; 531 535 }; 532 536 -
src/Parser/parser.cc
r1e9d87b r974906e2 7291 7291 /* Line 1806 of yacc.c */ 7292 7292 #line 1684 "parser.yy" 7293 { (yyval.in) = (yyvsp[(2) - (2)].in) ; }7293 { (yyval.in) = (yyvsp[(2) - (2)].in)->set_maybeConstructed( false ); } 7294 7294 break; 7295 7295 -
src/Parser/parser.yy
r1e9d87b r974906e2 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // cfa.y -- 8 // 7 // cfa.y -- 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Sat Sep 1 20:22:55 2001 … … 12 12 // Last Modified On : Thu Oct 8 17:17:54 2015 13 13 // Update Count : 1473 14 // 14 // 15 15 16 16 // This grammar is based on the ANSI99/11 C grammar, specifically parts of EXPRESSION and STATEMENTS, and on the C … … 1682 1682 { $$ = $2; } 1683 1683 | ATassign initializer 1684 { $$ = $2 ; }1684 { $$ = $2->set_maybeConstructed( false ); } 1685 1685 ; 1686 1686 -
src/SynTree/Declaration.h
r1e9d87b r974906e2 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Declaration.h -- 7 // Declaration.h -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Dec 09 14:08:22 201513 // Update Count : 3 212 // Last Modified On : Thu Jan 07 14:48:44 2016 13 // Update Count : 34 14 14 // 15 15 … … 91 91 Expression *get_bitfieldWidth() const { return bitfieldWidth; } 92 92 void set_bitfieldWidth( Expression *newValue ) { bitfieldWidth = newValue; } 93 ExprStmt * get_ctor() const { return ctor; } 94 void set_ctor( ExprStmt * newValue ) { ctor = newValue; } 93 95 94 96 virtual ObjectDecl *clone() const { return new ObjectDecl( *this ); } … … 101 103 Initializer *init; 102 104 Expression *bitfieldWidth; 105 ExprStmt * ctor; 103 106 }; 104 107 -
src/SynTree/Initializer.cc
r1e9d87b r974906e2 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Initializer.cc -- 7 // Initializer.cc -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Aug 12 14:05:25 201513 // Update Count : 1412 // Last Modified On : Thu Jan 07 15:00:18 2016 13 // Update Count : 23 14 14 // 15 15 … … 18 18 #include "utility.h" 19 19 20 Initializer::Initializer( ) {}20 Initializer::Initializer( bool maybeConstructed ) : maybeConstructed( maybeConstructed ) {} 21 21 22 22 Initializer::~Initializer() {} … … 31 31 void Initializer::print( std::ostream &os, int indent ) {} 32 32 33 SingleInit::SingleInit( Expression *v, std::list< Expression *> &_designators ) : value ( v ), designators( _designators ) {33 SingleInit::SingleInit( Expression *v, std::list< Expression *> &_designators, bool maybeConstructed ) : Initializer( maybeConstructed ), value ( v ), designators( _designators ) { 34 34 } 35 35 36 SingleInit::SingleInit( const SingleInit &other ) : value ( other.value ) {36 SingleInit::SingleInit( const SingleInit &other ) : Initializer(other), value ( other.value ) { 37 37 cloneAll(other.designators, designators ); 38 38 } … … 54 54 } 55 55 56 ListInit::ListInit( std::list<Initializer*> &_initializers, std::list<Expression *> &_designators )57 : initializers( _initializers ), designators( _designators ) {56 ListInit::ListInit( std::list<Initializer*> &_initializers, std::list<Expression *> &_designators, bool maybeConstructed ) 57 : Initializer( maybeConstructed), initializers( _initializers ), designators( _designators ) { 58 58 } 59 59 … … 65 65 66 66 void ListInit::print( std::ostream &os, int indent ) { 67 os << std::endl << std::string(indent, ' ') << "Compound initializer: "; 67 os << std::endl << std::string(indent, ' ') << "Compound initializer: "; 68 68 if ( ! designators.empty() ) { 69 69 os << std::string(indent + 2, ' ' ) << "designated by: ["; 70 70 for ( std::list < Expression * >::iterator i = designators.begin(); 71 71 i != designators.end(); i++ ) { 72 ( *i )->print(os, indent + 4 ); 72 ( *i )->print(os, indent + 4 ); 73 73 } // for 74 74 75 75 os << std::string(indent + 2, ' ' ) << "]"; 76 76 } // if 77 77 78 for ( std::list<Initializer *>::iterator i = initializers.begin(); i != initializers.end(); i++ ) 78 for ( std::list<Initializer *>::iterator i = initializers.begin(); i != initializers.end(); i++ ) 79 79 (*i)->print( os, indent + 2 ); 80 80 } -
src/SynTree/Initializer.h
r1e9d87b r974906e2 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Initializer.h -- 7 // Initializer.h -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon May 18 09:03:48 201513 // Update Count : 111 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Jan 07 13:33:20 2016 13 // Update Count : 5 14 14 // 15 15 … … 27 27 public: 28 28 // Initializer( std::string _name = std::string(""), int _pos = 0 ); 29 Initializer( );29 Initializer( bool maybeConstructed ); 30 30 virtual ~Initializer(); 31 31 … … 43 43 } 44 44 45 bool get_maybeConstructed() { return maybeConstructed; } 46 45 47 virtual Initializer *clone() const = 0; 46 48 virtual void accept( Visitor &v ) = 0; … … 50 52 // std::string name; 51 53 // int pos; 54 bool maybeConstructed; 52 55 }; 53 56 … … 55 58 class SingleInit : public Initializer { 56 59 public: 57 SingleInit( Expression *value, std::list< Expression *> &designators );60 SingleInit( Expression *value, std::list< Expression *> &designators, bool maybeConstructed ); 58 61 SingleInit( const SingleInit &other ); 59 62 virtual ~SingleInit(); 60 63 61 64 Expression *get_value() { return value; } 62 65 void set_value( Expression *newValue ) { value = newValue; } … … 79 82 class ListInit : public Initializer { 80 83 public: 81 ListInit( std::list<Initializer*> &, 82 std::list<Expression *> &designators = *(new std::list<Expression *>()));84 ListInit( std::list<Initializer*> &, 85 std::list<Expression *> &designators, bool maybeConstructed ); 83 86 virtual ~ListInit(); 84 87 -
src/SynTree/ObjectDecl.cc
r1e9d87b r974906e2 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // ObjectDecl.cc -- 7 // ObjectDecl.cc -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Sep 29 14:13:01 201513 // Update Count : 1812 // Last Modified On : Fri Jan 08 15:29:10 2016 13 // Update Count : 27 14 14 // 15 15 … … 19 19 #include "Expression.h" 20 20 #include "utility.h" 21 #include "Statement.h" 21 22 22 23 ObjectDecl::ObjectDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, Expression *bitfieldWidth, Type *type, Initializer *init, bool isInline, bool isNoreturn ) … … 24 25 set_isInline( isInline ); 25 26 set_isNoreturn( isNoreturn ); 27 set_ctor( NULL ); 26 28 } 27 29 28 30 ObjectDecl::ObjectDecl( const ObjectDecl &other ) 29 : Parent( other ), type( maybeClone( other.type ) ), init( maybeClone( other.init ) ), bitfieldWidth( maybeClone( other.bitfieldWidth ) ) {31 : Parent( other ), type( maybeClone( other.type ) ), init( maybeClone( other.init ) ), bitfieldWidth( maybeClone( other.bitfieldWidth ) ), ctor( maybeClone( other.ctor ) ) { 30 32 } 31 33 … … 34 36 delete init; 35 37 delete bitfieldWidth; 38 delete ctor; 36 39 } 37 40 … … 58 61 os << " with initializer "; 59 62 init->print( os, indent ); 63 os << std::string(indent, ' ') << "maybeConstructed? " << init->get_maybeConstructed(); 60 64 } // if 61 65 … … 64 68 bitfieldWidth->print( os ); 65 69 } // if 70 71 if ( ctor ) { 72 os << " initially constructed with "; 73 ctor->print( os, indent ); 74 } // if 66 75 } 67 76 … … 69 78 #if 0 70 79 if ( get_mangleName() != "") { 71 os << get_mangleName() << ": "; 72 } else 80 os << get_mangleName() << ": "; 81 } else 73 82 #endif 74 83 if ( get_name() != "" ) {
Note: See TracChangeset
for help on using the changeset viewer.