Browse Source

Decompiler: fix handling catch with/without FETCH_CLASS & JMP for different PHP version

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1309 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.1
Xuefer 8 years ago
parent
commit
081bb66e29
  1. 8
      lib/Decompiler.class.php

8
lib/Decompiler.class.php

@ -989,7 +989,7 @@ class Decompiler
for ($i = $catchFirst; $i <= $range[1]; ) {
if ($opcodes[$i]['opcode'] == XC_CATCH) {
$catchOpLine = $i;
$this->removeJmpInfo($EX, $catchOpLine - 1);
$this->removeJmpInfo($EX, $catchFirst);
$catchNext = $opcodes[$catchOpLine]['extended_value'];
$catchBodyLast = $catchNext - 1;
@ -1359,9 +1359,9 @@ class Decompiler
case XC_CATCH:
$catchNext = $op['extended_value'];
assert($opcodes[$i - 1]['opcode'] == XC_FETCH_CLASS);
$opcodes[$i - 1]['jmpouts'] = array($catchNext);
$opcodes[$catchNext]['jmpins'][] = $i - 1;
$catchBegin = $opcodes[$i - 1]['opcode'] == XC_FETCH_CLASS ? $i - 1 : $i;
$opcodes[$catchBegin]['jmpouts'] = array($catchNext);
$opcodes[$catchNext]['jmpins'][] = $catchBegin;
break;
}
/*

Loading…
Cancel
Save