Making debug info toggles a flag to allow finer control.

This commit is contained in:
Ben Vanik
2014-01-13 21:12:10 -08:00
parent dfaa0e2d08
commit faa75c9407
13 changed files with 54 additions and 24 deletions

View File

@@ -17,6 +17,22 @@ namespace alloy {
namespace runtime {
enum DebugInfoFlags {
DEBUG_INFO_NONE = 0,
DEBUG_INFO_SOURCE_DISASM = (1 << 1),
DEBUG_INFO_RAW_HIR_DISASM = (1 << 2),
DEBUG_INFO_HIR_DISASM = (1 << 3),
DEBUG_INFO_RAW_LIR_DISASM = (1 << 4),
DEBUG_INFO_LIR_DISASM = (1 << 5),
DEBUG_INFO_MACHINE_CODE_DISASM = (1 << 6),
DEBUG_INFO_ALL_DISASM = 0xFFFF,
DEBUG_INFO_JSON = (1 << 16),
};
class DebugInfo {
public:
DebugInfo();

View File

@@ -250,7 +250,7 @@ int Runtime::DemandFunction(
if (symbol_status == SymbolInfo::STATUS_NEW) {
// Symbol is undefined, so define now.
Function* function = NULL;
int result = frontend_->DefineFunction(symbol_info, false, &function);
int result = frontend_->DefineFunction(symbol_info, DEBUG_INFO_NONE, &function);
if (result) {
symbol_info->set_status(SymbolInfo::STATUS_FAILED);
return result;