Changeset 353d168 for src/SynTree/Statement.cc
- Timestamp:
- Aug 19, 2015, 3:59:45 PM (10 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:
- 830c21a
- Parents:
- 18997b9 (diff), 4aa0858 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Statement.cc
r18997b9 r353d168 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Jul 15 14:57:40 201513 // Update Count : 2711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 25 12:19:50 2015 13 // Update Count : 53 14 14 // 15 15 … … 42 42 expr->print( os, indent + 2 ); 43 43 } 44 45 46 AsmStmt::AsmStmt( std::list<Label> labels, bool voltile, ConstantExpr *instruction, std::list<Expression *> output, std::list<Expression *> input, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels ) : Statement( labels ), voltile( voltile ), instruction( instruction ), output( output ), input( input ), clobber( clobber ), gotolabels( gotolabels ) {} 47 48 AsmStmt::~AsmStmt() { 49 delete instruction; 50 deleteAll( output ); 51 deleteAll( input ); 52 deleteAll( clobber ); 53 } 54 55 void AsmStmt::print( std::ostream &os, int indent ) const { 56 os << "Assembler Statement:" << endl; 57 os << std::string( indent, ' ' ) << "instruction: " << endl << std::string( indent, ' ' ); 58 instruction->print( os, indent + 2 ); 59 if ( ! output.empty() ) { 60 os << endl << std::string( indent, ' ' ) << "output: " << endl; 61 printAll( output, os, indent + 2 ); 62 } // if 63 if ( ! input.empty() ) { 64 os << std::string( indent, ' ' ) << "input: " << endl << std::string( indent, ' ' ); 65 printAll( input, os, indent + 2 ); 66 } // if 67 if ( ! clobber.empty() ) { 68 os << std::string( indent, ' ' ) << "clobber: " << endl; 69 printAll( clobber, os, indent + 2 ); 70 } // if 71 } 72 44 73 45 74 const char *BranchStmt::brType[] = { "Goto", "Break", "Continue" };
Note:
See TracChangeset
for help on using the changeset viewer.