source: translator/InitTweak/InitExpander.cc @ 51587aa

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

licencing: fourth 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// XXX.cc --
8//
9// Author           : Richard C. Bilson
10// Created On       : Mon May 18 07:44:20 2015
11// Last Modified By :
12// Last Modified On :
13// Update Count     : 0
14//
15#include <list>
16#include <stack>
17#include <cassert>
18#include <algorithm>
19
20
21#include "utility.h"
22#include "InitExpander.h"
23#include "InitModel.h"
24
25namespace InitTweak {
26
27  InitExpander::InitExpander() {}
28
29  InitExpander::~InitExpander() {}
30
31  ObjectDecl *InitExpander::mutate( ObjectDecl *objectDecl ) {
32    index.visit( objectDecl );
33
34    if ( objectDecl->get_init() == 0 ) return objectDecl;
35
36    InitModelBuilder builder( objectDecl );
37    builder.get_assoc()->display( std::cerr ); // xxx
38    InitModelFiller filler( builder.get_assoc(), objectDecl->get_init(), true );
39    // filler.get_assoc()->display( std::cerr ); // xxx
40    InitUnspooler exp;
41    filler.get_assoc()->accept( exp );
42    objectDecl->set_init( exp.grab_initializer() );
43    objectDecl->get_init()->print( std::cerr );
44
45    return objectDecl;
46  }
47
48} // namespace InitTweak
49
50// Local Variables: //
51// tab-width: 4 //
52// mode: c++ //
53// compile-command: "make install" //
54// End: //
Note: See TracBrowser for help on using the repository browser.