public MaybeEmitDebugInfo ( ILGen ilg, IPersistentMap spanMap ) : void | ||
ilg | ILGen | |
spanMap | IPersistentMap | |
Результат | void |
public void MaybeEmitDebugInfo(ILGen ilg, IPersistentMap spanMap)
{
if ( _docWriter != null && spanMap != null )
{
int startLine;
int startCol;
int finishLine;
int finishCol;
if (Compiler.GetLocations(spanMap, out startLine, out startCol, out finishLine, out finishCol))
{
try
{
ilg.MarkSequencePoint(_docWriter, startLine, startCol, finishLine, finishCol);
}
catch (NotSupportedException)
{
// probably a dynamic ilgen
}
}
}
}
public static void EmitDebugInfo(ILGen ilg, IPersistentMap spanMap) { GenContext context = Compiler.CompilerContextVar.deref() as GenContext; if (context == null) { return; } context.MaybeEmitDebugInfo(ilg, spanMap); }