Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 322 lines (236 sloc) 7.511 kb
573b4602 » andigutmans
1999-04-07 Zend Library
1 /*
2 +----------------------------------------------------------------------+
3 | Zend Engine |
4 +----------------------------------------------------------------------+
ccfc46b0 » foobar
2004-01-08 - Happy new year and PHP 5 for rest of the files too..
5 | Copyright (c) 1998-2004 Zend Technologies Ltd. (http://www.zend.com) |
573b4602 » andigutmans
1999-04-07 Zend Library
6 +----------------------------------------------------------------------+
d863d52a » Sebastian Bergmann
2001-12-11 Update headers.
7 | This source file is subject to version 2.00 of the Zend license, |
b5b11177 » zsuraski
1999-07-16 License update
8 | that is bundled with this package in the file LICENSE, and is |
f68c7ff2 » James Cox
2003-06-10 updating license information in the headers.
9 | available through the world-wide-web at the following url: |
d863d52a » Sebastian Bergmann
2001-12-11 Update headers.
10 | http://www.zend.com/license/2_00.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
333406bd » foobar
2003-02-01 - Added some missing CVS $Id$ tags, headers and footers.
20 /* $Id$ */
b5b11177 » zsuraski
1999-07-16 License update
21
a6172174 » Sascha Schumann
2000-07-03 Replace macros which begin with an underscore through an appropiately
22 #ifndef ZEND_GLOBALS_H
23 #define ZEND_GLOBALS_H
573b4602 » andigutmans
1999-04-07 Zend Library
24
99947a25 » andigutmans
1999-09-05 - Shift around header files.
25
573b4602 » andigutmans
1999-04-07 Zend Library
26 #include <setjmp.h>
27
99947a25 » andigutmans
1999-09-05 - Shift around header files.
28 #include "zend_globals_macros.h"
29
573b4602 » andigutmans
1999-04-07 Zend Library
30 #include "zend_stack.h"
31 #include "zend_ptr_stack.h"
32 #include "zend_hash.h"
33 #include "zend_llist.h"
b7a5b3c3 » zsuraski
1999-12-27 - Generalize the fast cache mechanism
34 #include "zend_fast_cache.h"
6608f073 » smalyshev
2002-02-07 Mega-commit: Enter the new object model
35 #include "zend_objects.h"
f75f3cff » smalyshev
2002-05-31 Generalize object storage and reference bookkeeping
36 #include "zend_objects_API.h"
52303217 » Marcus Boerger
2004-03-30 - Fix Reflection class names
37 #include "zend_modules.h"
573b4602 » andigutmans
1999-04-07 Zend Library
38
ab9dcec2 » fujimoto
2003-08-11 - added script encoding support to Zend Engine 2.
39 #ifdef ZEND_MULTIBYTE
40 #include "zend_multibyte.h"
41 #endif /* ZEND_MULTIBYTE */
42
7a87fcbb » zsuraski
1999-04-21 Thread safety patch. We're still not quite there but it compiles agai…
43 /* Define ZTS if you want a thread-safe Zend */
52fcaa44 » zsuraski
1999-04-21 Thread-safe project
44 /*#undef ZTS*/
573b4602 » andigutmans
1999-04-07 Zend Library
45
46 #ifdef ZTS
1aa2c5c0 » zsuraski
1999-04-23 Ok, call me crazy, because I probably am.
47
48 BEGIN_EXTERN_C()
e06a1ed2 » zsuraski
1999-04-24 Thread safety fixes
49 ZEND_API extern int compiler_globals_id;
50 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…
51 ZEND_API extern int alloc_globals_id;
1aa2c5c0 » zsuraski
1999-04-23 Ok, call me crazy, because I probably am.
52 END_EXTERN_C()
53
573b4602 » andigutmans
1999-04-07 Zend Library
54 #endif
55
56 #define SYMTABLE_CACHE_SIZE 32
57
58
59 #include "zend_compile.h"
60
b510a6d1 » Sascha Schumann
1999-10-05 More portability stuff
61 /* excpt.h on Digital Unix 4.0 defines function_table */
62 #undef function_table
fafbf6d8 » zsuraski
2000-01-24 - Implement declare() with declarables framework
63
64
65 typedef struct _zend_declarables {
66 zval ticks;
67 } zend_declarables;
68
69
573b4602 » andigutmans
1999-04-07 Zend Library
70 struct _zend_compiler_globals {
71 zend_stack bp_stack;
72 zend_stack switch_cond_stack;
22f066e7 » andigutmans
1999-09-09 - Add foreach() freeing code.
73 zend_stack foreach_copy_stack;
573b4602 » andigutmans
1999-04-07 Zend Library
74 zend_stack object_stack;
fafbf6d8 » zsuraski
2000-01-24 - Implement declare() with declarables framework
75 zend_stack declare_stack;
573b4602 » andigutmans
1999-04-07 Zend Library
76
26578c38 » andigutmans
2001-10-29 - Initial support for nested class definitions
77 zend_class_entry *active_class_entry;
573b4602 » andigutmans
1999-04-07 Zend Library
78
79 /* variables for list() compilation */
80 zend_llist list_llist;
81 zend_llist dimension_llist;
43ebb868 » zsuraski
2001-07-16 Fix bug #10287 - avoid crashing under a bogus usage of list()
82 zend_stack list_stack;
573b4602 » andigutmans
1999-04-07 Zend Library
83
84 zend_stack function_call_stack;
85
86 char *compiled_filename;
87
88 int zend_lineno;
86a0efcf » zsuraski
1999-11-22 Fix #2744
89 int comment_start_line;
573b4602 » andigutmans
1999-04-07 Zend Library
90 char *heredoc;
91 int heredoc_len;
92
93 zend_op_array *active_op_array;
94
95 HashTable *function_table; /* function symbol table */
96 HashTable *class_table; /* class table */
97
c34f41b7 » zsuraski
2000-08-19 Eliminate run-time leak with eval()'s
98 HashTable filenames_table;
573b4602 » andigutmans
1999-04-07 Zend Library
99
9d11db12 » andigutmans
2001-08-08 - Merge new $_GET, $_POST etc. patch from Engine 1 tree
100 HashTable *auto_globals;
101
b6197bcf » zsuraski
2000-02-04 Maintain a state of whether we're compiling and/or executing
102 zend_bool in_compilation;
9ece7960 » zsuraski
1999-07-02 define zend_bool
103 zend_bool short_tags;
104 zend_bool asp_tags;
ced9cee1 » zsuraski
1999-12-15 - Implement return by reference:
105 zend_bool allow_call_time_pass_reference;
573b4602 » andigutmans
1999-04-07 Zend Library
106
fafbf6d8 » zsuraski
2000-01-24 - Implement declare() with declarables framework
107 zend_declarables declarables;
108
573b4602 » andigutmans
1999-04-07 Zend Library
109 /* For extensions support */
9ece7960 » zsuraski
1999-07-02 define zend_bool
110 zend_bool extended_info; /* generate extension information for debugger/profiler */
111 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.
112
9ece7960 » zsuraski
1999-07-02 define zend_bool
113 zend_bool unclean_shutdown;
87ba08d1 » zsuraski
1999-05-22 Avoid leaking fd's in case of failures
114
9596255d » zsuraski
2000-10-30 Final touches on the INI parser
115 zend_bool ini_parser_unbuffered_errors;
116
87ba08d1 » zsuraski
1999-05-22 Avoid leaking fd's in case of failures
117 zend_llist open_files;
85b4df53 » zsuraski
2001-07-15 Improved interactive mode - it is now available in all builds, withou…
118
f1e8815c » andigutmans
2002-01-13 - Change exception handling to use the Java-like catch(MyException $e…
119 long catch_begin;
29f5dbe1 » andigutmans
2001-08-30 - Initial support for exceptions.
120
609d58a4 » zsuraski
2001-08-06 Merge from branch - move to standard C scanners in thread safe mode
121 struct _zend_ini_parser_param *ini_parser_param;
122
85b4df53 » zsuraski
2001-07-15 Improved interactive mode - it is now available in all builds, withou…
123 int interactive;
7ade3b30 » zsuraski
2001-08-06 Fix an off by one lineno issue, in case of an implicit ;
124
cf05f34c » zsuraski
2003-01-05 MFZE1 - lineno fix
125 zend_uint start_lineno;
7ade3b30 » zsuraski
2001-08-06 Fix an off by one lineno issue, in case of an implicit ;
126 zend_bool increment_lineno;
b90d80b5 » andigutmans
2002-03-02 - Initial patch to support importing from class scopes (for Stig).
127
26dd8492 » zsuraski
2003-03-05 Add support for interfaces
128 znode implementing_class;
e062dffe » zsuraski
2002-12-06 - Implement public/protected/private methods.
129
471947b1 » zsuraski
2003-02-04 Reimplement PPP properties
130 zend_uint access_type;
bdd3b604 » Andrei Zmievski
2003-04-02 Implement a different way to catch documentation comments.
131
132 char *doc_comment;
133 zend_uint doc_comment_len;
ab9dcec2 » fujimoto
2003-08-11 - added script encoding support to Zend Engine 2.
134
135 #ifdef ZEND_MULTIBYTE
136 zend_encoding **script_encoding_list;
137 int script_encoding_list_size;
138
139 zend_encoding *internal_encoding;
140
141 /* multibyte utility functions */
142 zend_encoding_detector encoding_detector;
143 zend_encoding_converter encoding_converter;
144 zend_encoding_oddlen encoding_oddlen;
145 #endif /* ZEND_MULTIBYTE */
573b4602 » andigutmans
1999-04-07 Zend Library
146 };
147
148
149 struct _zend_executor_globals {
ced9cee1 » zsuraski
1999-12-15 - Implement return by reference:
150 zval **return_value_ptr_ptr;
573b4602 » andigutmans
1999-04-07 Zend Library
151
152 zval uninitialized_zval;
153 zval *uninitialized_zval_ptr;
154
155 zval error_zval;
156 zval *error_zval_ptr;
157
158 zend_function_state *function_state_ptr;
159 zend_ptr_stack arg_types_stack;
223c674c » zsuraski
1999-12-19 - Made things work again (Thies, everybody - please check the latest …
160
573b4602 » andigutmans
1999-04-07 Zend Library
161 /* symbol table cache */
162 HashTable *symtable_cache[SYMTABLE_CACHE_SIZE];
163 HashTable **symtable_cache_limit;
164 HashTable **symtable_cache_ptr;
165
166 zend_op **opline_ptr;
167
168 HashTable *active_symbol_table;
169 HashTable symbol_table; /* main symbol table */
170
5951b166 » andigutmans
2000-03-10 - Quick way of supporting include_once().
171 HashTable included_files; /* files already included */
5463dd5b » andigutmans
1999-11-30 - Add use support (behaves like require, but will not use the same fi…
172
573b4602 » andigutmans
1999-04-07 Zend Library
173 jmp_buf bailout;
174
175 int error_reporting;
fde2e61d » zsuraski
2000-06-30 error_reporting fix
176 int orig_error_reporting;
2ef6b689 » Sascha Schumann
2000-11-22 Pass on the exit status
177 int exit_status;
573b4602 » andigutmans
1999-04-07 Zend Library
178
179 zend_op_array *active_op_array;
180
181 HashTable *function_table; /* function symbol table */
182 HashTable *class_table; /* class table */
183 HashTable *zend_constants; /* constants table */
184
90bd4539 » andigutmans
2002-03-01 - Remove use of C++ reserved words namespace/this
185 zend_class_entry *scope;
42486196 » andigutmans
2001-12-06 - Initial work on changing namespace scope. Only methods & variables
186
90bd4539 » andigutmans
2002-03-01 - Remove use of C++ reserved words namespace/this
187 zval *This;
a4248dd5 » andigutmans
2002-01-05 - Significantly improve the performance of method calls and $this->me…
188
573b4602 » andigutmans
1999-04-07 Zend Library
189 long precision;
190
fafbf6d8 » zsuraski
2000-01-24 - Implement declare() with declarables framework
191 int ticks_count;
192
b6197bcf » zsuraski
2000-02-04 Maintain a state of whether we're compiling and/or executing
193 zend_bool in_execution;
55cf45ab » Dmitry Stogov
2004-03-24 New autoload protection schema was implemented (Using HashTable inste…
194 HashTable *in_autoload;
931ebe08 » zsuraski
2001-07-21 Improve bailout mechanism, supports nesting of bailouts a-la try..catch
195 zend_bool bailout_set;
aecd5b89 » zsuraski
2001-10-23 MFZE1
196 zend_bool full_tables_cleanup;
eb6fd52e » zsuraski
2004-02-25 - Rename compatiblity mode to zend.ze2_compatibility_mode (it doesn't…
197 zend_bool ze1_compatibility_mode;
b6197bcf » zsuraski
2000-02-04 Maintain a state of whether we're compiling and/or executing
198
573b4602 » andigutmans
1999-04-07 Zend Library
199 /* for extended information support */
741ca167 » andigutmans
1999-07-28 - Fixed various inheritance problems & Andrey's leak
200 zend_bool no_extensions;
573b4602 » andigutmans
1999-04-07 Zend Library
201
84eb48f0 » zsuraski
2000-06-16 Ok, this time here's some real Win32 system programming :)
202 #ifdef ZEND_WIN32
203 zend_bool timed_out;
204 #endif
205
573b4602 » andigutmans
1999-04-07 Zend Library
206 HashTable regular_list;
207 HashTable persistent_list;
208
39a7f4c3 » zsuraski
1999-04-12 This patch is a go. Not fully optimized yet, but working properly.
209 zend_ptr_stack argument_stack;
d12679a6 » andigutmans
2002-10-22 - Improve overall engine performance
210 zval *free_op1, *free_op2;
b5f5e9a6 » andigutmans
1999-08-15 - Optimize the execute stack a bit.
211 int (*unary_op)(zval *result, zval *op1);
8ce8324e » zsuraski
2001-07-30 More TSRMLS_FETCH annihilation
212 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.
213
5bf89ce6 » andigutmans
2001-06-21 - Hopefully fix bug #11476 and improve garbage to be freed very quickly.
214 zval *garbage[2];
1c0f1364 » andigutmans
1999-10-03 - Hooray. This might actually work. (I hope)
215 int garbage_ptr;
216
a72c1ab9 » zsuraski
2004-01-10 Added error mask to set_error_handler()
217 int user_error_handler_error_reporting;
67f69743 » zsuraski
2000-04-19 Initial support for trapping errors (not complete and disabled; will …
218 zval *user_error_handler;
04788f95 » Stig Bakken
2002-08-16 @- Added set_exception_handler() function for registering a global,
219 zval *user_exception_handler;
a72c1ab9 » zsuraski
2004-01-10 Added error mask to set_error_handler()
220 zend_stack user_error_handlers_error_reporting;
34c2b0a0 » zsuraski
2000-06-17 - Add restore_error_handler()
221 zend_ptr_stack user_error_handlers;
04788f95 » Stig Bakken
2002-08-16 @- Added set_exception_handler() function for registering a global,
222 zend_ptr_stack user_exception_handlers;
67f69743 » zsuraski
2000-04-19 Initial support for trapping errors (not complete and disabled; will …
223
ef0bd3d1 » zsuraski
2000-06-16 - Move timeout code to Zend
224 /* timeout support */
225 int timeout_seconds;
226
0b7a9cea » zsuraski
2000-06-03 - Fix Win32 compilation (Use winsock2.h from now on)
227 int lambda_count;
228
8831b9cf » andigutmans
2002-09-23 - MFZE1.
229 HashTable *ini_directives;
f75f3cff » smalyshev
2002-05-31 Generalize object storage and reference bookkeeping
230 zend_objects_store objects_store;
29f5dbe1 » andigutmans
2001-08-30 - Initial support for exceptions.
231 zval *exception;
9e60cb55 » zsuraski
2004-02-03 Rewrote exception support. Fixes a few limitations and bugs in the old
232 zend_op *opline_before_exception;
54d53055 » zsuraski
2000-12-27 Make the INI mechanism thread safe (or at least thread safer :)
233
7e5ec2d7 » andigutmans
2002-05-02 Initial support for built-in backtracing.
234 struct _zend_execute_data *current_execute_data;
235
52303217 » Marcus Boerger
2004-03-30 - Fix Reflection class names
236 struct _zend_module_entry *current_module;
9e60cb55 » zsuraski
2004-02-03 Rewrote exception support. Fixes a few limitations and bugs in the old
237
fce275eb » zsuraski
2003-02-07 Improve PPP handling of properties
238 zend_property_info std_property_info;
239
e842ef9f » Ilia Alshanetsky
2002-10-12 MFZE1 (floats & locale issue)
240 /* locale stuff */
241 char float_separator[1];
242
b5f5e9a6 » andigutmans
1999-08-15 - Optimize the execute stack a bit.
243 void *reserved[ZEND_MAX_RESERVED_RESOURCES];
573b4602 » andigutmans
1999-04-07 Zend Library
244 };
245
380c082e » andigutmans
2002-06-16 - Commit an initial version of a home made memory manager.
246 #include "zend_mm.h"
573b4602 » andigutmans
1999-04-07 Zend Library
247
248 struct _zend_alloc_globals {
c517633b » zsuraski
1999-12-26 namespace protection
249 zend_mem_header *head; /* standard list */
573b4602 » andigutmans
1999-04-07 Zend Library
250 void *cache[MAX_CACHED_MEMORY][MAX_CACHED_ENTRIES];
7f87a319 » smalyshev
2000-06-22 Make cache counters to be unsigned int
251 unsigned int cache_count[MAX_CACHED_MEMORY];
b7a5b3c3 » zsuraski
1999-12-27 - Generalize the fast cache mechanism
252 void *fast_cache_list_head[MAX_FAST_CACHE_TYPES];
573b4602 » andigutmans
1999-04-07 Zend Library
253
66d9314b » zsuraski
2001-08-03 Implement fast memory allocation and reduced fragmentation under Wind…
254 #ifdef ZEND_WIN32
255 HANDLE memory_heap;
256 #endif
257
ebd4445b » zsuraski
1999-12-27 Add cache statistics support
258 #if ZEND_DEBUG
259 /* for performance tuning */
260 int cache_stats[MAX_CACHED_MEMORY][2];
b7a5b3c3 » zsuraski
1999-12-27 - Generalize the fast cache mechanism
261 int fast_cache_stats[MAX_FAST_CACHE_TYPES][2];
ebd4445b » zsuraski
1999-12-27 Add cache statistics support
262 #endif
2e9886de » zsuraski
1999-04-10 Get rid of php3_ini in Zend
263 #if MEMORY_LIMIT
264 unsigned int memory_limit;
573b4602 » andigutmans
1999-04-07 Zend Library
265 unsigned int allocated_memory;
4c0d85ba » zsuraski
2001-05-16 Commit missing fix
266 unsigned int allocated_memory_peak;
573b4602 » andigutmans
1999-04-07 Zend Library
267 unsigned char memory_exhausted;
268 #endif
9e351716 » andigutmans
2002-06-19 - This was also supposed to be part of the previous ZEND_MM commit :)
269 #ifdef ZEND_MM
380c082e » andigutmans
2002-06-16 - Commit an initial version of a home made memory manager.
270 zend_mm_heap mm_heap;
271 #endif
573b4602 » andigutmans
1999-04-07 Zend Library
272 };
273
609d58a4 » zsuraski
2001-08-06 Merge from branch - move to standard C scanners in thread safe mode
274 struct _zend_scanner_globals {
e52aac94 » wez
2003-02-18 Implement simple stream support in the ZE scanners.
275 zend_file_handle *yy_in;
276 zend_file_handle *yy_out;
609d58a4 » zsuraski
2001-08-06 Merge from branch - move to standard C scanners in thread safe mode
277 int yy_leng;
278 char *yy_text;
279 struct yy_buffer_state *current_buffer;
280 char *c_buf_p;
281 int init;
282 int start;
fac8eaff » Ilia Alshanetsky
2002-10-14 MFZE1
283 int lineno;
17352812 » zsuraski
2001-09-22 MFZE1
284 char _yy_hold_char;
285 int yy_n_chars;
286 int _yy_did_buffer_switch_on_eof;
e42ab2c9 » zsuraski
2001-09-22 MFZE1
287 int _yy_last_accepting_state; /* Must be of the same type as yy_state_type,
288 * if for whatever reason it's no longer int!
289 */
17352812 » zsuraski
2001-09-22 MFZE1
290 char *_yy_last_accepting_cpos;
291 int _yy_more_flag;
292 int _yy_more_len;
0bb780b3 » zsuraski
2002-08-15 MFZE1
293 int yy_start_stack_ptr;
294 int yy_start_stack_depth;
295 int *yy_start_stack;
ab9dcec2 » fujimoto
2003-08-11 - added script encoding support to Zend Engine 2.
296
297 #ifdef ZEND_MULTIBYTE
298 /* original (unfiltered) script */
299 char *script_org;
300 int script_org_size;
301
302 /* filtered script */
303 char *script_filtered;
304 int script_filtered_size;
305
306 /* input/ouput filters */
307 zend_encoding_filter input_filter;
308 zend_encoding_filter output_filter;
309 zend_encoding *script_encoding;
310 zend_encoding *internal_encoding;
311 #endif /* ZEND_MULTIBYTE */
609d58a4 » zsuraski
2001-08-06 Merge from branch - move to standard C scanners in thread safe mode
312 };
313
a6172174 » Sascha Schumann
2000-07-03 Replace macros which begin with an underscore through an appropiately
314 #endif /* ZEND_GLOBALS_H */
333406bd » foobar
2003-02-01 - Added some missing CVS $Id$ tags, headers and footers.
315
316 /*
317 * Local variables:
318 * tab-width: 4
319 * c-basic-offset: 4
320 * indent-tabs-mode: t
321 * End:
322 */
Something went wrong with that request. Please try again.