1
0
Fork 0

Decompiler: dump any unhandled complex block

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@806 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
Xuefer 2011-04-27 05:10:28 +00:00
parent e4a3b35f70
commit 0921bdce74
1 changed files with 8 additions and 3 deletions

View File

@ -699,10 +699,12 @@ class Decompiler
return $opcodes;
}
// }}}
function decompileBasicBlock(&$EX, $range, $indent) // {{{
function decompileBasicBlock(&$EX, $range, $indent, $unhandled = false) // {{{
{
$this->dasmBasicBlock($EX, $range);
// $this->dumpRange($EX, $range, $indent);
if ($unhandled) {
$this->dumpRange($EX, $range, $indent);
}
$this->outputPhp($EX, $range, $indent);
}
// }}}
@ -1004,11 +1006,14 @@ class Decompiler
echo $indent, '}', PHP_EOL;
$this->endComplexBlock($EX);
if ($opcodes[$range[1] + 1]['opcode'] == XC_SWITCH_FREE) {
$this->removeJmpInfo($EX, $range[1] + 1);
}
return;
}
// }}}
$this->decompileBasicBlock($EX, $range, $indent);
$this->decompileBasicBlock($EX, $range, $indent, true);
}
// }}}
function recognizeAndDecompileClosedBlocks(&$EX, $range, $indent) // {{{ decompile in a tree way