zend_dump.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Zend Engine, Bytecode Visualisation |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | https://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Authors: Dmitry Stogov <dmitry@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. #ifndef ZEND_DUMP_H
  19. #define ZEND_DUMP_H
  20. #include "zend_ssa.h"
  21. #include "zend_dfg.h"
  22. #define ZEND_DUMP_HIDE_UNREACHABLE (1<<0)
  23. #define ZEND_DUMP_RC_INFERENCE (1<<1)
  24. #define ZEND_DUMP_CFG (1<<2)
  25. #define ZEND_DUMP_SSA (1<<3)
  26. #define ZEND_DUMP_LIVE_RANGES (1<<4)
  27. #define ZEND_DUMP_LINE_NUMBERS (1<<5)
  28. BEGIN_EXTERN_C()
  29. ZEND_API void zend_dump_op_array(const zend_op_array *op_array, uint32_t dump_flags, const char *msg, const void *data);
  30. ZEND_API void zend_dump_op(const zend_op_array *op_array, const zend_basic_block *b, const zend_op *opline, uint32_t dump_flags, const zend_ssa *ssa, const zend_ssa_op *ssa_op);
  31. ZEND_API void zend_dump_op_line(const zend_op_array *op_array, const zend_basic_block *b, const zend_op *opline, uint32_t dump_flags, const void *data);
  32. void zend_dump_dominators(const zend_op_array *op_array, const zend_cfg *cfg);
  33. void zend_dump_dfg(const zend_op_array *op_array, const zend_cfg *cfg, const zend_dfg *dfg);
  34. void zend_dump_phi_placement(const zend_op_array *op_array, const zend_ssa *ssa);
  35. void zend_dump_variables(const zend_op_array *op_array);
  36. void zend_dump_ssa_variables(const zend_op_array *op_array, const zend_ssa *ssa, uint32_t dump_flags);
  37. ZEND_API void zend_dump_ssa_var(const zend_op_array *op_array, const zend_ssa *ssa, int ssa_var_num, zend_uchar var_type, int var_num, uint32_t dump_flags);
  38. ZEND_API void zend_dump_var(const zend_op_array *op_array, zend_uchar var_type, int var_num);
  39. void zend_dump_op_array_name(const zend_op_array *op_array);
  40. void zend_dump_const(const zval *zv);
  41. void zend_dump_ht(HashTable *ht);
  42. END_EXTERN_C()
  43. #endif /* ZEND_DUMP_H */