Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 384 lines (318 sloc) 11.568 kB
573b460 @andigutmans Zend Library
andigutmans authored
1 /*
2 +----------------------------------------------------------------------+
3 | Zend Engine |
4 +----------------------------------------------------------------------+
08659c2 MFH: Bump copyright year, 3 of 3.
Sebastian Bergmann authored
5 | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
573b460 @andigutmans Zend Library
andigutmans authored
6 +----------------------------------------------------------------------+
d863d52 Update headers.
Sebastian Bergmann authored
7 | This source file is subject to version 2.00 of the Zend license, |
b5b1117 @zsuraski License update
zsuraski authored
8 | that is bundled with this package in the file LICENSE, and is |
f68c7ff updating license information in the headers.
James Cox authored
9 | available through the world-wide-web at the following url: |
d863d52 Update headers.
Sebastian Bergmann authored
10 | http://www.zend.com/license/2_00.txt. |
b5b1117 @zsuraski License update
zsuraski authored
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. |
573b460 @andigutmans Zend Library
andigutmans authored
14 +----------------------------------------------------------------------+
15 | Authors: Andi Gutmans <andi@zend.com> |
16 | Zeev Suraski <zeev@zend.com> |
17 +----------------------------------------------------------------------+
18 */
19
333406b - Added some missing CVS $Id$ tags, headers and footers.
foobar authored
20 /* $Id$ */
b5b1117 @zsuraski License update
zsuraski authored
21
a617217 Replace macros which begin with an underscore through an appropiately
Sascha Schumann authored
22 #ifndef ZEND_EXECUTE_H
23 #define ZEND_EXECUTE_H
573b460 @andigutmans Zend Library
andigutmans authored
24
25 #include "zend_compile.h"
26 #include "zend_hash.h"
51b9245 @andigutmans - More object junk
andigutmans authored
27 #include "zend_operators.h"
637a404 - MFH as discussed
Marcus Boerger authored
28 #include "zend_variables.h"
573b460 @andigutmans Zend Library
andigutmans authored
29
1250c43 @zsuraski * Add struct name to all typedef's so that they can be debugged with …
zsuraski authored
30 typedef union _temp_variable {
573b460 @andigutmans Zend Library
andigutmans authored
31 zval tmp_var;
4fff038 @andigutmans - Changed Ts{}.var to Ts{}.var.ptr_ptr.
andigutmans authored
32 struct {
33 zval **ptr_ptr;
b56fd46 @andigutmans - First part of the patch which makes reads use ptr and not ptr_ptr.
andigutmans authored
34 zval *ptr;
3a42bab @zsuraski Fix behavior of return-by-reference functions. Remove erroneous warn…
zsuraski authored
35 zend_bool fcall_returned_reference;
4fff038 @andigutmans - Changed Ts{}.var to Ts{}.var.ptr_ptr.
andigutmans authored
36 } var;
21f0964 @andigutmans - Hopefully fix bug #26696.
andigutmans authored
37 struct {
d9252aa @andigutmans - Fix for bug #29707
andigutmans authored
38 zval **ptr_ptr;
39 zval *ptr;
40 zend_bool fcall_returned_reference;
21f0964 @andigutmans - Hopefully fix bug #26696.
andigutmans authored
41 zval *str;
42 zend_uint offset;
43 } str_offset;
e470e22 - Fixed bug #35106 (nested foreach fails when array variable has a re…
Dmitry Stogov authored
44 struct {
45 zval **ptr_ptr;
46 zval *ptr;
47 zend_bool fcall_returned_reference;
48 HashPointer fe_pos;
49 } fe;
e94e3e1 @zsuraski Some cleanup
zsuraski authored
50 zend_class_entry *class_entry;
573b460 @andigutmans Zend Library
andigutmans authored
51 } temp_variable;
52
53
0450ab9 @zsuraski MFZE1 (Expose more C++ APIs)
zsuraski authored
54 BEGIN_EXTERN_C()
2c254ba @zsuraski Get rid of ELS_*(), and use TSRMLS_*() instead.
zsuraski authored
55 ZEND_API extern void (*zend_execute)(zend_op_array *op_array TSRMLS_DC);
2c44fab - Ported the zend_execute_internal hook to ZendEngine2.
Derick Rethans authored
56 ZEND_API extern void (*zend_execute_internal)(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
573b460 @andigutmans Zend Library
andigutmans authored
57
b4f3b9d @zsuraski Redesigned thread safety mechanism - nua nua
zsuraski authored
58 void init_executor(TSRMLS_D);
2c254ba @zsuraski Get rid of ELS_*(), and use TSRMLS_*() instead.
zsuraski authored
59 void shutdown_executor(TSRMLS_D);
0cd2da0 - Execute destructors earlier (Florian Schaper, fschaper at intux org)
Marcus Boerger authored
60 void shutdown_destructors(TSRMLS_D);
2c254ba @zsuraski Get rid of ELS_*(), and use TSRMLS_*() instead.
zsuraski authored
61 ZEND_API void execute(zend_op_array *op_array TSRMLS_DC);
2c44fab - Ported the zend_execute_internal hook to ZendEngine2.
Derick Rethans authored
62 ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
573b460 @andigutmans Zend Library
andigutmans authored
63 ZEND_API int zend_is_true(zval *op);
3df0288 Improove debug capabilities
Marcus Boerger authored
64 #define safe_free_zval_ptr(p) safe_free_zval_ptr_rel(p ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
65 static inline void safe_free_zval_ptr_rel(zval *p ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
66 {
2c254ba @zsuraski Get rid of ELS_*(), and use TSRMLS_*() instead.
zsuraski authored
67 TSRMLS_FETCH();
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
68
69 if (p!=EG(uninitialized_zval_ptr)) {
3df0288 Improove debug capabilities
Marcus Boerger authored
70 FREE_ZVAL_REL(p);
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
71 }
72 }
6c810b0 Improved memory usage by movig constants to read only memory. (Dmitry…
Dmitry Stogov authored
73 ZEND_API int zend_lookup_class(const char *name, int name_length, zend_class_entry ***ce TSRMLS_DC);
74 ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_autoload, zend_class_entry ***ce TSRMLS_DC);
b4f3b9d @zsuraski Redesigned thread safety mechanism - nua nua
zsuraski authored
75 ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSRMLS_DC);
d553002 MFH: Added zend_eval_stringl and made create_function(), etc. binary-…
Matt Wilmas authored
76 ZEND_API int zend_eval_stringl(char *str, int str_len, zval *retval_ptr, char *string_name TSRMLS_DC);
d3473d1 - Provide a unified way to display uncaught exceptions, which shows
Marcus Boerger authored
77 ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC);
d553002 MFH: Added zend_eval_stringl and made create_function(), etc. binary-…
Matt Wilmas authored
78 ZEND_API int zend_eval_stringl_ex(char *str, int str_len, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC);
6608f07 @smalyshev Mega-commit: Enter the new object model
smalyshev authored
79
99771d9 Remove --enable-c9x-inline option. We now use a syntax which is compa…
Sascha Schumann authored
80 static inline int i_zend_is_true(zval *op)
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
81 {
82 int result;
83
637a404 - MFH as discussed
Marcus Boerger authored
84 switch (Z_TYPE_P(op)) {
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
85 case IS_NULL:
86 result = 0;
87 break;
88 case IS_LONG:
89 case IS_BOOL:
90 case IS_RESOURCE:
637a404 - MFH as discussed
Marcus Boerger authored
91 result = (Z_LVAL_P(op)?1:0);
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
92 break;
93 case IS_DOUBLE:
637a404 - MFH as discussed
Marcus Boerger authored
94 result = (Z_DVAL_P(op) ? 1 : 0);
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
95 break;
96 case IS_STRING:
637a404 - MFH as discussed
Marcus Boerger authored
97 if (Z_STRLEN_P(op) == 0
98 || (Z_STRLEN_P(op)==1 && Z_STRVAL_P(op)[0]=='0')) {
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
99 result = 0;
100 } else {
101 result = 1;
102 }
103 break;
104 case IS_ARRAY:
637a404 - MFH as discussed
Marcus Boerger authored
105 result = (zend_hash_num_elements(Z_ARRVAL_P(op))?1:0);
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
106 break;
107 case IS_OBJECT:
97e7ce7 @smalyshev fix the fix
smalyshev authored
108 if(IS_ZEND_STD_OBJECT(*op)) {
f9c6520 @smalyshev Fix object true value: if we are in compat mode and it's Zend object -
smalyshev authored
109 TSRMLS_FETCH();
9d1f2f3 Fixed bug #34199 (if($obj)/if(!$obj) inconsistency)
Dmitry Stogov authored
110
111 if (Z_OBJ_HT_P(op)->cast_object) {
112 zval tmp;
637a404 - MFH as discussed
Marcus Boerger authored
113 if (Z_OBJ_HT_P(op)->cast_object(op, &tmp, IS_BOOL TSRMLS_CC) == SUCCESS) {
9d1f2f3 Fixed bug #34199 (if($obj)/if(!$obj) inconsistency)
Dmitry Stogov authored
114 result = Z_LVAL(tmp);
115 break;
116 }
117 } else if (Z_OBJ_HT_P(op)->get) {
118 zval *tmp = Z_OBJ_HT_P(op)->get(op TSRMLS_CC);
119 if(Z_TYPE_P(tmp) != IS_OBJECT) {
120 /* for safety - avoid loop */
121 convert_to_boolean(tmp);
122 result = Z_LVAL_P(tmp);
123 zval_ptr_dtor(&tmp);
124 break;
125 }
126 }
f9c6520 @smalyshev Fix object true value: if we are in compat mode and it's Zend object -
smalyshev authored
127 }
2b10c53 @felipensp MFH: Dropped zend.ze1_compatibility_mode
felipensp authored
128 result = 1;
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
129 break;
130 default:
131 result = 0;
132 break;
133 }
134 return result;
135 }
136
d76cf1d @zsuraski More TSRMLS_FETCH work
zsuraski authored
137 ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC);
dcf2490 @johannes - MFH: Fix #38465 (ReflectionParameter fails if default value is an a…
johannes authored
138 ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *scope TSRMLS_DC);
573b460 @andigutmans Zend Library
andigutmans authored
139
39a7f4c @zsuraski This patch is a go. Not fully optimized yet, but working properly.
zsuraski authored
140 /* dedicated Zend executor functions - do not use! */
e8b485d Selected better initial VM stack size
Dmitry Stogov authored
141 #define ZEND_VM_STACK_PAGE_SIZE ((64 * 1024) - 64)
0b68251 Changed EG(argument_stack) implementation.
Dmitry Stogov authored
142
143 struct _zend_vm_stack {
144 void **top;
145 void **end;
146 zend_vm_stack prev;
147 void *elements[1];
148 };
149
150 #define ZEND_VM_STACK_GROW_IF_NEEDED(count) \
151 do { \
c33db5c Fixed warning
Dmitry Stogov authored
152 if (UNEXPECTED((count) > \
0b68251 Changed EG(argument_stack) implementation.
Dmitry Stogov authored
153 EG(argument_stack)->end - EG(argument_stack)->top)) { \
c33db5c Fixed warning
Dmitry Stogov authored
154 zend_vm_stack_extend((count) TSRMLS_CC); \
0b68251 Changed EG(argument_stack) implementation.
Dmitry Stogov authored
155 } \
156 } while (0)
157
158 static inline zend_vm_stack zend_vm_stack_new_page(int count) {
2cd551f @smalyshev fix type
smalyshev authored
159 zend_vm_stack page = (zend_vm_stack)emalloc(sizeof(*page)+sizeof(page->elements[0])*(count-1));
0b68251 Changed EG(argument_stack) implementation.
Dmitry Stogov authored
160
161 page->top = page->elements;
162 page->end = page->elements + count;
163 page->prev = NULL;
164 return page;
165 }
166
167 static inline void zend_vm_stack_init(TSRMLS_D)
168 {
169 EG(argument_stack) = zend_vm_stack_new_page(ZEND_VM_STACK_PAGE_SIZE);
170 }
171
172 static inline void zend_vm_stack_destroy(TSRMLS_D)
173 {
174 zend_vm_stack stack = EG(argument_stack);
175
176 while (stack != NULL) {
177 zend_vm_stack p = stack->prev;
178 efree(stack);
179 stack = p;
180 }
181 }
182
183 static inline void zend_vm_stack_extend(int count TSRMLS_DC)
184 {
185 zend_vm_stack p = zend_vm_stack_new_page(count >= ZEND_VM_STACK_PAGE_SIZE ? count : ZEND_VM_STACK_PAGE_SIZE);
186 p->prev = EG(argument_stack);
187 EG(argument_stack) = p;
188 }
189
190 static inline void **zend_vm_stack_top(TSRMLS_D)
191 {
192 return EG(argument_stack)->top;
193 }
194
195 static inline void zend_vm_stack_push(void *ptr TSRMLS_DC)
196 {
197 ZEND_VM_STACK_GROW_IF_NEEDED(1);
198 *(EG(argument_stack)->top++) = ptr;
199 }
200
201 static inline void zend_vm_stack_push_nocheck(void *ptr TSRMLS_DC)
202 {
203 *(EG(argument_stack)->top++) = ptr;
204 }
205
206 static inline void *zend_vm_stack_pop(TSRMLS_D)
207 {
208 void *el = *(--EG(argument_stack)->top);
209
210 if (UNEXPECTED(EG(argument_stack)->top == EG(argument_stack)->elements)) {
211 zend_vm_stack p = EG(argument_stack);
212 EG(argument_stack) = p->prev;
213 efree(p);
214 }
215 return el;
216 }
217
218 static inline void *zend_vm_stack_alloc(size_t size TSRMLS_DC)
219 {
220 void *ret;
221
222 size = (size + (sizeof(void*) - 1)) / sizeof(void*);
223
c33db5c Fixed warning
Dmitry Stogov authored
224 ZEND_VM_STACK_GROW_IF_NEEDED((int)size);
e0ca3b2 Fixed types
Dmitry Stogov authored
225 ret = (void*)EG(argument_stack)->top;
0b68251 Changed EG(argument_stack) implementation.
Dmitry Stogov authored
226 EG(argument_stack)->top += size;
227 return ret;
228 }
229
230 static inline void zend_vm_stack_free(void *ptr TSRMLS_DC)
231 {
e0ca3b2 Fixed types
Dmitry Stogov authored
232 if (UNEXPECTED(EG(argument_stack)->elements == (void**)ptr)) {
0b68251 Changed EG(argument_stack) implementation.
Dmitry Stogov authored
233 zend_vm_stack p = EG(argument_stack);
234
235 EG(argument_stack) = p->prev;
236 efree(p);
237 } else {
e0ca3b2 Fixed types
Dmitry Stogov authored
238 EG(argument_stack)->top = (void**)ptr;
0b68251 Changed EG(argument_stack) implementation.
Dmitry Stogov authored
239 }
240 }
241
242 static inline void** zend_vm_stack_push_args(int count TSRMLS_DC)
243 {
244
245 if (UNEXPECTED(EG(argument_stack)->top - EG(argument_stack)->elements < count) ||
246 UNEXPECTED(EG(argument_stack)->top == EG(argument_stack)->end)) {
247 zend_vm_stack p = EG(argument_stack);
248
249 zend_vm_stack_extend(count + 1 TSRMLS_CC);
250
251 EG(argument_stack)->top += count;
252 *(EG(argument_stack)->top) = (void*)(zend_uintptr_t)count;
253 while (count-- > 0) {
254 void *data = *(--p->top);
255
256 if (UNEXPECTED(p->top == p->elements)) {
257 zend_vm_stack r = p;
258
259 EG(argument_stack)->prev = p->prev;
260 p = p->prev;
261 efree(r);
262 }
263 *(EG(argument_stack)->elements + count) = data;
264 }
265 return EG(argument_stack)->top++;
266 }
267 *(EG(argument_stack)->top) = (void*)(zend_uintptr_t)count;
268 return EG(argument_stack)->top++;
269 }
270
271 static inline void zend_vm_stack_clear_multiple(TSRMLS_D)
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
272 {
0b68251 Changed EG(argument_stack) implementation.
Dmitry Stogov authored
273 void **p = EG(argument_stack)->top - 1;
e1814f0 WIN64 support
Dmitry Stogov authored
274 int delete_count = (int)(zend_uintptr_t) *p;
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
275
276 while (--delete_count>=0) {
8df40bd Keeping consistent arg_stack during arguments freeing (Exception from…
Dmitry Stogov authored
277 zval *q = *(zval **)(--p);
278 *p = NULL;
279 zval_ptr_dtor(&q);
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
280 }
0b68251 Changed EG(argument_stack) implementation.
Dmitry Stogov authored
281 zend_vm_stack_free(p TSRMLS_CC);
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
282 }
283
0b68251 Changed EG(argument_stack) implementation.
Dmitry Stogov authored
284 static inline zval** zend_vm_stack_get_arg(int requested_arg TSRMLS_DC)
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
285 {
0b68251 Changed EG(argument_stack) implementation.
Dmitry Stogov authored
286 void **p = EG(current_execute_data)->prev_execute_data->function_state.arguments;
e1814f0 WIN64 support
Dmitry Stogov authored
287 int arg_count = (int)(zend_uintptr_t) *p;
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
288
0b68251 Changed EG(argument_stack) implementation.
Dmitry Stogov authored
289 if (UNEXPECTED(requested_arg > arg_count)) {
290 return NULL;
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
291 }
0b68251 Changed EG(argument_stack) implementation.
Dmitry Stogov authored
292 return (zval**)p - arg_count + requested_arg - 1;
df74f1d Add optional support for C0x inline semantics.
Sascha Schumann authored
293 }
39a7f4c @zsuraski This patch is a go. Not fully optimized yet, but working properly.
zsuraski authored
294
85b9327 @arnaud-lb MFH: better fix for #48409 , #48428 , #48228
arnaud-lb authored
295 static inline void zend_arg_types_stack_2_pop(zend_ptr_stack *stack, zval **object, zend_function **fbc)
296 {
297 void *a, *b;
298
299 zend_ptr_stack_2_pop(stack, &a, &b);
300
ba79cd5 @pierrejoye - fix build (void alarm)
pierrejoye authored
301 *object = (zval *) a;
302 *fbc = (zend_function *) b;
85b9327 @arnaud-lb MFH: better fix for #48409 , #48428 , #48228
arnaud-lb authored
303 }
304
305 static inline void zend_arg_types_stack_3_pop(zend_ptr_stack *stack, zend_class_entry **called_scope, zval **object, zend_function **fbc)
306 {
307 void *a, *b, *c;
308
309 zend_ptr_stack_3_pop(stack, &a, &b, &c);
310
ba79cd5 @pierrejoye - fix build (void alarm)
pierrejoye authored
311 *called_scope = (zend_class_entry *) a;
312 *object = (zval *) b;
313 *fbc = (zend_function *) c;
85b9327 @arnaud-lb MFH: better fix for #48409 , #48428 , #48228
arnaud-lb authored
314 }
315
b4f3b9d @zsuraski Redesigned thread safety mechanism - nua nua
zsuraski authored
316 void execute_new_code(TSRMLS_D);
573b460 @andigutmans Zend Library
andigutmans authored
317
318
319 /* services */
09e7647 Improve error message
Marcus Boerger authored
320 ZEND_API char *get_active_class_name(char **space TSRMLS_DC);
4187439 @zsuraski More TSRMLS_FETCH work
zsuraski authored
321 ZEND_API char *get_active_function_name(TSRMLS_D);
2c254ba @zsuraski Get rid of ELS_*(), and use TSRMLS_*() instead.
zsuraski authored
322 ZEND_API char *zend_get_executed_filename(TSRMLS_D);
323 ZEND_API uint zend_get_executed_lineno(TSRMLS_D);
4187439 @zsuraski More TSRMLS_FETCH work
zsuraski authored
324 ZEND_API zend_bool zend_is_executing(TSRMLS_D);
573b460 @andigutmans Zend Library
andigutmans authored
325
6c15837 @rlerdorf exit_on_timeout patch
rlerdorf authored
326 ZEND_API void zend_set_timeout(long seconds, int reset_signals);
4187439 @zsuraski More TSRMLS_FETCH work
zsuraski authored
327 ZEND_API void zend_unset_timeout(TSRMLS_D);
b72a273 @andigutmans - Forgot ZEND_API
andigutmans authored
328 ZEND_API void zend_timeout(int dummy);
6c810b0 Improved memory usage by movig constants to read only memory. (Dmitry…
Dmitry Stogov authored
329 ZEND_API zend_class_entry *zend_fetch_class(const char *class_name, uint class_name_len, int fetch_type TSRMLS_DC);
c5d8422 @zsuraski Reinstate early-binding for classes.
zsuraski authored
330 void zend_verify_abstract_class(zend_class_entry *ce TSRMLS_DC);
84eb48f @zsuraski Ok, this time here's some real Win32 system programming :)
zsuraski authored
331
ef0bd3d @zsuraski - Move timeout code to Zend
zsuraski authored
332 #ifdef ZEND_WIN32
226c56f MFH: Fixed compiler warnings
Jani Taskinen authored
333 void zend_init_timeout_thread(void);
334 void zend_shutdown_timeout_thread(void);
84eb48f @zsuraski Ok, this time here's some real Win32 system programming :)
zsuraski authored
335 #define WM_REGISTER_ZEND_TIMEOUT (WM_USER+1)
336 #define WM_UNREGISTER_ZEND_TIMEOUT (WM_USER+2)
ef0bd3d @zsuraski - Move timeout code to Zend
zsuraski authored
337 #endif
338
573b460 @andigutmans Zend Library
andigutmans authored
339 #define zendi_zval_copy_ctor(p) zval_copy_ctor(&(p))
340 #define zendi_zval_dtor(p) zval_dtor(&(p))
341
342 #define active_opline (*EG(opline_ptr))
343
e8214a3 @andigutmans - Commit Marcus' cleanup of abstract and static inheritance and improve
andigutmans authored
344 /* The following tries to resolve the classname of a zval of type object.
345 * Since it is slow it should be only used in error messages.
346 */
637a404 - MFH as discussed
Marcus Boerger authored
347 #define Z_OBJ_CLASS_NAME_P(zval) ((zval) && Z_TYPE_P(zval) == IS_OBJECT && Z_OBJ_HT_P(zval)->get_class_entry != NULL && Z_OBJ_HT_P(zval)->get_class_entry(zval TSRMLS_CC) ? Z_OBJ_HT_P(zval)->get_class_entry(zval TSRMLS_CC)->name : "")
e8214a3 @andigutmans - Commit Marcus' cleanup of abstract and static inheritance and improve
andigutmans authored
348
cf7384a @felipensp - MFH: Constness (Added const qualifier to several function parameters)
felipensp authored
349 ZEND_API zval** zend_get_compiled_variable_value(const zend_execute_data *execute_data_ptr, zend_uint var);
8838c0f @andigutmans - Two new API calls for Derick (retreive CV name and value) by Dmitry
andigutmans authored
350
84b96e9 Fix so that extensions like xdebug, can overload opcodes in all execu…
Dmitry Stogov authored
351 #define ZEND_USER_OPCODE_CONTINUE 0 /* execute next opcode */
352 #define ZEND_USER_OPCODE_RETURN 1 /* exit from executor (return from function) */
353 #define ZEND_USER_OPCODE_DISPATCH 2 /* call original opcode handler */
f1ab855 Fixed ability to call user functions from user opcodes without recursion
Dmitry Stogov authored
354 #define ZEND_USER_OPCODE_ENTER 3 /* enter into new op_array without recursion */
355 #define ZEND_USER_OPCODE_LEAVE 4 /* return to calling op_array within the same executor */
84b96e9 Fix so that extensions like xdebug, can overload opcodes in all execu…
Dmitry Stogov authored
356
3c1a774 USER_OPCODE API is improvet.
Dmitry Stogov authored
357 #define ZEND_USER_OPCODE_DISPATCH_TO 0x100 /* call original handler of returned opcode */
358
76a9a42 - Removed direct executor recursion.
Dmitry Stogov authored
359 ZEND_API int zend_set_user_opcode_handler(zend_uchar opcode, user_opcode_handler_t handler);
360 ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(zend_uchar opcode);
84b96e9 Fix so that extensions like xdebug, can overload opcodes in all execu…
Dmitry Stogov authored
361
87c9e68 @smalyshev export zval getters
smalyshev authored
362 /* former zend_execute_locks.h */
363 typedef struct _zend_free_op {
364 zval* var;
365 /* int is_var; */
366 } zend_free_op;
367
cf7384a @felipensp - MFH: Constness (Added const qualifier to several function parameters)
felipensp authored
368 ZEND_API zval *zend_get_zval_ptr(znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC);
369 ZEND_API zval **zend_get_zval_ptr_ptr(const znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC);
87c9e68 @smalyshev export zval getters
smalyshev authored
370
61b9ded Export zend_do_fcall() helper from executor
Dmitry Stogov authored
371 ZEND_API int zend_do_fcall(ZEND_OPCODE_HANDLER_ARGS);
87c9e68 @smalyshev export zval getters
smalyshev authored
372
0450ab9 @zsuraski MFZE1 (Expose more C++ APIs)
zsuraski authored
373 END_EXTERN_C()
374
a617217 Replace macros which begin with an underscore through an appropiately
Sascha Schumann authored
375 #endif /* ZEND_EXECUTE_H */
333406b - Added some missing CVS $Id$ tags, headers and footers.
foobar authored
376
377 /*
378 * Local variables:
379 * tab-width: 4
380 * c-basic-offset: 4
381 * indent-tabs-mode: t
382 * End:
383 */
Something went wrong with that request. Please try again.