diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-09-18 04:59:01 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-09-18 04:59:01 +0400 |
commit | 5185baab3eaac254da1d81aaaaf4b1428a5a57e3 (patch) | |
tree | 87d0d88a1767ba57a376c70292046b89815c52f8 | |
parent | 61d37e059f7eb9d94b20a109a8bf8f3195eb09d2 (diff) | |
download | php-git-5185baab3eaac254da1d81aaaaf4b1428a5a57e3.tar.gz |
Changed "inline" into "zend_always_inline"
-rw-r--r-- | Zend/zend_alloc.h | 6 | ||||
-rw-r--r-- | Zend/zend_ast.h | 24 | ||||
-rw-r--r-- | Zend/zend_compile.h | 2 | ||||
-rw-r--r-- | Zend/zend_hash.h | 68 | ||||
-rw-r--r-- | Zend/zend_ptr_stack.h | 2 | ||||
-rw-r--r-- | Zend/zend_string.h | 2 | ||||
-rw-r--r-- | Zend/zend_ts_hash.h | 6 | ||||
-rw-r--r-- | Zend/zend_types.h | 2 |
8 files changed, 56 insertions, 56 deletions
diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index d9853765c3..d50d3d5cb8 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -164,7 +164,7 @@ ZEND_API void ZEND_FASTCALL _efree_huge(void *, size_t size); #define estrndup_rel(s, length) _estrndup((s), (length) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) #define zend_mem_block_size_rel(ptr) _zend_mem_block_size((ptr) TSRMLS_CC ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC) -inline static void * __zend_malloc(size_t len) +zend_always_inline static void * __zend_malloc(size_t len) { void *tmp = malloc(len); if (tmp) { @@ -174,14 +174,14 @@ inline static void * __zend_malloc(size_t len) exit(1); } -inline static void * __zend_calloc(size_t nmemb, size_t len) +zend_always_inline static void * __zend_calloc(size_t nmemb, size_t len) { void *tmp = _safe_malloc(nmemb, len, 0); memset(tmp, 0, nmemb * len); return tmp; } -inline static void * __zend_realloc(void *p, size_t len) +zend_always_inline static void * __zend_realloc(void *p, size_t len) { p = realloc(p, len); if (p) { diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h index 2a1582ca24..716b385210 100644 --- a/Zend/zend_ast.h +++ b/Zend/zend_ast.h @@ -207,27 +207,27 @@ ZEND_API void zend_ast_destroy_and_free(zend_ast *ast); typedef void (*zend_ast_apply_func)(zend_ast **ast_ptr TSRMLS_DC); ZEND_API void zend_ast_apply(zend_ast *ast, zend_ast_apply_func fn TSRMLS_DC); -static inline zend_bool zend_ast_is_list(zend_ast *ast) { +static zend_always_inline zend_bool zend_ast_is_list(zend_ast *ast) { return (ast->kind >> ZEND_AST_IS_LIST_SHIFT) & 1; } -static inline zend_ast_list *zend_ast_get_list(zend_ast *ast) { +static zend_always_inline zend_ast_list *zend_ast_get_list(zend_ast *ast) { ZEND_ASSERT(zend_ast_is_list(ast)); return (zend_ast_list *) ast; } -static inline zval *zend_ast_get_zval(zend_ast *ast) { +static zend_always_inline zval *zend_ast_get_zval(zend_ast *ast) { ZEND_ASSERT(ast->kind == ZEND_AST_ZVAL); return &((zend_ast_zval *) ast)->val; } -static inline zend_string *zend_ast_get_str(zend_ast *ast) { +static zend_always_inline zend_string *zend_ast_get_str(zend_ast *ast) { return Z_STR_P(zend_ast_get_zval(ast)); } -static inline uint32_t zend_ast_get_num_children(zend_ast *ast) { +static zend_always_inline uint32_t zend_ast_get_num_children(zend_ast *ast) { ZEND_ASSERT(!zend_ast_is_list(ast)); return ast->kind >> ZEND_AST_NUM_CHILDREN_SHIFT; } -static inline uint32_t zend_ast_get_lineno(zend_ast *ast) { +static zend_always_inline uint32_t zend_ast_get_lineno(zend_ast *ast) { if (ast->kind == ZEND_AST_ZVAL) { zval *zv = zend_ast_get_zval(ast); return zv->u2.lineno; @@ -236,27 +236,27 @@ static inline uint32_t zend_ast_get_lineno(zend_ast *ast) { } } -static inline zend_ast *zend_ast_create_zval(zval *zv) { +static zend_always_inline zend_ast *zend_ast_create_zval(zval *zv) { return zend_ast_create_zval_ex(zv, 0); } -static inline zend_ast *zend_ast_create_zval_from_str(zend_string *str) { +static zend_always_inline zend_ast *zend_ast_create_zval_from_str(zend_string *str) { zval zv; ZVAL_STR(&zv, str); return zend_ast_create_zval(&zv); } -static inline zend_ast *zend_ast_create_zval_from_long(zend_long lval) { +static zend_always_inline zend_ast *zend_ast_create_zval_from_long(zend_long lval) { zval zv; ZVAL_LONG(&zv, lval); return zend_ast_create_zval(&zv); } -static inline zend_ast *zend_ast_create_binary_op(uint32_t opcode, zend_ast *op0, zend_ast *op1) { +static zend_always_inline zend_ast *zend_ast_create_binary_op(uint32_t opcode, zend_ast *op0, zend_ast *op1) { return zend_ast_create_ex(ZEND_AST_BINARY_OP, opcode, op0, op1); } -static inline zend_ast *zend_ast_create_assign_op(uint32_t opcode, zend_ast *op0, zend_ast *op1) { +static zend_always_inline zend_ast *zend_ast_create_assign_op(uint32_t opcode, zend_ast *op0, zend_ast *op1) { return zend_ast_create_ex(ZEND_AST_ASSIGN_OP, opcode, op0, op1); } -static inline zend_ast *zend_ast_create_cast(uint32_t type, zend_ast *op0) { +static zend_always_inline zend_ast *zend_ast_create_cast(uint32_t type, zend_ast *op0) { return zend_ast_create_ex(ZEND_AST_CAST, type, op0); } diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index 8cbe465c14..10143d9efb 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -83,7 +83,7 @@ typedef struct _zend_ast_znode { } zend_ast_znode; ZEND_API zend_ast *zend_ast_create_znode(znode *node); -static inline znode *zend_ast_get_znode(zend_ast *ast) { +static zend_always_inline znode *zend_ast_get_znode(zend_ast *ast) { return &((zend_ast_znode *) ast)->node; } diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index a6bb67a1f2..68a1811a55 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -286,7 +286,7 @@ static inline int _zend_handle_numeric_str(const char *key, size_t length, zend_ _zend_handle_numeric_str((key)->val, (key)->len, &idx) -static inline zval *zend_hash_find_ind(const HashTable *ht, zend_string *key) +static zend_always_inline zval *zend_hash_find_ind(const HashTable *ht, zend_string *key) { zval *zv; @@ -295,7 +295,7 @@ static inline zval *zend_hash_find_ind(const HashTable *ht, zend_string *key) } -static inline int zend_hash_exists_ind(const HashTable *ht, zend_string *key) +static zend_always_inline int zend_hash_exists_ind(const HashTable *ht, zend_string *key) { zval *zv; @@ -305,7 +305,7 @@ static inline int zend_hash_exists_ind(const HashTable *ht, zend_string *key) } -static inline zval *zend_hash_str_find_ind(const HashTable *ht, const char *str, int len) +static zend_always_inline zval *zend_hash_str_find_ind(const HashTable *ht, const char *str, int len) { zval *zv; @@ -314,7 +314,7 @@ static inline zval *zend_hash_str_find_ind(const HashTable *ht, const char *str, } -static inline zval *zend_symtable_update(HashTable *ht, zend_string *key, zval *pData) +static zend_always_inline zval *zend_symtable_update(HashTable *ht, zend_string *key, zval *pData) { zend_ulong idx; @@ -326,7 +326,7 @@ static inline zval *zend_symtable_update(HashTable *ht, zend_string *key, zval * } -static inline zval *zend_symtable_update_ind(HashTable *ht, zend_string *key, zval *pData) +static zend_always_inline zval *zend_symtable_update_ind(HashTable *ht, zend_string *key, zval *pData) { zend_ulong idx; @@ -338,7 +338,7 @@ static inline zval *zend_symtable_update_ind(HashTable *ht, zend_string *key, zv } -static inline int zend_symtable_del(HashTable *ht, zend_string *key) +static zend_always_inline int zend_symtable_del(HashTable *ht, zend_string *key) { zend_ulong idx; @@ -350,7 +350,7 @@ static inline int zend_symtable_del(HashTable *ht, zend_string *key) } -static inline int zend_symtable_del_ind(HashTable *ht, zend_string *key) +static zend_always_inline int zend_symtable_del_ind(HashTable *ht, zend_string *key) { zend_ulong idx; @@ -362,7 +362,7 @@ static inline int zend_symtable_del_ind(HashTable *ht, zend_string *key) } -static inline zval *zend_symtable_find(const HashTable *ht, zend_string *key) +static zend_always_inline zval *zend_symtable_find(const HashTable *ht, zend_string *key) { zend_ulong idx; @@ -374,7 +374,7 @@ static inline zval *zend_symtable_find(const HashTable *ht, zend_string *key) } -static inline zval *zend_symtable_find_ind(const HashTable *ht, zend_string *key) +static zend_always_inline zval *zend_symtable_find_ind(const HashTable *ht, zend_string *key) { zend_ulong idx; @@ -386,7 +386,7 @@ static inline zval *zend_symtable_find_ind(const HashTable *ht, zend_string *key } -static inline int zend_symtable_exists(HashTable *ht, zend_string *key) +static zend_always_inline int zend_symtable_exists(HashTable *ht, zend_string *key) { zend_ulong idx; @@ -398,7 +398,7 @@ static inline int zend_symtable_exists(HashTable *ht, zend_string *key) } -static inline zval *zend_symtable_str_update(HashTable *ht, const char *str, int len, zval *pData) +static zend_always_inline zval *zend_symtable_str_update(HashTable *ht, const char *str, int len, zval *pData) { zend_ulong idx; @@ -410,7 +410,7 @@ static inline zval *zend_symtable_str_update(HashTable *ht, const char *str, int } -static inline zval *zend_symtable_str_update_ind(HashTable *ht, const char *str, int len, zval *pData) +static zend_always_inline zval *zend_symtable_str_update_ind(HashTable *ht, const char *str, int len, zval *pData) { zend_ulong idx; @@ -422,7 +422,7 @@ static inline zval *zend_symtable_str_update_ind(HashTable *ht, const char *str, } -static inline int zend_symtable_str_del(HashTable *ht, const char *str, int len) +static zend_always_inline int zend_symtable_str_del(HashTable *ht, const char *str, int len) { zend_ulong idx; @@ -434,7 +434,7 @@ static inline int zend_symtable_str_del(HashTable *ht, const char *str, int len) } -static inline int zend_symtable_str_del_ind(HashTable *ht, const char *str, int len) +static zend_always_inline int zend_symtable_str_del_ind(HashTable *ht, const char *str, int len) { zend_ulong idx; @@ -446,7 +446,7 @@ static inline int zend_symtable_str_del_ind(HashTable *ht, const char *str, int } -static inline zval *zend_symtable_str_find(HashTable *ht, const char *str, int len) +static zend_always_inline zval *zend_symtable_str_find(HashTable *ht, const char *str, int len) { zend_ulong idx; @@ -458,7 +458,7 @@ static inline zval *zend_symtable_str_find(HashTable *ht, const char *str, int l } -static inline int zend_symtable_str_exists(HashTable *ht, const char *str, int len) +static zend_always_inline int zend_symtable_str_exists(HashTable *ht, const char *str, int len) { zend_ulong idx; @@ -469,7 +469,7 @@ static inline int zend_symtable_str_exists(HashTable *ht, const char *str, int l } } -static inline void *zend_hash_add_ptr(HashTable *ht, zend_string *key, void *pData) +static zend_always_inline void *zend_hash_add_ptr(HashTable *ht, zend_string *key, void *pData) { zval tmp, *zv; @@ -478,7 +478,7 @@ static inline void *zend_hash_add_ptr(HashTable *ht, zend_string *key, void *pDa return zv ? Z_PTR_P(zv) : NULL; } -static inline void *zend_hash_add_new_ptr(HashTable *ht, zend_string *key, void *pData) +static zend_always_inline void *zend_hash_add_new_ptr(HashTable *ht, zend_string *key, void *pData) { zval tmp, *zv; @@ -487,7 +487,7 @@ static inline void *zend_hash_add_new_ptr(HashTable *ht, zend_string *key, void return zv ? Z_PTR_P(zv) : NULL; } -static inline void *zend_hash_str_add_ptr(HashTable *ht, const char *str, int len, void *pData) +static zend_always_inline void *zend_hash_str_add_ptr(HashTable *ht, const char *str, int len, void *pData) { zval tmp, *zv; @@ -496,7 +496,7 @@ static inline void *zend_hash_str_add_ptr(HashTable *ht, const char *str, int le return zv ? Z_PTR_P(zv) : NULL; } -static inline void *zend_hash_update_ptr(HashTable *ht, zend_string *key, void *pData) +static zend_always_inline void *zend_hash_update_ptr(HashTable *ht, zend_string *key, void *pData) { zval tmp, *zv; @@ -505,7 +505,7 @@ static inline void *zend_hash_update_ptr(HashTable *ht, zend_string *key, void * return zv ? Z_PTR_P(zv) : NULL; } -static inline void *zend_hash_str_update_ptr(HashTable *ht, const char *str, int len, void *pData) +static zend_always_inline void *zend_hash_str_update_ptr(HashTable *ht, const char *str, int len, void *pData) { zval tmp, *zv; @@ -514,7 +514,7 @@ static inline void *zend_hash_str_update_ptr(HashTable *ht, const char *str, int return zv ? Z_PTR_P(zv) : NULL; } -static inline void *zend_hash_add_mem(HashTable *ht, zend_string *key, void *pData, size_t size) +static zend_always_inline void *zend_hash_add_mem(HashTable *ht, zend_string *key, void *pData, size_t size) { zval tmp, *zv; @@ -527,7 +527,7 @@ static inline void *zend_hash_add_mem(HashTable *ht, zend_string *key, void *pDa return NULL; } -static inline void *zend_hash_str_add_mem(HashTable *ht, const char *str, int len, void *pData, size_t size) +static zend_always_inline void *zend_hash_str_add_mem(HashTable *ht, const char *str, int len, void *pData, size_t size) { zval tmp, *zv; @@ -540,7 +540,7 @@ static inline void *zend_hash_str_add_mem(HashTable *ht, const char *str, int le return NULL; } -static inline void *zend_hash_update_mem(HashTable *ht, zend_string *key, void *pData, size_t size) +static zend_always_inline void *zend_hash_update_mem(HashTable *ht, zend_string *key, void *pData, size_t size) { void *p; @@ -549,7 +549,7 @@ static inline void *zend_hash_update_mem(HashTable *ht, zend_string *key, void * return zend_hash_update_ptr(ht, key, p); } -static inline void *zend_hash_str_update_mem(HashTable *ht, const char *str, int len, void *pData, size_t size) +static zend_always_inline void *zend_hash_str_update_mem(HashTable *ht, const char *str, int len, void *pData, size_t size) { void *p; @@ -558,7 +558,7 @@ static inline void *zend_hash_str_update_mem(HashTable *ht, const char *str, int return zend_hash_str_update_ptr(ht, str, len, p); } -static inline void *zend_hash_index_update_ptr(HashTable *ht, zend_ulong h, void *pData) +static zend_always_inline void *zend_hash_index_update_ptr(HashTable *ht, zend_ulong h, void *pData) { zval tmp, *zv; @@ -567,7 +567,7 @@ static inline void *zend_hash_index_update_ptr(HashTable *ht, zend_ulong h, void return zv ? Z_PTR_P(zv) : NULL; } -static inline void *zend_hash_next_index_insert_ptr(HashTable *ht, void *pData) +static zend_always_inline void *zend_hash_next_index_insert_ptr(HashTable *ht, void *pData) { zval tmp, *zv; @@ -576,7 +576,7 @@ static inline void *zend_hash_next_index_insert_ptr(HashTable *ht, void *pData) return zv ? Z_PTR_P(zv) : NULL; } -static inline void *zend_hash_index_update_mem(HashTable *ht, zend_ulong h, void *pData, size_t size) +static zend_always_inline void *zend_hash_index_update_mem(HashTable *ht, zend_ulong h, void *pData, size_t size) { void *p; @@ -585,7 +585,7 @@ static inline void *zend_hash_index_update_mem(HashTable *ht, zend_ulong h, void return zend_hash_index_update_ptr(ht, h, p); } -static inline void *zend_hash_next_index_insert_mem(HashTable *ht, void *pData, size_t size) +static zend_always_inline void *zend_hash_next_index_insert_mem(HashTable *ht, void *pData, size_t size) { zval tmp, *zv; @@ -598,7 +598,7 @@ static inline void *zend_hash_next_index_insert_mem(HashTable *ht, void *pData, return NULL; } -static inline void *zend_hash_find_ptr(const HashTable *ht, zend_string *key) +static zend_always_inline void *zend_hash_find_ptr(const HashTable *ht, zend_string *key) { zval *zv; @@ -606,7 +606,7 @@ static inline void *zend_hash_find_ptr(const HashTable *ht, zend_string *key) return zv ? Z_PTR_P(zv) : NULL; } -static inline void *zend_hash_str_find_ptr(const HashTable *ht, const char *str, int len) +static zend_always_inline void *zend_hash_str_find_ptr(const HashTable *ht, const char *str, int len) { zval *zv; @@ -614,7 +614,7 @@ static inline void *zend_hash_str_find_ptr(const HashTable *ht, const char *str, return zv ? Z_PTR_P(zv) : NULL; } -static inline void *zend_hash_index_find_ptr(const HashTable *ht, zend_ulong h) +static zend_always_inline void *zend_hash_index_find_ptr(const HashTable *ht, zend_ulong h) { zval *zv; @@ -622,7 +622,7 @@ static inline void *zend_hash_index_find_ptr(const HashTable *ht, zend_ulong h) return zv ? Z_PTR_P(zv) : NULL; } -static inline void *zend_symtable_str_find_ptr(HashTable *ht, const char *str, int len) +static zend_always_inline void *zend_symtable_str_find_ptr(HashTable *ht, const char *str, int len) { zend_ulong idx; @@ -633,7 +633,7 @@ static inline void *zend_symtable_str_find_ptr(HashTable *ht, const char *str, i } } -static inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht, HashPosition *pos) +static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht, HashPosition *pos) { zval *zv; diff --git a/Zend/zend_ptr_stack.h b/Zend/zend_ptr_stack.h index ecd7b7042a..8a3dede91e 100644 --- a/Zend/zend_ptr_stack.h +++ b/Zend/zend_ptr_stack.h @@ -111,7 +111,7 @@ static zend_always_inline void *zend_ptr_stack_pop(zend_ptr_stack *stack) return *(--stack->top_element); } -static inline void *zend_ptr_stack_top(zend_ptr_stack *stack) +static zend_always_inline void *zend_ptr_stack_top(zend_ptr_stack *stack) { return stack->elements[stack->top - 1]; } diff --git a/Zend/zend_string.h b/Zend/zend_string.h index a2b5fb932e..25032fc6b3 100644 --- a/Zend/zend_string.h +++ b/Zend/zend_string.h @@ -253,7 +253,7 @@ static zend_always_inline zend_bool zend_string_equals(zend_string *s1, zend_str * -- Ralf S. Engelschall <rse@engelschall.com> */ -static inline zend_ulong zend_inline_hash_func(const char *str, size_t len) +static zend_always_inline zend_ulong zend_inline_hash_func(const char *str, size_t len) { register zend_ulong hash = Z_UL(5381); diff --git a/Zend/zend_ts_hash.h b/Zend/zend_ts_hash.h index 3d05dd572d..6cb36410b8 100644 --- a/Zend/zend_ts_hash.h +++ b/Zend/zend_ts_hash.h @@ -111,7 +111,7 @@ ZEND_API zval *_zend_ts_hash_str_add(TsHashTable *ht, const char *key, int len, #define zend_ts_hash_str_add(ht, key, len, pData) \ _zend_ts_hash_str_add(ht, key, len, pData ZEND_FILE_LINE_CC) -static inline void *zend_ts_hash_str_find_ptr(TsHashTable *ht, const char *str, int len) +static zend_always_inline void *zend_ts_hash_str_find_ptr(TsHashTable *ht, const char *str, int len) { zval *zv; @@ -119,7 +119,7 @@ static inline void *zend_ts_hash_str_find_ptr(TsHashTable *ht, const char *str, return zv ? Z_PTR_P(zv) : NULL; } -static inline void *zend_ts_hash_str_update_ptr(TsHashTable *ht, const char *str, int len, void *pData) +static zend_always_inline void *zend_ts_hash_str_update_ptr(TsHashTable *ht, const char *str, int len, void *pData) { zval tmp, *zv; @@ -128,7 +128,7 @@ static inline void *zend_ts_hash_str_update_ptr(TsHashTable *ht, const char *str return zv ? Z_PTR_P(zv) : NULL; } -static inline void *zend_ts_hash_str_add_ptr(TsHashTable *ht, const char *str, int len, void *pData) +static zend_always_inline void *zend_ts_hash_str_add_ptr(TsHashTable *ht, const char *str, int len, void *pData) { zval tmp, *zv; diff --git a/Zend/zend_types.h b/Zend/zend_types.h index b7d163002d..e23842c679 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -248,7 +248,7 @@ struct _zend_ast_ref { #define IS_INDIRECT 15 #define IS_PTR 17 -static inline zend_uchar zval_get_type(const zval* pz) { +static zend_always_inline zend_uchar zval_get_type(const zval* pz) { return pz->u1.v.type; } |