Advertisement
Guest User

Untitled

a guest
Oct 5th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 18.25 KB | None | 0 0
  1. diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
  2. index f63b3a755d..499d0d64b6 100644
  3. --- a/Zend/zend_compile.h
  4. +++ b/Zend/zend_compile.h
  5. @@ -202,131 +198,157 @@ typedef struct _zend_oparray_context {
  6.  /* Common flags                                           |     |     |     */
  7.  /* ============                                           |     |     |     */
  8.  /*                                                        |     |     |     */
  9. +/* Visibility flags (public < protected < private)        |     |     |     */
  10. +#define ZEND_ACC_PUBLIC                  (1 <<  0) /*     |  X  |  X  |  X  */
  11. +#define ZEND_ACC_PROTECTED               (1 <<  1) /*     |  X  |  X  |  X  */
  12. +#define ZEND_ACC_PRIVATE                 (1 <<  2) /*     |  X  |  X  |  X  */
  13. +/*                                                        |     |     |     */
  14. +/* Property or method overrides private one               |     |     |     */
  15. +#define ZEND_ACC_CHANGED                 (1 <<  3) /*     |  X  |  X  |     */
  16. +/*                                                        |     |     |     */
  17.  /* Staic method or property                               |     |     |     */
  18. -#define ZEND_ACC_STATIC                  (1 <<  0) /*     |  X  |  X  |     */
  19. +#define ZEND_ACC_STATIC                  (1 <<  4) /*     |  X  |  X  |     */
  20.  /*                                                        |     |     |     */
  21.  /* Final class or method                                  |     |     |     */
  22. -#define ZEND_ACC_FINAL                   (1 <<  2) /*  X  |  X  |     |     */
  23. +#define ZEND_ACC_FINAL                   (1 <<  5) /*  X  |  X  |     |     */
  24.  /*                                                        |     |     |     */
  25. -/* Visibility flags (public < protected < private)        |     |     |     */
  26. -#define ZEND_ACC_PUBLIC                  (1 <<  8) /*     |  X  |  X  |  X  */
  27. -#define ZEND_ACC_PROTECTED               (1 <<  9) /*     |  X  |  X  |  X  */
  28. -#define ZEND_ACC_PRIVATE                 (1 << 10) /*     |  X  |  X  |  X  */
  29. +/* Abstract method                                        |     |     |     */
  30. +#define ZEND_ACC_ABSTRACT                (1 <<  6) /*  X  |  X  |     |     */
  31. +#define ZEND_ACC_EXPLICIT_ABSTRACT_CLASS (1 <<  6) /*  X  |     |     |     */
  32.  /*                                                        |     |     |     */
  33. -/* TODO: explain the name ???                             |     |     |     */
  34. -#define ZEND_ACC_CHANGED                 (1 << 11) /*     |  X  |  X  |     */
  35. +/* Immutable op_array and class_entries                   |     |     |     */
  36. +/* (implemented only for lazy loading of op_arrays)       |     |     |     */
  37. +#define ZEND_ACC_IMMUTABLE               (1 <<  7) /*  X  |  X  |     |     */
  38.  /*                                                        |     |     |     */
  39. -/* TODO: used only by ext/reflection ???                  |     |     |     */
  40. -#define ZEND_ACC_IMPLICIT_PUBLIC         (1 << 12) /*     |  ?  |  ?  |  ?  */
  41. +/* Function has typed arguments / class has typed props   |     |     |     */
  42. +#define ZEND_ACC_HAS_TYPE_HINTS          (1 <<  8) /*  X  |  X  |     |     */
  43.  /*                                                        |     |     |     */
  44. -/* Shadow of parent's private method/property             |     |     |     */
  45. -#define ZEND_ACC_SHADOW                  (1 << 17) /*     |  ?  |  X  |     */
  46. +/* Top-level class or function declaration                |     |     |     */
  47. +#define ZEND_ACC_TOP_LEVEL               (1 <<  9) /*  X  |  X  |     |     */
  48.  /*                                                        |     |     |     */
  49. -/* Class Flags (unused: 0, 1, 3, 11-18, 21, 25...)        |     |     |     */
  50. +/* op_array or class is preloaded                         |     |     |     */
  51. +#define ZEND_ACC_PRELOADED               (1 << 10) /*  X  |  X  |     |     */
  52. +/*                                                        |     |     |     */
  53. +/* Class Flags (unused: 24...)                            |     |     |     */
  54.  /* ===========                                            |     |     |     */
  55.  /*                                                        |     |     |     */
  56. +/* Special class types                                    |     |     |     */
  57. +#define ZEND_ACC_INTERFACE               (1 <<  0) /*  X  |     |     |     */
  58. +#define ZEND_ACC_TRAIT                   (1 <<  1) /*  X  |     |     |     */
  59. +#define ZEND_ACC_ANON_CLASS              (1 <<  2) /*  X  |     |     |     */
  60. +/*                                                        |     |     |     */
  61. +/* Class linked with parent, interfacs and traits         |     |     |     */
  62. +#define ZEND_ACC_LINKED                  (1 <<  3) /*  X  |     |     |     */
  63. +/*                                                        |     |     |     */
  64.  /* class is abstarct, since it is set by any              |     |     |     */
  65.  /* abstract method                                        |     |     |     */
  66.  #define ZEND_ACC_IMPLICIT_ABSTRACT_CLASS (1 <<  4) /*  X  |     |     |     */
  67.  /*                                                        |     |     |     */
  68. -/* Class is explicitly defined as abstract by using       |     |     |     */
  69. -/* the keyword.                                           |     |     |     */
  70. -#define ZEND_ACC_EXPLICIT_ABSTRACT_CLASS (1 <<  5) /*  X  |     |     |     */
  71. -/*                                                        |     |     |     */
  72. -/* Special class types                                    |     |     |     */
  73. -#define ZEND_ACC_INTERFACE               (1 <<  6) /*  X  |     |     |     */
  74. -#define ZEND_ACC_TRAIT                   (1 <<  7) /*  X  |     |     |     */
  75. -#define ZEND_ACC_ANON_CLASS              (1 <<  8) /*  X  |     |     |     */
  76. +/* Class has magic methods __get/__set/__unset/           |     |     |     */
  77. +/* __isset that use guards                                |     |     |     */
  78. +#define ZEND_ACC_USE_GUARDS              (1 << 11) /*  X  |     |     |     */
  79.  /*                                                        |     |     |     */
  80. -/* Bound anonymous class                                  |     |     |     */
  81. -#define ZEND_ACC_ANON_BOUND              (1 <<  9) /*  X  |     |     |     */
  82. +/* Class constants updated                                |     |     |     */
  83. +#define ZEND_ACC_CONSTANTS_UPDATED       (1 << 12) /*  X  |     |     |     */
  84.  /*                                                        |     |     |     */
  85.  /* Class extends another class                            |     |     |     */
  86. -#define ZEND_ACC_INHERITED               (1 << 10) /*  X  |     |     |     */
  87. +#define ZEND_ACC_INHERITED               (1 << 13) /*  X  |     |     |     */
  88.  /*                                                        |     |     |     */
  89.  /* Class implements interface(s)                          |     |     |     */
  90. -#define ZEND_ACC_IMPLEMENT_INTERFACES    (1 << 19) /*  X  |     |     |     */
  91. -/*                                                        |     |     |     */
  92. -/* Class constants updated                                |     |     |     */
  93. -#define ZEND_ACC_CONSTANTS_UPDATED       (1 << 20) /*  X  |     |     |     */
  94. +#define ZEND_ACC_IMPLEMENT_INTERFACES    (1 << 14) /*  X  |     |     |     */
  95.  /*                                                        |     |     |     */
  96.  /* Class uses trait(s)                                    |     |     |     */
  97. -#define ZEND_ACC_IMPLEMENT_TRAITS        (1 << 22) /*  X  |     |     |     */
  98. +#define ZEND_ACC_IMPLEMENT_TRAITS        (1 << 15) /*  X  |     |     |     */
  99.  /*                                                        |     |     |     */
  100.  /* User class has methods with static variables           |     |     |     */
  101. -#define ZEND_HAS_STATIC_IN_METHODS       (1 << 23) /*  X  |     |     |     */
  102. +#define ZEND_HAS_STATIC_IN_METHODS       (1 << 16) /*  X  |     |     |     */
  103.  /*                                                        |     |     |     */
  104. -/* Class has magic methods __get/__set/__unset/           |     |     |     */
  105. -/* __isset that use guards                                |     |     |     */
  106. -#define ZEND_ACC_USE_GUARDS              (1 << 24) /*  X  |     |     |     */
  107. +/* Whether all property types are resolved to CEs         |     |     |     */
  108. +#define ZEND_ACC_PROPERTY_TYPES_RESOLVED (1 << 17) /*  X  |     |     |     */
  109. +/*                                                        |     |     |     */
  110. +/* Children must reuse parent get_iterator()              |     |     |     */
  111. +#define ZEND_ACC_REUSE_GET_ITERATOR      (1 << 18) /*  X  |     |     |     */
  112.  /*                                                        |     |     |     */
  113. -/* Function Flags (unused: 4, 5, 17?)                     |     |     |     */
  114. +/* Parent class is resolved (CE).                         |     |     |     */
  115. +#define ZEND_ACC_RESOLVED_PARENT         (1 << 19) /*  X  |     |     |     */
  116. +/*                                                        |     |     |     */
  117. +/* Interfaces are resolved (CEs).                         |     |     |     */
  118. +#define ZEND_ACC_RESOLVED_INTERFACES     (1 << 20) /*  X  |     |     |     */
  119. +/*                                                        |     |     |     */
  120. +/* Class has unresolved variance obligations.             |     |     |     */
  121. +#define ZEND_ACC_UNRESOLVED_VARIANCE     (1 << 21) /*  X  |     |     |     */
  122. +/*                                                        |     |     |     */
  123. +/* Class is linked apart from variance obligations.       |     |     |     */
  124. +#define ZEND_ACC_NEARLY_LINKED           (1 << 22) /*  X  |     |     |     */
  125. +/*                                                        |     |     |     */
  126. +/* Whether this class was used in its unlinked state.     |     |     |     */
  127. +#define ZEND_ACC_HAS_UNLINKED_USES       (1 << 23) /*  X  |     |     |     */
  128. +/*                                                        |     |     |     */
  129. +/* Function Flags (unused: 23, 26)                        |     |     |     */
  130.  /* ==============                                         |     |     |     */
  131.  /*                                                        |     |     |     */
  132. -/* Abstarct method                                        |     |     |     */
  133. -#define ZEND_ACC_ABSTRACT                (1 <<  1) /*     |  X  |     |     */
  134. +/* deprecation flag                                       |     |     |     */
  135. +#define ZEND_ACC_DEPRECATED              (1 << 11) /*     |  X  |     |     */
  136.  /*                                                        |     |     |     */
  137. -/* TODO: used only during inheritance ???                 |     |     |     */
  138. -#define ZEND_ACC_IMPLEMENTED_ABSTRACT    (1 <<  3) /*     |  X  |     |     */
  139. +/* Function returning by reference                        |     |     |     */
  140. +#define ZEND_ACC_RETURN_REFERENCE        (1 << 12) /*     |  X  |     |     */
  141.  /*                                                        |     |     |     */
  142. -#define ZEND_ACC_FAKE_CLOSURE            (1 <<  6) /*     |  X  |     |     */
  143. +/* Function has a return type                             |     |     |     */
  144. +#define ZEND_ACC_HAS_RETURN_TYPE         (1 << 13) /*     |  X  |     |     */
  145.  /*                                                        |     |     |     */
  146. -/* method flag used by Closure::__invoke()                |     |     |     */
  147. -#define ZEND_ACC_USER_ARG_INFO           (1 <<  7) /*     |  X  |     |     */
  148. +/* Function with variable number of arguments             |     |     |     */
  149. +#define ZEND_ACC_VARIADIC                (1 << 14) /*     |  X  |     |     */
  150.  /*                                                        |     |     |     */
  151. -/* method flags (special method detection)                |     |     |     */
  152. -#define ZEND_ACC_CTOR                    (1 << 13) /*     |  X  |     |     */
  153. -#define ZEND_ACC_DTOR                    (1 << 14) /*     |  X  |     |     */
  154. +/* op_array has finally blocks (user only)                |     |     |     */
  155. +#define ZEND_ACC_HAS_FINALLY_BLOCK       (1 << 15) /*     |  X  |     |     */
  156.  /*                                                        |     |     |     */
  157.  /* "main" op_array with                                   |     |     |     */
  158. -/* ZEND_DECLARE_INHERITED_CLASS_DELAYED opcodes           |     |     |     */
  159. -#define ZEND_ACC_EARLY_BINDING           (1 << 15) /*     |  X  |     |     */
  160. +/* ZEND_DECLARE_CLASS_DELAYED opcodes                     |     |     |     */
  161. +#define ZEND_ACC_EARLY_BINDING           (1 << 16) /*     |  X  |     |     */
  162.  /*                                                        |     |     |     */
  163.  /* method flag (bc only), any method that has this        |     |     |     */
  164.  /* flag can be used statically and non statically.        |     |     |     */
  165. -#define ZEND_ACC_ALLOW_STATIC            (1 << 16) /*     |  X  |     |     */
  166. -/*                                                        |     |     |     */
  167. -/* deprecation flag                                       |     |     |     */
  168. -#define ZEND_ACC_DEPRECATED              (1 << 18) /*     |  X  |     |     */
  169. -/*                                                        |     |     |     */
  170. -#define ZEND_ACC_NO_RT_ARENA             (1 << 19) /*     |  X  |     |     */
  171. -/*                                                        |     |     |     */
  172. -#define ZEND_ACC_CLOSURE                 (1 << 20) /*     |  X  |     |     */
  173. +#define ZEND_ACC_ALLOW_STATIC            (1 << 17) /*     |  X  |     |     */
  174.  /*                                                        |     |     |     */
  175.  /* call through user function trampoline. e.g.            |     |     |     */
  176.  /* __call, __callstatic                                   |     |     |     */
  177. -#define ZEND_ACC_CALL_VIA_TRAMPOLINE     (1 << 21) /*     |  X  |     |     */
  178. +#define ZEND_ACC_CALL_VIA_TRAMPOLINE     (1 << 18) /*     |  X  |     |     */
  179.  /*                                                        |     |     |     */
  180.  /* disable inline caching                                 |     |     |     */
  181. -#define ZEND_ACC_NEVER_CACHE             (1 << 22) /*     |  X  |     |     */
  182. +#define ZEND_ACC_NEVER_CACHE             (1 << 19) /*     |  X  |     |     */
  183.  /*                                                        |     |     |     */
  184. -#define ZEND_ACC_GENERATOR               (1 << 23) /*     |  X  |     |     */
  185. +/* Closure related                                        |     |     |     */
  186. +#define ZEND_ACC_CLOSURE                 (1 << 20) /*     |  X  |     |     */
  187. +#define ZEND_ACC_FAKE_CLOSURE            (1 << 21) /*     |  X  |     |     */
  188.  /*                                                        |     |     |     */
  189. -/* Function with varable number of arguments              |     |     |     */
  190. -#define ZEND_ACC_VARIADIC                (1 << 24) /*     |  X  |     |     */
  191. +/* run_time_cache allocated on heap (user only)           |     |     |     */
  192. +#define ZEND_ACC_HEAP_RT_CACHE           (1 << 22) /*     |  X  |     |     */
  193.  /*                                                        |     |     |     */
  194. -/* Immutable op_array (lazy loading)                      |     |     |     */
  195. -#define ZEND_ACC_IMMUTABLE               (1 << 25) /*     |  X  |     |     */
  196. +/* method flag used by Closure::__invoke() (int only)     |     |     |     */
  197. +#define ZEND_ACC_USER_ARG_INFO           (1 << 22) /*     |  X  |     |     */
  198.  /*                                                        |     |     |     */
  199. -/* Function returning by reference                        |     |     |     */
  200. -#define ZEND_ACC_RETURN_REFERENCE        (1 << 26) /*     |  X  |     |     */
  201. +#define ZEND_ACC_GENERATOR               (1 << 24) /*     |  X  |     |     */
  202.  /*                                                        |     |     |     */
  203. -#define ZEND_ACC_DONE_PASS_TWO           (1 << 27) /*     |  X  |     |     */
  204. +/* function was processed by pass two (user only)         |     |     |     */
  205. +#define ZEND_ACC_DONE_PASS_TWO           (1 << 25) /*     |  X  |     |     */
  206.  /*                                                        |     |     |     */
  207. -/* Function has typed arguments                           |     |     |     */
  208. -#define ZEND_ACC_HAS_TYPE_HINTS          (1 << 28) /*     |  X  |     |     */
  209. +/* internal function is allocated at arena (int only)     |     |     |     */
  210. +#define ZEND_ACC_ARENA_ALLOCATED         (1 << 25) /*     |  X  |     |     */
  211.  /*                                                        |     |     |     */
  212. -/* op_array has finally blocks (user only)                |     |     |     */
  213. -#define ZEND_ACC_HAS_FINALLY_BLOCK       (1 << 29) /*     |  X  |     |     */
  214. +/* op_array is a clone of trait method                    |     |     |     */
  215. +#define ZEND_ACC_TRAIT_CLONE             (1 << 27) /*     |  X  |     |     */
  216.  /*                                                        |     |     |     */
  217. -/* internal function is allocated at arena (int only)     |     |     |     */
  218. -#define ZEND_ACC_ARENA_ALLOCATED         (1 << 29) /*     |  X  |     |     */
  219. +/* functions is a constructor                             |     |     |     */
  220. +#define ZEND_ACC_CTOR                    (1 << 28) /*     |  X  |     |     */
  221.  /*                                                        |     |     |     */
  222. -/* Function has a return type                             |     |     |     */
  223. -#define ZEND_ACC_HAS_RETURN_TYPE         (1 << 30) /*     |  X  |     |     */
  224. +/* function is a destructor                               |     |     |     */
  225. +#define ZEND_ACC_DTOR                    (1 << 29) /*     |  X  |     |     */
  226. +/*                                                        |     |     |     */
  227. +/* closure uses $this                                     |     |     |     */
  228. +#define ZEND_ACC_USES_THIS               (1 << 30) /*     |  X  |     |     */
  229.  /*                                                        |     |     |     */
  230.  /* op_array uses strict mode types                        |     |     |     */
  231. -#define ZEND_ACC_STRICT_TYPES            (1 << 31) /*     |  X  |     |     */
  232. +#define ZEND_ACC_STRICT_TYPES            (1U << 31) /*    |  X  |     |     */
  233.  
  234.  
  235.  #define ZEND_ACC_PPP_MASK  (ZEND_ACC_PUBLIC | ZEND_ACC_PROTECTED | ZEND_ACC_PRIVATE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement