Changes in src/SynTree/Statement.cc [7f5566b:145f1fc]
- File:
-
- 1 edited
-
src/SynTree/Statement.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Statement.cc
r7f5566b r145f1fc 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 : Sat Jul 25 12:19:50 201513 // Update Count : 5311 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Jul 15 14:57:40 2015 13 // Update Count : 27 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 } // if63 if ( ! input.empty() ) {64 os << std::string( indent, ' ' ) << "input: " << endl << std::string( indent, ' ' );65 printAll( input, os, indent + 2 );66 } // if67 if ( ! clobber.empty() ) {68 os << std::string( indent, ' ' ) << "clobber: " << endl;69 printAll( clobber, os, indent + 2 );70 } // if71 }72 73 44 74 45 const char *BranchStmt::brType[] = { "Goto", "Break", "Continue" };
Note:
See TracChangeset
for help on using the changeset viewer.