php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
zend_persist.c File Reference
#include "zend.h"
#include "ZendAccelerator.h"
#include "zend_persist.h"
#include "zend_extensions.h"
#include "zend_shared_alloc.h"
#include "zend_vm.h"
#include "zend_constants.h"
#include "zend_operators.h"
#include "zend_interfaces.h"
#include "zend_attributes.h"

Go to the source code of this file.

Macros

#define zend_set_str_gc_flags(str)
 
#define zend_accel_store_string(str)
 
#define zend_accel_memdup_string(str)
 
#define zend_accel_store_interned_string(str)
 
#define zend_accel_memdup_interned_string(str)
 

Typedefs

typedef void(* zend_persist_func_t) (zval *)
 

Functions

uint32_t zend_accel_get_class_name_map_ptr (zend_string *type_name)
 
zend_class_entryzend_persist_class_entry (zend_class_entry *orig_ce)
 
void zend_update_parent_ce (zend_class_entry *ce)
 
zend_error_info ** zend_persist_warnings (uint32_t num_warnings, zend_error_info **warnings)
 
zend_persistent_scriptzend_accel_script_persist (zend_persistent_script *script, int for_shm)
 

Macro Definition Documentation

◆ zend_accel_memdup_interned_string

#define zend_accel_memdup_interned_string ( str)
Value:
do { \
if (!IS_ACCEL_INTERNED(str)) { \
zend_accel_memdup_string(str); \
} \
} while (0)
#define IS_ACCEL_INTERNED(str)

Definition at line 80 of file zend_persist.c.

◆ zend_accel_memdup_string

#define zend_accel_memdup_string ( str)
Value:
do { \
if (new_str) { \
str = new_str; \
} else { \
new_str = zend_shared_memdup_put((void*)str, _ZSTR_STRUCT_SIZE(ZSTR_LEN(str))); \
str = new_str; \
zend_string_hash_val(str); \
zend_set_str_gc_flags(str); \
} \
} while (0)
struct _zend_string zend_string
void * zend_shared_alloc_get_xlat_entry(const void *key_pointer)
void * zend_shared_memdup_put(void *source, size_t size)
#define _ZSTR_STRUCT_SIZE(len)
#define ZSTR_LEN(zstr)
Definition zend_string.h:69

Definition at line 64 of file zend_persist.c.

◆ zend_accel_store_interned_string

#define zend_accel_store_interned_string ( str)
Value:
do { \
if (!IS_ACCEL_INTERNED(str)) { \
zend_accel_store_string(str); \
} \
} while (0)

Definition at line 75 of file zend_persist.c.

◆ zend_accel_store_string

#define zend_accel_store_string ( str)
Value:
do { \
if (new_str) { \
zend_string_release_ex(str, 0); \
str = new_str; \
} else { \
new_str = zend_shared_memdup_put((void*)str, _ZSTR_STRUCT_SIZE(ZSTR_LEN(str))); \
zend_string_release_ex(str, 0); \
str = new_str; \
zend_string_hash_val(str); \
zend_set_str_gc_flags(str); \
} \
} while (0)

Definition at line 51 of file zend_persist.c.

◆ zend_set_str_gc_flags

#define zend_set_str_gc_flags ( str)
Value:
do { \
GC_SET_REFCOUNT(str, 2); \
uint32_t flags = GC_STRING | (ZSTR_IS_VALID_UTF8(str) ? IS_STR_VALID_UTF8 : 0); \
|| (ZCG(current_persistent_script) && ZCG(current_persistent_script)->corrupted)) { \
GC_TYPE_INFO(str) = GC_STRING | (IS_STR_INTERNED << GC_FLAGS_SHIFT); \
} else { \
} \
GC_TYPE_INFO(str) = flags; \
} while (0)
bool file_cache_only
#define ZCG(v)
#define ZSTR_IS_VALID_UTF8(s)
Definition zend_string.h:85
#define GC_STRING
Definition zend_types.h:785
#define IS_STR_PERMANENT
Definition zend_types.h:819
#define IS_STR_INTERNED
Definition zend_types.h:817
#define IS_STR_VALID_UTF8
Definition zend_types.h:820
#define GC_FLAGS_SHIFT
Definition zend_types.h:739

Definition at line 38 of file zend_persist.c.

Typedef Documentation

◆ zend_persist_func_t

typedef void(* zend_persist_func_t) (zval *)

Definition at line 86 of file zend_persist.c.

Function Documentation

◆ zend_accel_get_class_name_map_ptr()

uint32_t zend_accel_get_class_name_map_ptr ( zend_string * type_name)

Definition at line 317 of file zend_persist.c.

◆ zend_accel_script_persist()

zend_persistent_script * zend_accel_script_persist ( zend_persistent_script * script,
int for_shm )

Definition at line 1361 of file zend_persist.c.

◆ zend_persist_class_entry()

zend_class_entry * zend_persist_class_entry ( zend_class_entry * orig_ce)

Definition at line 891 of file zend_persist.c.

◆ zend_persist_warnings()

zend_error_info ** zend_persist_warnings ( uint32_t num_warnings,
zend_error_info ** warnings )

Definition at line 1335 of file zend_persist.c.

◆ zend_update_parent_ce()

void zend_update_parent_ce ( zend_class_entry * ce)

Definition at line 1111 of file zend_persist.c.