source: trunk/processor/processor.m4 @ 1214

Last change on this file since 1214 was 1214, checked in by moo, 22 months ago

fix build

  • Property svn:eol-style set to native
File size: 30.5 KB
Line 
1dnl ================
2/* {{{ Pre-declare */
3DECL_STRUCT_P_FUNC(`zval')
4DECL_STRUCT_P_FUNC(`zval_ptr')
5DECL_STRUCT_P_FUNC(`zval_ptr_nullable')
6DECL_STRUCT_P_FUNC(`zend_op_array')
7DECL_STRUCT_P_FUNC(`zend_class_entry')
8#ifdef HAVE_XCACHE_CONSTANT
9DECL_STRUCT_P_FUNC(`zend_constant')
10#endif
11DECL_STRUCT_P_FUNC(`zend_function')
12DECL_STRUCT_P_FUNC(`xc_entry_var_t')
13DECL_STRUCT_P_FUNC(`xc_entry_php_t')
14#ifdef ZEND_ENGINE_2
15DECL_STRUCT_P_FUNC(`zend_property_info')
16#endif
17/* }}} */
18dnl ====================================================
19#ifdef IS_CV
20DEF_STRUCT_P_FUNC(`zend_compiled_variable', , `dnl {{{
21    PROCESS(int, name_len)
22    PROC_ZSTRING_L(, name, name_len)
23    PROCESS(ulong, hash_value)
24')
25dnl }}}
26#endif
27DEF_STRUCT_P_FUNC(`zend_uint', , `dnl {{{
28    IFCOPY(`dst[0] = src[0];')
29    IFDPRINT(`
30        INDENT()
31        fprintf(stderr, "%u\n", src[0]);
32    ')
33    DONE_SIZE(sizeof(src[0]))
34')
35dnl }}}
36#ifndef ZEND_ENGINE_2
37DEF_STRUCT_P_FUNC(`int', , `dnl {{{
38    IFCOPY(`*dst = *src;')
39    IFDPRINT(`
40        INDENT()
41        fprintf(stderr, "%d\n", src[0]);
42    ')
43    DONE_SIZE(sizeof(src[0]))
44')
45dnl }}}
46#endif
47#ifdef ZEND_ENGINE_2
48DEF_STRUCT_P_FUNC(`zend_try_catch_element', , `dnl {{{
49    PROCESS(zend_uint, try_op)
50    PROCESS(zend_uint, catch_op)
51#ifdef ZEND_ENGINE_2_5
52    PROCESS(zend_uint, finally_op)
53    PROCESS(zend_uint, finally_end)
54#endif
55')
56dnl }}}
57#endif
58DEF_STRUCT_P_FUNC(`zend_brk_cont_element', , `dnl {{{
59#ifdef ZEND_ENGINE_2_2
60    PROCESS(int, start)
61#endif
62    PROCESS(int, cont)
63    PROCESS(int, brk)
64    PROCESS(int, parent)
65')
66dnl }}}
67DEF_HASH_TABLE_FUNC(`HashTable_zval_ptr',           `zval_ptr')
68DEF_HASH_TABLE_FUNC(`HashTable_zend_function',      `zend_function')
69#ifdef ZEND_ENGINE_2
70DEF_HASH_TABLE_FUNC(`HashTable_zend_property_info', `zend_property_info')
71#endif
72DEF_STRUCT_P_FUNC(`zval', , `dnl {{{
73    IFDASM(`do {
74        zval_dtor(dst);
75        *dst = *src;
76        zval_copy_ctor(dst);
77        Z_SET_REFCOUNT(*dst, 1);
78        DONE(value)
79        DONE(type)
80#ifdef ZEND_ENGINE_2_3
81        DONE(is_ref__gc)
82        DONE(refcount__gc)
83#else
84        DONE(is_ref)
85        DONE(refcount)
86#endif
87    } while(0);
88    ', `
89        dnl IFDASM else
90        /* Variable information */
91dnl {{{ zvalue_value
92        DISABLECHECK(`
93        switch ((Z_TYPE_P(src) & IS_CONSTANT_TYPE_MASK)) {
94            case IS_LONG:
95            case IS_RESOURCE:
96            case IS_BOOL:
97                PROCESS(long, value.lval)
98                break;
99            case IS_DOUBLE:
100                PROCESS(double, value.dval)
101                break;
102            case IS_NULL:
103                IFDPRINT(`INDENT()`'fprintf(stderr, "\tNULL\n");')
104                break;
105
106            case IS_CONSTANT:
107#ifdef IS_UNICODE
108                if (UG(unicode)) {
109                    goto proc_unicode;
110                }
111#endif
112            case IS_STRING:
113#ifdef FLAG_IS_BC
114            case FLAG_IS_BC:
115#endif
116                PROCESS(int, value.str.len)
117                PROC_STRING_L(value.str.val, value.str.len)
118                break;
119#ifdef IS_UNICODE
120            case IS_UNICODE:
121proc_unicode:
122                PROCESS(int32_t, value.uni.len)
123                PROC_ZSTRING_L(1, value.uni.val, value.uni.len)
124                break;
125#endif
126
127            case IS_ARRAY:
128            case IS_CONSTANT_ARRAY:
129                STRUCT_P(HashTable, value.ht, HashTable_zval_ptr)
130                break;
131
132            case IS_OBJECT:
133                IFNOTMEMCPY(`IFCOPY(`memcpy(dst, src, sizeof(src[0]));')')
134                dnl STRUCT(value.obj)
135#ifndef ZEND_ENGINE_2
136                STRUCT_P(zend_class_entry, value.obj.ce)
137                STRUCT_P(HashTable, value.obj.properties, HashTable_zval_ptr)
138#endif
139                break;
140
141            default:
142                assert(0);
143        }
144        ')
145dnl }}}
146        DONE(value)
147        PROCESS(xc_zval_type_t, type)
148#ifdef ZEND_ENGINE_2_3
149        PROCESS(zend_uchar, is_ref__gc)
150#else
151        PROCESS(zend_uchar, is_ref)
152#endif
153
154#ifdef ZEND_ENGINE_2_3
155        PROCESS(zend_uint, refcount__gc)
156#elif defined(ZEND_ENGINE_2)
157        PROCESS(zend_uint, refcount)
158#else
159        PROCESS(zend_ushort, refcount)
160#endif
161    ')dnl IFDASM
162')
163dnl }}}
164DEF_STRUCT_P_FUNC(`zval_ptr', , `dnl {{{
165    IFDASM(`
166        pushdefFUNC_NAME(`zval')
167        FUNC_NAME (dasm, dst, src[0] TSRMLS_CC);
168        popdef(`FUNC_NAME')
169    ', `
170        do {
171            IFCALCCOPY(`
172                if (processor->reference) {
173                    zval_ptr *ppzv;
174                    if (zend_hash_find(&processor->zvalptrs, (char *) &src[0], sizeof(src[0]), (void **) &ppzv) == SUCCESS) {
175                        IFCOPY(`
176                            dst[0] = *ppzv;
177                            /* *dst is updated */
178                            dnl fprintf(stderr, "*dst is set to %p, PROCESSOR_TYPE is_shm %d\n", dst[0], xc_is_shm(dst[0]));
179                        ')
180                        IFCALCSTORE(`processor->have_references = 1;')
181                        IFSTORE(`assert(xc_is_shm(dst[0]));')
182                        IFRESTORE(`assert(!xc_is_shm(dst[0]));')
183                        break;
184                    }
185                }
186            ')
187           
188            ALLOC(dst[0], zval)
189            IFCALCCOPY(`
190                if (processor->reference) {
191                    IFCALC(`
192                        /* make dummy */
193                        zval_ptr pzv = (zval_ptr)-1;
194                    ', `
195                        zval_ptr pzv = dst[0];
196                        FIXPOINTER_EX(zval, pzv)
197                    ')
198                    if (zend_hash_add(&processor->zvalptrs, (char *) &src[0], sizeof(src[0]), (void *) &pzv, sizeof(pzv), NULL) == SUCCESS) {
199                        /* first add, go on */
200                        dnl fprintf(stderr, "mark[%p] = %p\n", src[0], pzv);
201                    }
202                    else {
203                        assert(0);
204                    }
205                }
206            ')
207            IFCOPY(`
208                dnl fprintf(stderr, "copy from %p to %p\n", src[0], dst[0]);
209            ')
210            IFDPRINT(`INDENT()`'fprintf(stderr, "[%p] ", src[0]);')
211            STRUCT_P_EX(zval, dst[0], src[0], `[0]', `', ` ')
212            FIXPOINTER_EX(zval, dst[0])
213        } while (0);
214    ')
215    DONE_SIZE(sizeof(zval_ptr))
216')
217dnl }}}
218DEF_STRUCT_P_FUNC(`zval_ptr_nullable', , `dnl {{{
219    if (src[0]) {
220        STRUCT_P_EX(zval_ptr, dst, src, `', `', ` ')
221    }
222    else {
223        IFCOPY(`COPYNULL_EX(src[0], src)')
224    }
225    DONE_SIZE(sizeof(zval_ptr_nullable))
226')
227dnl }}}
228#ifdef ZEND_ENGINE_2
229DEF_STRUCT_P_FUNC(`zend_arg_info', , `dnl {{{
230    PROCESS(zend_uint, name_len)
231    PROC_ZSTRING_L(, name, name_len)
232    PROCESS(zend_uint, class_name_len)
233    PROC_ZSTRING_L(, class_name, class_name_len)
234#ifdef ZEND_ENGINE_2_4
235    PROCESS(zend_uchar, type_hint)
236#else
237    PROCESS(zend_bool, array_type_hint)
238#endif
239    PROCESS(zend_bool, allow_null)
240    PROCESS(zend_bool, pass_by_reference)
241#ifndef ZEND_ENGINE_2_4
242    PROCESS(zend_bool, return_reference)
243    PROCESS(int, required_num_args)
244#endif
245')
246dnl }}}
247#endif
248#ifdef HAVE_XCACHE_CONSTANT
249DEF_STRUCT_P_FUNC(`zend_constant', , `dnl {{{
250    STRUCT(zval, value)
251    PROCESS(int, flags)
252    PROCESS(uint, name_len)
253    pushdef(`estrndup', `zend_strndup')
254    PROC_ZSTRING_N(, name, name_len)
255    popdef(`estrndup')
256    PROCESS(int, module_number)
257')
258dnl }}}
259#endif
260DEF_STRUCT_P_FUNC(`zend_function', , `dnl {{{
261    DISABLECHECK(`
262    switch (src->type) {
263    case ZEND_INTERNAL_FUNCTION:
264    case ZEND_OVERLOADED_FUNCTION:
265        IFNOTMEMCPY(`IFCOPY(`memcpy(dst, src, sizeof(src[0]));')')
266        break;
267
268    case ZEND_USER_FUNCTION:
269    case ZEND_EVAL_CODE:
270        DONE(type)
271        STRUCT(zend_op_array, op_array)
272        break;
273
274    default:
275        assert(0);
276    }
277    ')
278    DONE_SIZE(sizeof(src[0]))
279')
280dnl }}}
281#ifdef ZEND_ENGINE_2
282DEF_STRUCT_P_FUNC(`zend_property_info', , `dnl {{{
283    PROCESS(zend_uint, flags)
284    PROCESS(int, name_length)
285    PROC_ZSTRING_L(, name, name_length)
286    PROCESS(ulong, h)
287#ifdef ZEND_ENGINE_2_4
288    PROCESS(int, offset)
289#endif
290#ifdef ZEND_ENGINE_2_1
291    PROCESS(int, doc_comment_len)
292    PROC_ZSTRING_L(, doc_comment, doc_comment_len)
293#endif
294    dnl isnt in php6 yet
295#if defined(ZEND_ENGINE_2_2)
296    PROC_CLASS_ENTRY_P(ce)
297#endif
298')
299dnl }}}
300#endif
301#ifdef ZEND_ENGINE_2_4
302DEF_STRUCT_P_FUNC(`zend_trait_method_reference', , `dnl {{{
303    PROCESS(unsigned int, mname_len)
304    PROC_STRING_L(method_name, mname_len)
305    COPYNULL(ce)
306    PROCESS(unsigned int, cname_len)
307    PROC_STRING_L(class_name, cname_len)
308')
309dnl }}}
310DEF_STRUCT_P_FUNC(`zend_trait_alias', , `dnl {{{
311    STRUCT_P(zend_trait_method_reference, trait_method)
312    PROCESS(unsigned int, alias_len)
313    PROC_STRING_L(alias, alias_len)
314    PROCESS(zend_uint, modifiers)
315    COPYNULL(function)
316')
317dnl }}}
318DEF_STRUCT_P_FUNC(`zend_trait_precedence', , `dnl {{{
319    STRUCT_P(zend_trait_method_reference, trait_method)
320    PROCESS_ARRAY(, xc_ztstring, exclude_from_classes, zend_class_entry*)
321    COPYNULL(function)
322')
323dnl }}}
324DEF_STRUCT_P_FUNC(`zend_trait_alias_ptr', , `dnl {{{
325    IFDASM(`
326        pushdefFUNC_NAME(`zend_trait_alias')
327        FUNC_NAME (dasm, dst, src[0] TSRMLS_CC);
328        popdef(`FUNC_NAME')
329    ', `
330        ALLOC(dst[0], zend_trait_alias)
331        STRUCT_P_EX(zend_trait_alias, dst[0], src[0], `[0]', `', ` ')
332        FIXPOINTER_EX(zend_trait_alias, dst[0])
333    ')
334    DONE_SIZE(sizeof(zend_trait_alias))
335')
336dnl }}}
337DEF_STRUCT_P_FUNC(`zend_trait_precedence_ptr', , `dnl {{{
338    IFDASM(`
339        pushdefFUNC_NAME(`zend_trait_precedence')
340        FUNC_NAME (dasm, dst, src[0] TSRMLS_CC);
341        popdef(`FUNC_NAME')
342    ', `
343        ALLOC(dst[0], zend_trait_precedence)
344        STRUCT_P_EX(zend_trait_precedence, dst[0], src[0], `[0]', `', ` ')
345        FIXPOINTER_EX(zend_trait_precedence, dst[0])
346    ')
347    DONE_SIZE(sizeof(zend_trait_precedence))
348')
349dnl }}}
350#endif
351DEF_STRUCT_P_FUNC(`zend_class_entry', , `dnl {{{
352    IFCALCCOPY(`
353        processor->active_class_entry_src = src;
354        IFCOPY(`processor->active_class_entry_dst = dst;')
355    ')
356    PROCESS(char, type)
357    PROCESS(zend_uint, name_length)
358    PROC_ZSTRING_L(, name, name_length)
359    IFRESTORE(`
360#ifndef ZEND_ENGINE_2
361        /* just copy parent and resolve on install_class */
362        COPY(parent)
363#else
364        PROC_CLASS_ENTRY_P(parent)
365#endif
366    ', `
367        PROC_CLASS_ENTRY_P(parent)
368    ')
369#ifdef ZEND_ENGINE_2
370    PROCESS(int, refcount)
371#else
372    STRUCT_P(int, refcount)
373#endif
374#ifndef ZEND_ENGINE_2_4
375    PROCESS(zend_bool, constants_updated)
376#endif
377#ifdef ZEND_ENGINE_2
378    PROCESS(zend_uint, ce_flags)
379#endif
380
381#ifdef ZEND_ENGINE_2
382    STRUCT(HashTable, properties_info, HashTable_zend_property_info)
383#endif
384
385#ifdef ZEND_ENGINE_2_4
386    STRUCT_ARRAY(int, default_properties_count, zval_ptr_nullable, default_properties_table)
387    PROCESS(int, default_properties_count)
388    STRUCT_ARRAY(int, default_static_members_count, zval_ptr_nullable, default_static_members_table)
389    PROCESS(int, default_static_members_count)
390    IFCOPY(`dst->static_members_table = dst->default_static_members_table;')
391    DONE(static_members_table)
392#else
393    IFCOPY(`dst->builtin_functions = src->builtin_functions;')
394    DONE(builtin_functions)
395    STRUCT(HashTable, default_properties, HashTable_zval_ptr)
396#   ifdef ZEND_ENGINE_2_1
397    STRUCT(HashTable, default_static_members, HashTable_zval_ptr)
398    IFCOPY(`dst->static_members = &dst->default_static_members;')
399    DONE(static_members)
400#   elif defined(ZEND_ENGINE_2)
401    STRUCT_P(HashTable, static_members, HashTable_zval_ptr)
402#   endif
403#endif /* ZEND_ENGINE_2_4 */
404
405#ifdef ZEND_ENGINE_2
406    STRUCT(HashTable, constants_table, HashTable_zval_ptr)
407
408#ifdef ZEND_ENGINE_2_2
409    dnl runtime binding: ADD_INTERFACE will deal with it
410    COPYNULL(`interfaces')
411    COPYZERO(`num_interfaces')
412
413#   ifdef ZEND_ENGINE_2_4
414    dnl runtime binding: ADD_TRAIT will deal with it
415    COPYNULL(traits)
416    COPYZERO(num_traits)
417    STRUCT_ARRAY(, , zend_trait_alias_ptr, trait_aliases)
418    STRUCT_ARRAY(, , zend_trait_precedence_ptr, trait_precedences)
419#   endif
420#else
421    IFRESTORE(`
422        if (src->num_interfaces) {
423            CALLOC(dst->interfaces, zend_class_entry*, src->num_interfaces)
424            DONE(`interfaces')
425        }
426        else {
427            COPYNULL(`interfaces')
428        }
429    ', `
430        DONE(`interfaces')
431    ')
432    PROCESS(zend_uint, num_interfaces)
433#endif
434
435#   ifdef ZEND_ENGINE_2_4
436    DISABLECHECK(`
437    IFRESTORE(`dst->info.user.filename = processor->entry_php_src->filepath;', `PROC_STRING(info.user.filename)')
438    PROCESS(zend_uint, info.user.line_start)
439    PROCESS(zend_uint, info.user.line_end)
440    PROCESS(zend_uint, info.user.doc_comment_len)
441    PROC_ZSTRING_L(, info.user.doc_comment, info.user.doc_comment_len)
442    ')
443    DONE(info)
444#   else
445    IFRESTORE(`dst->filename = processor->entry_php_src->filepath;DONE(filename)', `PROC_STRING(filename)')
446    PROCESS(zend_uint, line_start)
447    PROCESS(zend_uint, line_end)
448#       ifdef ZEND_ENGINE_2_1
449    PROCESS(zend_uint, doc_comment_len)
450    PROC_ZSTRING_L(, doc_comment, doc_comment_len)
451#       endif
452#   endif
453
454    /* # NOT DONE */
455    COPY(serialize_func)
456    COPY(unserialize_func)
457    COPY(iterator_funcs)
458    COPY(create_object)
459    COPY(get_iterator)
460    COPY(interface_gets_implemented)
461#   ifdef ZEND_ENGINE_2_3
462    COPY(get_static_method)
463#   endif
464    COPY(serialize)
465    COPY(unserialize)
466    /* deal with it inside xc_fix_method */
467    SETNULL(constructor)
468    COPY(destructor)
469    COPY(clone)
470    COPY(__get)
471    COPY(__set)
472/* should be >5.1 */
473#   ifdef ZEND_ENGINE_2_1
474    COPY(__unset)
475    COPY(__isset)
476#    if defined(ZEND_ENGINE_2_2) || PHP_MAJOR_VERSION >= 6
477    COPY(__tostring)
478#    endif
479#   endif
480    COPY(__call)
481#   ifdef ZEND_CALLSTATIC_FUNC_NAME
482    COPY(__callstatic)
483#   endif
484#   ifndef ZEND_ENGINE_2_4
485    /* # NOT DONE */
486    COPY(module)
487#   endif
488#else /* ZEND_ENGINE_2 */
489    COPY(handle_function_call)
490    COPY(handle_property_get)
491    COPY(handle_property_set)
492#endif
493    dnl must do after SETNULL(constructor) and dst->parent
494    STRUCT(HashTable, function_table, HashTable_zend_function)
495    IFRESTORE(`dst->function_table.pDestructor = ZEND_FUNCTION_DTOR;')
496    IFCALCCOPY(`
497        processor->active_class_entry_src = NULL;
498        IFCOPY(`processor->active_class_entry_dst = NULL;')
499    ')
500')
501dnl }}}
502#ifdef ZEND_ENGINE_2_4
503undefine(`UNION_znode_op')
504define(`UNION_znode_op', `dnl {{{
505#ifndef NDEBUG
506    switch ((src->$1_type ifelse($1, `result', & ~EXT_TYPE_UNUSED))) {
507    case IS_CONST:
508    case IS_VAR:
509    case IS_CV:
510    case IS_TMP_VAR:
511    case IS_UNUSED:
512        break;
513
514    default:
515        assert(0);
516    }
517#endif
518
519    dnl dirty dispatch
520    DISABLECHECK(`
521    switch ((src->$1_type ifelse($1, `result', & ~EXT_TYPE_UNUSED))) {
522        case IS_CONST:
523            ifelse($1, `result', `
524                PROCESS(zend_uint, $1.constant)
525            ', `
526                IFDASM(`{
527                    zval *zv;
528                    ALLOC_INIT_ZVAL(zv);
529                    *zv = dasm->active_op_array_src->literals[src->$1.constant].constant;
530                    zval_copy_ctor(zv);
531                    add_assoc_zval_ex(dst, ZEND_STRS("$1.constant"), zv);
532                }
533                ', `
534                    IFCOPY(`
535                        dst->$1 = src->$1;
536                    ', `
537                        PROCESS(zend_uint, $1.constant)
538                    ')
539                ')
540            ')
541            break;
542        IFCOPY(`
543            IFNOTMEMCPY(`
544                default:
545                    $1 = $2;
546            ')
547        ', `
548        case IS_VAR:
549        case IS_TMP_VAR:
550        case IS_CV:
551            PROCESS(zend_uint, $1.var)
552            break;
553        case IS_UNUSED:
554            IFDASM(`PROCESS(zend_uint, $1.var)')
555            PROCESS(zend_uint, $1.opline_num)
556            break;
557        ')
558    }
559    ')
560    DONE($1)
561')
562dnl }}}
563#else
564DEF_STRUCT_P_FUNC(`znode', , `dnl {{{
565    PROCESS(xc_op_type, op_type)
566
567#ifdef IS_CV
568#   define XCACHE_IS_CV IS_CV
569#else
570/* compatible with zend optimizer */
571#   define XCACHE_IS_CV 16
572#endif
573    assert(src->op_type == IS_CONST ||
574        src->op_type == IS_VAR ||
575        src->op_type == XCACHE_IS_CV ||
576        src->op_type == IS_TMP_VAR ||
577        src->op_type == IS_UNUSED);
578    dnl dirty dispatch
579    DISABLECHECK(`
580    switch (src->op_type) {
581        case IS_CONST:
582            STRUCT(zval, u.constant)
583            break;
584        IFCOPY(`
585            IFNOTMEMCPY(`
586                default:
587                    memcpy(&dst->u, &src->u, sizeof(src->u));
588            ')
589        ', `
590        case IS_VAR:
591        case IS_TMP_VAR:
592        case XCACHE_IS_CV:
593            PROCESS(zend_uint, u.var)
594            PROCESS(zend_uint, u.EA.type)
595            break;
596        case IS_UNUSED:
597            IFDASM(`PROCESS(zend_uint, u.var)')
598            PROCESS(zend_uint, u.opline_num)
599#ifndef ZEND_ENGINE_2
600            PROCESS(zend_uint, u.fetch_type)
601#endif
602            PROCESS(zend_uint, u.EA.type)
603            break;
604        ')
605    }
606    ')
607    DONE(u)
608#if 0
609    DONE(EA)
610#endif
611#undef XCACHE_IS_CV
612')
613dnl }}}
614#endif
615DEF_STRUCT_P_FUNC(`zend_op', , `dnl {{{
616    PROCESS(xc_opcode, opcode)
617#ifdef ZEND_ENGINE_2_4
618    IFRESTORE(`', `
619    switch (src->opcode) {
620    case ZEND_BIND_TRAITS:
621        ((zend_op *) src)->op2_type = IS_UNUSED;
622        break;
623    }
624    ')
625    UNION_znode_op(result)
626    UNION_znode_op(op1)
627    UNION_znode_op(op2)
628#else
629    STRUCT(znode, result)
630    STRUCT(znode, op1)
631    STRUCT(znode, op2)
632#endif
633    PROCESS(ulong, extended_value)
634    PROCESS(uint, lineno)
635#ifdef ZEND_ENGINE_2_1
636#ifdef ZEND_ENGINE_2_4
637    PROCESS(zend_uchar, op1_type)
638    PROCESS(zend_uchar, op2_type)
639    PROCESS(zend_uchar, result_type)
640#endif
641    IFCOPY(`
642        assert(processor->active_op_array_src);
643        assert(processor->active_op_array_dst);
644#ifdef ZEND_ENGINE_2_4
645        pushdef(`UNION_znode_op_literal', `
646            if (src->$1_type == IS_CONST) {
647                dst->$1.constant = src->$1.literal - processor->active_op_array_src->literals;
648                dst->$1.literal = &processor->active_op_array_dst->literals[dst->$1.constant];
649            }
650        ')
651        UNION_znode_op_literal(op1)
652        UNION_znode_op_literal(op2)
653#endif
654        popdef(`UNION_znode_op_literal')
655        switch (src->opcode) {
656#ifdef ZEND_GOTO
657            case ZEND_GOTO:
658#endif
659            case ZEND_JMP:
660#ifdef ZEND_FAST_CALL
661            case ZEND_FAST_CALL:
662#endif
663#ifdef ZEND_ENGINE_2
664                assert(Z_OP(src->op1).jmp_addr >= processor->active_op_array_src->opcodes && Z_OP(src->op1).jmp_addr - processor->active_op_array_src->opcodes < processor->active_op_array_src->last);
665                Z_OP(dst->op1).jmp_addr = processor->active_op_array_dst->opcodes + (Z_OP(src->op1).jmp_addr - processor->active_op_array_src->opcodes);
666                assert(Z_OP(dst->op1).jmp_addr >= processor->active_op_array_dst->opcodes && Z_OP(dst->op1).jmp_addr - processor->active_op_array_dst->opcodes < processor->active_op_array_dst->last);
667#endif
668                break;
669
670            case ZEND_JMPZ:
671            case ZEND_JMPNZ:
672            case ZEND_JMPZ_EX:
673            case ZEND_JMPNZ_EX:
674#ifdef ZEND_JMP_SET
675            case ZEND_JMP_SET:
676#endif
677#ifdef ZEND_JMP_SET_VAR
678            case ZEND_JMP_SET_VAR:
679#endif
680#ifdef ZEND_ENGINE_2
681                assert(Z_OP(src->op2).jmp_addr >= processor->active_op_array_src->opcodes && Z_OP(src->op2).jmp_addr - processor->active_op_array_src->opcodes < processor->active_op_array_src->last);
682                Z_OP(dst->op2).jmp_addr = processor->active_op_array_dst->opcodes + (Z_OP(src->op2).jmp_addr - processor->active_op_array_src->opcodes);
683                assert(Z_OP(dst->op2).jmp_addr >= processor->active_op_array_dst->opcodes && Z_OP(dst->op2).jmp_addr - processor->active_op_array_dst->opcodes < processor->active_op_array_dst->last);
684#endif
685                break;
686
687            default:
688                break;
689        }
690    ')
691    PROCESS(opcode_handler_t, handler)
692#endif
693')
694dnl }}}
695#ifdef ZEND_ENGINE_2_4
696DEF_STRUCT_P_FUNC(`zend_literal', , `dnl {{{
697    STRUCT(zval, constant)
698    PROCESS(zend_ulong, hash_value)
699    PROCESS(zend_uint,  cache_slot)
700')
701dnl }}}
702#endif
703DEF_STRUCT_P_FUNC(`zend_op_array', , `dnl {{{
704    IFCOPY(`
705        processor->active_op_array_dst = dst;
706        processor->active_op_array_src = src;
707    ')
708    IFDASM(`
709        dasm->active_op_array_src = src;
710    ')
711    {
712    IFRESTORE(`
713    const xc_op_array_info_t *op_array_info = &processor->active_op_array_infos_src[processor->active_op_array_index++];
714    dnl shadow copy must NOT meet:
715    dnl readonly_protection=on
716    dnl main op_array && have early binding
717#ifdef ZEND_COMPILE_DELAYED_BINDING
718    zend_bool need_early_binding = 0;
719#else
720    zend_bool need_early_binding = processor->php_src->have_early_binding;
721#endif
722    zend_bool shallow_copy = !processor->readonly_protection && !(src == processor->php_src->op_array && need_early_binding);
723    if (shallow_copy) {
724        zend_bool gc_arg_info = 0;
725        zend_bool gc_opcodes  = 0;
726        /* really fast shallow copy */
727        memcpy(dst, src, sizeof(src[0]));
728        dst->refcount[0] = 1000;
729#ifdef ZEND_ACC_ALIAS
730        if ((processor->active_class_entry_src && (processor->active_class_entry_src->ce_flags & ZEND_ACC_TRAIT))) {
731            PROC_ZSTRING(, function_name)
732        }
733#endif
734        /* deep */
735        STRUCT_P(HashTable, static_variables, HashTable_zval_ptr)
736#ifdef ZEND_ENGINE_2
737        STRUCT_ARRAY(zend_uint, num_args, zend_arg_info, arg_info)
738        gc_arg_info = 1;
739#endif
740        dst->filename = processor->entry_php_src->filepath;
741#ifdef ZEND_ENGINE_2_4
742        if (src->literals /* || op_array_info->literalsinfo_cnt */) {
743            gc_opcodes = 1;
744        }
745#else
746        if (op_array_info->oplineinfo_cnt) {
747            gc_opcodes = 1;
748        }
749#endif
750        if (gc_opcodes) {
751            zend_op *opline, *end;
752            COPY_N_EX(last, zend_op, opcodes)
753
754            for (opline = dst->opcodes, end = opline + src->last; opline < end; ++opline) {
755#ifdef ZEND_ENGINE_2_4
756                pushdef(`UNION_znode_op_literal', `
757                    if (opline->$1_type == IS_CONST) {
758                        opline->$1.literal = &dst->literals[opline->$1.literal - src->literals];
759                    }
760                ')
761                UNION_znode_op_literal(op1)
762                UNION_znode_op_literal(op2)
763                popdef(`UNION_znode_op_literal')
764#endif
765
766                switch (opline->opcode) {
767#ifdef ZEND_GOTO
768                    case ZEND_GOTO:
769#endif
770                    case ZEND_JMP:
771#ifdef ZEND_FAST_CALL
772                    case ZEND_FAST_CALL:
773#endif
774#ifdef ZEND_ENGINE_2
775                        Z_OP(opline->op1).jmp_addr = &dst->opcodes[Z_OP(opline->op1).jmp_addr - src->opcodes];
776#endif
777                        break;
778
779                    case ZEND_JMPZ:
780                    case ZEND_JMPNZ:
781                    case ZEND_JMPZ_EX:
782                    case ZEND_JMPNZ_EX:
783#ifdef ZEND_JMP_SET
784                    case ZEND_JMP_SET:
785#endif
786#ifdef ZEND_JMP_SET_VAR
787            case ZEND_JMP_SET_VAR:
788#endif
789#ifdef ZEND_ENGINE_2
790                        Z_OP(opline->op2).jmp_addr = &dst->opcodes[Z_OP(opline->op2).jmp_addr - src->opcodes];
791#endif
792                        break;
793
794                    default:
795                        break;
796                }
797            }
798        }
799        if (gc_arg_info || gc_opcodes) {
800            xc_gc_op_array_t gc_op_array;
801#ifdef ZEND_ENGINE_2
802            gc_op_array.num_args = gc_arg_info ? dst->num_args : 0;
803            gc_op_array.arg_info = gc_arg_info ? dst->arg_info : NULL;
804#endif
805            gc_op_array.opcodes  = gc_opcodes ? dst->opcodes : NULL;
806            xc_gc_add_op_array(&gc_op_array TSRMLS_CC);
807        }
808        IFAUTOCHECK(`xc_autocheck_skip = 1;')
809    }
810    else
811    ')
812    do {
813    dnl RESTORE is done above!
814
815    /* Common elements */
816    PROCESS(zend_uchar, type)
817    PROC_ZSTRING(, function_name)
818#ifdef ZEND_ENGINE_2
819    PROCESS(zend_uint, fn_flags)
820    STRUCT_ARRAY(zend_uint, num_args, zend_arg_info, arg_info)
821    PROCESS(zend_uint, num_args)
822    PROCESS(zend_uint, required_num_args)
823#   ifndef ZEND_ENGINE_2_4
824    PROCESS(zend_bool, pass_rest_by_reference)
825#   endif
826#else
827    if (src->arg_types) {
828        ALLOC(dst->arg_types, zend_uchar, src->arg_types[0] + 1)
829        IFCOPY(`memcpy(dst->arg_types, src->arg_types, sizeof(src->arg_types[0]) * (src->arg_types[0]+1));')
830        IFDASM(`do {
831            int i;
832            zval *zv;
833            ALLOC_INIT_ZVAL(zv);
834            array_init(zv);
835            for (i = 0; i < src->arg_types[0]; i ++) {
836                add_next_index_long(zv, src->arg_types[i + 1]);
837            }
838            add_assoc_zval_ex(dst, ZEND_STRS("arg_types"), zv);
839        } while (0);')
840        DONE(arg_types)
841    }
842    else {
843        COPYNULL(arg_types)
844    }
845#endif
846#ifndef ZEND_ENGINE_2_4
847    PROCESS(unsigned char, return_reference)
848#endif
849    /* END of common elements */
850#ifdef IS_UNICODE
851    dnl SETNULL(u_twin)
852#endif
853
854    STRUCT_P(zend_uint, refcount)
855    UNFIXPOINTER(zend_uint, refcount)
856    IFSTORE(`dst->refcount[0] = 1;')
857
858#ifdef ZEND_ENGINE_2_4
859    dnl used when copying opcodes
860    STRUCT_ARRAY(int, last_literal, zend_literal, literals)
861    PROCESS(int, last_literal)
862#endif
863
864    dnl uses literals
865    STRUCT_ARRAY(zend_uint, last, zend_op, opcodes)
866    PROCESS(zend_uint, last)
867#ifndef ZEND_ENGINE_2_4
868    IFCOPY(`dst->size = src->last;DONE(size)', `PROCESS(zend_uint, size)')
869#endif
870
871#ifdef IS_CV
872    STRUCT_ARRAY(int, last_var, zend_compiled_variable, vars)
873    PROCESS(int, last_var)
874#   ifndef ZEND_ENGINE_2_4
875    IFCOPY(`dst->size_var = src->last_var;DONE(size_var)', `PROCESS(zend_uint, size_var)')
876#   endif
877#else
878    dnl zend_cv.m4 is illegal to be made public, don not ask me for it
879    IFDASM(`
880        sinclude(srcdir`/processor/zend_cv.m4')
881        ')
882#endif
883
884    PROCESS(zend_uint, T)
885
886#ifdef ZEND_ENGINE_2_5
887    PROCESS(zend_uint, nested_calls)
888    PROCESS(zend_uint, used_stack)
889#endif
890
891    STRUCT_ARRAY(last_brk_cont_t, last_brk_cont, zend_brk_cont_element, brk_cont_array)
892    PROCESS(last_brk_cont_t, last_brk_cont)
893#ifndef ZEND_ENGINE_2_4
894    PROCESS(zend_uint, current_brk_cont)
895#endif
896#ifndef ZEND_ENGINE_2
897    PROCESS(zend_bool, uses_globals)
898#endif
899
900#ifdef ZEND_ENGINE_2
901    STRUCT_ARRAY(int, last_try_catch, zend_try_catch_element, try_catch_array)
902    PROCESS(int, last_try_catch)
903#endif
904#ifdef ZEND_ENGINE_2_5
905    PROCESS(zend_bool, has_finally_block)
906#endif
907
908    STRUCT_P(HashTable, static_variables, HashTable_zval_ptr)
909
910#ifndef ZEND_ENGINE_2_4
911    COPY(start_op)
912    PROCESS(int, backpatch_count)
913#endif
914#ifdef ZEND_ENGINE_2_3
915    PROCESS(zend_uint, this_var)
916#endif
917
918#ifndef ZEND_ENGINE_2_4
919    PROCESS(zend_bool, done_pass_two)
920#endif
921    /* 5.0 <= ver < 5.3 */
922#if defined(ZEND_ENGINE_2) && !defined(ZEND_ENGINE_2_3)
923    PROCESS(zend_bool, uses_this)
924#endif
925
926    IFRESTORE(`dst->filename = processor->entry_php_src->filepath;DONE(filename)', `PROC_STRING(filename)')
927#ifdef IS_UNICODE
928    IFRESTORE(`
929        COPY(script_encoding)
930    ', `
931        PROC_STRING(script_encoding)
932    ')
933#endif
934#ifdef ZEND_ENGINE_2
935    PROCESS(zend_uint, line_start)
936    PROCESS(zend_uint, line_end)
937    PROCESS(int, doc_comment_len)
938    PROC_ZSTRING_L(, doc_comment, doc_comment_len)
939#endif
940#ifdef ZEND_COMPILE_DELAYED_BINDING
941    PROCESS(zend_uint, early_binding);
942#endif
943
944    /* reserved */
945    DONE(reserved)
946#if defined(HARDENING_PATCH) && HARDENING_PATCH
947    PROCESS(zend_bool, created_by_eval)
948#endif
949#ifdef ZEND_ENGINE_2_4
950    SETNULL(run_time_cache)
951    PROCESS(int, last_cache_slot)
952#endif
953    } while (0);
954    IFRESTORE(`xc_fix_op_array_info(processor->entry_php_src, processor->php_src, dst, shallow_copy, op_array_info TSRMLS_CC);')
955
956#ifdef ZEND_ENGINE_2
957    dnl mark it as -1 on store, and lookup parent on restore
958    IFSTORE(`dst->prototype = (processor->active_class_entry_src && src->prototype) ? (zend_function *) -1 : NULL;', `
959        IFRESTORE(`do {
960            zend_function *parent;
961            if (src->prototype != NULL
962             && zend_u_hash_find(&(processor->active_class_entry_dst->parent->function_table),
963                    UG(unicode) ? IS_UNICODE : IS_STRING,
964                    src->function_name, xc_zstrlen(UG(unicode) ? IS_UNICODE : IS_STRING, src->function_name) + 1,
965                    (void **) &parent) == SUCCESS) {
966                /* see do_inherit_method_check() */
967                if ((parent->common.fn_flags & ZEND_ACC_ABSTRACT)) {
968                    dst->prototype = parent;
969                } else if (!(parent->common.fn_flags & ZEND_ACC_CTOR) || (parent->common.prototype && (parent->common.prototype->common.scope->ce_flags & ZEND_ACC_INTERFACE))) {
970                    /* ctors only have a prototype if it comes from an interface */
971                    dst->prototype = parent->common.prototype ? parent->common.prototype : parent;
972                }
973                else {
974                    dst->prototype = NULL;
975                }
976            }
977            else {
978                dst->prototype = NULL;
979            }
980        } while (0);
981        ')
982    ')
983    DONE(prototype)
984
985#endif
986
987#ifdef ZEND_ENGINE_2
988    PROC_CLASS_ENTRY_P(scope)
989    IFCOPY(`
990        if (src->scope) {
991            xc_fix_method(processor, dst TSRMLS_CC);
992        }
993    ')
994#endif
995
996    IFRESTORE(`
997        if (xc_have_op_array_ctor) {
998            zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) xc_zend_extension_op_array_ctor_handler, dst TSRMLS_CC);
999        }
1000    ')
1001    }
1002    IFCOPY(`
1003        processor->active_op_array_dst = NULL;
1004        processor->active_op_array_src = NULL;
1005    ')
1006    IFDASM(`
1007        dasm->active_op_array_src = NULL;
1008    ')
1009')
1010dnl }}}
1011
1012#ifdef HAVE_XCACHE_CONSTANT
1013DEF_STRUCT_P_FUNC(`xc_constinfo_t', , `dnl {{{
1014    PROCESS(zend_uint, key_size)
1015#ifdef IS_UNICODE
1016    PROCESS(zend_uchar, type)
1017#endif
1018    IFRESTORE(`COPY(key)', `
1019        PROC_ZSTRING_N(type, key, key_size)
1020    ')
1021    PROCESS(ulong, h)
1022    STRUCT(zend_constant, constant)
1023')
1024dnl }}}
1025#endif
1026IFRESTORE(`', `
1027DEF_STRUCT_P_FUNC(`xc_op_array_info_detail_t', , `dnl {{{
1028    PROCESS(zend_uint, index)
1029    PROCESS(zend_uint, info)
1030')
1031dnl }}}
1032DEF_STRUCT_P_FUNC(`xc_op_array_info_t', , `dnl {{{
1033#ifdef ZEND_ENGINE_2_4
1034    PROCESS(zend_uint, literalinfo_cnt)
1035    STRUCT_ARRAY(zend_uint, literalinfo_cnt, xc_op_array_info_detail_t, literalinfos)
1036#else
1037    PROCESS(zend_uint, oplineinfo_cnt)
1038    STRUCT_ARRAY(zend_uint, oplineinfo_cnt, xc_op_array_info_detail_t, oplineinfos)
1039#endif
1040')
1041dnl }}}
1042')
1043DEF_STRUCT_P_FUNC(`xc_funcinfo_t', , `dnl {{{
1044    PROCESS(zend_uint, key_size)
1045#ifdef IS_UNICODE
1046    PROCESS(zend_uchar, type)
1047#endif
1048    IFRESTORE(`COPY(key)', `
1049        PROC_ZSTRING_N(type, key, key_size)
1050    ')
1051    PROCESS(ulong, h)
1052    IFRESTORE(`COPY(op_array_info)', `
1053        STRUCT(xc_op_array_info_t, op_array_info)
1054    ')
1055    IFRESTORE(`
1056        processor->active_op_array_infos_src = &src->op_array_info;
1057        processor->active_op_array_index = 0;
1058    ')
1059    STRUCT(zend_function, func)
1060')
1061dnl }}}
1062DEF_STRUCT_P_FUNC(`xc_classinfo_t', , `dnl {{{
1063    PROCESS(zend_uint, key_size)
1064#ifdef IS_UNICODE
1065    PROCESS(zend_uchar, type)
1066#endif
1067    IFRESTORE(`COPY(key)', `
1068        PROC_ZSTRING_N(type, key, key_size)
1069    ')
1070    PROCESS(ulong, h)
1071    PROCESS(zend_uint, methodinfo_cnt)
1072    IFRESTORE(`COPY(methodinfos)', `
1073        STRUCT_ARRAY(zend_uint, methodinfo_cnt, xc_op_array_info_t, methodinfos)
1074    ')
1075    IFRESTORE(`
1076        processor->active_op_array_infos_src = src->methodinfos;
1077        processor->active_op_array_index = 0;
1078    ')
1079#ifdef ZEND_ENGINE_2
1080    STRUCT_P(zend_class_entry, cest)
1081#else
1082    STRUCT(zend_class_entry, cest)
1083#endif
1084#ifndef ZEND_COMPILE_DELAYED_BINDING
1085    PROCESS(int, oplineno)
1086#endif
1087')
1088dnl }}}
1089IFRESTORE(`', `
1090#ifdef ZEND_ENGINE_2_1
1091DEF_STRUCT_P_FUNC(`xc_autoglobal_t', , `dnl {{{
1092    PROCESS(zend_uint, key_len)
1093#ifdef IS_UNICODE
1094    PROCESS(zend_uchar, type)
1095#endif
1096    IFRESTORE(`COPY(key)', `
1097        PROC_ZSTRING_L(type, key, key_len)
1098    ')
1099    PROCESS(ulong, h)
1100')
1101dnl }}}
1102#endif
1103')
1104IFRESTORE(`', `
1105#ifdef XCACHE_ERROR_CACHING
1106DEF_STRUCT_P_FUNC(`xc_compilererror_t', , `dnl {{{
1107    PROCESS(int, type)
1108    PROCESS(uint, lineno)
1109    PROCESS(int, error_len)
1110    PROC_STRING_L(error, error_len)
1111')
1112dnl }}}
1113#endif
1114')
1115DEF_STRUCT_P_FUNC(`xc_entry_data_php_t', , `dnl {{{
1116    IFCOPY(`
1117        processor->php_dst = dst;
1118        processor->php_src = src;
1119    ')
1120
1121    /* skip */
1122    DONE(next)
1123    PROCESS(xc_hash_value_t, hvalue)
1124    PROCESS(xc_md5sum_t, md5)
1125    PROCESS(zend_ulong, refcount)
1126
1127    PROCESS(zend_ulong, hits)
1128    PROCESS(size_t, size)
1129
1130    IFRESTORE(`COPY(op_array_info)', `
1131        STRUCT(xc_op_array_info_t, op_array_info)
1132    ')
1133    IFRESTORE(`
1134        processor->active_op_array_infos_src = &dst->op_array_info;
1135        processor->active_op_array_index = 0;
1136    ')
1137    STRUCT_P(zend_op_array, op_array)
1138
1139#ifdef HAVE_XCACHE_CONSTANT
1140    PROCESS(zend_uint, constinfo_cnt)
1141    STRUCT_ARRAY(zend_uint, constinfo_cnt, xc_constinfo_t, constinfos)
1142#endif
1143
1144    PROCESS(zend_uint, funcinfo_cnt)
1145    STRUCT_ARRAY(zend_uint, funcinfo_cnt, xc_funcinfo_t, funcinfos)
1146
1147    PROCESS(zend_uint, classinfo_cnt)
1148    STRUCT_ARRAY(zend_uint, classinfo_cnt, xc_classinfo_t, classinfos, , IFRESTORE(`processor->active_class_index'))
1149#ifdef ZEND_ENGINE_2_1
1150    PROCESS(zend_uint, autoglobal_cnt)
1151    IFRESTORE(`
1152        COPY(autoglobals)
1153    ', `
1154        STRUCT_ARRAY(zend_uint, autoglobal_cnt, xc_autoglobal_t, autoglobals)
1155    ')
1156#endif
1157#ifdef XCACHE_ERROR_CACHING
1158    PROCESS(zend_uint, compilererror_cnt)
1159    IFRESTORE(`
1160        COPY(compilererrors)
1161    ', `
1162        STRUCT_ARRAY(zend_uint, compilererror_cnt, xc_compilererror_t, compilererrors)
1163    ')
1164#endif
1165#ifndef ZEND_COMPILE_DELAYED_BINDING
1166    PROCESS(zend_bool, have_early_binding)
1167#endif
1168    PROCESS(zend_bool, have_references)
1169')
1170dnl }}}
1171DEF_STRUCT_P_FUNC(`xc_entry_t', , `dnl {{{
1172    /* skip */
1173    DONE(next)
1174    PROCESS(size_t, size)
1175
1176    PROCESS(time_t, ctime)
1177    PROCESS(time_t, atime)
1178    PROCESS(time_t, dtime)
1179    PROCESS(long, ttl)
1180    PROCESS(zend_ulong, hits)
1181    DONE(name) dnl handle in xc_entry_php_t and xc_entry_var_t
1182')
1183dnl }}}
1184DEF_STRUCT_P_FUNC(`xc_entry_php_t', , `dnl {{{
1185    STRUCT(xc_entry_t, entry)
1186    DISABLECHECK(`
1187        PROCESS(int, entry.name.str.len)
1188        IFRESTORE(`COPY(entry.name.str.val)', `
1189            PROC_STRING_L(entry.name.str.val, entry.name.str.len)
1190        ')
1191    ')
1192
1193    IFCALCCOPY(`COPY(php)', `STRUCT_P(xc_entry_data_php_t, php)')
1194
1195    IFSTORE(`dst->refcount = 0; DONE(refcount)', `PROCESS(long, refcount)')
1196    PROCESS(time_t, file_mtime)
1197    PROCESS(size_t, file_size)
1198    PROCESS(size_t, file_device)
1199    PROCESS(size_t, file_inode)
1200
1201    PROCESS(size_t, filepath_len)
1202    IFRESTORE(`COPY(filepath)', `PROC_STRING_L(filepath, filepath_len)')
1203    PROCESS(size_t, dirpath_len)
1204    IFRESTORE(`COPY(dirpath)', `PROC_STRING_L(dirpath, dirpath_len)')
1205#ifdef IS_UNICODE
1206    PROCESS(int, ufilepath_len)
1207    IFRESTORE(`COPY(ufilepath)', `PROC_USTRING_L(ufilepath, ufilepath_len)')
1208    PROCESS(int, udirpath_len)
1209    IFRESTORE(`COPY(udirpath)', `PROC_USTRING_L(udirpath, udirpath_len)')
1210#endif
1211')
1212dnl }}}
1213DEF_STRUCT_P_FUNC(`xc_entry_var_t', , `dnl {{{
1214    STRUCT(xc_entry_t, entry)
1215
1216#ifdef IS_UNICODE
1217    PROCESS(zend_uchar, name_type)
1218#endif
1219    dnl {{{ entry.name
1220    DISABLECHECK(`
1221#ifdef IS_UNICODE
1222        if (src->name_type == IS_UNICODE) {
1223            PROCESS(int32_t, entry.name.ustr.len)
1224        }
1225        else {
1226            PROCESS(int, entry.name.str.len)
1227        }
1228#else
1229        PROCESS(int, entry.name.str.len)
1230#endif
1231        IFRESTORE(`COPY(entry.name.str.val)', `
1232#ifdef IS_UNICODE
1233            PROC_ZSTRING_L(name_type, entry.name.uni.val, entry.name.uni.len)
1234#else
1235            PROC_STRING_L(entry.name.str.val, entry.name.str.len)
1236#endif
1237        ')
1238    ')
1239    dnl }}}
1240
1241    IFDPRINT(`INDENT()`'fprintf(stderr, "zval:value");')
1242    STRUCT_P_EX(zval_ptr, dst->value, src->value, `value', `', `&')
1243    PROCESS(zend_bool, have_references)
1244    DONE(value)
1245')
1246dnl }}}
1247dnl ====================================================
Note: See TracBrowser for help on using the repository browser.