mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
- Avoid zend_do_ticks() call for each statement in parsing
This commit is contained in:
parent
8d52500d41
commit
80d432ca62
@ -6170,14 +6170,12 @@ void zend_do_extended_fcall_end(TSRMLS_D) /* {{{ */
|
||||
|
||||
void zend_do_ticks(TSRMLS_D) /* {{{ */
|
||||
{
|
||||
if (Z_LVAL(CG(declarables).ticks)) {
|
||||
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
|
||||
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
|
||||
|
||||
opline->opcode = ZEND_TICKS;
|
||||
SET_UNUSED(opline->op1);
|
||||
SET_UNUSED(opline->op2);
|
||||
opline->extended_value = Z_LVAL(CG(declarables).ticks);
|
||||
}
|
||||
opline->opcode = ZEND_TICKS;
|
||||
SET_UNUSED(opline->op1);
|
||||
SET_UNUSED(opline->op2);
|
||||
opline->extended_value = Z_LVAL(CG(declarables).ticks);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
#define INC_BPC(op_array) if (op_array->fn_flags & ZEND_ACC_INTERACTIVE) { (CG(context).backpatch_count++); }
|
||||
#define DEC_BPC(op_array) if (op_array->fn_flags & ZEND_ACC_INTERACTIVE) { (CG(context).backpatch_count--); }
|
||||
#define HANDLE_INTERACTIVE() if (CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE) { execute_new_code(TSRMLS_C); }
|
||||
#define DO_TICKS() if (Z_LVAL(CG(declarables).ticks)) { zend_do_ticks(TSRMLS_C); }
|
||||
|
||||
#define RESET_DOC_COMMENT() \
|
||||
{ \
|
||||
|
@ -213,7 +213,7 @@ inner_statement:
|
||||
|
||||
|
||||
statement:
|
||||
unticked_statement { zend_do_ticks(TSRMLS_C); }
|
||||
unticked_statement { DO_TICKS(); }
|
||||
| T_STRING ':' { zend_do_label(&$1 TSRMLS_CC); }
|
||||
;
|
||||
|
||||
@ -293,11 +293,11 @@ unset_variable:
|
||||
;
|
||||
|
||||
function_declaration_statement:
|
||||
unticked_function_declaration_statement { zend_do_ticks(TSRMLS_C); }
|
||||
unticked_function_declaration_statement { DO_TICKS(); }
|
||||
;
|
||||
|
||||
class_declaration_statement:
|
||||
unticked_class_declaration_statement { zend_do_ticks(TSRMLS_C); }
|
||||
unticked_class_declaration_statement { DO_TICKS(); }
|
||||
;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user