php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
zend_map_ptr.h File Reference
#include "zend_portability.h"

Go to the source code of this file.

Macros

#define ZEND_MAP_PTR_KIND_PTR   0
 
#define ZEND_MAP_PTR_KIND_PTR_OR_OFFSET   1
 
#define ZEND_MAP_PTR_KIND   ZEND_MAP_PTR_KIND_PTR_OR_OFFSET
 
#define ZEND_MAP_PTR(ptr)
 
#define ZEND_MAP_PTR_DEF(type, name)
 
#define ZEND_MAP_PTR_OFFSET2PTR(offset)
 
#define ZEND_MAP_PTR_PTR2OFFSET(ptr)
 
#define ZEND_MAP_PTR_INIT(ptr, val)
 
#define ZEND_MAP_PTR_NEW(ptr)
 
#define ZEND_MAP_PTR_NEW_STATIC(ptr)
 
#define ZEND_MAP_PTR_NEW_OFFSET()
 
#define ZEND_MAP_PTR_IS_OFFSET(ptr)
 
#define ZEND_MAP_PTR_GET(ptr)
 
#define ZEND_MAP_PTR_GET_IMM(ptr)
 
#define ZEND_MAP_PTR_SET(ptr, val)
 
#define ZEND_MAP_PTR_SET_IMM(ptr, val)
 
#define ZEND_MAP_PTR_BIASED_BASE(real_base)
 
#define ZEND_MAP_PTR_STATIC_NUM_TO_PTR(num)
 

Typedefs

typedef struct _zend_string zend_string
 

Functions

ZEND_API void zend_map_ptr_reset (void)
 
ZEND_API voidzend_map_ptr_new (void)
 
ZEND_API voidzend_map_ptr_new_static (void)
 
ZEND_API void zend_map_ptr_extend (size_t last)
 
ZEND_API void zend_alloc_ce_cache (zend_string *type_name)
 

Variables

ZEND_API size_t zend_map_ptr_static_last
 
ZEND_API size_t zend_map_ptr_static_size
 

Macro Definition Documentation

◆ ZEND_MAP_PTR

#define ZEND_MAP_PTR ( ptr)
Value:
ptr ## __ptr
void * ptr
Definition ffi.c:3814

Definition at line 31 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_BIASED_BASE

#define ZEND_MAP_PTR_BIASED_BASE ( real_base)
Value:
((void*)(((uintptr_t)(real_base)) + zend_map_ptr_static_size * sizeof(void *) - 1))
ZEND_API size_t zend_map_ptr_static_size
Definition zend.c:2008

Definition at line 71 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_DEF

#define ZEND_MAP_PTR_DEF ( type,
name )
Value:
zend_ffi_type * type
Definition ffi.c:3812
#define ZEND_MAP_PTR(ptr)
zend_string * name

Definition at line 33 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_GET

#define ZEND_MAP_PTR_GET ( ptr)
Value:
ZEND_MAP_PTR_GET_IMM(ptr) : \
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)
#define ZEND_MAP_PTR_IS_OFFSET(ptr)

Definition at line 54 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_GET_IMM

#define ZEND_MAP_PTR_GET_IMM ( ptr)
Value:
#define ZEND_MAP_PTR_OFFSET2PTR(offset)

Definition at line 58 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_INIT

#define ZEND_MAP_PTR_INIT ( ptr,
val )
Value:
do { \
ZEND_MAP_PTR(ptr) = (val); \
} while (0)
zval * val
Definition ffi.c:4262

Definition at line 39 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_IS_OFFSET

#define ZEND_MAP_PTR_IS_OFFSET ( ptr)
Value:
(((uintptr_t)ZEND_MAP_PTR(ptr)) & 1L)

Definition at line 52 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_KIND

#define ZEND_MAP_PTR_KIND   ZEND_MAP_PTR_KIND_PTR_OR_OFFSET

Definition at line 29 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_KIND_PTR

