1
0
Fork 0

Decompiler: recognize top level goto

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@808 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
Xuefer 2011-04-27 06:43:43 +00:00
parent 14a0dc698c
commit 49f8f2288d
1 changed files with 12 additions and 0 deletions

View File

@ -780,6 +780,18 @@ class Decompiler
return false;
}
// }}}
// {{{ goto
if ($firstOp['opcode'] == XC_JMP && !empty($firstOp['jmpouts']) && $firstOp['jmpouts'][0] == $range[1] + 1) {
$this->removeJmpInfo($EX, $range[0]);
$firstOp['opcode'] = XC_GOTO;
$target = $firstOp['op1']['var'];
$firstOp['goto'] = $target;
$opcodes[$target]['gofrom'][] = $range[0];
$this->recognizeAndDecompileClosedBlocks($EX, $range, $indent);
return false;
}
// }}}
// {{{ try/catch
if (!empty($firstOp['jmpins']) && $opcodes[$firstOp['jmpins'][0]]['opcode'] == XC_JMP
&& $lastOp['opcode'] == XC_JMP && !empty($lastOp['jmpouts']) && $lastOp['jmpouts'][0] <= $firstOp['jmpins'][0]