Browse Source

method call decompile fix

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@722 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 11 years ago
parent
commit
64879478cc
  1. 15
      Decompiler.class.php
  2. 4
      opcode_spec_def.h

15
Decompiler.class.php

@ -800,7 +800,12 @@ class Decompiler
break;
case ZEND_FETCH_CLASS_PARENT:
$class = 'parent';
break;
case ZEND_FETCH_CLASS_STATIC:
$class = 'static';
break;
}
$istmpres = true;
}
else {
$class = $op2['constant'];
@ -1062,17 +1067,12 @@ class Decompiler
break;
}
array_push($EX['arg_types_stack'], array($EX['fbc'], $EX['object'], $EX['called_scope']));
if ($opc == XC_INIT_STATIC_METHOD_CALL) {
$EX['object'] = null;
$EX['called_scope'] = $op1['var'];
}
else if ($opc == XC_INIT_METHOD_CALL || $op1['op_type'] != XC_IS_UNUSED) {
if ($opc == XC_INIT_STATIC_METHOD_CALL || $opc == XC_INIT_METHOD_CALL || $op1['op_type'] != XC_IS_UNUSED) {
$obj = $this->getOpVal($op1, $EX);
if (!isset($obj)) {
$obj = '$this';
}
// looks like PHP4 only
if (isset($op1['constant'])) {
if ($opc == XC_INIT_STATIC_METHOD_CALL || /* PHP4 */ isset($op1['constant'])) {
$EX['object'] = null;
$EX['called_scope'] = $this->unquoteName($obj);
}
@ -1864,6 +1864,7 @@ define('ZEND_FETCH_CLASS_MAIN', 3);
define('ZEND_FETCH_CLASS_GLOBAL', 4);
define('ZEND_FETCH_CLASS_AUTO', 5);
define('ZEND_FETCH_CLASS_INTERFACE', 6);
define('ZEND_FETCH_CLASS_STATIC', 7);
define('ZEND_EVAL', (1<<0));
define('ZEND_INCLUDE', (1<<1));

4
opcode_spec_def.h

@ -171,7 +171,11 @@ static const xc_opcode_spec_t xc_opcode_spec[] = {
OPSPEC( UNUSED, STD, UNUSED, UNUSED) /* 111 INIT_CTOR_CALL */
OPSPEC( UNUSED, STD, STD, VAR) /* 112 INIT_METHOD_CALL */
# ifdef ZEND_ENGINE_2_3
OPSPEC( UNUSED, STD, STD, UNUSED) /* 113 INIT_STATIC_METHOD_CALL */
# else
OPSPEC( UNUSED, UCLASS, STD, UNUSED) /* 113 INIT_STATIC_METHOD_CALL */
# endif
OPSPEC( ISSET, STD, FETCH, TMP) /* 114 ISSET_ISEMPTY_VAR */
OPSPEC( ISSET, STD, STD, TMP) /* 115 ISSET_ISEMPTY_DIM_OBJ */

Loading…
Cancel
Save