#include <msp/strings/format.h>
#include "compatibility.h"
#include "compiler.h"
+#include "debug.h"
#include "error.h"
#include "generate.h"
#include "optimize.h"
return module->source_map;
}
+string Compiler::get_stage_debug(Stage::Type stage_type) const
+{
+ for(list<Stage>::iterator i=module->stages.begin(); i!=module->stages.end(); ++i)
+ if(i->type==stage_type)
+ return DumpTree().apply(*i);
+ throw key_error(Stage::get_stage_name(stage_type));
+}
+
void Compiler::append_module(Module &mod, DataFile::Collection *res)
{
module->source_map.merge_from(mod.source_map);