namespace GL {
namespace SL {
-ConstantSpecializer::ConstantSpecializer():
- values(0)
-{ }
-
void ConstantSpecializer::apply(Stage &stage, const map<string, int> &v)
{
values = &v;
}
-InlineableFunctionLocator::InlineableFunctionLocator():
- current_function(0),
- return_count(0)
-{ }
-
void InlineableFunctionLocator::visit(FunctionCall &call)
{
FunctionDeclaration *def = call.declaration;
}
-InlineContentInjector::InlineContentInjector():
- source_func(0),
- pass(REFERENCED)
-{ }
-
string InlineContentInjector::apply(Stage &stage, FunctionDeclaration &target_func, Block &tgt_blk, const NodeList<Statement>::iterator &ins_pt, FunctionCall &call)
{
source_func = call.declaration->definition;
}
-FunctionInliner::FunctionInliner():
- current_function(0),
- r_any_inlined(false),
- r_inlined_here(false)
-{ }
-
bool FunctionInliner::apply(Stage &s)
{
stage = &s;
}
-ExpressionInliner::ExpressionInliner():
- r_ref_info(0),
- r_trivial(false),
- access_read(true),
- access_write(false),
- iteration_init(false),
- iteration_body(0),
- r_oper(0)
-{ }
-
bool ExpressionInliner::apply(Stage &s)
{
s.content.visit(*this);
}
-UnreachableCodeRemover::UnreachableCodeRemover():
- reachable(true)
-{ }
-
bool UnreachableCodeRemover::apply(Stage &stage)
{
stage.content.visit(*this);
}
-UnusedVariableRemover::UnusedVariableRemover():
- stage(0),
- interface_block(0),
- r_assignment(0),
- assignment_target(false),
- r_side_effects(false),
- in_struct(false),
- composite_reference(false),
- in_loop(0)
-{ }
-
bool UnusedVariableRemover::apply(Stage &s)
{
stage = &s;