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 13 84.6 %
Date: 2014-11-22 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | Zend Engine                                                          |
       4             :    +----------------------------------------------------------------------+
       5             :    | Copyright (c) 1998-2014 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             : 
      26             : BEGIN_EXTERN_C()
      27             : 
      28             : ZEND_API void _zval_dtor_func(zend_refcounted *p ZEND_FILE_LINE_DC);
      29             : ZEND_API void _zval_dtor_func_for_ptr(zend_refcounted *p ZEND_FILE_LINE_DC);
      30             : 
      31             : static zend_always_inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
      32             : {
      33     1661115 :         if (!Z_REFCOUNTED_P(zvalue)) {
      34             :                 return;
      35             :         }
      36     1392479 :         _zval_dtor_func(Z_COUNTED_P(zvalue) ZEND_FILE_LINE_RELAY_CC);
      37             : }
      38             : 
      39             : static zend_always_inline void _zval_ptr_dtor_nogc(zval *zval_ptr ZEND_FILE_LINE_DC)
      40             : {
      41    95904415 :         if (Z_REFCOUNTED_P(zval_ptr) && !Z_DELREF_P(zval_ptr)) {
      42     6306522 :                 _zval_dtor_func_for_ptr(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
      43             :         }
      44             : }
      45             : 
      46             : ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC);
      47             : 
      48             : #define zval_copy_ctor_func(zv) _zval_copy_ctor_func(zv ZEND_FILE_LINE_CC)
      49             : 
      50             : static zend_always_inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
      51             : {
      52        1762 :         if (Z_REFCOUNTED_P(zvalue) || Z_IMMUTABLE_P(zvalue)) {
      53        1034 :                 if (Z_COPYABLE_P(zvalue) || Z_IMMUTABLE_P(zvalue)) {
      54         960 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      55             :                 } else {
      56             :                         Z_ADDREF_P(zvalue);
      57             :                 }
      58             :         }
      59             : }
      60             : 
      61             : static zend_always_inline void _zval_opt_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
      62             : {
      63      951267 :         if (Z_OPT_REFCOUNTED_P(zvalue) || Z_OPT_IMMUTABLE_P(zvalue)) {
      64      418630 :                 if (Z_OPT_COPYABLE_P(zvalue) || Z_OPT_IMMUTABLE_P(zvalue)) {
      65      226367 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      66             :                 } else {
      67             :                         Z_ADDREF_P(zvalue);
      68             :                 }
      69             :         }
      70             : }
      71             : 
      72             : static zend_always_inline void _zval_copy_ctor_no_imm(zval *zvalue ZEND_FILE_LINE_DC)
      73             : {
      74             :         if (Z_REFCOUNTED_P(zvalue)) {
      75             :                 if (Z_COPYABLE_P(zvalue)) {
      76             :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      77             :                 } else {
      78             :                         Z_ADDREF_P(zvalue);
      79             :                 }
      80             :         }
      81             : }
      82             : 
      83             : static zend_always_inline void _zval_opt_copy_ctor_no_imm(zval *zvalue ZEND_FILE_LINE_DC)
      84             : {
      85          10 :         if (Z_OPT_REFCOUNTED_P(zvalue)) {
      86           0 :                 if (Z_OPT_COPYABLE_P(zvalue)) {
      87           0 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      88             :                 } else {
      89             :                         Z_ADDREF_P(zvalue);
      90             :                 }
      91             :         }
      92             : }
      93             : 
      94             : ZEND_API int zval_copy_static_var(zval *p TSRMLS_DC, int num_args, va_list args, zend_hash_key *key);
      95             : 
      96             : ZEND_API size_t zend_print_variable(zval *var TSRMLS_DC);
      97             : ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);
      98             : ZEND_API void _zval_internal_dtor_for_ptr(zval *zvalue ZEND_FILE_LINE_DC);
      99             : ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC);
     100             : ZEND_API void _zval_internal_ptr_dtor(zval *zvalue ZEND_FILE_LINE_DC);
     101             : ZEND_API void _zval_dtor_wrapper(zval *zvalue);
     102             : #define zval_copy_ctor(zvalue) _zval_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
     103             : #define zval_opt_copy_ctor(zvalue) _zval_opt_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
     104             : #define zval_copy_ctor_no_imm(zvalue) _zval_copy_ctor_no_imm((zvalue) ZEND_FILE_LINE_CC)
     105             : #define zval_opt_copy_ctor_no_imm(zvalue) _zval_opt_copy_ctor_no_imm((zvalue) ZEND_FILE_LINE_CC)
     106             : #define zval_dtor(zvalue) _zval_dtor((zvalue) ZEND_FILE_LINE_CC)
     107             : #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
     108             : #define zval_ptr_dtor_nogc(zval_ptr) _zval_ptr_dtor_nogc((zval_ptr) ZEND_FILE_LINE_CC)
     109             : #define zval_internal_dtor(zvalue) _zval_internal_dtor((zvalue) ZEND_FILE_LINE_CC)
     110             : #define zval_internal_ptr_dtor(zvalue) _zval_internal_ptr_dtor((zvalue) ZEND_FILE_LINE_CC)
     111             : #define zval_dtor_wrapper _zval_dtor_wrapper
     112             : 
     113             : #if ZEND_DEBUG
     114             : ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue);
     115             : ZEND_API void _zval_ptr_dtor_wrapper(zval *zval_ptr);
     116             : ZEND_API void _zval_internal_dtor_wrapper(zval *zvalue);
     117             : ZEND_API void _zval_internal_ptr_dtor_wrapper(zval *zvalue);
     118             : #define zval_copy_ctor_wrapper _zval_copy_ctor_wrapper
     119             : #define zval_ptr_dtor_wrapper _zval_ptr_dtor_wrapper
     120             : #define zval_internal_dtor_wrapper _zval_internal_dtor_wrapper
     121             : #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor_wrapper
     122             : #else
     123             : #define zval_copy_ctor_wrapper _zval_copy_ctor_func
     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             : #define ZVAL_COPY_CTOR zval_copy_ctor_wrapper
     139             : 
     140             : #endif
     141             : 
     142             : /*
     143             :  * Local variables:
     144             :  * tab-width: 4
     145             :  * c-basic-offset: 4
     146             :  * indent-tabs-mode: t
     147             :  * End:
     148             :  */

Generated by: LCOV version 1.10

Generated at Sat, 22 Nov 2014 23:01:13 +0000 (6 days ago)

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