ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change
on this file since 42dcae7 was
51b7345,
checked in by Peter A. Buhr <pabuhr@…>, 10 years ago
|
initial commit
|
-
Property mode set to
100644
|
File size:
850 bytes
|
Line | |
---|
1 | /* |
---|
2 | * This file is part of the Cforall project |
---|
3 | * |
---|
4 | * $Id: CommaExpr.cc,v 1.7 2005/08/29 20:59:25 rcbilson Exp $ |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Expression.h" |
---|
9 | #include "Type.h" |
---|
10 | #include "utility.h" |
---|
11 | |
---|
12 | |
---|
13 | CommaExpr::CommaExpr( Expression *arg1, Expression *arg2, Expression *_aname ) |
---|
14 | : Expression( _aname ), arg1( arg1 ), arg2( arg2 ) |
---|
15 | { |
---|
16 | cloneAll( arg2->get_results(), get_results() ); |
---|
17 | } |
---|
18 | |
---|
19 | CommaExpr::CommaExpr( const CommaExpr &other ) |
---|
20 | : Expression( other ), arg1( maybeClone( other.arg1 ) ), arg2( maybeClone( other.arg2 ) ) |
---|
21 | { |
---|
22 | } |
---|
23 | |
---|
24 | CommaExpr::~CommaExpr() |
---|
25 | { |
---|
26 | delete arg1; |
---|
27 | delete arg2; |
---|
28 | } |
---|
29 | |
---|
30 | void |
---|
31 | CommaExpr::print( std::ostream &os, int indent ) const |
---|
32 | { |
---|
33 | os << std::string( indent, ' ' ) << "Comma Expression:" << std::endl; |
---|
34 | arg1->print( os, indent+2 ); |
---|
35 | os << std::endl; |
---|
36 | arg2->print( os, indent+2 ); |
---|
37 | Expression::print( os, indent ); |
---|
38 | } |
---|
39 | |
---|
40 | |
---|
Note: See
TracBrowser
for help on using the repository browser.