com php-src: Fix out-dated docs and typo: Zend/zend_compile .h Zend/zend_execute.c

From: Date: Fri, 01 Mar 2019 15:14:11 +0000
Subject: com php-src: Fix out-dated docs and typo: Zend/zend_compile .h Zend/zend_execute.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104934@lists.php.net to get a copy of this message
Commit: 7c351ba65ca861470373dd1467138d668dcac5f3 Author: c9s <yoan@maicoin.com> Fri, 1 Mar 2019 14:15:32 +0800 Committer: Nikita Popov <nikita.ppv@gmail.com> Fri, 1 Mar 2019 16:14:11 +0100 Parents: 51dacafc64336bc7fa02de1ec032d651b1d2b0e1 Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7c351ba65ca861470373dd1467138d668dcac5f3 Log: Fix out-dated docs and typo [ci skip] Changed paths: M Zend/zend_compile.h M Zend/zend_execute.c Diff: diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 7ff0605..1fff90a 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -958,7 +958,7 @@ static zend_always_inline int zend_check_arg_send_type(const zend_function *zf, #define ARG_MAY_BE_SENT_BY_REF(zf, arg_num) \ zend_check_arg_send_type(zf, arg_num, ZEND_SEND_PREFER_REF) -/* Quick API to check firat 12 arguments */ +/* Quick API to check first 12 arguments */ #define MAX_ARG_FLAG_NUM 12 #ifdef WORDS_BIGENDIAN diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 70669e5..e71075c 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -3261,7 +3261,7 @@ ZEND_API void zend_free_compiled_variables(zend_execute_data *execute_data) /* { * +========================================+ * EG(current_execute_data) -> | zend_execute_data | * +----------------------------------------+ - * EX_CV_NUM(0) ---------> | VAR[0] = ARG[1] | + * EX_VAR_NUM(0) --------> | VAR[0] = ARG[1] | * | ... | * | VAR[op_array->num_args-1] = ARG[N] | * | ... | @@ -3274,6 +3274,15 @@ ZEND_API void zend_free_compiled_variables(zend_execute_data *execute_data) /* { * +----------------------------------------+ */ +/* zend_copy_extra_args is used when the actually passed number of arguments + * (EX_NUM_ARGS) is greater than what the function defined (op_array->num_args). + * + * The extra arguments will be copied into the call frame after all the compiled variables. + * + * If there are extra arguments copied, a flag "ZEND_CALL_FREE_EXTRA_ARGS" will be set + * on the zend_execute_data, and when the executor leaves the function, the + * args will be freed in zend_leave_helper. + */ static zend_never_inline void zend_copy_extra_args(EXECUTE_DATA_D) { zend_op_array *op_array = &EX(func)->op_array;

« previous php.cvs (#104934) next »