зеркало из https://github.com/mono/ikvm-fork.git
Renamed CodeEmitter.Finish() to CheckLabels() and moved invocation to the right place.
This commit is contained in:
Родитель
0743299862
Коммит
d20098ec2a
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2002, 2004, 2005, 2006, 2008 Jeroen Frijters
|
Copyright (C) 2002, 2004, 2005, 2006, 2008, 2009 Jeroen Frijters
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -900,7 +900,7 @@ namespace IKVM.Internal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Finish()
|
internal void CheckLabels()
|
||||||
{
|
{
|
||||||
#if LABELCHECK
|
#if LABELCHECK
|
||||||
foreach(System.Diagnostics.StackFrame frame in labels.Values)
|
foreach(System.Diagnostics.StackFrame frame in labels.Values)
|
||||||
|
|
|
@ -7359,6 +7359,7 @@ namespace IKVM.Internal
|
||||||
LineNumberTableAttribute.LineNumberWriter lineNumberTable = null;
|
LineNumberTableAttribute.LineNumberWriter lineNumberTable = null;
|
||||||
bool nonleaf = false;
|
bool nonleaf = false;
|
||||||
Compiler.Compile(this, wrapper, methods[i], classFile, m, ilGenerator, ref nonleaf, invokespecialstubcache, ref lineNumberTable);
|
Compiler.Compile(this, wrapper, methods[i], classFile, m, ilGenerator, ref nonleaf, invokespecialstubcache, ref lineNumberTable);
|
||||||
|
ilGenerator.CheckLabels();
|
||||||
if (nonleaf)
|
if (nonleaf)
|
||||||
{
|
{
|
||||||
mbld.SetImplementationFlags(mbld.GetMethodImplementationFlags() | MethodImplAttributes.NoInlining);
|
mbld.SetImplementationFlags(mbld.GetMethodImplementationFlags() | MethodImplAttributes.NoInlining);
|
||||||
|
@ -7418,6 +7419,7 @@ namespace IKVM.Internal
|
||||||
{
|
{
|
||||||
ilGenerator.Emit(OpCodes.Ret);
|
ilGenerator.Emit(OpCodes.Ret);
|
||||||
}
|
}
|
||||||
|
ilGenerator.CheckLabels();
|
||||||
}
|
}
|
||||||
|
|
||||||
// add all interfaces that we implement (including the magic ones) and handle ghost conversions
|
// add all interfaces that we implement (including the magic ones) and handle ghost conversions
|
||||||
|
|
|
@ -951,7 +951,6 @@ class Compiler
|
||||||
//ilGenerator.Emit(OpCodes.Br, - (ilGenerator.GetILOffset() + 5));
|
//ilGenerator.Emit(OpCodes.Br, - (ilGenerator.GetILOffset() + 5));
|
||||||
ilGenerator.Emit(OpCodes.Br_S, (sbyte)-2);
|
ilGenerator.Emit(OpCodes.Br_S, (sbyte)-2);
|
||||||
}
|
}
|
||||||
ilGenerator.Finish();
|
|
||||||
nonleaf = c.nonleaf;
|
nonleaf = c.nonleaf;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
Загрузка…
Ссылка в новой задаче