summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-05-18 13:18:08 +0300
committerDmitry Stogov <dmitry@zend.com>2017-05-18 13:18:08 +0300
commit8203a175b1e11f4aef4e5ecfa92d81a91130f20f (patch)
treed7f55546efc8567231237e2ceda4138a7dc56746 /Zend/zend_compile.c
parentb627e33a8dd514718fb8999fdbf6b961e35012e3 (diff)
downloadphp-git-8203a175b1e11f4aef4e5ecfa92d81a91130f20f.tar.gz
Remove unused opcode handlers
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 82da49a702..22c6ca114c 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -7298,6 +7298,9 @@ void zend_compile_array(znode *result, zend_ast *ast) /* {{{ */
return;
}
+ /* Empty arrays are handled at compile-time */
+ ZEND_ASSERT(list->children > 0);
+
for (i = 0; i < list->children; ++i) {
zend_ast *elem_ast = list->child[i];
zend_ast *value_ast, *key_ast;
@@ -7341,11 +7344,6 @@ void zend_compile_array(znode *result, zend_ast *ast) /* {{{ */
}
}
- /* Handle empty array */
- if (!list->children) {
- zend_emit_op_tmp(result, ZEND_INIT_ARRAY, NULL, NULL);
- }
-
/* Add a flag to INIT_ARRAY if we know this array cannot be packed */
if (!packed) {
ZEND_ASSERT(opnum_init != (uint32_t)-1);