今日は JIT の修正、opcache の func_info の修正、opcache 最適化器の修正、libzip の検出に失敗する場合がある問題の修正、テストの並列実行対策、phpinfo() 関連コードの ZEND_COLD 指定、PHP 8 の ZPP エラー例外化で不要になったコードの削除、組み込み関数の一部に返り値型情報の追加、引数なしでの array_merge() / array_merge_recursive() が空配列を返すようにする修正、不要な zval コピーの削減、FFI で get/set オブジェクトハンドラを利用しないようにする修正、
2019-05-28
nikic: BIND_STATIC of implicit binding may be undef
- https://github.com/php/php-src/commit/fd23f9104a9772234a3469e341500cf1b9503f63
- [7.4~]
- アロー関数の JIT コンパイルの修正
- ZEND_BIND_STATIC は関数内の static 変数の利用時、ローカル変数扱いのポインタっぽい zval へ関数の op_array に紐づく静的変数テーブルから変数の実体を紐付けるよーな処理
- ZEND_BIND_IMPLICIT は元々アロー関数での暗黙的束縛用に ZEND_BIND_LEXICAL で extended_value に使うフラグだったが、ZEND_BIND_STATIC でもアロー関数時に付けるようにし、 opcache 側での型推論時に MAY_BE_UNDEF を付ける材料にしているもよう
nikic: Remove special handling of zero-arg funcs in func_info
- https://github.com/php/php-src/commit/a1284b4241ddfe30ee31058c2d44acf03df7aafc
- ext/opcache で、引数なし関数の func_info での特別扱いをやめた
- PHP 8 では変な引数で呼び出すと常時例外なのでいらないということらしい
paresy: Fixed bug #76345
- https://github.com/php/php-src/commit/a0c9d0849aa5e53c37f8fd68db80412364e8edaf
- [7.2~]
- ext/zip で、libzip の検出に失敗する場合がある問題の修正
cmb69: Prevent parallel test conflicts
- https://github.com/php/php-src/commit/c12d474653c6d10cd74391943bdb7af4509ed2d3
- [7.4~]
- ext/sockets で、テストで利用するポートをずらして並列実行対策
dstogov: Put phpinfo() related code into cold code segment
- https://github.com/php/php-src/commit/072f28938f1c8860432c22c03ce7bdc7e8112e61
- [7.4~]
- phpinfo() 関連のコードを ZEND_COLD 指定
- わりと真剣にこのみみっちい最適化の効果を知りたい(ちりつもなんだろうけど)
nikic: zend_func_info: Remove unnecessary type callbacks
- https://github.com/php/php-src/commit/bd4c9bce680b82fc31b84d82d7f272e02e15d4fa
- ext/opcache で、PHP 8 の ZPP エラー例外化で不要になったコードの削除
nikic: Add return type information to some ext/standard functions
- https://github.com/php/php-src/commit/521a919caf21f5c924539a9faeaaa8c2f6fb3096
- ext/standard な組み込み関数の一部に返り値型情報を追加
dtakken: Allow array_merge() / array_merge_recursive() without arguments
- https://github.com/php/php-src/commit/77cf3d7b1100dbb2b441b2a75f21b4e8ee0cb9b1
- [7.4~]
- 引数なしでの array_merge() / array_merge_recursive() が空配列を返すよう修正
-
array_merge(...$arrays)
とかやる際に便利 - PR:4175
nikic: Remove FUNC_MAY_WARN
- https://github.com/php/php-src/commit/812665844426986145ffbf01bc7ff43fa09e4517
- ext/opcache で、FUNC_MAY_WARN フラグの削除
dstogov: Fixed register allocation
- https://github.com/php/php-src/commit/38c75f8fd3f286e097755402ee62a45f856748e9
- ext/opcache/jit で、レジスタ割り当ての修正
nikic: Update MAY_BE_NULL func_info for Zend functions
- https://github.com/php/php-src/commit/1493c735821a2271081ac111d64f2aeb8bf23b65
- ext/opcache で、PHP 8 で null を返さなくなる関数について func_info から MAY_BE_NULL を削除
nikic: Update MAY_BE_NULL for parts of ext/standard
- https://github.com/php/php-src/commit/d95c15e3717ad909a3e4736c4e26ee7a9331d7e1
- ext/opcache で、PHP 8 で null を返さなくなる関数について func_info から MAY_BE_NULL を削除
dstogov: Avoid double copying
nikic: Update MAY_BE_NULL info for more ext/standard functions
- https://github.com/php/php-src/commit/0d79c70cf3c10f60a2e8fbfd68903d8716b7b43c
- ext/opcache で、PHP 8 で null を返さなくなる関数について func_info から MAY_BE_NULL を削除
nikic: hebrev/hebrevc: Don't return false for empty string
- https://github.com/php/php-src/commit/4da316d18991ff4dbe0a7315045f7928d66a4381
- hebrev()、hebrevc() に空文字列を渡した際 false を返さないよう修正
- ext/opcache で、func_info の方も修正
nikic: Revert accidental changes
- https://github.com/php/php-src/commit/7791784bc9229433f03b0529a61c8e843a30c8ea
- ext/opcache で、func_info から MAY_BE_FALSE を誤って落としていた部分を復旧
nikic: JIT: Fix SWITCH_LONG/STRING codegen with exact type
- https://github.com/php/php-src/commit/0bd1fc225d90c5b0a002e201f2b2ca1d7e93bc35
- ext/opcache/jit で、switch のジャンプテーブル生成が誤っていたのを修正
nikic: SCCP: Don't perform partial object propagation for typed props
- https://github.com/php/php-src/commit/6893f1f98e1c73d4eece1827f0dc4fedc059a67d
- [7.4~]
- ext/opcache で、SCCP 最適化で型付プロパティについて代入の伝搬をやらないよう修正
dstogov: Avoid usage of internal get/set object handlers. They are going to be removed in PHP-8.
- https://github.com/php/php-src/commit/6738241aece97979bdb7531babcfdf12e3c4b45b
- [7.4~]
- ext/ffi で、PHP 8 で削除される get/set オブジェクトハンドラを利用しないよう修正
- FFI 経由でのスカラ値へのアクセスは cdata プロパティを通して行うようになる
nikic: SCCP: Fix handling of ASSIGN_OBJ_REF
- https://github.com/php/php-src/commit/f19dd674e012639f8511ff2e531f24e74ef701ac
- [7.4~]
- ext/opcache で、SCCP 最適化で型付プロパティへの参照については代入の伝搬をやらないよう修正
nikic: Fix type inference of SEND_UNPACK with empty array
- https://github.com/php/php-src/commit/59dfaa3f99b9be8b0848fe7bafce3c52a821a1fc
- [7.2~]
- ext/opcache で、空配列での SEND_UNPACK の型推論を修正