зеркало из https://github.com/mono/ikvm-fork.git
Store our CodeEmitterLabel object in label check dictionary, instead of the underlying Label.
This commit is contained in:
Родитель
d20098ec2a
Коммит
d3fbd5588d
|
@ -81,7 +81,7 @@ namespace IKVM.Internal
|
||||||
private CodeEmitterLabel lazyBranch;
|
private CodeEmitterLabel lazyBranch;
|
||||||
private LocalBuilder[] tempLocals = new LocalBuilder[32];
|
private LocalBuilder[] tempLocals = new LocalBuilder[32];
|
||||||
#if LABELCHECK
|
#if LABELCHECK
|
||||||
private Dictionary<Label, System.Diagnostics.StackFrame> labels = new Dictionary<Label, System.Diagnostics.StackFrame>();
|
private Dictionary<CodeEmitterLabel, System.Diagnostics.StackFrame> labels = new Dictionary<CodeEmitterLabel, System.Diagnostics.StackFrame>();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
internal static CodeEmitter Create(MethodBuilder mb)
|
internal static CodeEmitter Create(MethodBuilder mb)
|
||||||
|
@ -259,11 +259,11 @@ namespace IKVM.Internal
|
||||||
|
|
||||||
internal CodeEmitterLabel DefineLabel()
|
internal CodeEmitterLabel DefineLabel()
|
||||||
{
|
{
|
||||||
Label label = ilgen_real.DefineLabel();
|
CodeEmitterLabel label = new CodeEmitterLabel(ilgen_real.DefineLabel());
|
||||||
#if LABELCHECK
|
#if LABELCHECK
|
||||||
labels.Add(label, new System.Diagnostics.StackFrame(1, true));
|
labels.Add(label, new System.Diagnostics.StackFrame(1, true));
|
||||||
#endif
|
#endif
|
||||||
return new CodeEmitterLabel(label);
|
return label;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Emit(OpCode opcode)
|
internal void Emit(OpCode opcode)
|
||||||
|
@ -533,7 +533,7 @@ namespace IKVM.Internal
|
||||||
}
|
}
|
||||||
LazyGen();
|
LazyGen();
|
||||||
#if LABELCHECK
|
#if LABELCHECK
|
||||||
labels.Remove(loc.Label);
|
labels.Remove(loc);
|
||||||
#endif
|
#endif
|
||||||
ilgen_real.MarkLabel(loc.Label);
|
ilgen_real.MarkLabel(loc.Label);
|
||||||
loc.Offset = offset;
|
loc.Offset = offset;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче