ikvm/runtime verifier.cs,1.93,1.94
ikvm/runtime JsrInliner.cs, 1.6,1.7
ikvm/runtime LocalVars.cs, 1.5,1.6
This commit is contained in:
jfrijters 2012-10-31 08:05:42 +00:00
Родитель a22b0003c7
Коммит 35d4dc950a
3 изменённых файлов: 3 добавлений и 27 удалений

Просмотреть файл

@ -429,15 +429,7 @@ namespace IKVM.Internal
// mark the exception handlers reachable from this instruction
for (int j = 0; j < method.ExceptionTable.Length; j++)
{
// if we're currently inside an exception block, we need to merge our current state with the exception handler
// and if we right after the exception block (i == method.ExceptionTable[j].endIndex) and the block ends in
// an instruction that simply falls through, we need to merge our current state with the exception handler as
// well (because the last instruction may be a store to a local variable that affects the type of the local variable)
// (note that we can legally access instructions[i - 1] because an empty exception block is illegal)
if (method.ExceptionTable[j].startIndex <= i
&& (i < method.ExceptionTable[j].endIndex
|| (i == method.ExceptionTable[j].endIndex
&& ByteCodeMetaData.GetFlowControl(instructions[i - 1].NormalizedOpCode) == ByteCodeFlowControl.Next)))
if (method.ExceptionTable[j].startIndex <= i && i < method.ExceptionTable[j].endIndex)
{
// NOTE this used to be CopyLocalsAndSubroutines, but it doesn't (always) make
// sense to copy the subroutine state

Просмотреть файл

@ -398,15 +398,7 @@ struct LocalVarInfo
for (int j = 0; j < exceptions.Length; j++)
{
// if we're currently inside an exception block, we need to merge our current state with the exception handler
// and if we right after the exception block (i == method.ExceptionTable[j].endIndex) and the block ends in
// an instruction that simply falls through, we need to merge our current state with the exception handler as
// well (because the last instruction may be a store to a local variable that affects the type of the local variable)
// (note that we can legally access instructions[i - 1] because an empty exception block is illegal)
if (exceptions[j].startIndex <= i
&& (i < exceptions[j].endIndex
|| (i == exceptions[j].endIndex
&& ByteCodeMetaData.GetFlowControl(instructions[i - 1].NormalizedOpCode) == ByteCodeFlowControl.Next)))
if (exceptions[j].startIndex <= i && i < exceptions[j].endIndex)
{
state[exceptions[j].handlerIndex].Merge(curr);
}

Просмотреть файл

@ -1294,15 +1294,7 @@ sealed class MethodAnalyzer
// mark the exception handlers reachable from this instruction
for(int j = 0; j < method.ExceptionTable.Length; j++)
{
// if we're currently inside an exception block, we need to merge our current state with the exception handler
// and if we right after the exception block (i == method.ExceptionTable[j].endIndex) and the block ends in
// an instruction that simply falls through, we need to merge our current state with the exception handler as
// well (because the last instruction may be a store to a local variable that affects the type of the local variable)
// (note that we can legally access instructions[i - 1] because an empty exception block is illegal)
if(method.ExceptionTable[j].startIndex <= i
&& (i < method.ExceptionTable[j].endIndex
|| (i == method.ExceptionTable[j].endIndex
&& ByteCodeMetaData.GetFlowControl(instructions[i - 1].NormalizedOpCode) == ByteCodeFlowControl.Next)))
if(method.ExceptionTable[j].startIndex <= i && i < method.ExceptionTable[j].endIndex)
{
int idx = method.ExceptionTable[j].handlerIndex;
InstructionState ex = state[i].CopyLocals();