Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 249 lines (179 sloc) 5.938 kb
573b4602 » andigutmans
1999-04-07 Zend Library
1 /*
2 +----------------------------------------------------------------------+
3 | Zend Engine |
4 +----------------------------------------------------------------------+
d2c9e807 » andigutmans
2001-02-26 - Update copyright year
5 | Copyright (c) 1998-2001 Zend Technologies Ltd. (http://www.zend.com) |
573b4602 » andigutmans
1999-04-07 Zend Library
6 +----------------------------------------------------------------------+
5e55e47f » zsuraski
2000-03-06 It's official now...
7 | This source file is subject to version 0.92 of the Zend license, |
b5b11177 » zsuraski
1999-07-16 License update
8 | that is bundled with this package in the file LICENSE, and is |
9 | available at through the world-wide-web at |
5e55e47f » zsuraski
2000-03-06 It's official now...
10 | http://www.zend.com/license/0_92.txt. |
b5b11177 » zsuraski
1999-07-16 License update
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. |
573b4602 » andigutmans
1999-04-07 Zend Library
14 +----------------------------------------------------------------------+
15 | Authors: Andi Gutmans <andi@zend.com> |
16 | Zeev Suraski <zeev@zend.com> |
17 +----------------------------------------------------------------------+
18 */
19
b5b11177 » zsuraski
1999-07-16 License update
20
a6172174 » Sascha Schumann
2000-07-03 Replace macros which begin with an underscore through an appropiately
21 #ifndef ZEND_GLOBALS_H
22 #define ZEND_GLOBALS_H
573b4602 » andigutmans
1999-04-07 Zend Library
23
99947a25 » andigutmans
1999-09-05 - Shift around header files.
24
573b4602 » andigutmans
1999-04-07 Zend Library
25 #include <setjmp.h>
26
99947a25 » andigutmans
1999-09-05 - Shift around header files.
27 #include "zend_globals_macros.h"
28
573b4602 » andigutmans
1999-04-07 Zend Library
29 #include "zend_stack.h"
30 #include "zend_ptr_stack.h"
31 #include "zend_hash.h"
32 #include "zend_llist.h"
b7a5b3c3 » zsuraski
1999-12-27 - Generalize the fast cache mechanism
33 #include "zend_fast_cache.h"
573b4602 » andigutmans
1999-04-07 Zend Library
34
7a87fcbb » zsuraski
1999-04-21 Thread safety patch. We're still not quite there but it compiles agai…
35 /* Define ZTS if you want a thread-safe Zend */
52fcaa44 » zsuraski
1999-04-21 Thread-safe project
36 /*#undef ZTS*/
573b4602 » andigutmans
1999-04-07 Zend Library
37
38 #ifdef ZTS
1aa2c5c0 » zsuraski
1999-04-23 Ok, call me crazy, because I probably am.
39
40 BEGIN_EXTERN_C()
e06a1ed2 » zsuraski
1999-04-24 Thread safety fixes
41 ZEND_API extern int compiler_globals_id;
42 ZEND_API extern int executor_globals_id;
5864b57e » zsuraski
1999-12-30 This should enable people to use ALLOC_ZVAL() in code outside the php…
43 ZEND_API extern int alloc_globals_id;
1aa2c5c0 » zsuraski
1999-04-23 Ok, call me crazy, because I probably am.
44 END_EXTERN_C()
45
573b4602 » andigutmans
1999-04-07 Zend Library
46 #endif
47
48 #define SYMTABLE_CACHE_SIZE 32
49
50
51 #include "zend_compile.h"
52
b510a6d1 » Sascha Schumann
1999-10-05 More portability stuff
53 /* excpt.h on Digital Unix 4.0 defines function_table */
54 #undef function_table
fafbf6d8 » zsuraski
2000-01-24 - Implement declare() with declarables framework
55
56
57 typedef struct _zend_declarables {
58 zval ticks;
59 } zend_declarables;
60
61
573b4602 » andigutmans
1999-04-07 Zend Library
62 struct _zend_compiler_globals {
63 zend_stack bp_stack;
64 zend_stack switch_cond_stack;
22f066e7 » andigutmans
1999-09-09 - Add foreach() freeing code.
65 zend_stack foreach_copy_stack;
573b4602 » andigutmans
1999-04-07 Zend Library
66 zend_stack object_stack;
fafbf6d8 » zsuraski
2000-01-24 - Implement declare() with declarables framework
67 zend_stack declare_stack;
573b4602 » andigutmans
1999-04-07 Zend Library
68
69 zend_class_entry class_entry, *active_class_entry;
cb0d2775 » zsuraski
2001-06-21 parent::methodname() now works better with runtime classes (fix bug #…
70 zval active_ce_parent_class_name;
573b4602 » andigutmans
1999-04-07 Zend Library
71
72 /* variables for list() compilation */
73 zend_llist list_llist;
74 zend_llist dimension_llist;
43ebb868 » zsuraski
2001-07-16 Fix bug #10287 - avoid crashing under a bogus usage of list()
75 zend_stack list_stack;
573b4602 » andigutmans
1999-04-07 Zend Library
76
77 zend_stack function_call_stack;
78
79 char *compiled_filename;
80
81 int zend_lineno;
86a0efcf » zsuraski
1999-11-22 Fix #2744
82 int comment_start_line;
573b4602 » andigutmans
1999-04-07 Zend Library
83 char *heredoc;
84 int heredoc_len;
85
86 zend_op_array *active_op_array;
87
88 HashTable *function_table; /* function symbol table */
89 HashTable *class_table; /* class table */
2eabb14d » andigutmans
2001-09-30 - Merge the NAMESPACES_BRANCH. It wasn't a good idea to have a branch…
90 HashTable *namespaces;
573b4602 » andigutmans
1999-04-07 Zend Library
91
c34f41b7 » zsuraski
2000-08-19 Eliminate run-time leak with eval()'s
92 HashTable filenames_table;
573b4602 » andigutmans
1999-04-07 Zend Library
93
9d11db12 » andigutmans
2001-08-08 - Merge new $_GET, $_POST etc. patch from Engine 1 tree
94 HashTable *auto_globals;
95
b6197bcf » zsuraski
2000-02-04 Maintain a state of whether we're compiling and/or executing
96 zend_bool in_compilation;
9ece7960 » zsuraski
1999-07-02 define zend_bool
97 zend_bool short_tags;
98 zend_bool asp_tags;
ced9cee1 » zsuraski
1999-12-15 - Implement return by reference:
99 zend_bool allow_call_time_pass_reference;
573b4602 » andigutmans
1999-04-07 Zend Library
100
fafbf6d8 » zsuraski
2000-01-24 - Implement declare() with declarables framework
101 zend_declarables declarables;
102
573b4602 » andigutmans
1999-04-07 Zend Library
103 /* For extensions support */
9ece7960 » zsuraski
1999-07-02 define zend_bool
104 zend_bool extended_info; /* generate extension information for debugger/profiler */
105 zend_bool handle_op_arrays; /* run op_arrays through op_array handlers */
1aa2c5c0 » zsuraski
1999-04-23 Ok, call me crazy, because I probably am.
106
9ece7960 » zsuraski
1999-07-02 define zend_bool
107 zend_bool unclean_shutdown;
87ba08d1 » zsuraski
1999-05-22 Avoid leaking fd's in case of failures
108
9596255d » zsuraski
2000-10-30 Final touches on the INI parser
109 zend_bool ini_parser_unbuffered_errors;
110
87ba08d1 » zsuraski
1999-05-22 Avoid leaking fd's in case of failures
111 zend_llist open_files;
85b4df53 » zsuraski
2001-07-15 Improved interactive mode - it is now available in all builds, withou…
112
29f5dbe1 » andigutmans
2001-08-30 - Initial support for exceptions.
113 zend_llist *throw_list;
114
609d58a4 » zsuraski
2001-08-06 Merge from branch - move to standard C scanners in thread safe mode
115 struct _zend_ini_parser_param *ini_parser_param;
116
85b4df53 » zsuraski
2001-07-15 Improved interactive mode - it is now available in all builds, withou…
117 int interactive;
7ade3b30 » zsuraski
2001-08-06 Fix an off by one lineno issue, in case of an implicit ;
118
119 zend_bool increment_lineno;
2eabb14d » andigutmans
2001-09-30 - Merge the NAMESPACES_BRANCH. It wasn't a good idea to have a branch…
120
121 char *namespace;
122 int namespace_len;
573b4602 » andigutmans
1999-04-07 Zend Library
123 };
124
125
126 struct _zend_executor_globals {
ced9cee1 » zsuraski
1999-12-15 - Implement return by reference:
127 zval **return_value_ptr_ptr;
573b4602 » andigutmans
1999-04-07 Zend Library
128
129 zval uninitialized_zval;
130 zval *uninitialized_zval_ptr;
131
132 zval error_zval;
133 zval *error_zval_ptr;
134
135 zend_function_state *function_state_ptr;
136 zend_ptr_stack arg_types_stack;
223c674c » zsuraski
1999-12-19 - Made things work again (Thies, everybody - please check the latest …
137
573b4602 » andigutmans
1999-04-07 Zend Library
138 /* symbol table cache */
139 HashTable *symtable_cache[SYMTABLE_CACHE_SIZE];
140 HashTable **symtable_cache_limit;
141 HashTable **symtable_cache_ptr;
142
143 zend_op **opline_ptr;
144
145 HashTable *active_symbol_table;
146 HashTable symbol_table; /* main symbol table */
147
5951b166 » andigutmans
2000-03-10 - Quick way of supporting include_once().
148 HashTable included_files; /* files already included */
5463dd5b » andigutmans
1999-11-30 - Add use support (behaves like require, but will not use the same fi…
149
573b4602 » andigutmans
1999-04-07 Zend Library
150 jmp_buf bailout;
151
152 int error_reporting;
fde2e61d » zsuraski
2000-06-30 error_reporting fix
153 int orig_error_reporting;
2ef6b689 » Sascha Schumann
2000-11-22 Pass on the exit status
154 int exit_status;
573b4602 » andigutmans
1999-04-07 Zend Library
155
156 zend_op_array *active_op_array;
157
158 HashTable *function_table; /* function symbol table */
159 HashTable *class_table; /* class table */
160 HashTable *zend_constants; /* constants table */
2eabb14d » andigutmans
2001-09-30 - Merge the NAMESPACES_BRANCH. It wasn't a good idea to have a branch…
161 HashTable *namespaces;
573b4602 » andigutmans
1999-04-07 Zend Library
162
163 long precision;
164
fafbf6d8 » zsuraski
2000-01-24 - Implement declare() with declarables framework
165 int ticks_count;
166
b6197bcf » zsuraski
2000-02-04 Maintain a state of whether we're compiling and/or executing
167 zend_bool in_execution;
931ebe08 » zsuraski
2001-07-21 Improve bailout mechanism, supports nesting of bailouts a-la try..catch
168 zend_bool bailout_set;
aecd5b89 » zsuraski
2001-10-23 MFZE1
169 zend_bool full_tables_cleanup;
b6197bcf » zsuraski
2000-02-04 Maintain a state of whether we're compiling and/or executing
170
573b4602 » andigutmans
1999-04-07 Zend Library
171 /* for extended information support */
741ca167 » andigutmans
1999-07-28 - Fixed various inheritance problems & Andrey's leak
172 zend_bool no_extensions;
573b4602 » andigutmans
1999-04-07 Zend Library
173
84eb48f0 » zsuraski
2000-06-16 Ok, this time here's some real Win32 system programming :)
174 #ifdef ZEND_WIN32
175 zend_bool timed_out;
176 #endif
177
573b4602 » andigutmans
1999-04-07 Zend Library
178 HashTable regular_list;
179 HashTable persistent_list;
180
39a7f4c3 » zsuraski
1999-04-12 This patch is a go. Not fully optimized yet, but working properly.
181 zend_ptr_stack argument_stack;
b5f5e9a6 » andigutmans
1999-08-15 - Optimize the execute stack a bit.
182 int free_op1, free_op2;
183 int (*unary_op)(zval *result, zval *op1);
8ce8324e » zsuraski
2001-07-30 More TSRMLS_FETCH annihilation
184 int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC);
39a7f4c3 » zsuraski
1999-04-12 This patch is a go. Not fully optimized yet, but working properly.
185
5bf89ce6 » andigutmans
2001-06-21 - Hopefully fix bug #11476 and improve garbage to be freed very quickly.
186 zval *garbage[2];
1c0f1364 » andigutmans
1999-10-03 - Hooray. This might actually work. (I hope)
187 int garbage_ptr;
188
67f69743 » zsuraski
2000-04-19 Initial support for trapping errors (not complete and disabled; will …
189 zval *user_error_handler;
34c2b0a0 » zsuraski
2000-06-17 - Add restore_error_handler()
190 zend_ptr_stack user_error_handlers;
67f69743 » zsuraski
2000-04-19 Initial support for trapping errors (not complete and disabled; will …
191
ef0bd3d1 » zsuraski
2000-06-16 - Move timeout code to Zend
192 /* timeout support */
193 int timeout_seconds;
194
0b7a9cea » zsuraski
2000-06-03 - Fix Win32 compilation (Use winsock2.h from now on)
195 int lambda_count;
196
54d53055 » zsuraski
2000-12-27 Make the INI mechanism thread safe (or at least thread safer :)
197 HashTable ini_directives;
5af7770a » andigutmans
2001-08-07 - Sync Engine2 CVS with latest Engine CVS
198 zend_objects objects;
29f5dbe1 » andigutmans
2001-08-30 - Initial support for exceptions.
199 zval *exception;
54d53055 » zsuraski
2000-12-27 Make the INI mechanism thread safe (or at least thread safer :)
200
b5f5e9a6 » andigutmans
1999-08-15 - Optimize the execute stack a bit.
201 void *reserved[ZEND_MAX_RESERVED_RESOURCES];
573b4602 » andigutmans
1999-04-07 Zend Library
202 };
203
204
205 struct _zend_alloc_globals {
c517633b » zsuraski
1999-12-26 namespace protection
206 zend_mem_header *head; /* standard list */
207 zend_mem_header *phead; /* persistent list */
573b4602 » andigutmans
1999-04-07 Zend Library
208 void *cache[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
7f87a319 » smalyshev
2000-06-22 Make cache counters to be unsigned int
209 unsigned int cache_count[MAX_CACHED_MEMORY];
b7a5b3c3 » zsuraski
1999-12-27 - Generalize the fast cache mechanism
210 void *fast_cache_list_head[MAX_FAST_CACHE_TYPES];
573b4602 » andigutmans
1999-04-07 Zend Library
211
66d9314b » zsuraski
2001-08-03 Implement fast memory allocation and reduced fragmentation under Wind…
212 #ifdef ZEND_WIN32
213 HANDLE memory_heap;
214 #endif
215
ebd4445b » zsuraski
1999-12-27 Add cache statistics support
216 #if ZEND_DEBUG
217 /* for performance tuning */
218 int cache_stats[MAX_CACHED_MEMORY][2];
b7a5b3c3 » zsuraski
1999-12-27 - Generalize the fast cache mechanism
219 int fast_cache_stats[MAX_FAST_CACHE_TYPES][2];
ebd4445b » zsuraski
1999-12-27 Add cache statistics support
220 #endif
2e9886de » zsuraski
1999-04-10 Get rid of php3_ini in Zend
221 #if MEMORY_LIMIT
222 unsigned int memory_limit;
573b4602 » andigutmans
1999-04-07 Zend Library
223 unsigned int allocated_memory;
4c0d85ba » zsuraski
2001-05-16 Commit missing fix
224 unsigned int allocated_memory_peak;
573b4602 » andigutmans
1999-04-07 Zend Library
225 unsigned char memory_exhausted;
226 #endif
227 };
228
609d58a4 » zsuraski
2001-08-06 Merge from branch - move to standard C scanners in thread safe mode
229 struct _zend_scanner_globals {
483fc4c7 » zsuraski
2001-09-19 MFZE1
230 FILE *yy_in;
231 FILE *yy_out;
609d58a4 » zsuraski
2001-08-06 Merge from branch - move to standard C scanners in thread safe mode
232 int yy_leng;
233 char *yy_text;
234 struct yy_buffer_state *current_buffer;
235 char *c_buf_p;
236 int init;
237 int start;
17352812 » zsuraski
2001-09-22 MFZE1
238 char _yy_hold_char;
239 int yy_n_chars;
240 int _yy_did_buffer_switch_on_eof;
e42ab2c9 » zsuraski
2001-09-22 MFZE1
241 int _yy_last_accepting_state; /* Must be of the same type as yy_state_type,
242 * if for whatever reason it's no longer int!
243 */
17352812 » zsuraski
2001-09-22 MFZE1
244 char *_yy_last_accepting_cpos;
245 int _yy_more_flag;
246 int _yy_more_len;
609d58a4 » zsuraski
2001-08-06 Merge from branch - move to standard C scanners in thread safe mode
247 };
248
a6172174 » Sascha Schumann
2000-07-03 Replace macros which begin with an underscore through an appropiately
249 #endif /* ZEND_GLOBALS_H */
Something went wrong with that request. Please try again.