Changeset 5b2f5bb for src/SynTree
- Timestamp:
- Mar 30, 2016, 3:48:55 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:
- e0323a2
- Parents:
- 4cc4286
- Location:
- src/SynTree
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Initializer.cc
r4cc4286 r5b2f5bb 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Jan 13 15:31:45201612 // Last Modified On : Wed Mar 30 13:58:32 2016 13 13 // Update Count : 28 14 14 // … … 16 16 #include "Initializer.h" 17 17 #include "Expression.h" 18 #include "Statement.h" 18 19 #include "Common/utility.h" 19 20 … … 81 82 82 83 83 ConstructorInit::ConstructorInit( Expression * ctor, Initializer * init ) : Initializer( true ), ctor( ctor ), init( init ) {}84 ConstructorInit::ConstructorInit( Statement * ctor, Statement * dtor, Initializer * init ) : Initializer( true ), ctor( ctor ), dtor( dtor ), init( init ) {} 84 85 ConstructorInit::~ConstructorInit() { 85 86 delete ctor; … … 98 99 } // if 99 100 101 if ( dtor ) { 102 os << " destructed with "; 103 dtor->print( os, indent+2 ); 104 } 105 100 106 if ( init ) { 101 107 os << " with fallback C-style initializer: "; -
src/SynTree/Initializer.h
r4cc4286 r5b2f5bb 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Feb 09 14:40:15201612 // Last Modified On : Wed Mar 30 13:22:08 2016 13 13 // Update Count : 19 14 14 // … … 107 107 class ConstructorInit : public Initializer { 108 108 public: 109 ConstructorInit( Expression * ctor, Initializer * init );109 ConstructorInit( Statement * ctor, Statement * dtor, Initializer * init ); 110 110 virtual ~ConstructorInit(); 111 111 112 void set_ctor( Expression * newValue ) { ctor = newValue; } 113 Expression * get_ctor() const { return ctor; } 112 void set_ctor( Statement * newValue ) { ctor = newValue; } 113 Statement * get_ctor() const { return ctor; } 114 void set_dtor( Statement * newValue ) { dtor = newValue; } 115 Statement * get_dtor() const { return dtor; } 114 116 void set_init( Initializer * newValue ) { init = newValue; } 115 117 Initializer * get_init() const { return init; } … … 121 123 122 124 private: 123 Expression * ctor; 125 Statement * ctor; 126 Statement * dtor; 124 127 // C-style initializer made up of SingleInit and ListInit nodes to use as a fallback 125 128 // if an appropriate constructor definition is not found by the resolver
Note: See TracChangeset
for help on using the changeset viewer.