Zend源码中ZEND_FASTCALL的作用?

新手上路,请多包涵

Zend源码中ZEND_FASTCALL的作用?

以下为zend源码中zend_vm_execute.h:

`static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{

   USE_OPLINE

   zval *value;
   zval **variable_ptr_ptr;

   SAVE_OPLINE();
   value = opline->op2.zv;
   variable_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(execute_data, opline->op1.var TSRMLS_CC);

   if (IS_CV == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL)) {
       if (zend_assign_to_string_offset(&EX_T(opline->op1.var), value, IS_CONST TSRMLS_CC)) {
           if (RETURN_VALUE_USED(opline)) {
           PZVAL_LOCK(&EG(uninitialized_zval));
           EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
       }
   } else {
       if (IS_CONST == IS_TMP_VAR) {
           value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
       } else if (IS_CONST == IS_CONST) {
           value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
       } else {
           value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
       }
       if (RETURN_VALUE_USED(opline)) {
           PZVAL_LOCK(value);
           EX_T(opline->result.var).var.ptr = value;
       }
   }

   if (IS_CV == IS_VAR && 0) {
       zval_ptr_dtor_nogc(&value);
   }

   /* zend_assign_to_variable() always takes care of op2, never free it! */

   CHECK_EXCEPTION();
   ZEND_VM_NEXT_OPCODE();
}

阅读 1.1k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题