com php-src: Renumber types and type_flags: Zend/zend_t ypes.h
| From: | Dmitry Stogov | Date: | Tue, 10 Oct 2017 08:10:27 +0000 |
| Subject: | com php-src: Renumber types and type_flags: Zend/zend_t ypes.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99673@lists.php.net to get a copy of this message | ||
Commit: dec8b787eec376033c9a6051072ad9e60bee7d64
Author: Dmitry Stogov <dmitry@zend.com> Tue, 10 Oct 2017 11:10:27 +0300
Parents: ef5ea48741a1d227a10a6654c1a8cc2f02dd414f
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=dec8b787eec376033c9a6051072ad9e60bee7d64
Log:
Renumber types and type_flags
Changed paths:
M Zend/zend_types.h
Diff:
diff --git a/Zend/zend_types.h b/Zend/zend_types.h
index c613dfb..ce7ebac 100644
--- a/Zend/zend_types.h
+++ b/Zend/zend_types.h
@@ -180,11 +180,13 @@ struct _zval_struct {
zend_value value; /* value */
union {
struct {
- ZEND_ENDIAN_LOHI_4(
+ ZEND_ENDIAN_LOHI_3(
zend_uchar type, /* active type */
zend_uchar type_flags,
- zend_uchar _unused,
- zend_uchar _reserved) /* call info for EX(This) */
+ union {
+ uint16_t call_info; /* call info for EX(This) */
+ uint16_t extra; /* not further specified */
+ } u)
} v;
uint32_t type_info;
} u1;
@@ -374,16 +376,16 @@ struct _zend_ast_ref {
/* constant expressions */
#define IS_CONSTANT_AST 12
-/* fake types */
-#define _IS_BOOL 13
-#define IS_CALLABLE 14
-#define IS_ITERABLE 19
-#define IS_VOID 18
-
/* internal types */
-#define IS_INDIRECT 15
-#define IS_PTR 17
-#define _IS_ERROR 20
+#define IS_INDIRECT 13
+#define IS_PTR 14
+#define _IS_ERROR 15
+
+/* fake types used only for type hinting (Z_TYPE(zv) can not use them) */
+#define _IS_BOOL 16
+#define IS_CALLABLE 17
+#define IS_ITERABLE 18
+#define IS_VOID 19
static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
return pz->u1.v.type;
@@ -460,9 +462,9 @@ static zend_always_inline zend_uchar zval_get_type(const zval* pz) {
#define GC_OBJECT (IS_OBJECT | (GC_COLLECTABLE << GC_FLAGS_SHIFT))
/* zval.u1.v.type_flags */
-#define IS_TYPE_REFCOUNTED (1<<2)
-#define IS_TYPE_COPYABLE (1<<4)
-#define IS_CONSTANT_VISITED_MARK (1<<5)
+#define IS_CONSTANT_VISITED_MARK (1<<0)
+#define IS_TYPE_COPYABLE (1<<1)
+#define IS_TYPE_REFCOUNTED (1<<2) /* equal to ZEND_CALL_FREE_EXTRA_ARGS */
/* extended types */
#define IS_INTERNED_STRING_EX IS_STRING