Changeset 854 in svn for trunk/processor/processor.m4


Ignore:
Timestamp:
2012-03-28T10:48:20+02:00 (3 years ago)
Author:
Xuefer
Message:

remove type/cache/hvalue from cached copy to reduce memory usage a little bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/processor.m4

    r851 r854  
    10671067    ')
    10681068
    1069     PROCESS(xc_hash_value_t, hvalue)
    10701069    /* skip */
    10711070    DONE(next)
    1072     COPY(cache)
     1071    PROCESS(xc_hash_value_t, hvalue)
    10731072    PROCESS(xc_md5sum_t, md5)
    10741073    PROCESS(zend_ulong, refcount)
     
    11191118')
    11201119dnl }}}
    1121 DEF_STRUCT_P_FUNC(`xc_entry_data_var_t', , `dnl {{{
    1122     IFDPRINT(`INDENT()`'fprintf(stderr, "zval:value");')
    1123     STRUCT_P_EX(zval_ptr, dst->value, src->value, `value', `', `&')
    1124     PROCESS(zend_bool, have_references)
    1125     DONE(value)
    1126 ')
    1127 dnl }}}
    11281120DEF_STRUCT_P_FUNC(`xc_entry_t', , `dnl {{{
    1129     PROCESS(xc_hash_value_t, hvalue)
    11301121    /* skip */
    11311122    DONE(next)
    1132     COPY(cache)
    1133     PROCESS(xc_entry_type_t, type)
    11341123    PROCESS(size_t, size)
    11351124
     
    11641153    DONE(name)
    11651154    dnl }}}
    1166 
    1167     dnl {{{ data
    1168     DISABLECHECK(`
    1169         switch (src->type) {
    1170         case XC_TYPE_PHP:
    1171             IFCALCCOPY(`COPY(data.php)', `STRUCT_P(xc_entry_data_php_t, data.php)')
    1172             break;
    1173 
    1174         case XC_TYPE_VAR:
    1175             STRUCT(xc_entry_data_var_t, data.var)
    1176             break;
    1177 
    1178         default:
    1179             assert(0);
    1180         }
    1181     ')
    1182     DONE(data)
    1183     dnl }}}
    11841155')
    11851156dnl }}}
    11861157DEF_STRUCT_P_FUNC(`xc_entry_php_t', , `dnl {{{
    11871158    STRUCT(xc_entry_t, entry)
     1159    IFCALCCOPY(`COPY(php)', `STRUCT_P(xc_entry_data_php_t, php)')
    11881160
    11891161    IFSTORE(`dst->refcount = 0; DONE(refcount)', `PROCESS(long, refcount)')
     
    11941166#endif
    11951167
    1196     if (src->entry.type == XC_TYPE_PHP) {
    1197         PROCESS(int, filepath_len)
    1198         IFRESTORE(`COPY(filepath)', `PROC_STRING_L(filepath, filepath_len)')
    1199         PROCESS(int, dirpath_len)
    1200         IFRESTORE(`COPY(dirpath)', `PROC_STRING_L(dirpath, dirpath_len)')
     1168    PROCESS(int, filepath_len)
     1169    IFRESTORE(`COPY(filepath)', `PROC_STRING_L(filepath, filepath_len)')
     1170    PROCESS(int, dirpath_len)
     1171    IFRESTORE(`COPY(dirpath)', `PROC_STRING_L(dirpath, dirpath_len)')
    12011172#ifdef IS_UNICODE
    1202         PROCESS(int, ufilepath_len)
    1203         IFRESTORE(`COPY(ufilepath)', `PROC_USTRING_L(ufilepath, ufilepath_len)')
    1204         PROCESS(int, udirpath_len)
    1205         IFRESTORE(`COPY(udirpath)', `PROC_USTRING_L(udirpath, udirpath_len)')
    1206 #endif
    1207     }
    1208     else {
    1209         DONE(filepath_len)
    1210         DONE(filepath)
    1211         DONE(dirpath_len)
    1212         DONE(dirpath)
    1213 #ifdef IS_UNICODE
    1214         DONE(ufilepath_len)
    1215         DONE(ufilepath)
    1216         DONE(udirpath_len)
    1217         DONE(udirpath)
    1218 #endif
    1219     }
     1173    PROCESS(int, ufilepath_len)
     1174    IFRESTORE(`COPY(ufilepath)', `PROC_USTRING_L(ufilepath, ufilepath_len)')
     1175    PROCESS(int, udirpath_len)
     1176    IFRESTORE(`COPY(udirpath)', `PROC_USTRING_L(udirpath, udirpath_len)')
     1177#endif
     1178')
     1179dnl }}}
     1180DEF_STRUCT_P_FUNC(`xc_entry_var_t', , `dnl {{{
     1181    STRUCT(xc_entry_t, entry)
     1182
     1183    IFDPRINT(`INDENT()`'fprintf(stderr, "zval:value");')
     1184    STRUCT_P_EX(zval_ptr, dst->value, src->value, `value', `', `&')
     1185    PROCESS(zend_bool, have_references)
     1186    DONE(value)
    12201187')
    12211188dnl }}}
Note: See TracChangeset for help on using the changeset viewer.