From 31ba7d1cb770d02ce1c88735073a0c39d4c2e55b Mon Sep 17 00:00:00 2001 From: "Su, Tao" Date: Sat, 29 Jan 2022 00:12:32 -0800 Subject: [PATCH 1/2] [Zend] Update README.md with new Zend VM executors As a new learner to PHP Zend VM, the first place I can find information is this README.md. Unfortunately, it has not included the latest Zend VM kind and code generation script. With code reading and trail-and-error experiments, I found a few updates that might be helpful to new learners. ChangeLog: 1) Add HYBRID threading model 2) Remove --without-old-executor option and description 3) ZE2 --> ZE3 (Since PHP 7) 4) Change default VM kind from CALL to HYBRID Signed-off-by: Su, Tao --- Zend/README.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Zend/README.md b/Zend/README.md index cf1f15463d2f9..810495bd42a9c 100644 --- a/Zend/README.md +++ b/Zend/README.md @@ -126,14 +126,13 @@ definitions. It is included from `zend_compile.h`. The second one is an executor code itself. It is included from `zend_execute.c`. `zend_vm_gen.php` can produce different kind of executors. You can select -different opcode threading model using `--with-vm-kind=CALL|SWITCH|GOTO`. You -can disable opcode specialization using `--without-specializer`. You can include -or exclude old executor together with specialized one using -`--without-old-executor`. At last you can debug executor using original -`zend_vm_def.h` or generated file `zend_vm_execute.h`. Debugging with original -file requires `--with-lines` option. By default ZE2 uses the following command -to generate executor: +different opcode threading model using `--with-vm-kind=CALL|SWITCH|GOTO|HYBRID`. +You can disable opcode specialization using `--without-specializer`. +At last you can debug executor using original `zend_vm_def.h` or generated file +`zend_vm_execute.h`. Debugging with original file requires `--with-lines` option. +By default ZE3 (since PHP 7) uses the following command to generate executor: ```bash -php zend_vm_gen.php --with-vm-kind=CALL +# Default VM kind is HYBRID +php zend_vm_gen.php --with-vm-kind=HYBRID ``` From f4efebb576fc94bcf277a512449c2185d9db7a66 Mon Sep 17 00:00:00 2001 From: Tony Su Date: Sun, 30 Jan 2022 08:41:47 +0800 Subject: [PATCH 2/2] [Zend] Update README.md and apply review comments Reviewed-by: Ilija Tovilo --- Zend/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Zend/README.md b/Zend/README.md index 810495bd42a9c..ff0a9913cc2f1 100644 --- a/Zend/README.md +++ b/Zend/README.md @@ -125,11 +125,11 @@ Executor's code is generated by PHP script zend_vm_gen.php it uses definitions. It is included from `zend_compile.h`. The second one is an executor code itself. It is included from `zend_execute.c`. -`zend_vm_gen.php` can produce different kind of executors. You can select +`zend_vm_gen.php` can produce different kind of executors. You can select a different opcode threading model using `--with-vm-kind=CALL|SWITCH|GOTO|HYBRID`. You can disable opcode specialization using `--without-specializer`. -At last you can debug executor using original `zend_vm_def.h` or generated file -`zend_vm_execute.h`. Debugging with original file requires `--with-lines` option. +At last you can debug the executor using the original `zend_vm_def.h` or the generated +`zend_vm_execute.h` file. Debugging with the original file requires the `--with-lines` option. By default ZE3 (since PHP 7) uses the following command to generate executor: ```bash