mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
Merge branch 'PHP-7.3' into PHP-7.4
This commit is contained in:
commit
16460ebc81
@ -3426,7 +3426,7 @@ int zend_compile_func_cuf(znode *result, zend_ast_list *args, zend_string *lcnam
|
|||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
static int zend_compile_assert(znode *result, zend_ast_list *args, zend_string *name, zend_function *fbc) /* {{{ */
|
static void zend_compile_assert(znode *result, zend_ast_list *args, zend_string *name, zend_function *fbc) /* {{{ */
|
||||||
{
|
{
|
||||||
if (EG(assertions) >= 0) {
|
if (EG(assertions) >= 0) {
|
||||||
znode name_node;
|
znode name_node;
|
||||||
@ -3469,8 +3469,6 @@ static int zend_compile_assert(znode *result, zend_ast_list *args, zend_string *
|
|||||||
result->op_type = IS_CONST;
|
result->op_type = IS_CONST;
|
||||||
ZVAL_TRUE(&result->u.constant);
|
ZVAL_TRUE(&result->u.constant);
|
||||||
}
|
}
|
||||||
|
|
||||||
return SUCCESS;
|
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
@ -3693,10 +3691,6 @@ int zend_try_compile_special_func(znode *result, zend_string *lcname, zend_ast_l
|
|||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zend_string_equals_literal(lcname, "assert")) {
|
|
||||||
return zend_compile_assert(result, args, lcname, fbc);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CG(compiler_options) & ZEND_COMPILE_NO_BUILTINS) {
|
if (CG(compiler_options) & ZEND_COMPILE_NO_BUILTINS) {
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
@ -3805,8 +3799,16 @@ void zend_compile_call(znode *result, zend_ast *ast, uint32_t type) /* {{{ */
|
|||||||
zend_op *opline;
|
zend_op *opline;
|
||||||
|
|
||||||
lcname = zend_string_tolower(Z_STR_P(name));
|
lcname = zend_string_tolower(Z_STR_P(name));
|
||||||
|
|
||||||
fbc = zend_hash_find_ptr(CG(function_table), lcname);
|
fbc = zend_hash_find_ptr(CG(function_table), lcname);
|
||||||
|
|
||||||
|
/* Special assert() handling should apply independently of compiler flags. */
|
||||||
|
if (fbc && zend_string_equals_literal(lcname, "assert")) {
|
||||||
|
zend_compile_assert(result, zend_ast_get_list(args_ast), lcname, fbc);
|
||||||
|
zend_string_release(lcname);
|
||||||
|
zval_ptr_dtor(&name_node.u.constant);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!fbc
|
if (!fbc
|
||||||
/* Don't use INIT_FCALL for recursive calls */
|
/* Don't use INIT_FCALL for recursive calls */
|
||||||
|| (fbc == (zend_function*)CG(active_op_array))
|
|| (fbc == (zend_function*)CG(active_op_array))
|
||||||
|
Loading…
Reference in New Issue
Block a user