Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 629 lines (477 sloc) 19.042 kb
573b4602 »
1999-04-07 Zend Library
1 /*
2 +----------------------------------------------------------------------+
3 | Zend Engine |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
6 +----------------------------------------------------------------------+
8d1de13a »
1999-07-19 0.91 update
7 | This source file is subject to version 0.91 of the Zend license, |
b5b11177 »
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 |
8d1de13a »
1999-07-19 0.91 update
10 | http://www.zend.com/license/0_91.txt. |
b5b11177 »
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 »
1999-04-07 Zend Library
14 +----------------------------------------------------------------------+
15 | Authors: Andi Gutmans <andi@zend.com> |
16 | Zeev Suraski <zeev@zend.com> |
17 +----------------------------------------------------------------------+
18 */
19
b5b11177 »
1999-07-16 License update
20
573b4602 »
1999-04-07 Zend Library
21 #ifndef _COMPILE_H
22 #define _COMPILE_H
23
24 #include "zend.h"
fa76f0c9 »
1999-04-14 Compile fix
25
009025e0 »
1999-09-06 * header file cleanup
26 #ifdef HAVE_STDARG_H
27 # include <stdarg.h>
fa76f0c9 »
1999-04-14 Compile fix
28 #endif
29
573b4602 »
1999-04-07 Zend Library
30 #include "zend_llist.h"
31
32 #define DEBUG_ZEND 0
fcaf734f »
1999-05-02 - Don't support interactive mode when thread safe.
33
34 #ifndef ZTS
009025e0 »
1999-09-06 * header file cleanup
35 # define SUPPORT_INTERACTIVE 1
fcaf734f »
1999-05-02 - Don't support interactive mode when thread safe.
36 #else
009025e0 »
1999-09-06 * header file cleanup
37 # define SUPPORT_INTERACTIVE 0
fcaf734f »
1999-05-02 - Don't support interactive mode when thread safe.
38 #endif
573b4602 »
1999-04-07 Zend Library
39
40 #define FREE_PNODE(znode) zval_dtor(&znode->u.constant);
41 #define FREE_OP(op, should_free) if (should_free) zval_dtor(&Ts[(op)->u.var].tmp_var);
42
43
44 #if SUPPORT_INTERACTIVE
45 #define INC_BPC(op_array) ((op_array)->backpatch_count++)
46 #define DEC_BPC(op_array) ((op_array)->backpatch_count--)
47 #define HANDLE_INTERACTIVE() if (EG(interactive)) { execute_new_code(CLS_C); }
48 #else
49 #define INC_BPC(op_array)
50 #define DEC_BPC(op_array)
51 #define HANDLE_INTERACTIVE()
52 #endif
53
54 typedef struct _zend_op_array zend_op_array;
55
1250c43a »
1999-05-22 * Add struct name to all typedef's so that they can be debugged with …
56 typedef struct _znode {
573b4602 »
1999-04-07 Zend Library
57 int op_type;
58 union {
59 zval constant;
60
61 int var;
62 int opline_num;
bbe27ffa »
1999-08-03 - Initialize extended value's and put the fetch_type in it's own vari…
63 int fetch_type;
573b4602 »
1999-04-07 Zend Library
64 zend_op_array *op_array;
65 struct {
66 int var; /* dummy */
67 int type;
68 } EA;
69 } u;
70 } znode;
71
72
73 typedef struct _zend_op {
74 int opcode;
75 znode result;
76 znode op1;
77 znode op2;
39a7f4c3 »
1999-04-12 This patch is a go. Not fully optimized yet, but working properly.
78 ulong extended_value;
573b4602 »
1999-04-07 Zend Library
79 char *filename;
80 uint lineno;
81 } zend_op;
82
83
1250c43a »
1999-05-22 * Add struct name to all typedef's so that they can be debugged with …
84 typedef struct _zend_brk_cont_element {
573b4602 »
1999-04-07 Zend Library
85 int cont;
86 int brk;
87 int parent;
88 } zend_brk_cont_element;
89
90
91 struct _zend_op_array {
92 int type; /* MUST be the first element of this struct! */
93
94 unsigned char *arg_types; /* MUST be the second element of this struct! */
7f35cfda »
1999-10-25 *** empty log message ***
95 char *function_name; /* MUST be the third element of this struct! */
573b4602 »
1999-04-07 Zend Library
96
97 int *refcount;
98
99 zend_op *opcodes;
100 int last, size;
101
102 int T;
103
104
105 zend_brk_cont_element *brk_cont_array;
106 int last_brk_cont;
107 int current_brk_cont;
1b4b5c4a »
1999-06-04 New $GLOBALS init
108 unsigned char uses_globals;
573b4602 »
1999-04-07 Zend Library
109
110 /* static variables support */
111 HashTable *static_variables;
112
113 #if SUPPORT_INTERACTIVE
114 int start_op_number, end_op_number;
115 int last_executed_op_number;
116 int backpatch_count;
117 #endif
ced9cee1 »
1999-12-15 - Implement return by reference:
118 zend_bool return_reference;
573b4602 »
1999-04-07 Zend Library
119
b5f5e9a6 »
1999-08-15 - Optimize the execute stack a bit.
120 void *reserved[ZEND_MAX_RESERVED_RESOURCES];
573b4602 »
1999-04-07 Zend Library
121 };
122
123
1250c43a »
1999-05-22 * Add struct name to all typedef's so that they can be debugged with …
124 typedef struct _zend_internal_function {
573b4602 »
1999-04-07 Zend Library
125 int type; /* MUST be the first element of this struct! */
126
127 unsigned char *arg_types; /* MUST be the second element of this struct */
7f35cfda »
1999-10-25 *** empty log message ***
128 char *function_name; /* MUST be the third element of this struct */
573b4602 »
1999-04-07 Zend Library
129
130 void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
131 } zend_internal_function;
132
133
1250c43a »
1999-05-22 * Add struct name to all typedef's so that they can be debugged with …
134 typedef union _zend_function {
573b4602 »
1999-04-07 Zend Library
135 int type; /* MUST be the first element of this struct! */
136 struct {
137 int type; /* never used */
138 unsigned char *arg_types;
7f35cfda »
1999-10-25 *** empty log message ***
139 char *function_name;
573b4602 »
1999-04-07 Zend Library
140 } common;
141
142 zend_op_array op_array;
143 zend_internal_function internal_function;
144 } zend_function;
145
146
9cb2cf13 »
1999-05-20 Optimize allocations into uninitialized_zval assignments
147 typedef struct _zend_function_state {
573b4602 »
1999-04-07 Zend Library
148 HashTable *function_symbol_table;
149 zend_function *function;
b5f5e9a6 »
1999-08-15 - Optimize the execute stack a bit.
150 void *reserved[ZEND_MAX_RESERVED_RESOURCES];
573b4602 »
1999-04-07 Zend Library
151 } zend_function_state;
152
153
1250c43a »
1999-05-22 * Add struct name to all typedef's so that they can be debugged with …
154 typedef struct _zend_switch_entry {
573b4602 »
1999-04-07 Zend Library
155 znode cond;
156 int default_case;
157 int control_var;
158 } zend_switch_entry;
159
160
1250c43a »
1999-05-22 * Add struct name to all typedef's so that they can be debugged with …
161 typedef struct _list_llist_element {
573b4602 »
1999-04-07 Zend Library
162 znode var;
163 zend_llist dimensions;
164 znode value;
165 } list_llist_element;
166
167
39f9487e »
1999-04-14 -Tiny patches
168 typedef struct _zend_file_handle {
573b4602 »
1999-04-07 Zend Library
169 int type;
170 char *filename;
5463dd5b »
1999-11-30 - Add use support (behaves like require, but will not use the same fi…
171 char *opened_path;
573b4602 »
1999-04-07 Zend Library
172 union {
173 int fd;
174 FILE *fp;
175 #ifdef __cplusplus
176 istream *is;
177 #endif
178 } handle;
9baad804 »
1999-12-04 - Break the zend->PHP dependency introduced by the .php extension for…
179 zend_bool free_filename;
573b4602 »
1999-04-07 Zend Library
180 } zend_file_handle;
181
182
183 #include "zend_globals.h"
184
185 #define IS_CONST (1<<0)
186 #define IS_TMP_VAR (1<<1)
187 #define IS_VAR (1<<2)
188 #define IS_UNUSED (1<<3) /* Unused variable */
189
190
191 #define EXT_TYPE_UNUSED (1<<0)
192
ad115d20 »
2000-01-29 Fix require()
193 BEGIN_EXTERN_C()
194
573b4602 »
1999-04-07 Zend Library
195 void init_compiler(CLS_D ELS_DC);
196 void shutdown_compiler(CLS_D);
197
39f9487e »
1999-04-14 -Tiny patches
198 extern ZEND_API zend_op_array *(*zend_compile_files)(int mark_as_ref CLS_DC, int file_count, ...);
573b4602 »
1999-04-07 Zend Library
199
ed06a70f »
1999-06-05 * Centralized shutdown
200 void zend_activate(CLS_D ELS_DC);
201 void zend_deactivate(CLS_D ELS_DC);
dc0e6632 »
2000-01-16 Allow module startup to be separate from the compiler/executor startup
202 void zend_activate_modules();
203
ed06a70f »
1999-06-05 * Centralized shutdown
204
573b4602 »
1999-04-07 Zend Library
205 int lex_scan(zval *zendlval CLS_DC);
206 void startup_scanner(CLS_D);
207 void shutdown_scanner(CLS_D);
208
07e08855 »
1999-08-02 Make set_compiled_filename() return a pointer to the allocated file name
209 ZEND_API char *zend_set_compiled_filename(char *new_compiled_filename);
573b4602 »
1999-04-07 Zend Library
210 ZEND_API void zend_restore_compiled_filename(char *original_compiled_filename);
93536507 »
1999-12-01 Fix warnings surfacing in maintainer-mode.
211 ZEND_API char *zend_get_compiled_filename(void);
573b4602 »
1999-04-07 Zend Library
212
1aa2c5c0 »
1999-04-23 Ok, call me crazy, because I probably am.
213 #ifdef ZTS
214 const char *zend_get_zendtext(CLS_D);
215 int zend_get_zendleng(CLS_D);
216 #endif
217
573b4602 »
1999-04-07 Zend Library
218
219 /* parser-driven code generators */
220 void do_binary_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
221 void do_unary_op(int op, znode *result, znode *op1 CLS_DC);
222 void do_binary_assign_op(int op, znode *result, znode *op1, znode *op2 CLS_DC);
223 void do_assign(znode *result, znode *variable, znode *value CLS_DC);
224 void do_assign_ref(znode *result, znode *lvar, znode *rvar CLS_DC);
225 void fetch_simple_variable(znode *result, znode *varname, int bp CLS_DC);
82c8a9e7 »
1999-09-20 - Indirect references had all of the fetches by mistakenly backpatched.
226 void fetch_simple_variable_ex(znode *result, znode *varname, int bp, int op CLS_DC);
573b4602 »
1999-04-07 Zend Library
227 void do_indirect_references(znode *result, znode *num_references, znode *variable CLS_DC);
228 void do_fetch_global_or_static_variable(znode *varname, znode *static_assignment, int fetch_type CLS_DC);
7a87fcbb »
1999-04-21 Thread safety patch. We're still not quite there but it compiles agai…
229 void do_fetch_globals(znode *varname CLS_DC);
573b4602 »
1999-04-07 Zend Library
230
231 void fetch_array_begin(znode *result, znode *varname, znode *first_dim CLS_DC);
232 void fetch_array_dim(znode *result, znode *parent, znode *dim CLS_DC);
7663e4f6 »
2000-01-29 - Add parser support for string offsets. This added three shift/reduce
233 void fetch_string_offset(znode *result, znode *parent, znode *offset CLS_DC);
573b4602 »
1999-04-07 Zend Library
234 void do_print(znode *result, znode *arg CLS_DC);
235 void do_echo(znode *arg CLS_DC);
88029643 »
1999-05-30 * fix some casts
236 typedef int (*unary_op_type)(zval *, zval *);
237 ZEND_API unary_op_type get_unary_op(int opcode);
573b4602 »
1999-04-07 Zend Library
238 ZEND_API void *get_binary_op(int opcode);
239
240 void do_while_cond(znode *expr, znode *close_bracket_token CLS_DC);
241 void do_while_end(znode *while_token, znode *close_bracket_token CLS_DC);
242 void do_do_while_begin(CLS_D);
400ee6ca »
1999-12-31 - Fix bug #3073. continue in do..while() loops should work now
243 void do_do_while_end(znode *do_token, znode *expr_open_bracket, znode *expr CLS_DC);
573b4602 »
1999-04-07 Zend Library
244
245
246 void do_if_cond(znode *cond, znode *closing_bracket_token CLS_DC);
247 void do_if_after_statement(znode *closing_bracket_token, unsigned char initialize CLS_DC);
248 void do_if_end(CLS_D);
249
250 void do_for_cond(znode *expr, znode *second_semicolon_token CLS_DC);
251 void do_for_before_statement(znode *cond_start, znode *second_semicolon_token CLS_DC);
252 void do_for_end(znode *second_semicolon_token CLS_DC);
253
254 void do_pre_incdec(znode *result, znode *op1, int op CLS_DC);
255 void do_post_incdec(znode *result, znode *op1, int op CLS_DC);
256
257 void do_begin_variable_parse(CLS_D);
06d04d15 »
1999-09-29 - Fix SEND_VAR problem after fetch'ing a variable and not knowing the…
258 void do_end_variable_parse(int type, int arg_offset CLS_DC);
573b4602 »
1999-04-07 Zend Library
259
1b6fae10 »
1999-07-24 Thoroughly fix the SWITCH problem. No RETURN handling yet.
260 void do_free(znode *op1 CLS_DC);
573b4602 »
1999-04-07 Zend Library
261
7a87fcbb »
1999-04-21 Thread safety patch. We're still not quite there but it compiles agai…
262 void do_init_string(znode *result CLS_DC);
573b4602 »
1999-04-07 Zend Library
263 void do_add_char(znode *result, znode *op1, znode *op2 CLS_DC);
264 void do_add_string(znode *result, znode *op1, znode *op2 CLS_DC);
265 void do_add_variable(znode *result, znode *op1, znode *op2 CLS_DC);
266
ced9cee1 »
1999-12-15 - Implement return by reference:
267 void do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference CLS_DC);
573b4602 »
1999-04-07 Zend Library
268 void do_end_function_declaration(znode *function_token CLS_DC);
269 void do_receive_arg(int op, znode *var, znode *offset, znode *initialization, unsigned char pass_type CLS_DC);
739132e5 »
1999-07-29 - Fixed a leak when doing inheritance. The parent class name wasn't b…
270 int do_begin_function_call(znode *function_name CLS_DC);
573b4602 »
1999-04-07 Zend Library
271 void do_begin_dynamic_function_call(znode *function_name CLS_DC);
272 void do_begin_class_member_function_call(znode *class_name, znode *function_name CLS_DC);
739132e5 »
1999-07-29 - Fixed a leak when doing inheritance. The parent class name wasn't b…
273 void do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall CLS_DC);
7fe808ea »
1999-12-17 - By mistake commited this to the branch. It fixes a bug we introduce…
274 void do_return(znode *expr, int do_end_vparse CLS_DC);
ef5b7e21 »
1999-08-14 Generate better warnings for class/function redefinitions
275 ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable *function_table, HashTable *class_table, int compile_time);
b0bfa458 »
1999-05-15 * Fix all hash checks that checked Bucket.arKey for NULL, when it was…
276 void do_early_binding(CLS_D);
573b4602 »
1999-04-07 Zend Library
277
278 void do_pass_param(znode *param, int op, int offset CLS_DC);
279
280
281 void do_boolean_or_begin(znode *expr1, znode *op_token CLS_DC);
282 void do_boolean_or_end(znode *result, znode *expr1, znode *expr2, znode *op_token CLS_DC);
283 void do_boolean_and_begin(znode *expr1, znode *op_token CLS_DC);
284 void do_boolean_and_end(znode *result, znode *expr1, znode *expr2, znode *op_token CLS_DC);
285
286 void do_brk_cont(int op, znode *expr CLS_DC);
287
288 void do_switch_cond(znode *cond CLS_DC);
289 void do_switch_end(znode *case_list CLS_DC);
290 void do_case_before_statement(znode *case_list, znode *case_token, znode *case_expr CLS_DC);
291 void do_case_after_statement(znode *result, znode *case_token CLS_DC);
292 void do_default_before_statement(znode *case_list, znode *default_token CLS_DC);
293
294 void do_begin_class_declaration(znode *class_name, znode *parent_class_name CLS_DC);
295 void do_end_class_declaration(CLS_D);
296 void do_declare_property(znode *var_name, znode *value CLS_DC);
297
298 void do_fetch_property(znode *result, znode *object, znode *property CLS_DC);
299
300
301 void do_push_object(znode *object CLS_DC);
302 void do_pop_object(znode *object CLS_DC);
303
304
8f51f72d »
1999-07-26 - Fix the new operator incompatibility.
305 void do_begin_new_object(znode *new_token, znode *class_name CLS_DC);
306 void do_end_new_object(znode *result, znode *class_name, znode *new_token, znode *argument_list CLS_DC);
573b4602 »
1999-04-07 Zend Library
307
308 void do_fetch_constant(znode *result, znode *constant_name, int mode CLS_DC);
309
310 void do_shell_exec(znode *result, znode *cmd CLS_DC);
311
03d354dc »
1999-10-01 - For Andrei. Implement references in array() initializations
312 void do_init_array(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
313 void do_add_array_element(znode *result, znode *expr, znode *offset, int is_ref CLS_DC);
7ed49234 »
1999-06-09 - Fix the static array() initializing
314 void do_add_static_array_element(znode *result, znode *offset, znode *expr);
fdcaba40 »
1999-12-02 Solve a couple of compile issues
315 void do_list_init(CLS_D);
573b4602 »
1999-04-07 Zend Library
316 void do_list_end(znode *result, znode *expr CLS_DC);
317 void do_add_list_element(znode *element CLS_DC);
318 void do_new_list_begin(CLS_D);
319 void do_new_list_end(CLS_D);
320
321 void do_cast(znode *result, znode *expr, int type CLS_DC);
322 void do_include_or_eval(int type, znode *result, znode *op1 CLS_DC);
67b4b3a6 »
1999-12-23 - require() of a dynamic expression now has the standard require() se…
323 void do_require(znode *filename CLS_DC);
573b4602 »
1999-04-07 Zend Library
324
325 void do_unset(znode *variable CLS_DC);
326 void do_isset_or_isempty(int type, znode *result, znode *variable CLS_DC);
327
328 void do_foreach_begin(znode *foreach_token, znode *array, znode *open_brackets_token, znode *as_token CLS_DC);
329 void do_foreach_cont(znode *value, znode *key, znode *as_token CLS_DC);
330 void do_foreach_end(znode *foreach_token, znode *open_brackets_token CLS_DC);
331
fafbf6d8 »
2000-01-24 - Implement declare() with declarables framework
332 void do_declare_begin(CLS_D);
333 void do_declare_stmt(znode *var, znode *val CLS_DC);
334 void do_declare_end(CLS_D);
335
573b4602 »
1999-04-07 Zend Library
336 void do_end_heredoc(CLS_D);
337
338 void do_exit(znode *result, znode *message CLS_DC);
339
340 void do_begin_silence(znode *strudel_token CLS_DC);
341 void do_end_silence(znode *strudel_token CLS_DC);
342
343 void do_begin_qm_op(znode *cond, znode *qm_token CLS_DC);
344 void do_qm_true(znode *true_value, znode *qm_token, znode *colon_token CLS_DC);
345 void do_qm_false(znode *result, znode *false_value, znode *qm_token, znode *colon_token CLS_DC);
346
347 void do_extended_info(CLS_D);
348 void do_extended_fcall_begin(CLS_D);
349 void do_extended_fcall_end(CLS_D);
350
fafbf6d8 »
2000-01-24 - Implement declare() with declarables framework
351 void do_ticks(CLS_D);
352
7c4a0838 »
1999-04-26 Various thread safety fixes and DLL updates
353 #define INITIAL_OP_ARRAY_SIZE 64
354
573b4602 »
1999-04-07 Zend Library
355
356 /* helper functions in zend-scanner.l */
5463dd5b »
1999-11-30 - Add use support (behaves like require, but will not use the same fi…
357 ZEND_API int require_file(zend_file_handle *file_handle, zend_bool unique CLS_DC);
9baad804 »
1999-12-04 - Break the zend->PHP dependency introduced by the .php extension for…
358 ZEND_API int require_filename(char *filename CLS_DC);
359 ZEND_API int use_filename(char *filename, uint filename_length CLS_DC);
573b4602 »
1999-04-07 Zend Library
360 ZEND_API zend_op_array *compile_files(int mark_as_ref CLS_DC, int file_count, ...);
7a87fcbb »
1999-04-21 Thread safety patch. We're still not quite there but it compiles agai…
361 ZEND_API zend_op_array *v_compile_files(int mark_as_ref CLS_DC, int file_count, va_list files);
573b4602 »
1999-04-07 Zend Library
362 ZEND_API zend_op_array *compile_string(zval *source_string CLS_DC);
67b4b3a6 »
1999-12-23 - require() of a dynamic expression now has the standard require() se…
363 ZEND_API zend_op_array *compile_filename(int mode, zval *filename CLS_DC ELS_DC);
1877b077 »
1999-10-05 This causes link problems with anything higher than -O0.
364 ZEND_API int open_file_for_scanning(zend_file_handle *file_handle CLS_DC);
573b4602 »
1999-04-07 Zend Library
365 ZEND_API void init_op_array(zend_op_array *op_array, int initial_ops_size);
366 ZEND_API void destroy_op_array(zend_op_array *op_array);
87ba08d1 »
1999-05-22 Avoid leaking fd's in case of failures
367 ZEND_API void zend_close_file_handle(zend_file_handle *file_handle CLS_DC);
58153dfe »
1999-11-26 - Improve the file handle closing code
368 ZEND_API void zend_open_file_dtor(zend_file_handle *fh);
573b4602 »
1999-04-07 Zend Library
369
62114c18 »
2000-01-17 Destructors no longer return ints, the low level problem it was inten…
370 ZEND_API void destroy_zend_function(zend_function *function);
371 ZEND_API void destroy_zend_class(zend_class_entry *ce);
7c4a0838 »
1999-04-26 Various thread safety fixes and DLL updates
372 void zend_class_add_ref(zend_class_entry *ce);
373
62114c18 »
2000-01-17 Destructors no longer return ints, the low level problem it was inten…
374 #define ZEND_FUNCTION_DTOR (void (*)(void *)) destroy_zend_function
375 #define ZEND_CLASS_DTOR (void (*)(void *)) destroy_zend_class
81d901b1 »
1999-07-09 Step 1 in nuking the garbage collector:
376
573b4602 »
1999-04-07 Zend Library
377 zend_op *get_next_op(zend_op_array *op_array CLS_DC);
babad269 »
1999-09-20 - First step in fixing locking problem. Array fetches are now always …
378 void init_op(zend_op *op CLS_DC);
573b4602 »
1999-04-07 Zend Library
379 int get_next_op_number(zend_op_array *op_array);
380 int print_class(zend_class_entry *class_entry);
381 void print_op_array(zend_op_array *op_array, int optimizations);
382 int pass_two(zend_op_array *op_array);
383 void pass_include_eval(zend_op_array *op_array);
384 zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
385
386 int zendlex(znode *zendlval CLS_DC);
387
388 #define ZEND_NOP 0
389
390 #define ZEND_ADD 1
391 #define ZEND_SUB 2
392 #define ZEND_MUL 3
393 #define ZEND_DIV 4
394 #define ZEND_MOD 5
395 #define ZEND_SL 6
396 #define ZEND_SR 7
397 #define ZEND_CONCAT 8
398 #define ZEND_BW_OR 9
399 #define ZEND_BW_AND 10
400 #define ZEND_BW_XOR 11
401 #define ZEND_BW_NOT 12
402 #define ZEND_BOOL_NOT 13
403 #define ZEND_BOOL_XOR 14
98f02543 »
1999-10-19 - Move IS_IDENTICAL next to IS_EQUAL
404 #define ZEND_IS_IDENTICAL 15
405 #define ZEND_IS_EQUAL 16
406 #define ZEND_IS_NOT_EQUAL 17
407 #define ZEND_IS_SMALLER 18
408 #define ZEND_IS_SMALLER_OR_EQUAL 19
409 #define ZEND_CAST 20
410 #define ZEND_QM_ASSIGN 21
411
412 #define ZEND_ASSIGN_ADD 22
413 #define ZEND_ASSIGN_SUB 23
414 #define ZEND_ASSIGN_MUL 24
415 #define ZEND_ASSIGN_DIV 25
416 #define ZEND_ASSIGN_MOD 26
417 #define ZEND_ASSIGN_SL 27
418 #define ZEND_ASSIGN_SR 28
419 #define ZEND_ASSIGN_CONCAT 29
420 #define ZEND_ASSIGN_BW_OR 30
421 #define ZEND_ASSIGN_BW_AND 31
422 #define ZEND_ASSIGN_BW_XOR 32
573b4602 »
1999-04-07 Zend Library
423
98f02543 »
1999-10-19 - Move IS_IDENTICAL next to IS_EQUAL
424 #define ZEND_PRE_INC 33
425 #define ZEND_PRE_DEC 34
426 #define ZEND_POST_INC 35
427 #define ZEND_POST_DEC 36
573b4602 »
1999-04-07 Zend Library
428
98f02543 »
1999-10-19 - Move IS_IDENTICAL next to IS_EQUAL
429 #define ZEND_ASSIGN 37
430 #define ZEND_ASSIGN_REF 38
431
432 #define ZEND_ECHO 39
433 #define ZEND_PRINT 40
434
435 #define ZEND_JMP 41
436 #define ZEND_JMPZ 42
437 #define ZEND_JMPNZ 43
438 #define ZEND_JMPZNZ 44
439 #define ZEND_JMPZ_EX 45
440 #define ZEND_JMPNZ_EX 46
441 #define ZEND_CASE 47
442 #define ZEND_SWITCH_FREE 48
443 #define ZEND_BRK 49
444 #define ZEND_CONT 50
445 #define ZEND_BOOL 51
446
447 #define ZEND_INIT_STRING 52
448 #define ZEND_ADD_CHAR 53
449 #define ZEND_ADD_STRING 54
450 #define ZEND_ADD_VAR 55
451
452 #define ZEND_BEGIN_SILENCE 56
453 #define ZEND_END_SILENCE 57
454
455 #define ZEND_INIT_FCALL_BY_NAME 58
456 #define ZEND_DO_FCALL 59
457 #define ZEND_DO_FCALL_BY_NAME 60
458 #define ZEND_RETURN 61
459
460 #define ZEND_RECV 62
461 #define ZEND_RECV_INIT 63
573b4602 »
1999-04-07 Zend Library
462
98f02543 »
1999-10-19 - Move IS_IDENTICAL next to IS_EQUAL
463 #define ZEND_SEND_VAL 64
464 #define ZEND_SEND_VAR 65
465 #define ZEND_SEND_REF 66
573b4602 »
1999-04-07 Zend Library
466
98f02543 »
1999-10-19 - Move IS_IDENTICAL next to IS_EQUAL
467 #define ZEND_NEW 67
468 #define ZEND_JMP_NO_CTOR 68
469 #define ZEND_FREE 69
573b4602 »
1999-04-07 Zend Library
470
98f02543 »
1999-10-19 - Move IS_IDENTICAL next to IS_EQUAL
471 #define ZEND_INIT_ARRAY 70
472 #define ZEND_ADD_ARRAY_ELEMENT 71
573b4602 »
1999-04-07 Zend Library
473
98f02543 »
1999-10-19 - Move IS_IDENTICAL next to IS_EQUAL
474 #define ZEND_INCLUDE_OR_EVAL 72
573b4602 »
1999-04-07 Zend Library
475
98f02543 »
1999-10-19 - Move IS_IDENTICAL next to IS_EQUAL
476 #define ZEND_UNSET_VAR 73
477 #define ZEND_UNSET_DIM_OBJ 74
478 #define ZEND_ISSET_ISEMPTY 75
573b4602 »
1999-04-07 Zend Library
479
98f02543 »
1999-10-19 - Move IS_IDENTICAL next to IS_EQUAL
480 #define ZEND_FE_RESET 76
481 #define ZEND_FE_FETCH 77
573b4602 »
1999-04-07 Zend Library
482
98f02543 »
1999-10-19 - Move IS_IDENTICAL next to IS_EQUAL
483 #define ZEND_EXIT 78
573b4602 »
1999-04-07 Zend Library
484
485
4ebf7b85 »
1999-11-14 - Fix comment as to Joey's findings
486 /* the following 15 opcodes are 5 groups of 3 opcodes each, and must
573b4602 »
1999-04-07 Zend Library
487 * remain in that order!
488 */
98f02543 »
1999-10-19 - Move IS_IDENTICAL next to IS_EQUAL
489 #define ZEND_FETCH_R 79
490 #define ZEND_FETCH_DIM_R 80
491 #define ZEND_FETCH_OBJ_R 81
492 #define ZEND_FETCH_W 82
493 #define ZEND_FETCH_DIM_W 83
494 #define ZEND_FETCH_OBJ_W 84
495 #define ZEND_FETCH_RW 85
496 #define ZEND_FETCH_DIM_RW 86
497 #define ZEND_FETCH_OBJ_RW 87
498 #define ZEND_FETCH_IS 88
499 #define ZEND_FETCH_DIM_IS 89
500 #define ZEND_FETCH_OBJ_IS 90
501 #define ZEND_FETCH_FUNC_ARG 91
502 #define ZEND_FETCH_DIM_FUNC_ARG 92
503 #define ZEND_FETCH_OBJ_FUNC_ARG 93
504
505 #define ZEND_FETCH_DIM_TMP_VAR 94
506 #define ZEND_FETCH_CONSTANT 95
507
508 #define ZEND_DECLARE_FUNCTION_OR_CLASS 96
509
510 #define ZEND_EXT_STMT 97
511 #define ZEND_EXT_FCALL_BEGIN 98
512 #define ZEND_EXT_FCALL_END 99
513 #define ZEND_EXT_NOP 100
514
fafbf6d8 »
2000-01-24 - Implement declare() with declarables framework
515 #define ZEND_TICKS 101
516
573b4602 »
1999-04-07 Zend Library
517 /* end of block */
518
519
520
521
522 /* global/local fetches */
523 #define ZEND_FETCH_GLOBAL 0
524 #define ZEND_FETCH_LOCAL 1
525 #define ZEND_FETCH_STATIC 2
526
527 /* var status for backpatching */
06d04d15 »
1999-09-29 - Fix SEND_VAR problem after fetch'ing a variable and not knowing the…
528 #define BP_VAR_R 0
529 #define BP_VAR_W 1
530 #define BP_VAR_RW 2
531 #define BP_VAR_IS 3
532 #define BP_VAR_NA 4 /* if not applicable */
533 #define BP_VAR_FUNC_ARG 5
573b4602 »
1999-04-07 Zend Library
534
535
536 #define ZEND_INTERNAL_FUNCTION 1
537 #define ZEND_USER_FUNCTION 2
538 #define ZEND_OVERLOADED_FUNCTION 3
2493f680 »
1999-04-27 * Fix debugger+interactive mode bug
539 #define ZEND_EVAL_CODE 4
573b4602 »
1999-04-07 Zend Library
540
541 #define ZEND_INTERNAL_CLASS 1
542 #define ZEND_USER_CLASS 2
543
544 #define ZEND_EVAL (1<<0)
545 #define ZEND_INCLUDE (1<<1)
5463dd5b »
1999-11-30 - Add use support (behaves like require, but will not use the same fi…
546 #define ZEND_IMPORT (1<<2)
67b4b3a6 »
1999-12-23 - require() of a dynamic expression now has the standard require() se…
547 #define ZEND_REQUIRE (1<<3)
573b4602 »
1999-04-07 Zend Library
548
549 #define ZEND_ISSET (1<<0)
550 #define ZEND_ISEMPTY (1<<1)
551
552 #define ZEND_CT (1<<0)
553 #define ZEND_RT (1<<1)
554
555
58153dfe »
1999-11-26 - Improve the file handle closing code
556 #define ZEND_HANDLE_FILENAME 0
557 #define ZEND_HANDLE_FD 1
558 #define ZEND_HANDLE_FP 2
559 #define ZEND_HANDLE_STDIOSTREAM 3
560 #define ZEND_HANDLE_FSTREAM 4
573b4602 »
1999-04-07 Zend Library
561
d894cf44 »
1999-07-08 Support definition of classes that are derived from classes that are …
562 #define ZEND_DECLARE_CLASS 1
563 #define ZEND_DECLARE_FUNCTION 2
564 #define ZEND_DECLARE_INHERITED_CLASS 3
b0bfa458 »
1999-05-15 * Fix all hash checks that checked Bucket.arKey for NULL, when it was…
565
1250c43a »
1999-05-22 * Add struct name to all typedef's so that they can be debugged with …
566 #define ZEND_FETCH_STANDARD 0
cccd2445 »
1999-07-10 Get rid of AiCount completely
567 #define ZEND_FETCH_ADD_LOCK 1
1250c43a »
1999-05-22 * Add struct name to all typedef's so that they can be debugged with …
568
741b8161 »
1999-05-28 * Support getThis() for internal functions.
569 #define ZEND_MEMBER_FUNC_CALL 1<<0
570 #define ZEND_CTOR_CALL 1<<1
571
6ec1acbe »
1999-07-09 Phase 3:
572
59d5462a »
1999-09-28 - Stop using the locking mechanism and start using refcount.
573 #define AI_USE_PTR(ai) \
574 if ((ai).ptr_ptr) { \
575 (ai).ptr = *((ai).ptr_ptr); \
576 (ai).ptr_ptr = &((ai).ptr); \
577 } else { \
578 (ai).ptr = NULL; \
579 }
580
86357a9c »
1999-10-01 - Move is_ref back to being an unsigned char and not a bit field.
581 #define PZVAL_IS_REF(z) ((z)->is_ref)
2a6da781 »
1999-07-09 Step 4:
582
59d5462a »
1999-09-28 - Stop using the locking mechanism and start using refcount.
583 #define PZVAL_LOCK(z) ((z)->refcount++)
ced9cee1 »
1999-12-15 - Implement return by reference:
584 #define PZVAL_UNLOCK(z) { ((z)->refcount--); \
585 if (!(z)->refcount && !EG(suspend_garbage)) { \
586 EG(garbage)[EG(garbage_ptr)++] = (z); \
587 if (EG(garbage_ptr) == 4) { \
588 zval_dtor(EG(garbage)[0]); \
62b2087a »
1999-12-24 - Create two new macro's. ALLOC_ZVAL() and FREE_ZVAL(z) and make Zend…
589 FREE_ZVAL(EG(garbage)[0]); \
ced9cee1 »
1999-12-15 - Implement return by reference:
590 zval_dtor(EG(garbage)[1]); \
62b2087a »
1999-12-24 - Create two new macro's. ALLOC_ZVAL() and FREE_ZVAL(z) and make Zend…
591 FREE_ZVAL(EG(garbage)[1]); \
ced9cee1 »
1999-12-15 - Implement return by reference:
592 EG(garbage)[0] = EG(garbage)[2]; \
593 EG(garbage)[1] = EG(garbage)[3]; \
594 EG(garbage_ptr) -= 2; \
595 } \
596 } \
1c0f1364 »
1999-10-03 - Hooray. This might actually work. (I hope)
597 }
598
ced9cee1 »
1999-12-15 - Implement return by reference:
599 #define SUSPEND_GARBAGE() (EG(suspend_garbage)=1)
600 #define RESUME_GARBAGE() (EG(suspend_garbage)=0)
601
59d5462a »
1999-09-28 - Stop using the locking mechanism and start using refcount.
602 #define SELECTIVE_PZVAL_LOCK(pzv, pzn) if (!((pzn)->u.EA.type & EXT_TYPE_UNUSED)) { PZVAL_LOCK(pzv); }
6ec1acbe »
1999-07-09 Phase 3:
603
6d988ec6 »
1999-11-03 - Add support for BYREF_FORCE_REST
604
605 /* Lost In Stupid Parentheses */
606 #define ARG_SHOULD_BE_SENT_BY_REF(offset, conduct_check, arg_types) \
607 ( \
608 conduct_check \
609 && arg_types \
610 && \
611 ( \
612 ( \
613 offset<=arg_types[0] \
614 && arg_types[offset]==BYREF_FORCE \
615 ) \
616 || ( \
617 offset>=arg_types[0] \
618 && arg_types[arg_types[0]]==BYREF_FORCE_REST \
619 ) \
620 ) \
621 )
622
ced9cee1 »
1999-12-15 - Implement return by reference:
623 #define ZEND_RETURN_VAL 0
624 #define ZEND_RETURN_REF 1
625
ad115d20 »
2000-01-29 Fix require()
626 END_EXTERN_C()
627
573b4602 »
1999-04-07 Zend Library
628 #endif /* _COMPILE_H */
Something went wrong with that request. Please try again.