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-06-27 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             :    +----------------------------------------------------------------------+
      18             : */
      19             : 
      20             : /* $Id$ */
      21             : 
      22             : #ifndef ZEND_VARIABLES_H
      23             : #define ZEND_VARIABLES_H
      24             : 
      25             : #include "zend_types.h"
      26             : #include "zend_gc.h"
      27             : 
      28             : BEGIN_EXTERN_C()
      29             : 
      30             : ZEND_API void ZEND_FASTCALL _zval_dtor_func(zend_refcounted *p ZEND_FILE_LINE_DC);
      31             : ZEND_API void ZEND_FASTCALL _zval_dtor_func_for_ptr(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_dtor_func_for_ptr(zv) _zval_dtor_func_for_ptr(zv ZEND_FILE_LINE_CC)
      36             : #define zval_copy_ctor_func(zv)    _zval_copy_ctor_func(zv ZEND_FILE_LINE_CC)
      37             : 
      38             : static zend_always_inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
      39             : {
      40     2903083 :         if (!Z_REFCOUNTED_P(zvalue)) {
      41             :                 return;
      42             :         }
      43     1252087 :         _zval_dtor_func(Z_COUNTED_P(zvalue) ZEND_FILE_LINE_RELAY_CC);
      44             : }
      45             : 
      46             : static zend_always_inline void _zval_ptr_dtor_nogc(zval *zval_ptr ZEND_FILE_LINE_DC)
      47             : {
      48    26321486 :         if (Z_REFCOUNTED_P(zval_ptr) && !Z_DELREF_P(zval_ptr)) {
      49     3551846 :                 _zval_dtor_func_for_ptr(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
      50             :         }
      51             : }
      52             : 
      53             : static zend_always_inline void i_zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC)
      54             : {
      55    23842693 :         if (Z_REFCOUNTED_P(zval_ptr)) {
      56    14228504 :                 if (!Z_DELREF_P(zval_ptr)) {
      57     6224695 :                         _zval_dtor_func_for_ptr(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
      58             :                 } else {
      59             :                         GC_ZVAL_CHECK_POSSIBLE_ROOT(zval_ptr);
      60             :                 }
      61             :         }
      62             : }
      63             : 
      64             : static zend_always_inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
      65             : {
      66        1649 :         if (Z_REFCOUNTED_P(zvalue) || Z_IMMUTABLE_P(zvalue)) {
      67        1013 :                 if (Z_COPYABLE_P(zvalue) || Z_IMMUTABLE_P(zvalue)) {
      68         934 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      69             :                 } else {
      70             :                         Z_ADDREF_P(zvalue);
      71             :                 }
      72             :         }
      73             : }
      74             : 
      75             : static zend_always_inline void _zval_opt_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
      76             : {
      77      199932 :         if (Z_OPT_REFCOUNTED_P(zvalue) || Z_OPT_IMMUTABLE_P(zvalue)) {
      78         112 :                 if (Z_OPT_COPYABLE_P(zvalue) || Z_OPT_IMMUTABLE_P(zvalue)) {
      79         108 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      80             :                 } else {
      81             :                         Z_ADDREF_P(zvalue);
      82             :                 }
      83             :         }
      84             : }
      85             : 
      86             : static zend_always_inline void _zval_copy_ctor_no_imm(zval *zvalue ZEND_FILE_LINE_DC)
      87             : {
      88             :         if (Z_REFCOUNTED_P(zvalue)) {
      89             :                 if (Z_COPYABLE_P(zvalue)) {
      90             :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      91             :                 } else {
      92             :                         Z_ADDREF_P(zvalue);
      93             :                 }
      94             :         }
      95             : }
      96             : 
      97             : static zend_always_inline void _zval_opt_copy_ctor_no_imm(zval *zvalue ZEND_FILE_LINE_DC)
      98             : {
      99          10 :         if (Z_OPT_REFCOUNTED_P(zvalue)) {
     100           0 :                 if (Z_OPT_COPYABLE_P(zvalue)) {
     101           0 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
     102             :                 } else {
     103             :                         Z_ADDREF_P(zvalue);
     104             :                 }
     105             :         }
     106             : }
     107             : 
     108             : ZEND_API int zval_copy_static_var(zval *p, int num_args, va_list args, zend_hash_key *key);
     109             : 
     110             : ZEND_API size_t zend_print_variable(zval *var);
     111             : ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);
     112             : ZEND_API void _zval_internal_dtor_for_ptr(zval *zvalue ZEND_FILE_LINE_DC);
     113             : ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC);
     114             : ZEND_API void _zval_internal_ptr_dtor(zval *zvalue ZEND_FILE_LINE_DC);
     115             : ZEND_API void _zval_dtor_wrapper(zval *zvalue);
     116             : #define zval_copy_ctor(zvalue) _zval_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
     117             : #define zval_opt_copy_ctor(zvalue) _zval_opt_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
     118             : #define zval_copy_ctor_no_imm(zvalue) _zval_copy_ctor_no_imm((zvalue) ZEND_FILE_LINE_CC)
     119             : #define zval_opt_copy_ctor_no_imm(zvalue) _zval_opt_copy_ctor_no_imm((zvalue) ZEND_FILE_LINE_CC)
     120             : #define zval_dtor(zvalue) _zval_dtor((zvalue) ZEND_FILE_LINE_CC)
     121             : #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
     122             : #define zval_ptr_dtor_nogc(zval_ptr) _zval_ptr_dtor_nogc((zval_ptr) ZEND_FILE_LINE_CC)
     123             : #define zval_internal_dtor(zvalue) _zval_internal_dtor((zvalue) ZEND_FILE_LINE_CC)
     124             : #define zval_internal_ptr_dtor(zvalue) _zval_internal_ptr_dtor((zvalue) ZEND_FILE_LINE_CC)
     125             : #define zval_dtor_wrapper _zval_dtor_wrapper
     126             : 
     127             : #if ZEND_DEBUG
     128             : ZEND_API void _zval_ptr_dtor_wrapper(zval *zval_ptr);
     129             : ZEND_API void _zval_internal_dtor_wrapper(zval *zvalue);
     130             : ZEND_API void _zval_internal_ptr_dtor_wrapper(zval *zvalue);
     131             : #define zval_ptr_dtor_wrapper _zval_ptr_dtor_wrapper
     132             : #define zval_internal_dtor_wrapper _zval_internal_dtor_wrapper
     133             : #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor_wrapper
     134             : #else
     135             : #define zval_ptr_dtor_wrapper _zval_ptr_dtor
     136             : #define zval_internal_dtor_wrapper _zval_internal_dtor
     137             : #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor
     138             : #endif
     139             : 
     140             : ZEND_API void zval_add_ref(zval *p);
     141             : ZEND_API void zval_add_ref_unref(zval *p);
     142             : 
     143             : END_EXTERN_C()
     144             : 
     145             : #define ZVAL_DESTRUCTOR zval_dtor_wrapper
     146             : #define ZVAL_PTR_DTOR zval_ptr_dtor_wrapper
     147             : #define ZVAL_INTERNAL_DTOR zval_internal_dtor_wrapper
     148             : #define ZVAL_INTERNAL_PTR_DTOR zval_internal_ptr_dtor_wrapper
     149             : 
     150             : #endif
     151             : 
     152             : /*
     153             :  * Local variables:
     154             :  * tab-width: 4
     155             :  * c-basic-offset: 4
     156             :  * indent-tabs-mode: t
     157             :  * End:
     158             :  */

Generated by: LCOV version 1.10

Generated at Sat, 27 Jun 2015 09:41:07 +0000 (5 days ago)

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