summaryrefslogtreecommitdiff
path: root/processor
diff options
context:
space:
mode:
authorXuefer <xuefer@gmail.com>2014-05-27 15:48:37 +0000
committerXuefer <xuefer@gmail.com>2014-05-27 15:48:37 +0000
commit5f8c3d0ee3de8611a8b98367da46ea28179435db (patch)
tree27722843f645f61ccde23215f8da454edb489bc9 /processor
parent23d83bef264dfe8129df2a628127a1918fc9f59f (diff)
downloadxcache-5f8c3d0ee3de8611a8b98367da46ea28179435db.tar.gz
xcache-5f8c3d0ee3de8611a8b98367da46ea28179435db.zip
Decompiler PHP_5_6: updated support for zend_ast
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1488 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
Diffstat (limited to 'processor')
-rw-r--r--processor/main.m41
-rw-r--r--processor/processor.m44
-rw-r--r--processor/struct.m46
3 files changed, 8 insertions, 3 deletions
diff --git a/processor/main.m4 b/processor/main.m4
index 4611b88..7077c5c 100644
--- a/processor/main.m4
+++ b/processor/main.m4
@@ -254,6 +254,7 @@ dnl }}}
EXPORT_PROCESSOR(`dasm', `zend_op_array')
EXPORT_PROCESSOR(`dasm', `zend_function')
EXPORT_PROCESSOR(`dasm', `zend_class_entry')
+EXPORT_PROCESSOR(`dasm', `zend_ast')
EXPORT_PROCESSOR(`dprint', `zval')
include(__dir__`/hashtable.m4')
diff --git a/processor/processor.m4 b/processor/processor.m4
index c1ba902..8cdac41 100644
--- a/processor/processor.m4
+++ b/processor/processor.m4
@@ -96,7 +96,7 @@ DEF_STRUCT_P_FUNC(`zend_ast', , `dnl {{{
DST()->u.val = (zval *) (DST() + 1);
memcpy(DST()->u.val, SRC()->u.val, sizeof(zval));
')
- STRUCT_P_EX(zval, DST()->u.val, SRC()->u.val, `', `', ` ')
+ STRUCT_P_EX(zval, DST()->u.val, SRC()->u.val, `[]', `', ` ')
RELOCATE_EX(zval, DST()->u.val)
}
else {
@@ -105,7 +105,7 @@ DEF_STRUCT_P_FUNC(`zend_ast', , `dnl {{{
if (src_ast) {
ZEND_AST_HELPER(`src_ast', `
ALLOC(`(&DST()->u.child)[i]', zend_ast)
- STRUCT_P_EX(zend_ast, (&DST()->u.child)[i], src_ast, `[i]', `', ` ')
+ STRUCT_P_EX(zend_ast, (&DST()->u.child)[i], src_ast, `[]', `', ` ')
')
RELOCATE_EX(zend_ast, (&DST()->u.child)[i])
}
diff --git a/processor/struct.m4 b/processor/struct.m4
index f3076a4..6055781 100644
--- a/processor/struct.m4
+++ b/processor/struct.m4
@@ -157,7 +157,11 @@ ifdef(`DASM_STRUCT_DIRECT', `', `
);
ifdef(`DASM_STRUCT_DIRECT', `', `
IFDASM(`
- add_assoc_zval_ex(DST(), XCACHE_STRS("$4"), zv);
+ ifelse(`$4', `[]', `
+ add_next_index_zval(DST(), zv);
+ ', `
+ add_assoc_zval_ex(DST(), XCACHE_STRS("$4"), zv);
+ ')
} while (0);
')
')