Skip to content

Commit 22688c7

Browse files
Su, Taoiluuu1994
Su, Tao
authored andcommitted
[ci skip] [Zend] Update README.md with new Zend VM executors
Closes GH-8008 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 <tao.su@intel.com>
1 parent 74f7f2c commit 22688c7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Zend/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,21 @@ ZEND_VM_HELPER_EX(<HELPER-NAME>, <OP1_TYPES>, <OP2_TYPES>, <PARAM_SPEC>)
119119
}
120120
```
121121
122-
Executor's code is generated by PHP script zend_vm_gen.php it uses
122+
The executors code is generated by the PHP script `zend_vm_gen.php`. It uses
123123
`zend_vm_def.h` and `zend_vm_execute.skl` as input and produces
124124
`zend_vm_opcodes.h` and `zend_vm_execute.h`. The first file is a list of opcode
125125
definitions. It is included from `zend_compile.h`. The second one is an executor
126126
code itself. It is included from `zend_execute.c`.
127127
128-
`zend_vm_gen.php` can produce different kind of executors. You can select
129-
different opcode threading model using `--with-vm-kind=CALL|SWITCH|GOTO`. You
130-
can disable opcode specialization using `--without-specializer`. You can include
131-
or exclude old executor together with specialized one using
132-
`--without-old-executor`. At last you can debug executor using original
133-
`zend_vm_def.h` or generated file `zend_vm_execute.h`. Debugging with original
134-
file requires `--with-lines` option. By default ZE2 uses the following command
135-
to generate executor:
128+
`zend_vm_gen.php` can produce different kind of executors. You can select a
129+
different opcode threading model using `--with-vm-kind=CALL|SWITCH|GOTO|HYBRID`.
130+
You can disable opcode specialization using `--without-specializer`.
131+
At last you can debug the executor using the original `zend_vm_def.h` or the
132+
generated `zend_vm_execute.h` file. Debugging with the original file requires
133+
the `--with-lines` option. By default ZE3 (since PHP 7) uses the following
134+
command to generate the executor:
136135
137136
```bash
138-
php zend_vm_gen.php --with-vm-kind=CALL
137+
# Default VM kind is HYBRID
138+
php zend_vm_gen.php --with-vm-kind=HYBRID
139139
```

0 commit comments

Comments
 (0)