You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.7 KiB

27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Zend Engine |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 0.91 of the Zend license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available at through the world-wide-web at |
  10. | http://www.zend.com/license/0_91.txt. |
  11. | If you did not receive a copy of the Zend license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@zend.com so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Authors: Andi Gutmans <andi@zend.com> |
  16. | Zeev Suraski <zeev@zend.com> |
  17. +----------------------------------------------------------------------+
  18. */
  19. #ifndef _EXECUTE_H
  20. #define _EXECUTE_H
  21. #include "zend_compile.h"
  22. #include "zend_hash.h"
  23. typedef union _temp_variable {
  24. zval tmp_var;
  25. struct {
  26. zval **ptr_ptr;
  27. zval *ptr;
  28. } var;
  29. struct {
  30. zval tmp_var; /* a dummy */
  31. zval *str;
  32. int offset;
  33. unsigned char type;
  34. } EA;
  35. } temp_variable;
  36. ZEND_API extern void (*zend_execute)(zend_op_array *op_array ELS_DC);
  37. void init_executor(CLS_D ELS_DC);
  38. void shutdown_executor(ELS_D);
  39. void execute(zend_op_array *op_array ELS_DC);
  40. ZEND_API int zend_is_true(zval *op);
  41. ZEND_API inline void safe_free_zval_ptr(zval *p);
  42. ZEND_API void zend_eval_string(char *str, zval *retval CLS_DC ELS_DC);
  43. ZEND_API inline int i_zend_is_true(zval *op);
  44. ZEND_API int zval_update_constant(zval **pp);
  45. ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC);
  46. /* dedicated Zend executor functions - do not use! */
  47. ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D);
  48. ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC);
  49. #if SUPPORT_INTERACTIVE
  50. void execute_new_code(CLS_D);
  51. #endif
  52. /* services */
  53. ZEND_API char *get_active_function_name(void);
  54. ZEND_API char *zend_get_executed_filename(ELS_D);
  55. ZEND_API uint zend_get_executed_lineno(ELS_D);
  56. #define zendi_zval_copy_ctor(p) zval_copy_ctor(&(p))
  57. #define zendi_zval_dtor(p) zval_dtor(&(p))
  58. #define active_opline (*EG(opline_ptr))
  59. #define IS_OVERLOADED_OBJECT 1
  60. #define IS_STRING_OFFSET 2
  61. #endif /* _EXECUTE_H */