polserver/pol-core/bscript/compiler/codegen/DebugBlockGuard.h
Eric Swanson 1567241871
New compiler: write debug info (.dbg and .dbg.txt) (#302)
Also: OG compiler debug info for foreach iterator changed to match actual variable name

Adds:
- ast/DebugStatementMarker: for "intrusive debug" (ecompile -i) instructions
- codegen/DebugBlockGuard: pushes and pops debug block #
- format/DebugStoreSerializer: writes .dbg and .dbg.txt files
- representation/DebugBlock: holds parent block # and local variable names for each block
- representation/DebugStore: holds all debug information
2020-09-12 14:26:58 -07:00

26 lines
499 B
C++

#ifndef POLSERVER_DEBUGBLOCKGUARD_H
#define POLSERVER_DEBUGBLOCKGUARD_H
#include <memory>
#include <vector>
namespace Pol::Bscript::Compiler
{
class InstructionEmitter;
class LocalVariableScopeInfo;
class Variable;
class DebugBlockGuard
{
public:
DebugBlockGuard( InstructionEmitter&, LocalVariableScopeInfo& );
~DebugBlockGuard();
private:
InstructionEmitter& emitter;
const unsigned previous_block_id;
};
} // namespace Pol::Bscript::Compiler
#endif // POLSERVER_DEBUGBLOCKGUARD_H