com php-src: begin handlers are currently invoked without access to the arguments being sent, this moves the opcode after SEND: UPGRADING.INTERNALS
Zend/zend_compile.c
| From: | Joe Watkins | Date: | Tue, 19 Feb 2019 17:21:32 +0000 |
| Subject: | com php-src: begin handlers are currently invoked without access to the arguments being sent, this moves the opcode after SEND: UPGRADING.INTERNALS Zend/zend_compile.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-104748@lists.php.net to get a copy of this message | ||
Commit: a3994a9e1601bab7dc576177e184733241ff356a
Author: Joe Watkins <krakjoe@php.net> Tue, 19 Feb 2019 17:45:13 +0100
Parents: b2073253bf82fdd7feb3f219e442fa3e4a39ea9e
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a3994a9e1601bab7dc576177e184733241ff356a
Log:
begin handlers are currently invoked without access to the arguments being sent, this moves the
opcode after SEND
Changed paths:
M UPGRADING.INTERNALS
M Zend/zend_compile.c
Diff:
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index 4caacb2..e54094a 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -16,6 +16,7 @@ PHP 7.4 INTERNALS UPGRADE NOTES
m. write_property return value
n. Assignments to references
o. ZEND_COMPILE_EXTENDED_INFO split
+ p. ZEND_EXT_FCALL_BEGIN can access arguments
2. Build system changes
a. Abstract
@@ -174,6 +175,9 @@ PHP 7.4 INTERNALS UPGRADE NOTES
This allows tooling to choose between profiling and debugging behaviour
ZEND_COMPILE_EXTENDED_INFO remains and preserves behaviour.
+ p. ZEND_EXT_BEGIN_FCALL is emitted after arguments are sent, this means
+ that handlers may access arguments..
+
========================
2. Build system changes
========================
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index c5d4fd7..1f6449f 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -3074,10 +3074,10 @@ void zend_compile_call_common(znode *result, zend_ast *args_ast,
zend_function *
uint32_t arg_count;
uint32_t call_flags;
- zend_do_extended_fcall_begin();
-
arg_count = zend_compile_args(args_ast, fbc);
+ zend_do_extended_fcall_begin();
+
opline = &CG(active_op_array)->opcodes[opnum_init];
opline->extended_value = arg_count;