#define ZEND_MAP_PTR_KIND_PTR   0

Definition at line 26 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_KIND_PTR_OR_OFFSET

#define ZEND_MAP_PTR_KIND_PTR_OR_OFFSET   1

Definition at line 27 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_NEW

#define ZEND_MAP_PTR_NEW ( ptr)
Value:
do { \
ZEND_MAP_PTR(ptr) = zend_map_ptr_new(); \
} while (0)
ZEND_API void * zend_map_ptr_new(void)
Definition zend.c:2016

Definition at line 42 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_NEW_OFFSET

#define ZEND_MAP_PTR_NEW_OFFSET ( )
Value:
((uint32_t)(uintptr_t)zend_map_ptr_new())

Definition at line 50 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_NEW_STATIC

#define ZEND_MAP_PTR_NEW_STATIC ( ptr)
Value:
do { \
ZEND_MAP_PTR(ptr) = zend_map_ptr_new_static(); \
} while (0)
ZEND_API void * zend_map_ptr_new_static(void)
Definition zend.c:2032

Definition at line 45 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_OFFSET2PTR

#define ZEND_MAP_PTR_OFFSET2PTR ( offset)
Value:
((void**)((char*)CG(map_ptr_base) + offset))
zend_long offset
#define CG(v)

Definition at line 35 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_PTR2OFFSET

#define ZEND_MAP_PTR_PTR2OFFSET ( ptr)
Value:
((void*)(((char*)(ptr)) - ((char*)CG(map_ptr_base))))

Definition at line 37 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_SET

#define ZEND_MAP_PTR_SET ( ptr,
val )
Value:
do { \
ZEND_MAP_PTR_SET_IMM(ptr, val); \
} else { \
ZEND_MAP_PTR_INIT(ptr, val); \
} \
} while (0)

Definition at line 60 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_SET_IMM

#define ZEND_MAP_PTR_SET_IMM ( ptr,
val )
Value:
do { \
void **__p = ZEND_MAP_PTR_OFFSET2PTR((intptr_t)ZEND_MAP_PTR(ptr)); \
*__p = (val); \
} while (0)

Definition at line 67 of file zend_map_ptr.h.

◆ ZEND_MAP_PTR_STATIC_NUM_TO_PTR

#define ZEND_MAP_PTR_STATIC_NUM_TO_PTR ( num)
Value:
((void **)CG(map_ptr_real_base) + zend_map_ptr_static_size - ZEND_MM_ALIGNED_SIZE_EX((num) + 1, 4096) + ((num) & 4095))
#define ZEND_MM_ALIGNED_SIZE_EX(size, alignment)
Definition zend_alloc.h:37

Definition at line 74 of file zend_map_ptr.h.

Typedef Documentation

◆ zend_string

typedef struct _zend_string zend_string

Definition at line 24 of file zend_map_ptr.h.

Function Documentation

◆ zend_alloc_ce_cache()

ZEND_API void zend_alloc_ce_cache ( zend_string * type_name)

Definition at line 2070 of file zend.c.

◆ zend_map_ptr_extend()

ZEND_API void zend_map_ptr_extend ( size_t last)

Definition at line 2053 of file zend.c.

◆ zend_map_ptr_new()

ZEND_API void * zend_map_ptr_new ( void )

Definition at line 2016 of file zend.c.

◆ zend_map_ptr_new_static()

ZEND_API void * zend_map_ptr_new_static ( void )

Definition at line 2032 of file zend.c.

◆ zend_map_ptr_reset()

ZEND_API void zend_map_ptr_reset ( void )

Definition at line 2011 of file zend.c.

Variable Documentation

◆ zend_map_ptr_static_last

ZEND_API size_t zend_map_ptr_static_last
extern

Definition at line 2009 of file zend.c.

◆ zend_map_ptr_static_size

ZEND_API size_t zend_map_ptr_static_size
extern

Definition at line 2008 of file zend.c.