source: src/InitTweak/InitExpander.cc @ f678663e

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 f678663e was 843054c2, checked in by Peter A. Buhr <pabuhr@…>, 9 years ago

licencing: seventh groups of files

  • Property mode set to 100644
File size: 1.3 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// InitExpander.cc --
8//
9// Author           : Rodolfo G. Esteves
10// Created On       : Mon May 18 07:44:20 2015
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Tue May 19 16:34:12 2015
13// Update Count     : 1
14//
15
16#include <list>
17#include <stack>
18#include <cassert>
19#include <algorithm>
20
21#include "utility.h"
22#include "InitExpander.h"
23#include "InitModel.h"
24
25namespace InitTweak {
26        InitExpander::InitExpander() {}
27
28        InitExpander::~InitExpander() {}
29
30        ObjectDecl *InitExpander::mutate( ObjectDecl *objectDecl ) {
31                index.visit( objectDecl );
32
33                if ( objectDecl->get_init() == 0 ) return objectDecl;
34
35                InitModelBuilder builder( objectDecl );
36                builder.get_assoc()->display( std::cerr ); // xxx
37                InitModelFiller filler( builder.get_assoc(), objectDecl->get_init(), true );
38                // filler.get_assoc()->display( std::cerr ); // xxx
39                InitUnspooler exp;
40                filler.get_assoc()->accept( exp );
41                objectDecl->set_init( exp.grab_initializer() );
42                objectDecl->get_init()->print( std::cerr );
43
44                return objectDecl;
45        }
46} // namespace InitTweak
47
48// Local Variables: //
49// tab-width: 4 //
50// mode: c++ //
51// compile-command: "make install" //
52// End: //
Note: See TracBrowser for help on using the repository browser.