summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Decompiler.class.php7
-rw-r--r--processor/processor.m48
-rw-r--r--xcache/xc_utils.c2
3 files changed, 16 insertions, 1 deletions
diff --git a/lib/Decompiler.class.php b/lib/Decompiler.class.php
index 9b65693..cb44d4f 100644
--- a/lib/Decompiler.class.php
+++ b/lib/Decompiler.class.php
@@ -2087,7 +2087,12 @@ class Decompiler
$class['name'] = unquoteName($this->getOpVal($op2, $EX), $EX);
}
if ($opc == XC_DECLARE_INHERITED_CLASS || $opc == XC_DECLARE_INHERITED_CLASS_DELAYED) {
- $ext /= XC_SIZEOF_TEMP_VARIABLE;
+ if (ZEND_ENGINE_2_5) {
+ $ext = (0xffffffff - $ext + 1) / XC_SIZEOF_TEMP_VARIABLE - 1;
+ }
+ else {
+ $ext /= XC_SIZEOF_TEMP_VARIABLE;
+ }
$class['parent'] = $T[$ext];
unset($T[$ext]);
}
diff --git a/processor/processor.m4 b/processor/processor.m4
index 5823718..03eaef7 100644
--- a/processor/processor.m4
+++ b/processor/processor.m4
@@ -691,6 +691,14 @@ define(`UNION_znode_op', `dnl {{{
', `
case IS_VAR:
case IS_TMP_VAR:
+ IFDASM(`
+#ifdef ZEND_ENGINE_2_5
+ add_assoc_long_ex(DST(), XCACHE_STRS("$1.var"), (temp_variable *)0 - (temp_variable *)((int) SRC($1.var)) - 1);
+ break;
+#endif
+ ', `
+ /* no break */
+ ')
case IS_CV:
PROCESS(zend_uint, $1.var)
break;
diff --git a/xcache/xc_utils.c b/xcache/xc_utils.c
index 7bcce1b..c6f99fa 100644
--- a/xcache/xc_utils.c
+++ b/xcache/xc_utils.c
@@ -309,6 +309,7 @@ static void xc_fix_opcode_ex_znode(int tofix, xc_op_spec_t spec, Z_OP_TYPEOF_TYP
*op_type = IS_UNUSED;
}
break;
+#ifndef ZEND_ENGINE_2_5
case IS_TMP_VAR:
case IS_VAR:
if (tofix) {
@@ -317,6 +318,7 @@ static void xc_fix_opcode_ex_znode(int tofix, xc_op_spec_t spec, Z_OP_TYPEOF_TYP
else {
Z_OP(*op).var *= sizeof(temp_variable);
}
+#endif
}
#endif
}