зеркало из 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
|
||||
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
|
||||
foreach(System.Diagnostics.StackFrame frame in labels.Values)
|
||||
|
|
|
@ -7359,6 +7359,7 @@ namespace IKVM.Internal
|
|||
LineNumberTableAttribute.LineNumberWriter lineNumberTable = null;
|
||||
bool nonleaf = false;
|
||||
Compiler.Compile(this, wrapper, methods[i], classFile, m, ilGenerator, ref nonleaf, invokespecialstubcache, ref lineNumberTable);
|
||||
ilGenerator.CheckLabels();
|
||||
if (nonleaf)
|
||||
{
|
||||
mbld.SetImplementationFlags(mbld.GetMethodImplementationFlags() | MethodImplAttributes.NoInlining);
|
||||
|
@ -7418,6 +7419,7 @@ namespace IKVM.Internal
|
|||
{
|
||||
ilGenerator.Emit(OpCodes.Ret);
|
||||
}
|
||||
ilGenerator.CheckLabels();
|
||||
}
|
||||
|
||||
// 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_S, (sbyte)-2);
|
||||
}
|
||||
ilGenerator.Finish();
|
||||
nonleaf = c.nonleaf;
|
||||
}
|
||||
finally
|
||||
|
|
Загрузка…
Ссылка в новой задаче