File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_HANDLER(Z
4343 ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
4444}
4545```
46- 所有opcode的handler定义格式都是相同的,其参数列表通过ZEND_OPCODE_HANDLER_ARGS宏定义,展开后实际只有一个execute_data;ZEND_FASTCALL这个宏是用于指定C语言函数调用方式的,这里指定的是fastcall方式,GNU C下就是__attribute__((fastcall))。去掉一些非关键操作展开后 :
46+ 所有opcode的handler定义格式都是相同的,其参数列表通过ZEND_OPCODE_HANDLER_ARGS宏定义,展开后实际只有一个execute_data,展开后 :
4747```c
48- static int __attribute__((fastcall)) ZEND_ASSIGN_SPEC_CV_CONST_HANDLER(zend_execute_data *execute_data)
48+ static int ZEND_ASSIGN_SPEC_CV_CONST_HANDLER(zend_execute_data *execute_data)
4949{
5050 //USE_OPLINE
5151 const zend_op *opline = execute_data->opline;
@@ -148,7 +148,7 @@ ZEND_API void execute_ex(zend_execute_data *ex)
148148```
149149这个时候调用各opcode指令的handler时就不再传入execute_data的参数了,handler使用时直接从全局变量读取,仍以上面的赋值ZEND_ASSIGN指令为例,handler展开后:
150150``` c
151- static int __attribute__ ((fastcall)) ZEND_ASSIGN_SPEC_CV_CONST_HANDLER(void)
151+ static int ZEND_ASSIGN_SPEC_CV_CONST_HANDLER (void)
152152{
153153 ...
154154
You can’t perform that action at this time.
0 commit comments