source: trunk/xcache/xc_utils.h @ 1018

Last change on this file since 1018 was 1018, checked in by moo, 2 years ago

updated deps header

  • Property svn:eol-style set to native
File size: 2.2 KB
Line 
1#include "xcache.h"
2#include "xc_compatibility.h"
3
4typedef struct {
5    zend_op_array *op_array;
6    HashTable *function_table;
7    HashTable *class_table;
8} xc_compile_result_t;
9
10xc_compile_result_t *xc_compile_result_init(xc_compile_result_t *cr,
11        zend_op_array *op_array,
12        HashTable *function_table,
13        HashTable *class_table);
14void xc_compile_result_free(xc_compile_result_t *cr);
15xc_compile_result_t *xc_compile_result_init_cur(xc_compile_result_t *cr, zend_op_array *op_array TSRMLS_DC);
16/* apply func */
17int xc_apply_op_array(xc_compile_result_t *cr, apply_func_t applyer TSRMLS_DC);
18
19int xc_undo_pass_two(zend_op_array *op_array TSRMLS_DC);
20int xc_redo_pass_two(zend_op_array *op_array TSRMLS_DC);
21int xc_fix_opcode(zend_op_array *op_array TSRMLS_DC);
22int xc_undo_fix_opcode(zend_op_array *op_array TSRMLS_DC);
23zend_uchar xc_get_fixed_opcode(zend_uchar opcode, int line);
24
25typedef void (*xc_foreach_early_binding_class_cb)(zend_op *opline, int oplineno, void *data TSRMLS_DC);
26int xc_foreach_early_binding_class(zend_op_array *op_array, xc_foreach_early_binding_class_cb callback, void *data TSRMLS_DC);
27
28/* installer */
29#ifdef HAVE_XCACHE_CONSTANT
30void xc_install_constant(ZEND_24(NOTHING, const) char *filename, zend_constant *constant, zend_uchar type, const24_zstr key, uint len, ulong h TSRMLS_DC);
31#endif
32void xc_install_function(ZEND_24(NOTHING, const) char *filename, zend_function *func, zend_uchar type, const24_zstr key, uint len, ulong h TSRMLS_DC);
33ZESW(xc_cest_t *, void) xc_install_class(ZEND_24(NOTHING, const) char *filename, xc_cest_t *cest, int oplineno, zend_uchar type, const24_zstr key, uint len, ulong h TSRMLS_DC);
34
35#if defined(E_STRICT) || defined(E_DEPRECATED)
36#define XCACHE_ERROR_CACHING
37#endif
38
39typedef zend_bool (*xc_if_func_t)(void *data);
40
41void xc_hash_copy_if(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, xc_if_func_t checker);
42#ifdef HAVE_XCACHE_CONSTANT
43void xc_zend_constant_ctor(zend_constant *c);
44void xc_zend_constant_dtor(zend_constant *c);
45void xc_copy_internal_zend_constants(HashTable *target, HashTable *source);
46#endif
47
48#ifndef ZEND_COMPILE_DELAYED_BINDING
49int xc_do_early_binding(zend_op_array *op_array, HashTable *class_table, int oplineno TSRMLS_DC);
50#endif
Note: See TracBrowser for help on using the repository browser.