mirror of
https://github.com/php/php-src.git
synced 2026-04-28 18:53:33 +02:00
Don't track parameter number in separate znode
We already track it in the op array already.
This commit is contained in:
+3
-2
@@ -1822,7 +1822,7 @@ void zend_do_end_function_declaration(const znode *function_token TSRMLS_DC) /*
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
void zend_do_receive_arg(zend_uchar op, znode *varname, const znode *offset, const znode *initialization, znode *class_type, zend_uchar pass_by_reference, zend_bool is_variadic TSRMLS_DC) /* {{{ */
|
||||
void zend_do_receive_param(zend_uchar op, znode *varname, const znode *initialization, znode *class_type, zend_uchar pass_by_reference, zend_bool is_variadic TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zend_op *opline;
|
||||
zend_arg_info *cur_arg_info;
|
||||
@@ -1863,7 +1863,8 @@ void zend_do_receive_arg(zend_uchar op, znode *varname, const znode *offset, con
|
||||
CG(active_op_array)->num_args++;
|
||||
opline->opcode = op;
|
||||
SET_NODE(opline->result, &var);
|
||||
SET_NODE(opline->op1, offset);
|
||||
opline->op1_type = IS_UNUSED;
|
||||
opline->op1.num = CG(active_op_array)->num_args;
|
||||
if (op == ZEND_RECV_INIT) {
|
||||
SET_NODE(opline->op2, initialization);
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -501,7 +501,7 @@ void zend_do_add_variable(znode *result, const znode *op1, const znode *op2 TSRM
|
||||
int zend_do_verify_access_types(const znode *current_access_type, const znode *new_modifier);
|
||||
void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference, znode *fn_flags_znode TSRMLS_DC);
|
||||
void zend_do_end_function_declaration(const znode *function_token TSRMLS_DC);
|
||||
void zend_do_receive_arg(zend_uchar op, znode *varname, const znode *offset, const znode *initialization, znode *class_type, zend_bool pass_by_reference, zend_bool is_variadic TSRMLS_DC);
|
||||
void zend_do_receive_param(zend_uchar op, znode *varname, const znode *initialization, znode *class_type, zend_bool pass_by_reference, zend_bool is_variadic TSRMLS_DC);
|
||||
int zend_do_begin_function_call(znode *function_name, zend_bool check_namespace TSRMLS_DC);
|
||||
void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC);
|
||||
void zend_do_clone(znode *result, const znode *expr TSRMLS_DC);
|
||||
|
||||
@@ -528,14 +528,15 @@ parameter_list:
|
||||
|
||||
|
||||
non_empty_parameter_list:
|
||||
parameter
|
||||
| non_empty_parameter_list ',' parameter
|
||||
;
|
||||
|
||||
parameter:
|
||||
optional_class_type is_reference is_variadic T_VARIABLE
|
||||
{ $$.op_type = IS_UNUSED; $$.u.op.num=1; zend_do_receive_arg(ZEND_RECV, &$4, &$$, NULL, &$1, $2.op_type, $3.op_type TSRMLS_CC); }
|
||||
{ zend_do_receive_param(ZEND_RECV, &$4, NULL, &$1, $2.op_type, $3.op_type TSRMLS_CC); }
|
||||
| optional_class_type is_reference is_variadic T_VARIABLE '=' static_scalar
|
||||
{ $$.op_type = IS_UNUSED; $$.u.op.num=1; zend_do_receive_arg(ZEND_RECV_INIT, &$4, &$$, &$6, &$1, $2.op_type, $3.op_type TSRMLS_CC); }
|
||||
| non_empty_parameter_list ',' optional_class_type is_reference is_variadic T_VARIABLE
|
||||
{ $$=$1; $$.u.op.num++; zend_do_receive_arg(ZEND_RECV, &$6, &$$, NULL, &$3, $4.op_type, $5.op_type TSRMLS_CC); }
|
||||
| non_empty_parameter_list ',' optional_class_type is_reference is_variadic T_VARIABLE '=' static_scalar
|
||||
{ $$=$1; $$.u.op.num++; zend_do_receive_arg(ZEND_RECV_INIT, &$6, &$$, &$8, &$3, $4.op_type, $5.op_type TSRMLS_CC); }
|
||||
{ zend_do_receive_param(ZEND_RECV_INIT, &$4, &$6, &$1, $2.op_type, $3.op_type TSRMLS_CC); }
|
||||
;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user