source: src/InitTweak/InitExpander.cc @ 09a9a8b

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

licencing: seventh groups of files

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[51587aa]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//
[a08ba92]7// InitExpander.cc --
[51587aa]8//
[843054c2]9// Author           : Rodolfo G. Esteves
[51587aa]10// Created On       : Mon May 18 07:44:20 2015
[a08ba92]11// Last Modified By : Peter A. Buhr
12// Last Modified On : Tue May 19 16:34:12 2015
13// Update Count     : 1
[51587aa]14//
[a08ba92]15
[51b7345]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 {
[a08ba92]26        InitExpander::InitExpander() {}
[51b7345]27
[a08ba92]28        InitExpander::~InitExpander() {}
[51b7345]29
[a08ba92]30        ObjectDecl *InitExpander::mutate( ObjectDecl *objectDecl ) {
31                index.visit( objectDecl );
[51b7345]32
[a08ba92]33                if ( objectDecl->get_init() == 0 ) return objectDecl;
[51b7345]34
[a08ba92]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 );
[51b7345]43
[a08ba92]44                return objectDecl;
45        }
[51b7345]46} // namespace InitTweak
47
[51587aa]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.