PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LCOV - code coverage report
Current view: top level - Zend - zend_variables.h (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 11 11 100.0 %
Date: 2016-07-26 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | Zend Engine                                                          |
       4             :    +----------------------------------------------------------------------+
       5             :    | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
       6             :    +----------------------------------------------------------------------+
       7             :    | This source file is subject to version 2.00 of the Zend license,     |
       8             :    | that is bundled with this package in the file LICENSE, and is        |
       9             :    | available through the world-wide-web at the following url:           |
      10             :    | http://www.zend.com/license/2_00.txt.                                |
      11             :    | If you did not receive a copy of the Zend license and are unable to  |
      12             :    | obtain it through the world-wide-web, please send a note to          |
      13             :    | license@zend.com so we can mail you a copy immediately.              |
      14             :    +----------------------------------------------------------------------+
      15             :    | Authors: Andi Gutmans <andi@zend.com>                                |
      16             :    |          Zeev Suraski <zeev@zend.com>                                |
      17             :    |          Dmitry Stogov <dmitry@zend.com>                             |
      18             :    +----------------------------------------------------------------------+
      19             : */
      20             : 
      21             : /* $Id$ */
      22             : 
      23             : #ifndef ZEND_VARIABLES_H
      24             : #define ZEND_VARIABLES_H
      25             : 
      26             : #include "zend_types.h"
      27             : #include "zend_gc.h"
      28             : 
      29             : BEGIN_EXTERN_C()
      30             : 
      31             : ZEND_API void ZEND_FASTCALL _zval_dtor_func(zend_refcounted *p ZEND_FILE_LINE_DC);
      32             : ZEND_API void ZEND_FASTCALL _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC);
      33             : 
      34             : #define zval_dtor_func(zv)         _zval_dtor_func(zv ZEND_FILE_LINE_CC)
      35             : #define zval_copy_ctor_func(zv)    _zval_copy_ctor_func(zv ZEND_FILE_LINE_CC)
      36             : 
      37             : static zend_always_inline void _zval_ptr_dtor_nogc(zval *zval_ptr ZEND_FILE_LINE_DC)
      38             : {
      39    39781535 :         if (Z_REFCOUNTED_P(zval_ptr) && !Z_DELREF_P(zval_ptr)) {
      40     5480753 :                 _zval_dtor_func(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
      41             :         }
      42             : }
      43             : 
      44             : static zend_always_inline void i_zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC)
      45             : {
      46    35449842 :         if (Z_REFCOUNTED_P(zval_ptr)) {
      47    18153756 :                 if (!Z_DELREF_P(zval_ptr)) {
      48     8446671 :                         _zval_dtor_func(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
      49             :                 } else {
      50             :                         GC_ZVAL_CHECK_POSSIBLE_ROOT(zval_ptr);
      51             :                 }
      52             :         }
      53             : }
      54             : 
      55             : static zend_always_inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
      56             : {
      57        1855 :         if (Z_REFCOUNTED_P(zvalue) || Z_IMMUTABLE_P(zvalue)) {
      58         994 :                 if (Z_COPYABLE_P(zvalue) || Z_IMMUTABLE_P(zvalue)) {
      59         928 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      60             :                 } else {
      61             :                         Z_ADDREF_P(zvalue);
      62             :                 }
      63             :         }
      64             : }
      65             : 
      66             : static zend_always_inline void _zval_opt_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
      67             : {
      68      224791 :         if (Z_OPT_REFCOUNTED_P(zvalue) || Z_OPT_IMMUTABLE_P(zvalue)) {
      69      101736 :                 if (Z_OPT_COPYABLE_P(zvalue) || Z_OPT_IMMUTABLE_P(zvalue)) {
      70      101731 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      71             :                 } else {
      72             :                         Z_ADDREF_P(zvalue);
      73             :                 }
      74             :         }
      75             : }
      76             : 
      77             : static zend_always_inline void _zval_copy_ctor_no_imm(zval *zvalue ZEND_FILE_LINE_DC)
      78             : {
      79             :         if (Z_REFCOUNTED_P(zvalue)) {
      80             :                 if (Z_COPYABLE_P(zvalue)) {
      81             :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      82             :                 } else {
      83             :                         Z_ADDREF_P(zvalue);
      84             :                 }
      85             :         }
      86             : }
      87             : 
      88             : static zend_always_inline void _zval_opt_copy_ctor_no_imm(zval *zvalue ZEND_FILE_LINE_DC)
      89             : {
      90             :         if (Z_OPT_REFCOUNTED_P(zvalue)) {
      91             :                 if (Z_OPT_COPYABLE_P(zvalue)) {
      92             :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      93             :                 } else {
      94             :                         Z_ADDREF_P(zvalue);
      95             :                 }
      96             :         }
      97             : }
      98             : 
      99             : ZEND_API size_t zend_print_variable(zval *var);
     100             : ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);
     101             : ZEND_API void _zval_internal_dtor_for_ptr(zval *zvalue ZEND_FILE_LINE_DC);
     102             : ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC);
     103             : ZEND_API void _zval_internal_ptr_dtor(zval *zvalue ZEND_FILE_LINE_DC);
     104             : ZEND_API void _zval_dtor_wrapper(zval *zvalue);
     105             : #define zval_copy_ctor(zvalue) _zval_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
     106             : #define zval_opt_copy_ctor(zvalue) _zval_opt_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
     107             : #define zval_copy_ctor_no_imm(zvalue) _zval_copy_ctor_no_imm((zvalue) ZEND_FILE_LINE_CC)
     108             : #define zval_opt_copy_ctor_no_imm(zvalue) _zval_opt_copy_ctor_no_imm((zvalue) ZEND_FILE_LINE_CC)
     109             : #define zval_dtor(zvalue) zval_ptr_dtor_nogc(zvalue)
     110             : #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
     111             : #define zval_ptr_dtor_nogc(zval_ptr) _zval_ptr_dtor_nogc((zval_ptr) ZEND_FILE_LINE_CC)
     112             : #define zval_internal_dtor(zvalue) _zval_internal_dtor((zvalue) ZEND_FILE_LINE_CC)
     113             : #define zval_internal_ptr_dtor(zvalue) _zval_internal_ptr_dtor((zvalue) ZEND_FILE_LINE_CC)
     114             : #define zval_dtor_wrapper _zval_dtor_wrapper
     115             : 
     116             : #if ZEND_DEBUG
     117             : ZEND_API void _zval_ptr_dtor_wrapper(zval *zval_ptr);
     118             : ZEND_API void _zval_internal_dtor_wrapper(zval *zvalue);
     119             : ZEND_API void _zval_internal_ptr_dtor_wrapper(zval *zvalue);
     120             : #define zval_ptr_dtor_wrapper _zval_ptr_dtor_wrapper
     121             : #define zval_internal_dtor_wrapper _zval_internal_dtor_wrapper
     122             : #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor_wrapper
     123             : #else
     124             : #define zval_ptr_dtor_wrapper _zval_ptr_dtor
     125             : #define zval_internal_dtor_wrapper _zval_internal_dtor
     126             : #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor
     127             : #endif
     128             : 
     129             : ZEND_API void zval_add_ref(zval *p);
     130             : ZEND_API void zval_add_ref_unref(zval *p);
     131             : 
     132             : END_EXTERN_C()
     133             : 
     134             : #define ZVAL_DESTRUCTOR zval_dtor_wrapper
     135             : #define ZVAL_PTR_DTOR zval_ptr_dtor_wrapper
     136             : #define ZVAL_INTERNAL_DTOR zval_internal_dtor_wrapper
     137             : #define ZVAL_INTERNAL_PTR_DTOR zval_internal_ptr_dtor_wrapper
     138             : 
     139             : #endif
     140             : 
     141             : /*
     142             :  * Local variables:
     143             :  * tab-width: 4
     144             :  * c-basic-offset: 4
     145             :  * indent-tabs-mode: t
     146             :  * End:
     147             :  */

Generated by: LCOV version 1.10

Generated at Tue, 26 Jul 2016 17:07:32 +0000 (3 days ago)

Copyright © 2005-2016 The PHP Group
All rights reserved.