Changeset 917 in svn for trunk/processor


Ignore:
Timestamp:
2012-06-23T04:49:59Z (7 years ago)
Author:
Xuefer
Message:

kill sign/const warning

Location:
trunk/processor
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/head.m4

    r878 r917  
    6363typedef zend_trait_precedence *zend_trait_precedence_ptr;
    6464#endif
    65 
    66 typedef zend_uchar xc_zval_data_type;
     65#ifdef ZEND_ENGINE_2_3
     66typedef int last_brk_cont_t;
     67#else
     68typedef zend_uint last_brk_cont_t;
     69#endif
     70
     71typedef zend_uchar xc_zval_type_t;
    6772typedef int xc_op_type;
    6873typedef zend_uchar xc_opcode;
  • trunk/processor/process.m4

    r860 r917  
    2020')
    2121dnl }}}
    22 define(`PROCESS_zval_data_type', `dnl {{{ (1:elm)
     22define(`PROCESS_xc_zval_type_t', `dnl {{{ (1:elm)
    2323    IFDPRINT(`
    2424        INDENT()
     
    2828')
    2929dnl }}}
    30 define(`PROCESS_op_type', `dnl {{{ (1:elm)
     30define(`PROCESS_xc_op_type', `dnl {{{ (1:elm)
    3131    IFDPRINT(`
    3232        INDENT()
     
    3636')
    3737dnl }}}
    38 define(`PROCESS_opcode', `dnl {{{ (1:elm)
     38define(`PROCESS_xc_opcode', `dnl {{{ (1:elm)
    3939    IFDPRINT(`
    4040        INDENT()
     
    6666    , `$1', `xc_entry_type_t',  `PROCESS_SCALAR(`$2', `d',  `$1')'
    6767    , `$1', `xc_hash_value_t',  `PROCESS_SCALAR(`$2', `lu', `$1')'
     68    , `$1', `last_brk_cont_t',  `PROCESS_SCALAR(`$2', `d', `$1')'
    6869
    6970    , `$1', `xc_ztstring',       `PROCESS_xc_ztstring(`$2')'
    70     , `$1', `xc_zval_data_type', `PROCESS_zval_data_type(`$2')'
    71     , `$1', `xc_op_type',        `PROCESS_op_type(`$2')'
    72     , `$1', `xc_opcode',         `PROCESS_opcode(`$2')'
     71    , `$1', `xc_zval_type_t',    `PROCESS_xc_zval_type_t(`$2')'
     72    , `$1', `xc_op_type',        `PROCESS_xc_op_type(`$2')'
     73    , `$1', `xc_opcode',         `PROCESS_xc_opcode(`$2')'
    7374    , `$1', `opcode_handler_t',  `/* is copying enough? */COPY(`$2')'
    7475    , `$1', `xc_md5sum_t',       `COPY(`$2')'
  • trunk/processor/processor.m4

    r880 r917  
    141141dnl }}}
    142142        DONE(value)
    143         PROCESS(xc_zval_data_type, type)
     143        PROCESS(xc_zval_type_t, type)
    144144#ifdef ZEND_ENGINE_2_3
    145145        PROCESS(zend_uchar, is_ref__gc)
     
    380380
    381381#ifdef ZEND_ENGINE_2_4
    382     STRUCT_ARRAY(default_properties_count, zval_ptr_nullable, default_properties_table)
     382    STRUCT_ARRAY(int, default_properties_count, zval_ptr_nullable, default_properties_table)
    383383    PROCESS(int, default_properties_count)
    384     STRUCT_ARRAY(default_static_members_count, zval_ptr_nullable, default_static_members_table)
     384    STRUCT_ARRAY(int, default_static_members_count, zval_ptr_nullable, default_static_members_table)
    385385    PROCESS(int, default_static_members_count)
    386386    IFCOPY(`dst->static_members_table = dst->default_static_members_table;')
     
    411411    COPYNULL(traits)
    412412    COPYZERO(num_traits)
    413     STRUCT_ARRAY(, zend_trait_alias_ptr, trait_aliases)
    414     STRUCT_ARRAY(, zend_trait_precedence_ptr, trait_precedences)
     413    STRUCT_ARRAY(, , zend_trait_alias_ptr, trait_aliases)
     414    STRUCT_ARRAY(, , zend_trait_precedence_ptr, trait_precedences)
    415415#   endif
    416416#else
     
    716716        STRUCT_P(HashTable, static_variables, HashTable_zval_ptr)
    717717#ifdef ZEND_ENGINE_2
    718         STRUCT_ARRAY(num_args, zend_arg_info, arg_info)
     718        STRUCT_ARRAY(zend_uint, num_args, zend_arg_info, arg_info)
    719719        gc_arg_info = 1;
    720720#endif
     
    793793#ifdef ZEND_ENGINE_2
    794794    PROCESS(zend_uint, fn_flags)
    795     STRUCT_ARRAY(num_args, zend_arg_info, arg_info)
     795    STRUCT_ARRAY(zend_uint, num_args, zend_arg_info, arg_info)
    796796    PROCESS(zend_uint, num_args)
    797797    PROCESS(zend_uint, required_num_args)
     
    833833#ifdef ZEND_ENGINE_2_4
    834834    dnl used when copying opcodes
    835     STRUCT_ARRAY(last_literal, zend_literal, literals)
     835    STRUCT_ARRAY(int, last_literal, zend_literal, literals)
    836836    PROCESS(int, last_literal)
    837837#endif
    838838
    839839    dnl uses literals
    840     STRUCT_ARRAY(last, zend_op, opcodes)
     840    STRUCT_ARRAY(zend_uint, last, zend_op, opcodes)
    841841    PROCESS(zend_uint, last)
    842842#ifndef ZEND_ENGINE_2_4
     
    845845
    846846#ifdef IS_CV
    847     STRUCT_ARRAY(last_var, zend_compiled_variable, vars)
     847    STRUCT_ARRAY(int, last_var, zend_compiled_variable, vars)
    848848    PROCESS(int, last_var)
    849849#   ifndef ZEND_ENGINE_2_4
     
    859859    PROCESS(zend_uint, T)
    860860
    861     STRUCT_ARRAY(last_brk_cont, zend_brk_cont_element, brk_cont_array)
    862     PROCESS(zend_uint, last_brk_cont)
     861    STRUCT_ARRAY(last_brk_cont_t, last_brk_cont, zend_brk_cont_element, brk_cont_array)
     862    PROCESS(last_brk_cont_t, last_brk_cont)
    863863#ifndef ZEND_ENGINE_2_4
    864864    PROCESS(zend_uint, current_brk_cont)
     
    869869
    870870#ifdef ZEND_ENGINE_2
    871     STRUCT_ARRAY(last_try_catch, zend_try_catch_element, try_catch_array)
     871    STRUCT_ARRAY(int, last_try_catch, zend_try_catch_element, try_catch_array)
    872872    PROCESS(int, last_try_catch)
    873873#endif
     
    997997#ifdef ZEND_ENGINE_2_4
    998998    PROCESS(zend_uint, literalinfo_cnt)
    999     STRUCT_ARRAY(literalinfo_cnt, xc_op_array_info_detail_t, literalinfos)
     999    STRUCT_ARRAY(zend_uint, literalinfo_cnt, xc_op_array_info_detail_t, literalinfos)
    10001000#else
    10011001    PROCESS(zend_uint, oplineinfo_cnt)
    1002     STRUCT_ARRAY(oplineinfo_cnt, xc_op_array_info_detail_t, oplineinfos)
     1002    STRUCT_ARRAY(zend_uint, oplineinfo_cnt, xc_op_array_info_detail_t, oplineinfos)
    10031003#endif
    10041004')
     
    10351035    PROCESS(zend_uint, methodinfo_cnt)
    10361036    IFRESTORE(`COPY(methodinfos)', `
    1037         STRUCT_ARRAY(methodinfo_cnt, xc_op_array_info_t, methodinfos)
     1037        STRUCT_ARRAY(zend_uint, methodinfo_cnt, xc_op_array_info_t, methodinfos)
    10381038    ')
    10391039    IFRESTORE(`
     
    11031103#ifdef HAVE_XCACHE_CONSTANT
    11041104    PROCESS(zend_uint, constinfo_cnt)
    1105     STRUCT_ARRAY(constinfo_cnt, xc_constinfo_t, constinfos)
     1105    STRUCT_ARRAY(zend_uint, constinfo_cnt, xc_constinfo_t, constinfos)
    11061106#endif
    11071107
    11081108    PROCESS(zend_uint, funcinfo_cnt)
    1109     STRUCT_ARRAY(funcinfo_cnt, xc_funcinfo_t, funcinfos)
     1109    STRUCT_ARRAY(zend_uint, funcinfo_cnt, xc_funcinfo_t, funcinfos)
    11101110
    11111111    PROCESS(zend_uint, classinfo_cnt)
    1112     STRUCT_ARRAY(classinfo_cnt, xc_classinfo_t, classinfos, , IFRESTORE(`processor->active_class_index'))
     1112    STRUCT_ARRAY(zend_uint, classinfo_cnt, xc_classinfo_t, classinfos, , IFRESTORE(`processor->active_class_index'))
    11131113#ifdef ZEND_ENGINE_2_1
    11141114    PROCESS(zend_uint, autoglobal_cnt)
     
    11161116        COPY(autoglobals)
    11171117    ', `
    1118         STRUCT_ARRAY(autoglobal_cnt, xc_autoglobal_t, autoglobals)
     1118        STRUCT_ARRAY(zend_uint, autoglobal_cnt, xc_autoglobal_t, autoglobals)
    11191119    ')
    11201120#endif
     
    11241124        COPY(compilererrors)
    11251125    ', `
    1126         STRUCT_ARRAY(compilererror_cnt, xc_compilererror_t, compilererrors)
     1126        STRUCT_ARRAY(zend_uint, compilererror_cnt, xc_compilererror_t, compilererrors)
    11271127    ')
    11281128#endif
  • trunk/processor/struct.m4

    r879 r917  
    172172')
    173173dnl }}}
    174 dnl {{{ STRUCT_ARRAY(1:count, 2:type, 3:elm, 4:name=type, 5:loopcounter)
     174dnl {{{ STRUCT_ARRAY(1:count_type, 2:count, 3:type, 4:elm, 5:name=type, 6:loopcounter)
    175175define(`STRUCT_ARRAY', `
    176     if (SRC(`$3')) {
     176    if (SRC(`$4')) {
    177177        ifelse(
    178             `$5', `', `int i; pushdef(`LOOPCOUNTER', `i')',
    179             `', `', `pushdef(`LOOPCOUNTER', `$5')')
    180         pushdefFUNC_NAME(`$2', `$4')
     178            `$6', `', `ifelse(`$1', `', `size_t', `$1') i; pushdef(`LOOPCOUNTER', `i')',
     179            `', `', `pushdef(`LOOPCOUNTER', `$6')')
     180        pushdefFUNC_NAME(`$3', `$5')
    181181        IFDASM(`
    182182            zval *arr;
     
    185185
    186186            for (LOOPCOUNTER = 0;
    187                     ifelse(`$1', `', `SRC(`$3[LOOPCOUNTER]')',
    188                     `', `', `LOOPCOUNTER < SRC(`$1')');
     187                    ifelse(`$2', `', `SRC(`$4[LOOPCOUNTER]')',
     188                    `', `', `LOOPCOUNTER < SRC(`$2')');
    189189                    ++LOOPCOUNTER) {
    190190                zval *zv;
     
    192192                ALLOC_INIT_ZVAL(zv);
    193193                array_init(zv);
    194                 FUNC_NAME (zv, &(SRC(`$3[LOOPCOUNTER]')) TSRMLS_CC);
     194                FUNC_NAME (zv, &(SRC(`$4[LOOPCOUNTER]')) TSRMLS_CC);
    195195                add_next_index_zval(arr, zv);
    196196            }
    197             add_assoc_zval_ex(dst, ZEND_STRS("$3"), arr);
     197            add_assoc_zval_ex(dst, ZEND_STRS("$4"), arr);
    198198        ', `
    199199            dnl find count with NULL
    200             ifelse(`$1', `', `
     200            ifelse(`$2', `', `
    201201                size_t count = 0;
    202                 while (SRC(`$3[count]')) {
     202                while (SRC(`$4[count]')) {
    203203                    ++count;
    204204                }
     
    206206                pushdef(`ARRAY_ELEMENT_COUNT', `count')
    207207            ',
    208             `', `', `pushdef(`ARRAY_ELEMENT_COUNT', `SRC(`$1')')')
    209             ALLOC(`dst->$3', `$2', `ARRAY_ELEMENT_COUNT')
     208            `', `', `pushdef(`ARRAY_ELEMENT_COUNT', `SRC(`$2')')')
     209            ALLOC(`dst->$4', `$3', `ARRAY_ELEMENT_COUNT')
    210210            popdef(`ARRAY_ELEMENT_COUNT')
    211211
    212212            for (LOOPCOUNTER = 0;
    213                     ifelse(`$1', `', `SRC(`$3[LOOPCOUNTER]')',
    214                     `', `', `LOOPCOUNTER < SRC(`$1')');
     213                    ifelse(`$2', `', `SRC(`$4[LOOPCOUNTER]')',
     214                    `', `', `LOOPCOUNTER < SRC(`$2')');
    215215                    ++LOOPCOUNTER) {
    216216                DISABLECHECK(`
    217                     STRUCT(`$2', `$3[LOOPCOUNTER]', `$4')
     217                    STRUCT(`$3', `$4[LOOPCOUNTER]', `$5')
    218218                ')
    219219            }
    220220            dnl the end marker
    221             ifelse(`$1', `', `IFCOPY(`DST(`$3[LOOPCOUNTER]') = NULL;')')
     221            ifelse(`$2', `', `IFCOPY(`DST(`$4[LOOPCOUNTER]') = NULL;')')
    222222        ')dnl IFDASM
    223         DONE(`$3')
     223        DONE(`$4')
    224224        popdef(`FUNC_NAME')
    225225        popdef(`LOOPCOUNTER')
    226226    }
    227227    else {
    228         COPYNULL(`$3')
    229     }
    230 ')
    231 dnl }}}
     228        COPYNULL(`$4')
     229    }
     230')
     231dnl }}}
Note: See TracChangeset for help on using the changeset viewer.