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: 2014-12-13 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             : #include "zend_types.h"
      26             : #include "zend_gc.h"
      27             : 
      28             : BEGIN_EXTERN_C()
      29             : 
      30             : ZEND_API void _zval_dtor_func(zend_refcounted *p ZEND_FILE_LINE_DC);
      31             : ZEND_API void _zval_dtor_func_for_ptr(zend_refcounted *p ZEND_FILE_LINE_DC);
      32             : 
      33             : static zend_always_inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
      34             : {
      35     1477851 :         if (!Z_REFCOUNTED_P(zvalue)) {
      36             :                 return;
      37             :         }
      38     1274582 :         _zval_dtor_func(Z_COUNTED_P(zvalue) ZEND_FILE_LINE_RELAY_CC);
      39             : }
      40             : 
      41             : static zend_always_inline void _zval_ptr_dtor_nogc(zval *zval_ptr ZEND_FILE_LINE_DC)
      42             : {
      43    93185939 :         if (Z_REFCOUNTED_P(zval_ptr) && !Z_DELREF_P(zval_ptr)) {
      44     6276080 :                 _zval_dtor_func_for_ptr(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
      45             :         }
      46             : }
      47             : 
      48             : static zend_always_inline void i_zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC TSRMLS_DC)
      49             : {
      50    29349475 :         if (Z_REFCOUNTED_P(zval_ptr)) {
      51    18248001 :                 if (!Z_DELREF_P(zval_ptr)) {
      52     6890071 :                         _zval_dtor_func_for_ptr(Z_COUNTED_P(zval_ptr) ZEND_FILE_LINE_RELAY_CC);
      53             :                 } else {
      54             :                         GC_ZVAL_CHECK_POSSIBLE_ROOT(zval_ptr);
      55             :                 }
      56             :         }
      57             : }
      58             : 
      59             : ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC);
      60             : 
      61             : #define zval_copy_ctor_func(zv) _zval_copy_ctor_func(zv ZEND_FILE_LINE_CC)
      62             : 
      63             : static zend_always_inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
      64             : {
      65        1765 :         if (Z_REFCOUNTED_P(zvalue) || Z_IMMUTABLE_P(zvalue)) {
      66        1034 :                 if (Z_COPYABLE_P(zvalue) || Z_IMMUTABLE_P(zvalue)) {
      67         960 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      68             :                 } else {
      69             :                         Z_ADDREF_P(zvalue);
      70             :                 }
      71             :         }
      72             : }
      73             : 
      74             : static zend_always_inline void _zval_opt_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
      75             : {
      76      419167 :         if (Z_OPT_REFCOUNTED_P(zvalue) || Z_OPT_IMMUTABLE_P(zvalue)) {
      77      186253 :                 if (Z_OPT_COPYABLE_P(zvalue) || Z_OPT_IMMUTABLE_P(zvalue)) {
      78        8913 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      79             :                 } else {
      80             :                         Z_ADDREF_P(zvalue);
      81             :                 }
      82             :         }
      83             : }
      84             : 
      85             : static zend_always_inline void _zval_copy_ctor_no_imm(zval *zvalue ZEND_FILE_LINE_DC)
      86             : {
      87             :         if (Z_REFCOUNTED_P(zvalue)) {
      88             :                 if (Z_COPYABLE_P(zvalue)) {
      89             :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
      90             :                 } else {
      91             :                         Z_ADDREF_P(zvalue);
      92             :                 }
      93             :         }
      94             : }
      95             : 
      96             : static zend_always_inline void _zval_opt_copy_ctor_no_imm(zval *zvalue ZEND_FILE_LINE_DC)
      97             : {
      98          10 :         if (Z_OPT_REFCOUNTED_P(zvalue)) {
      99           0 :                 if (Z_OPT_COPYABLE_P(zvalue)) {
     100           0 :                         _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
     101             :                 } else {
     102             :                         Z_ADDREF_P(zvalue);
     103             :                 }
     104             :         }
     105             : }
     106             : 
     107             : ZEND_API int zval_copy_static_var(zval *p TSRMLS_DC, int num_args, va_list args, zend_hash_key *key);
     108             : 
     109             : ZEND_API size_t zend_print_variable(zval *var TSRMLS_DC);
     110             : ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);
     111             : ZEND_API void _zval_internal_dtor_for_ptr(zval *zvalue ZEND_FILE_LINE_DC);
     112             : ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC);
     113             : ZEND_API void _zval_internal_ptr_dtor(zval *zvalue ZEND_FILE_LINE_DC);
     114             : ZEND_API void _zval_dtor_wrapper(zval *zvalue);
     115             : #define zval_copy_ctor(zvalue) _zval_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
     116             : #define zval_opt_copy_ctor(zvalue) _zval_opt_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
     117             : #define zval_copy_ctor_no_imm(zvalue) _zval_copy_ctor_no_imm((zvalue) ZEND_FILE_LINE_CC)
     118             : #define zval_opt_copy_ctor_no_imm(zvalue) _zval_opt_copy_ctor_no_imm((zvalue) ZEND_FILE_LINE_CC)
     119             : #define zval_dtor(zvalue) _zval_dtor((zvalue) ZEND_FILE_LINE_CC)
     120             : #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
     121             : #define zval_ptr_dtor_nogc(zval_ptr) _zval_ptr_dtor_nogc((zval_ptr) ZEND_FILE_LINE_CC)
     122             : #define zval_internal_dtor(zvalue) _zval_internal_dtor((zvalue) ZEND_FILE_LINE_CC)
     123             : #define zval_internal_ptr_dtor(zvalue) _zval_internal_ptr_dtor((zvalue) ZEND_FILE_LINE_CC)
     124             : #define zval_dtor_wrapper _zval_dtor_wrapper
     125             : 
     126             : #if ZEND_DEBUG
     127             : ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue);
     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_copy_ctor_wrapper _zval_copy_ctor_wrapper
     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_copy_ctor_wrapper _zval_copy_ctor_func
     137             : #define zval_ptr_dtor_wrapper _zval_ptr_dtor
     138             : #define zval_internal_dtor_wrapper _zval_internal_dtor
     139             : #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor
     140             : #endif
     141             : 
     142             : ZEND_API void zval_add_ref(zval *p);
     143             : ZEND_API void zval_add_ref_unref(zval *p);
     144             : 
     145             : END_EXTERN_C()
     146             : 
     147             : #define ZVAL_DESTRUCTOR zval_dtor_wrapper
     148             : #define ZVAL_PTR_DTOR zval_ptr_dtor_wrapper
     149             : #define ZVAL_INTERNAL_DTOR zval_internal_dtor_wrapper
     150             : #define ZVAL_INTERNAL_PTR_DTOR zval_internal_ptr_dtor_wrapper
     151             : #define ZVAL_COPY_CTOR zval_copy_ctor_wrapper
     152             : 
     153             : #endif
     154             : 
     155             : /*
     156             :  * Local variables:
     157             :  * tab-width: 4
     158             :  * c-basic-offset: 4
     159             :  * indent-tabs-mode: t
     160             :  * End:
     161             :  */

Generated by: LCOV version 1.10

Generated at Sat, 13 Dec 2014 06:16:10 +0000 (4 days ago)

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