summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.h
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-05-31 12:09:06 +0300
committerDmitry Stogov <dmitry@zend.com>2019-05-31 12:20:21 +0300
commit1df9f238fed314255b858e3996c35be8cdff917f (patch)
treeab3dbad2f11e44688926b6a98fb50b7c0c68d1b2 /Zend/zend_compile.h
parent84333cad674890174c47f3c21b1b1cf85a4276ac (diff)
downloadphp-git-1df9f238fed314255b858e3996c35be8cdff917f.tar.gz
Better hot/cold code splitting
Diffstat (limited to 'Zend/zend_compile.h')
-rw-r--r--Zend/zend_compile.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index 9989011600..7745daf47e 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -766,7 +766,6 @@ ZEND_API void function_add_ref(zend_function *function);
ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type);
ZEND_API zend_op_array *compile_string(zval *source_string, char *filename);
ZEND_API zend_op_array *compile_filename(int type, zval *filename);
-ZEND_API void zend_try_exception_handler();
ZEND_API int zend_execute_scripts(int type, zval *retval, int file_count, ...);
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle);
ZEND_API void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size);
@@ -775,6 +774,16 @@ ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle);
ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce);
ZEND_API void zend_cleanup_internal_classes(void);
+ZEND_API ZEND_COLD void zend_user_exception_handler(void);
+
+#define zend_try_exception_handler() do { \
+ if (UNEXPECTED(EG(exception))) { \
+ if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) { \
+ zend_user_exception_handler(); \
+ } \
+ } \
+ } while (0)
+
ZEND_API void destroy_zend_function(zend_function *function);
ZEND_API void zend_function_dtor(zval *zv);
ZEND_API void destroy_zend_class(zval *zv);