Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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