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: 14 16 87.5 %
Date: 2015-09-02 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | Zend Engine                                                          |
       4             :    +----------------------------------------------------------------------+
       5             :    | Copyright (c) 1998-2015 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_dtor_func_for_ptr(zend_refcounted *p ZEND_FILE_LINE_DC);
      33             : ZEND_API void ZEND_FASTCALL _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC);
      34             : 
      35             : #define zval_dtor_func(zv)         _zval_dtor_func(zv ZEND_FILE_LINE_CC)
      36             : #define zval_dtor_func_for_ptr(zv) _zval_dtor_func_for_ptr(zv ZEND_FILE_LINE_CC)
      37             : #define zval_copy_ctor_func(zv)    _zval_copy_ctor_func(zv ZEND_FILE_LINE_CC)
      38             : 
      39             : static zend_always_inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
      40             : {
      41     2910214 :         if (!Z_REFCOUNTED_P(zvalue)) {
      42             :                 return;
      43             :         }
      44     1257839 :         _zval_dtor_func(Z_COUNTED_P(zvalue) ZEND_FILE_LINE_RELAY_CC);
      45             : }
      46             : 
      47             : static zend_always_inline void _zval_ptr_dtor_nogc(zval *zval_ptr ZEND_FILE_LINE_DC)
      48             : {
      49    25944445 :         if (Z_REFCOUNTED_P(zval_ptr) && !Z_DELREF_P(zval_ptr)) {
      50     3572900 :                 _zval_dtor_func_for_ptr(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
      51             :         }
      52             : }
      53             : 
      54             : static zend_always_inline void i_zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC)
      55             : {
      56    24845713 :         if (Z_REFCOUNTED_P(zval_ptr)) {
      57    14353561 :                 if (!Z_DELREF_P(zval_ptr)) {
      58     6287811 :                         _zval_dtor_func_for_ptr(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
      59             :                 } else {
      60             :                         GC_ZVAL_CHECK_POSSIBLE_ROOT(zval_ptr);
      61             :                 }
      62             :         }
      63             : }
      64             : 
      65             : static zend_always_inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
      66             : {
      67        1647 :         if (Z_REFCOUNTED_P(zvalue) || Z_IMMUTABLE_P(zvalue)) {
      68        1011 :                 if (Z_COPYABLE_P(zvalue) || Z_IMMUTABLE_P(zvalue)) {
      69         934 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      70             :                 } else {
      71             :                         Z_ADDREF_P(zvalue);
      72             :                 }
      73             :         }
      74             : }
      75             : 
      76             : static zend_always_inline void _zval_opt_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
      77             : {
      78      114865 :         if (Z_OPT_REFCOUNTED_P(zvalue) || Z_OPT_IMMUTABLE_P(zvalue)) {
      79         113 :                 if (Z_OPT_COPYABLE_P(zvalue) || Z_OPT_IMMUTABLE_P(zvalue)) {
      80         108 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      81             :                 } else {
      82             :                         Z_ADDREF_P(zvalue);
      83             :                 }
      84             :         }
      85             : }
      86             : 
      87             : static zend_always_inline void _zval_copy_ctor_no_imm(zval *zvalue ZEND_FILE_LINE_DC)
      88             : {
      89             :         if (Z_REFCOUNTED_P(zvalue)) {
      90             :                 if (Z_COPYABLE_P(zvalue)) {
      91             :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      92             :                 } else {
      93             :                         Z_ADDREF_P(zvalue);
      94             :                 }
      95             :         }
      96             : }
      97             : 
      98             : static zend_always_inline void _zval_opt_copy_ctor_no_imm(zval *zvalue ZEND_FILE_LINE_DC)
      99             : {
     100          10 :         if (Z_OPT_REFCOUNTED_P(zvalue)) {
     101           0 :                 if (Z_OPT_COPYABLE_P(zvalue)) {
     102           0 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
     103             :                 } else {
     104             :                         Z_ADDREF_P(zvalue);
     105             :                 }
     106             :         }
     107             : }
     108             : 
     109             : ZEND_API int zval_copy_static_var(zval *p, int num_args, va_list args, zend_hash_key *key);
     110             : 
     111             : ZEND_API size_t zend_print_variable(zval *var);
     112             : ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);
     113             : ZEND_API void _zval_internal_dtor_for_ptr(zval *zvalue ZEND_FILE_LINE_DC);
     114             : ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC);
     115             : ZEND_API void _zval_internal_ptr_dtor(zval *zvalue ZEND_FILE_LINE_DC);
     116             : ZEND_API void _zval_dtor_wrapper(zval *zvalue);
     117             : #define zval_copy_ctor(zvalue) _zval_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
     118             : #define zval_opt_copy_ctor(zvalue) _zval_opt_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
     119             : #define zval_copy_ctor_no_imm(zvalue) _zval_copy_ctor_no_imm((zvalue) ZEND_FILE_LINE_CC)
     120             : #define zval_opt_copy_ctor_no_imm(zvalue) _zval_opt_copy_ctor_no_imm((zvalue) ZEND_FILE_LINE_CC)
     121             : #define zval_dtor(zvalue) _zval_dtor((zvalue) ZEND_FILE_LINE_CC)
     122             : #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
     123             : #define zval_ptr_dtor_nogc(zval_ptr) _zval_ptr_dtor_nogc((zval_ptr) ZEND_FILE_LINE_CC)
     124             : #define zval_internal_dtor(zvalue) _zval_internal_dtor((zvalue) ZEND_FILE_LINE_CC)
     125             : #define zval_internal_ptr_dtor(zvalue) _zval_internal_ptr_dtor((zvalue) ZEND_FILE_LINE_CC)
     126             : #define zval_dtor_wrapper _zval_dtor_wrapper
     127             : 
     128             : #if ZEND_DEBUG
     129             : ZEND_API void _zval_ptr_dtor_wrapper(zval *zval_ptr);
     130             : ZEND_API void _zval_internal_dtor_wrapper(zval *zvalue);
     131             : ZEND_API void _zval_internal_ptr_dtor_wrapper(zval *zvalue);
     132             : #define zval_ptr_dtor_wrapper _zval_ptr_dtor_wrapper
     133             : #define zval_internal_dtor_wrapper _zval_internal_dtor_wrapper
     134             : #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor_wrapper
     135             : #else
     136             : #define zval_ptr_dtor_wrapper _zval_ptr_dtor
     137             : #define zval_internal_dtor_wrapper _zval_internal_dtor
     138             : #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor
     139             : #endif
     140             : 
     141             : ZEND_API void zval_add_ref(zval *p);
     142             : ZEND_API void zval_add_ref_unref(zval *p);
     143             : 
     144             : END_EXTERN_C()
     145             : 
     146             : #define ZVAL_DESTRUCTOR zval_dtor_wrapper
     147             : #define ZVAL_PTR_DTOR zval_ptr_dtor_wrapper
     148             : #define ZVAL_INTERNAL_DTOR zval_internal_dtor_wrapper
     149             : #define ZVAL_INTERNAL_PTR_DTOR zval_internal_ptr_dtor_wrapper
     150             : 
     151             : #endif
     152             : 
     153             : /*
     154             :  * Local variables:
     155             :  * tab-width: 4
     156             :  * c-basic-offset: 4
     157             :  * indent-tabs-mode: t
     158             :  * End:
     159             :  */

Generated by: LCOV version 1.10

Generated at Wed, 02 Sep 2015 17:19:07 +0000 (25 hours ago)

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