mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Merge branch 'PHP-8.2'
* PHP-8.2: Remove unnecessary ast eval bailout
This commit is contained in:
commit
51a99456e2
3 changed files with 4 additions and 12 deletions
|
@ -801,8 +801,6 @@ static zend_result ZEND_FASTCALL zend_ast_evaluate_ex(zval *result, zend_ast *as
|
||||||
{
|
{
|
||||||
zend_string *class_name = zend_ast_get_str(ast->child[0]);
|
zend_string *class_name = zend_ast_get_str(ast->child[0]);
|
||||||
zend_string *const_name = zend_ast_get_str(ast->child[1]);
|
zend_string *const_name = zend_ast_get_str(ast->child[1]);
|
||||||
zval *zv;
|
|
||||||
bool bailout = 0;
|
|
||||||
|
|
||||||
zend_string *previous_filename;
|
zend_string *previous_filename;
|
||||||
zend_long previous_lineno;
|
zend_long previous_lineno;
|
||||||
|
@ -812,18 +810,11 @@ static zend_result ZEND_FASTCALL zend_ast_evaluate_ex(zval *result, zend_ast *as
|
||||||
EG(filename_override) = scope->info.user.filename;
|
EG(filename_override) = scope->info.user.filename;
|
||||||
EG(lineno_override) = zend_ast_get_lineno(ast);
|
EG(lineno_override) = zend_ast_get_lineno(ast);
|
||||||
}
|
}
|
||||||
zend_try {
|
zval *zv = zend_get_class_constant_ex(class_name, const_name, scope, ast->attr);
|
||||||
zv = zend_get_class_constant_ex(class_name, const_name, scope, ast->attr);
|
|
||||||
} zend_catch {
|
|
||||||
bailout = 1;
|
|
||||||
} zend_end_try();
|
|
||||||
if (scope) {
|
if (scope) {
|
||||||
EG(filename_override) = previous_filename;
|
EG(filename_override) = previous_filename;
|
||||||
EG(lineno_override) = previous_lineno;
|
EG(lineno_override) = previous_lineno;
|
||||||
}
|
}
|
||||||
if (bailout) {
|
|
||||||
zend_bailout();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (UNEXPECTED(zv == NULL)) {
|
if (UNEXPECTED(zv == NULL)) {
|
||||||
ZVAL_UNDEF(result);
|
ZVAL_UNDEF(result);
|
||||||
|
|
|
@ -471,8 +471,6 @@ void shutdown_executor(void) /* {{{ */
|
||||||
if (EG(ht_iterators) != EG(ht_iterators_slots)) {
|
if (EG(ht_iterators) != EG(ht_iterators_slots)) {
|
||||||
efree(EG(ht_iterators));
|
efree(EG(ht_iterators));
|
||||||
}
|
}
|
||||||
|
|
||||||
ZEND_ASSERT(EG(filename_override) == NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ZEND_DEBUG
|
#if ZEND_DEBUG
|
||||||
|
|
|
@ -1589,6 +1589,9 @@ static void php_free_request_globals(void)
|
||||||
efree(PG(php_sys_temp_dir));
|
efree(PG(php_sys_temp_dir));
|
||||||
PG(php_sys_temp_dir) = NULL;
|
PG(php_sys_temp_dir) = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EG(filename_override) = NULL;
|
||||||
|
EG(lineno_override) = -1;
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue