mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
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
20 lines
592 B
C++
20 lines
592 B
C++
#include "DebugBlockGuard.h"
|
|
|
|
#include "compiler/codegen/InstructionEmitter.h"
|
|
#include "compiler/model/LocalVariableScopeInfo.h"
|
|
#include "compiler/model/Variable.h"
|
|
|
|
namespace Pol::Bscript::Compiler
|
|
{
|
|
DebugBlockGuard::DebugBlockGuard( InstructionEmitter& emitter,
|
|
LocalVariableScopeInfo& local_variable_scope_info )
|
|
: emitter( emitter ),
|
|
previous_block_id( emitter.enter_debug_block( local_variable_scope_info ) )
|
|
{
|
|
}
|
|
DebugBlockGuard::~DebugBlockGuard()
|
|
{
|
|
emitter.set_debug_block( previous_block_id );
|
|
}
|
|
|
|
} // namespace Pol::Bscript::Compiler
|