ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
checkIsModifiedFlag.C
Go to the documentation of this file.
1 // tps (01/14/2010) : Switching from rose.h to sage3.
2 #include "sage3basic.h"
3 #include "checkIsModifiedFlag.h"
4 using namespace std;
5 
9  {
10  // DQ (7/7/2005): Introduce tracking of performance of ROSE.
11  TimingPerformance timer ("Check the isModifiedFlag in each IR node:");
12 
13  return CheckIsModifiedFlagSupport(node);
14  }
15 
16 // QY
17 bool
19 {
20  bool retval=false;
21 
22  // DQ (7/21/2010): This appears to be consuming 8-9 Gig of memory for the case of ROSE compiling a large source file.
23  // RPM (8/2/2010): However, binary unparsing depends on being able to see when the AST has been modified.
24 #if 1
25  if (node->get_isModified()) {
26  node->set_isModified(false);
27  retval = true;
28  }
29 
30  vector <SgNode*> children = node->get_traversalSuccessorContainer();
31  for (vector<SgNode*>::const_iterator p = children.begin(); p != children.end(); ++p) {
32  SgNode *cur = *p;
33  if (cur && node==cur->get_parent() && CheckIsModifiedFlagSupport(cur))
34  retval = true;
35  }
36 #endif
37 
38  return retval;
39 }
40