diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2019-04-12 01:01:47 +0300 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2019-04-12 01:01:47 +0300 |
| commit | 39505764adbf1b46656ea2a5c8337e667356ae4b (patch) | |
| tree | 2d68b6f70611ee94e13d0f3e0d8f8edc38104cbe /Zend/zend_opcode.c | |
| parent | 7604f295cae6c092fc55d17f7acdd108b8d532d1 (diff) | |
| parent | 88a2268d6b9ff152399a8761dc826ce414c0b985 (diff) | |
| download | php-git-39505764adbf1b46656ea2a5c8337e667356ae4b.tar.gz | |
Merge branch 'PHP-7.4'
* PHP-7.4:
Replace "ZEND_CALL_CTOR" hack by additional live-range
Diffstat (limited to 'Zend/zend_opcode.c')
| -rw-r--r-- | Zend/zend_opcode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 5b1914c99d..a44a7c562d 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -603,10 +603,15 @@ static void emit_live_range( start++; break; /* Objects created via ZEND_NEW are only fully initialized - * after the DO_FCALL (constructor call). */ + * after the DO_FCALL (constructor call). + * We are creating two live-ranges: ZEND_LINE_NEW for uninitialized + * part, and ZEND_LIVE_TMPVAR for initialized. + */ case ZEND_NEW: { int level = 0; + uint32_t orig_start = start; + while (def_opline + 1 < use_opline) { def_opline++; start++; @@ -635,6 +640,7 @@ static void emit_live_range( } } } + emit_live_range_raw(op_array, var_num, ZEND_LIVE_NEW, orig_start + 1, start + 1); if (start + 1 == end) { /* Trivial live-range, no need to store it. */ return; |
