I'm excluding unticked statements for this (in 5.x they were included)
as this would just result in two consecutive EXT_STMTs.
Also add all class statements to unticked statements, these would
generate superfluous EXT_STMT/TICKS in the parent op_array.
static inline zend_bool zend_is_unticked_stmt(zend_ast *ast) /* {{{ */
{
- return ast->kind == ZEND_AST_STMT_LIST || ast->kind == ZEND_AST_LABEL;
+ return ast->kind == ZEND_AST_STMT_LIST || ast->kind == ZEND_AST_LABEL
+ || ast->kind == ZEND_AST_PROP_DECL || ast->kind == ZEND_AST_CLASS_CONST_DECL
+ || ast->kind == ZEND_AST_USE_TRAIT || ast->kind == ZEND_AST_METHOD;
}
/* }}} */
CG(zend_lineno) = ast->lineno;
+ if ((CG(compiler_options) & ZEND_COMPILE_EXTENDED_INFO) && !zend_is_unticked_stmt(ast)) {
+ zend_do_extended_info();
+ }
+
switch (ast->kind) {
case ZEND_AST_STMT_LIST:
zend_compile_stmt_list(ast);