Changeset 859
Legend:
- Unmodified
- Added
- Removed
-
trunk/processor/processor.m4
r856 r859 1074 1074 PROCESS(zend_ulong, refcount) 1075 1075 1076 PROCESS(size_t, file_size)1077 1076 PROCESS(zend_ulong, hits) 1078 1077 PROCESS(size_t, size) … … 1162 1161 IFSTORE(`dst->refcount = 0; DONE(refcount)', `PROCESS(long, refcount)') 1163 1162 PROCESS(time_t, file_mtime) 1163 PROCESS(size_t, file_size) 1164 1164 #ifdef HAVE_INODE 1165 1165 PROCESS(int, file_device) -
trunk/xcache.c
r858 r859 4 4 #endif 5 5 6 #if 06 #if 1 7 7 #define SHOW_DPRINT 8 8 #endif … … 337 337 xc_entry_php_t *p_php = (xc_entry_php_t *) p; 338 338 xc_entry_php_t *xce_php = (xc_entry_php_t *) xce; 339 fresh = p_php->file_mtime == xce_php->file_mtime && p_php-> php->file_size == xce_php->php->file_size;339 fresh = p_php->file_mtime == xce_php->file_mtime && p_php->file_size == xce_php->file_size; 340 340 } 341 341 break; … … 364 364 } 365 365 /* }}} */ 366 static void xc_entry_hold_php_dmz(xc_cache_t *cache, xc_entry_php_t * xceTSRMLS_DC) /* {{{ */367 { 368 TRACE("hold % s", xce->entry.name.str.val);369 xce->refcount ++;370 xc_stack_push(&XG(php_holds)[cache->cacheid], (void *) xce);366 static void xc_entry_hold_php_dmz(xc_cache_t *cache, xc_entry_php_t *entry TSRMLS_DC) /* {{{ */ 367 { 368 TRACE("hold %d:%s", entry->file_inode, entry->entry.name.str.val); 369 entry->refcount ++; 370 xc_stack_push(&XG(php_holds)[cache->cacheid], (void *)entry); 371 371 } 372 372 /* }}} */ … … 686 686 add_assoc_long_ex(ei, ZEND_STRS("size"), entry->size + php->size); 687 687 add_assoc_long_ex(ei, ZEND_STRS("phprefcount"), php->refcount); 688 add_assoc_long_ex(ei, ZEND_STRS("file_size"), php->file_size); 688 add_assoc_long_ex(ei, ZEND_STRS("file_mtime"), entry_php->file_mtime); 689 add_assoc_long_ex(ei, ZEND_STRS("file_size"), entry_php->file_size); 689 690 #ifdef HAVE_INODE 690 691 add_assoc_long_ex(ei, ZEND_STRS("file_device"), entry_php->file_device); 691 692 add_assoc_long_ex(ei, ZEND_STRS("file_inode"), entry_php->file_inode); 692 693 #endif 693 add_assoc_long_ex(ei, ZEND_STRS("file_mtime"), entry_php->file_mtime);694 694 695 695 #ifdef HAVE_XCACHE_CONSTANT … … 826 826 xc_stack_t *s; 827 827 xc_cache_t *cache; 828 xc_entry_ t *xce;828 xc_entry_php_t *xce; 829 829 830 830 for (i = 0; i < cachecount; i ++) { 831 831 s = &holds[i]; 832 TRACE("holded %d ", xc_stack_count(s));832 TRACE("holded %d items", xc_stack_count(s)); 833 833 if (xc_stack_count(s)) { 834 834 cache = caches[i]; 835 835 ENTER_LOCK(cache) { 836 836 while (xc_stack_count(s)) { 837 xce = (xc_entry_ t*) xc_stack_pop(s);838 TRACE("unhold % s", xce->name.str.val);839 ((xc_entry_php_t *) xce)->refcount ++;840 assert( ((xc_entry_php_t *) xce)->refcount >= 0);837 xce = (xc_entry_php_t *) xc_stack_pop(s); 838 TRACE("unhold %d:%s", xce->file_inode, xce->entry.name.str.val); 839 xce->refcount ++; 840 assert(xce->refcount >= 0); 841 841 } 842 842 } LEAVE_LOCK(cache); … … 905 905 } 906 906 /* }}} */ 907 908 #if 0 /* {{{ note about php hashing */909 the folling note is written in the form of "got = from"910 911 TODO: open_basedir912 913 opened_path = stat || zend_compile_file914 915 phphashid = inode ? inode : hash(basename)916 md5key = md5(relativepath)917 md5hashid = hash(md5key)918 cachehashid = multislot ? hash(basename) : hash(phphashid)919 920 cached = phphashid -> md5key -> cachedmd5info -> cachedphp921 cachedphp = [phphashid, fullpath]922 restoredphp = [fullpath, phphashid]923 924 #endif /* }}} */925 907 926 908 #define HASH(i) (i) … … 974 956 /* }}} */ 975 957 #define xc_entry_hash_var xc_entry_hash_name 976 static inline xc_hash_value_t xc_entry_hash_php(xc_entry_php_t *xce TSRMLS_DC) /* {{{ */977 {978 return979 #ifdef HAVE_INODE980 xce->file_inode ? HASH(xce->file_device + xce->file_inode) :981 #endif982 xc_entry_hash_php_basename(xce TSRMLS_CC);983 }984 /* }}} */985 958 static void xc_entry_free_key_php(xc_entry_php_t *xce TSRMLS_DC) /* {{{ */ 986 959 { … … 1000 973 /* }}} */ 1001 974 1002 static int xc_entry_init_key_php(xc_entry_hash_t *entry_hash, xc_entry_php_t *xce, const char *filename TSRMLS_DC) /* {{{ */ 1003 { 1004 char opened_path_buffer[MAXPATHLEN]; 1005 1006 if (!filename || !SG(request_info).path_translated) { 975 static int xc_entry_init_key_php(xc_compiler_t *compiler TSRMLS_DC) /* {{{ */ 976 { 977 if (!compiler->filename || !SG(request_info).path_translated) { 1007 978 return FAILURE; 1008 979 } 1009 980 1010 if (strstr( filename, "://") != NULL) {981 if (strstr(compiler->filename, "://") != NULL) { 1011 982 return FAILURE; 1012 983 } … … 1015 986 struct stat buf, *pbuf; 1016 987 1017 if (strcmp(SG(request_info).path_translated, filename) == 0) {988 if (strcmp(SG(request_info).path_translated, compiler->filename) == 0) { 1018 989 /* sapi has already done this stat() for us */ 1019 990 pbuf = sapi_get_stat(TSRMLS_C); … … 1025 996 /* absolute path */ 1026 997 pbuf = &buf; 1027 if (IS_ABSOLUTE_PATH( filename, strlen(filename))) {1028 if (VCWD_STAT( filename, pbuf) != 0) {998 if (IS_ABSOLUTE_PATH(compiler->filename, strlen(compiler->filename))) { 999 if (VCWD_STAT(compiler->filename, pbuf) != 0) { 1029 1000 return FAILURE; 1030 1001 } … … 1033 1004 1034 1005 /* relative path */ 1035 if (* filename == '.' && (IS_SLASH(filename[1]) ||filename[1] == '.')) {1036 const char *ptr = filename + 1;1006 if (*compiler->filename == '.' && (IS_SLASH(compiler->filename[1]) || compiler->filename[1] == '.')) { 1007 const char *ptr = compiler->filename + 1; 1037 1008 if (*ptr == '.') { 1038 1009 while (*(++ptr) == '.'); … … 1042 1013 } 1043 1014 1044 if (VCWD_STAT( filename, pbuf) != 0) {1015 if (VCWD_STAT(compiler->filename, pbuf) != 0) { 1045 1016 return FAILURE; 1046 1017 } … … 1050 1021 1051 1022 /* use include_path */ 1052 if (xc_stat( filename, PG(include_path), pbuf TSRMLS_CC) != SUCCESS) {1023 if (xc_stat(compiler->filename, PG(include_path), pbuf TSRMLS_CC) != SUCCESS) { 1053 1024 return FAILURE; 1054 1025 } … … 1064 1035 } 1065 1036 1066 xce->file_mtime = pbuf->st_mtime; 1037 compiler->new_entry.file_mtime = pbuf->st_mtime; 1038 compiler->new_entry.file_size = pbuf->st_size; 1067 1039 #ifdef HAVE_INODE 1068 xce->file_device = pbuf->st_dev; 1069 xce->file_inode = pbuf->st_ino; 1070 #endif 1071 xce->php->file_size = pbuf->st_size; 1040 compiler->new_entry.file_device = pbuf->st_dev; 1041 compiler->new_entry.file_inode = pbuf->st_ino; 1042 #endif 1072 1043 } 1073 1044 else { /* XG(inode) */ 1074 xce->file_mtime = 0; 1045 compiler->new_entry.file_mtime = 0; 1046 compiler->new_entry.file_size = 0; 1075 1047 #ifdef HAVE_INODE 1076 xce->file_device = 0; 1077 xce->file_inode = 0; 1078 #endif 1079 xce->php->file_size = 0; 1080 } 1081 1048 compiler->new_entry.file_device = 0; 1049 compiler->new_entry.file_inode = 0; 1050 #endif 1051 compiler->opened_path = expand_filepath(compiler->filename, compiler->opened_path_buffer TSRMLS_CC); 1052 } 1053 1054 UNISW(NOTHING, compiler->new_entry.entry.name_type = IS_STRING;) 1055 compiler->new_entry.entry.name.str.val = (char *) (compiler->opened_path ? compiler->opened_path : compiler->filename); 1056 compiler->new_entry.entry.name.str.len = strlen(compiler->new_entry.entry.name.str.val); 1057 1058 { 1059 xc_hash_value_t basename_hash_value; 1060 if ( 1061 xc_php_hcache.size > 1 1082 1062 #ifdef HAVE_INODE 1083 if (!xce->file_inode) 1084 #endif 1085 { 1086 /* hash on filename, let's expand it to real path */ 1087 /* FIXME */ 1088 filename = expand_filepath(filename, opened_path_buffer TSRMLS_CC); 1089 if (filename == NULL) { 1090 return FAILURE; 1091 } 1092 } 1093 1094 UNISW(NOTHING, xce->entry.name_type = IS_STRING;) 1095 xce->entry.name.str.val = (char *) filename; 1096 xce->entry.name.str.len = strlen(filename); 1097 1098 entry_hash->cacheslotid = xc_php_hcache.size > 1 ? xc_hash_fold(xc_entry_hash_php_basename(xce TSRMLS_CC), &xc_php_hcache) : 0; 1099 entry_hash->entryslotid = xc_hash_fold(xc_entry_hash_php(xce TSRMLS_CC), &xc_php_hentry); 1100 xce->filepath = NULL; 1101 xce->dirpath = NULL; 1063 || !compiler->new_entry.file_inode 1064 #endif 1065 ) 1066 { 1067 basename_hash_value = xc_entry_hash_php_basename(&compiler->new_entry TSRMLS_CC); 1068 } 1069 1070 compiler->entry_hash.cacheid = xc_php_hcache.size > 1 ? xc_hash_fold(basename_hash_value, &xc_php_hcache) : 0; 1071 compiler->entry_hash.entryslotid = xc_hash_fold( 1072 #ifdef HAVE_INODE 1073 compiler->new_entry.file_inode 1074 ? HASH(compiler->new_entry.file_device + compiler->new_entry.file_inode) 1075 : 1076 #endif 1077 basename_hash_value 1078 , &xc_php_hentry); 1079 } 1080 1081 compiler->new_entry.filepath = NULL; 1082 compiler->new_entry.dirpath = NULL; 1102 1083 #ifdef IS_UNICODE 1103 xce->ufilepath = NULL;1104 xce->udirpath = NULL;1084 compiler->new_entry.ufilepath = NULL; 1085 compiler->new_entry.udirpath = NULL; 1105 1086 #endif 1106 1087 … … 1113 1094 } 1114 1095 /* }}} */ 1115 static int xc_entry_init_key_php_md5(xc_cache_t *cache, xc_ entry_data_php_t *php, xc_entry_php_t *xceTSRMLS_DC) /* {{{ */1096 static int xc_entry_init_key_php_md5(xc_cache_t *cache, xc_compiler_t *compiler TSRMLS_DC) /* {{{ */ 1116 1097 { 1117 1098 unsigned char buf[1024]; … … 1121 1102 ulong old_rsid = EG(regular_list).nNextFreeElement; 1122 1103 1123 stream = php_stream_open_wrapper( xce->entry.name.str.val, "rb", USE_PATH | REPORT_ERRORS | ENFORCE_SAFE_MODE | STREAM_DISABLE_OPEN_BASEDIR, NULL);1104 stream = php_stream_open_wrapper(compiler->new_entry.entry.name.str.val, "rb", USE_PATH | REPORT_ERRORS | ENFORCE_SAFE_MODE | STREAM_DISABLE_OPEN_BASEDIR, NULL); 1124 1105 if (!stream) { 1125 1106 return FAILURE; … … 1130 1111 PHP_MD5Update(&context, buf, n); 1131 1112 } 1132 PHP_MD5Final((unsigned char *) php->md5.digest, &context);1113 PHP_MD5Final((unsigned char *) compiler->new_php.md5.digest, &context); 1133 1114 1134 1115 php_stream_close(stream); … … 1141 1122 } 1142 1123 1143 php->hvalue = (xc_php_hash_md5(php TSRMLS_CC) & cache->hphp->mask);1124 compiler->new_php.hvalue = (xc_php_hash_md5(&compiler->new_php TSRMLS_CC) & cache->hphp->mask); 1144 1125 #ifdef XCACHE_DEBUG 1145 1126 { 1146 1127 char md5str[33]; 1147 make_digest(md5str, (unsigned char *) php->md5.digest);1128 make_digest(md5str, (unsigned char *) compiler->new_php.md5.digest); 1148 1129 TRACE("md5 %s", md5str); 1149 1130 } … … 1153 1134 } 1154 1135 /* }}} */ 1155 static void xc_entry_init_key_php_entry(xc_entry_php_t * xce, ZEND_24(const) char *filepath TSRMLS_DC) /* {{{*/1156 { 1157 xce->filepath = filepath;1158 xce->filepath_len = strlen(xce->filepath);1159 xce->dirpath = estrndup(xce->filepath, xce->filepath_len);1160 xce->dirpath_len = zend_dirname(xce->dirpath, xce->filepath_len);1136 static void xc_entry_init_key_php_entry(xc_entry_php_t *entry_php, ZEND_24(const) char *filepath TSRMLS_DC) /* {{{*/ 1137 { 1138 entry_php->filepath = filepath; 1139 entry_php->filepath_len = strlen(entry_php->filepath); 1140 entry_php->dirpath = estrndup(entry_php->filepath, entry_php->filepath_len); 1141 entry_php->dirpath_len = zend_dirname(entry_php->dirpath, entry_php->filepath_len); 1161 1142 #ifdef IS_UNICODE 1162 zend_string_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), & xce->ufilepath, &xce->ufilepath_len, xce->filepath, xce->filepath_len TSRMLS_CC);1163 zend_string_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), & xce->udirpath, &xce->udirpath_len, xce->dirpath, xce->dirpath_len TSRMLS_CC);1143 zend_string_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &entry_php->ufilepath, &entry_php->ufilepath_len, entry_php->filepath, entry_php->filepath_len TSRMLS_CC); 1144 zend_string_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &entry_php->udirpath, &entry_php->udirpath_len, entry_php->dirpath, entry_php->dirpath_len TSRMLS_CC); 1164 1145 #endif 1165 1146 } … … 1212 1193 } xc_const_usage_t; 1213 1194 /* }}} */ 1214 static void xc_collect_op_array_info(xc_ entry_php_t *xce, xc_entry_data_php_t *php, xc_const_usage_t *usage, xc_op_array_info_t *op_array_info, zend_op_array *op_array TSRMLS_DC) /* {{{ */1195 static void xc_collect_op_array_info(xc_compiler_t *compiler, xc_const_usage_t *usage, xc_op_array_info_t *op_array_info, zend_op_array *op_array TSRMLS_DC) /* {{{ */ 1215 1196 { 1216 1197 int i; … … 1220 1201 1221 1202 #define XCACHE_ANALYZE_LITERAL(type) \ 1222 if (zend_binary_strcmp(Z_STRVAL(literal->constant), Z_STRLEN(literal->constant), xce->type##path, xce->type##path_len) == 0) { \1203 if (zend_binary_strcmp(Z_STRVAL(literal->constant), Z_STRLEN(literal->constant), compiler->new_entry.type##path, compiler->new_entry.type##path_len) == 0) { \ 1223 1204 usage->type##path_used = 1; \ 1224 1205 literalinfo |= xcache_##literal##_is_##type; \ … … 1226 1207 1227 1208 #define XCACHE_U_ANALYZE_LITERAL(type) \ 1228 if (zend_u_##binary_strcmp(Z_USTRVAL(literal->constant), Z_USTRLEN(literal->constant), xce->u##type##path, xce->u##type##path_len) == 0) { \1209 if (zend_u_##binary_strcmp(Z_USTRVAL(literal->constant), Z_USTRLEN(literal->constant), compiler->new_entry.u##type##path, compiler->new_entry.u##type##path_len) == 0) { \ 1229 1210 usage->u##type##path_used = 1; \ 1230 1211 literalinfo |= xcache_##literal##_is_##type; \ … … 1232 1213 1233 1214 #define XCACHE_ANALYZE_OP(type, op) \ 1234 if (zend_binary_strcmp(Z_STRVAL(Z_OP_CONSTANT(opline->op)), Z_STRLEN(Z_OP_CONSTANT(opline->op)), xce->type##path, xce->type##path_len) == 0) { \1215 if (zend_binary_strcmp(Z_STRVAL(Z_OP_CONSTANT(opline->op)), Z_STRLEN(Z_OP_CONSTANT(opline->op)), compiler->new_entry.type##path, compiler->new_entry.type##path_len) == 0) { \ 1235 1216 usage->type##path_used = 1; \ 1236 1217 oplineinfo |= xcache_##op##_is_##type; \ … … 1238 1219 1239 1220 #define XCACHE_U_ANALYZE_OP(type, op) \ 1240 if (zend_u_##binary_strcmp(Z_USTRVAL(Z_OP_CONSTANT(opline->op)), Z_USTRLEN(Z_OP_CONSTANT(opline->op)), xce->u##type##path, xce->u##type##path_len) == 0) { \1221 if (zend_u_##binary_strcmp(Z_USTRVAL(Z_OP_CONSTANT(opline->op)), Z_USTRLEN(Z_OP_CONSTANT(opline->op)), compiler->new_entry.u##type##path, compiler->new_entry.u##type##path_len) == 0) { \ 1241 1222 usage->u##type##path_used = 1; \ 1242 1223 oplineinfo |= xcache_##op##_is_##type; \ … … 1502 1483 } 1503 1484 /* }}} */ 1504 static zend_op_array *xc_compile_php(xc_ entry_php_t *xce, xc_entry_data_php_t *php, zend_file_handle *h, int type TSRMLS_DC) /* {{{ */1485 static zend_op_array *xc_compile_php(xc_compiler_t *compiler, zend_file_handle *h, int type TSRMLS_DC) /* {{{ */ 1505 1486 { 1506 1487 zend_op_array *op_array; … … 1515 1496 old_constinfo_cnt = zend_hash_num_elements(EG(zend_constants)); 1516 1497 1517 php->op_array = NULL;1498 compiler->new_php.op_array = NULL; 1518 1499 XG(initial_compile_file_called) = 0; 1519 1500 zend_try { … … 1538 1519 /* {{{ prepare */ 1539 1520 zend_restore_compiled_filename(h->opened_path ? h->opened_path : (char *) h->filename TSRMLS_CC); 1540 php->op_array= op_array;1521 compiler->new_php.op_array = op_array; 1541 1522 1542 1523 #ifdef HAVE_XCACHE_CONSTANT 1543 php->constinfo_cnt = zend_hash_num_elements(EG(zend_constants)) - old_constinfo_cnt;1544 #endif 1545 php->funcinfo_cnt = zend_hash_num_elements(CG(function_table)) - old_funcinfo_cnt;1546 php->classinfo_cnt = zend_hash_num_elements(CG(class_table)) - old_classinfo_cnt;1524 compiler->new_php.constinfo_cnt = zend_hash_num_elements(EG(zend_constants)) - old_constinfo_cnt; 1525 #endif 1526 compiler->new_php.funcinfo_cnt = zend_hash_num_elements(CG(function_table)) - old_funcinfo_cnt; 1527 compiler->new_php.classinfo_cnt = zend_hash_num_elements(CG(class_table)) - old_classinfo_cnt; 1547 1528 #ifdef ZEND_ENGINE_2_1 1548 /* {{{ count php->autoglobal_cnt */ {1529 /* {{{ count new_php.autoglobal_cnt */ { 1549 1530 Bucket *b; 1550 1531 1551 php->autoglobal_cnt = 0;1532 compiler->new_php.autoglobal_cnt = 0; 1552 1533 for (b = CG(auto_globals)->pListHead; b != NULL; b = b->pListNext) { 1553 1534 zend_auto_global *auto_global = (zend_auto_global *) b->pData; 1554 1535 /* check if actived */ 1555 1536 if (auto_global->auto_global_callback && !auto_global->armed) { 1556 php->autoglobal_cnt ++;1537 compiler->new_php.autoglobal_cnt ++; 1557 1538 } 1558 1539 } … … 1562 1543 1563 1544 #define X_ALLOC_N(var, cnt) do { \ 1564 if ( php->cnt) { \1565 ECALLOC_N( php->var, php->cnt); \1566 if (! php->var) { \1545 if (compiler->new_php.cnt) { \ 1546 ECALLOC_N(compiler->new_php.var, compiler->new_php.cnt); \ 1547 if (!compiler->new_php.var) { \ 1567 1548 goto err_alloc; \ 1568 1549 } \ 1569 1550 } \ 1570 1551 else { \ 1571 php->var = NULL; \1552 compiler->new_php.var = NULL; \ 1572 1553 } \ 1573 1554 } while (0) … … 1591 1572 #define COPY_H(vartype, var, cnt, name, datatype) do { \ 1592 1573 for (i = 0, j = 0; b; i ++, b = b->pListNext) { \ 1593 vartype *data = & php->var[j]; \1574 vartype *data = &compiler->new_php.var[j]; \ 1594 1575 \ 1595 1576 if (i < old_##cnt) { \ … … 1598 1579 j ++; \ 1599 1580 \ 1600 assert(i < old_##cnt + php->cnt); \1581 assert(i < old_##cnt + compiler->new_php.cnt); \ 1601 1582 assert(b->pData); \ 1602 1583 memcpy(&data->name, b->pData, sizeof(datatype)); \ … … 1630 1611 /* check if actived */ 1631 1612 if (auto_global->auto_global_callback && !auto_global->armed) { 1632 xc_autoglobal_t *data = & php->autoglobals[i];1633 1634 assert(i < php->autoglobal_cnt);1613 xc_autoglobal_t *data = &compiler->new_php.autoglobals[i]; 1614 1615 assert(i < compiler->new_php.autoglobal_cnt); 1635 1616 i ++; 1636 1617 UNISW(NOTHING, data->type = b->key.type;) … … 1654 1635 unsigned int i; 1655 1636 1656 xc_entry_init_key_php_entry( xce, zend_get_compiled_filename(TSRMLS_C) TSRMLS_CC);1637 xc_entry_init_key_php_entry(&compiler->new_entry, zend_get_compiled_filename(TSRMLS_C) TSRMLS_CC); 1657 1638 memset(&const_usage, 0, sizeof(const_usage)); 1658 1639 1659 for (i = 0; i < php->classinfo_cnt; i ++) {1660 xc_classinfo_t *classinfo = & php->classinfos[i];1640 for (i = 0; i < compiler->new_php.classinfo_cnt; i ++) { 1641 xc_classinfo_t *classinfo = &compiler->new_php.classinfos[i]; 1661 1642 zend_class_entry *ce = CestToCePtr(classinfo->cest); 1662 1643 classinfo->methodinfo_cnt = ce->function_table.nTableSize; … … 1670 1651 1671 1652 for (j = 0, b = ce->function_table.pListHead; b; j ++, b = b->pListNext) { 1672 xc_collect_op_array_info( xce, php, &const_usage, &classinfo->methodinfos[j], (zend_op_array *) b->pData TSRMLS_CC);1653 xc_collect_op_array_info(compiler, &const_usage, &classinfo->methodinfos[j], (zend_op_array *) b->pData TSRMLS_CC); 1673 1654 } 1674 1655 } … … 1678 1659 } 1679 1660 1680 for (i = 0; i < php->funcinfo_cnt; i ++) {1681 xc_collect_op_array_info( xce, php, &const_usage, &php->funcinfos[i].op_array_info, (zend_op_array *) &php->funcinfos[i].func TSRMLS_CC);1682 } 1683 1684 xc_collect_op_array_info( xce, php, &const_usage, &php->op_array_info, php->op_array TSRMLS_CC);1661 for (i = 0; i < compiler->new_php.funcinfo_cnt; i ++) { 1662 xc_collect_op_array_info(compiler, &const_usage, &compiler->new_php.funcinfos[i].op_array_info, (zend_op_array *) &compiler->new_php.funcinfos[i].func TSRMLS_CC); 1663 } 1664 1665 xc_collect_op_array_info(compiler, &const_usage, &compiler->new_php.op_array_info, compiler->new_php.op_array TSRMLS_CC); 1685 1666 1686 1667 /* file/dir path free unused */ 1687 1668 #define X_FREE_UNUSED(var) \ 1688 1669 if (!const_usage.var##path_used) { \ 1689 efree( xce->var##path); \1690 xce->var##path = NULL; \1691 xce->var##path_len = 0; \1670 efree(compiler->new_entry.var##path); \ 1671 compiler->new_entry.var##path = NULL; \ 1672 compiler->new_entry.var##path_len = 0; \ 1692 1673 } 1693 1674 /* filepath is required to restore op_array->filename, so no free filepath here */ … … 1701 1682 /* }}} */ 1702 1683 #ifdef XCACHE_ERROR_CACHING 1703 php->compilererrors = ((xc_sandbox_t *) XG(sandbox))->compilererrors;1704 php->compilererror_cnt = ((xc_sandbox_t *) XG(sandbox))->compilererror_cnt;1684 compiler->new_php.compilererrors = ((xc_sandbox_t *) XG(sandbox))->compilererrors; 1685 compiler->new_php.compilererror_cnt = ((xc_sandbox_t *) XG(sandbox))->compilererror_cnt; 1705 1686 #endif 1706 1687 #ifndef ZEND_COMPILE_DELAYED_BINDING 1707 1688 /* {{{ find inherited classes that should be early-binding */ 1708 php->have_early_binding = 0;1689 compiler->new_php.have_early_binding = 0; 1709 1690 { 1710 1691 int i; 1711 for (i = 0; i < php->classinfo_cnt; i ++) {1712 php->classinfos[i].oplineno = -1;1713 } 1714 } 1715 1716 xc_undo_pass_two( php->op_array TSRMLS_CC);1717 xc_foreach_early_binding_class( php->op_array, xc_cache_early_binding_class_cb, (void *) php TSRMLS_CC);1718 xc_redo_pass_two( php->op_array TSRMLS_CC);1692 for (i = 0; i < compiler->new_php.classinfo_cnt; i ++) { 1693 compiler->new_php.classinfos[i].oplineno = -1; 1694 } 1695 } 1696 1697 xc_undo_pass_two(compiler->new_php.op_array TSRMLS_CC); 1698 xc_foreach_early_binding_class(compiler->new_php.op_array, xc_cache_early_binding_class_cb, (void *) compiler->new_php.SRMLS_CC); 1699 xc_redo_pass_two(compiler->new_php.op_array TSRMLS_CC); 1719 1700 /* }}} */ 1720 1701 #endif … … 1723 1704 1724 1705 err_alloc: 1725 xc_free_php( php TSRMLS_CC);1706 xc_free_php(&compiler->new_php TSRMLS_CC); 1726 1707 1727 1708 err_bailout: … … 1735 1716 } 1736 1717 /* }}} */ 1737 static zend_op_array *xc_compile_restore(xc_entry_php_t *stored_ xce, zend_file_handle *h TSRMLS_DC) /* {{{ */1718 static zend_op_array *xc_compile_restore(xc_entry_php_t *stored_entry, xc_entry_data_php_t *stored_php, zend_file_handle *h TSRMLS_DC) /* {{{ */ 1738 1719 { 1739 1720 zend_op_array *op_array; 1740 xc_entry_php_t xce;1741 xc_entry_data_php_t php;1721 xc_entry_php_t restored_entry; 1722 xc_entry_data_php_t restored_php; 1742 1723 zend_bool catched; 1743 1724 1744 1725 CG(in_compilation) = 1; 1745 CG(compiled_filename) = stored_ xce->entry.name.str.val;1726 CG(compiled_filename) = stored_entry->entry.name.str.val; 1746 1727 CG(zend_lineno) = 0; 1747 TRACE("restoring % s", stored_xce->entry.name.str.val);1748 xc_processor_restore_xc_entry_php_t(& xce, stored_xceTSRMLS_CC);1749 xc_processor_restore_xc_entry_data_php_t(stored_ xce, &php, xce.php, xc_readonly_protection TSRMLS_CC);1750 xce.php = &php;1728 TRACE("restoring %d:%s", stored_entry->file_inode, stored_entry->entry.name.str.val); 1729 xc_processor_restore_xc_entry_php_t(&restored_entry, stored_entry TSRMLS_CC); 1730 xc_processor_restore_xc_entry_data_php_t(stored_entry, &restored_php, stored_php, xc_readonly_protection TSRMLS_CC); 1731 restored_entry.php = &restored_php; 1751 1732 #ifdef SHOW_DPRINT 1752 xc_dprint(& xce, 0 TSRMLS_CC);1733 xc_dprint(&restored_entry, 0 TSRMLS_CC); 1753 1734 #endif 1754 1735 1755 1736 catched = 0; 1756 1737 zend_try { 1757 op_array = xc_entry_install(& xce, h TSRMLS_CC);1738 op_array = xc_entry_install(&restored_entry, h TSRMLS_CC); 1758 1739 } zend_catch { 1759 1740 catched = 1; … … 1761 1742 1762 1743 #ifdef HAVE_XCACHE_CONSTANT 1763 if ( php.constinfos) {1764 efree( php.constinfos);1765 } 1766 #endif 1767 if ( php.funcinfos) {1768 efree( php.funcinfos);1769 } 1770 if ( php.classinfos) {1771 efree( php.classinfos);1744 if (restored_php.constinfos) { 1745 efree(restored_php.constinfos); 1746 } 1747 #endif 1748 if (restored_php.funcinfos) { 1749 efree(restored_php.funcinfos); 1750 } 1751 if (restored_php.classinfos) { 1752 efree(restored_php.classinfos); 1772 1753 } 1773 1754 … … 1777 1758 CG(in_compilation) = 0; 1778 1759 CG(compiled_filename) = NULL; 1779 TRACE("restored %s", stored_xce->entry.name.str.val);1760 TRACE("restored %d:%s", stored_entry->file_inode, stored_entry->entry.name.str.val); 1780 1761 return op_array; 1781 1762 } … … 1787 1768 } 1788 1769 /* }}} */ 1789 static zend_op_array *xc_compile_file_ex(xc_entry_hash_t *entry_hash, xc_entry_php_t *xce, zend_file_handle *h, int type TSRMLS_DC) /* {{{ */ 1790 { 1770 static zend_op_array *xc_compile_file_ex(xc_compiler_t *compiler, zend_file_handle *h, int type TSRMLS_DC) /* {{{ */ 1771 { 1772 /* 1773 if (clog) { 1774 return old; 1775 } 1776 1777 if (cached_entry = getby entry_hash) { 1778 php = cached_entry.php; 1779 php = restore(php); 1780 return php; 1781 } 1782 else { 1783 if (!(php = getby md5)) { 1784 if (clog) { 1785 return old; 1786 } 1787 php = compile(); 1788 entry = create entries[entry]; 1789 } 1790 1791 entry.php = php; 1792 return php; 1793 } 1794 */ 1795 1791 1796 zend_op_array *op_array; 1792 xc_entry_php_t *stored_ xce;1797 xc_entry_php_t *stored_entry; 1793 1798 xc_entry_data_php_t *stored_php; 1794 1799 zend_bool gaveup = 0; 1795 1800 zend_bool catched = 0; 1796 zend_bool newlycompiled;1797 1801 xc_sandbox_t sandbox; 1798 xc_cache_t *cache = xc_php_caches[ entry_hash->cacheslotid];1802 xc_cache_t *cache = xc_php_caches[compiler->entry_hash.cacheid]; 1799 1803 1800 1804 /* stale clogs precheck */ … … 1803 1807 return old_compile_file(h, type TSRMLS_CC); 1804 1808 } 1809 1805 1810 /* {{{ entry_lookup/hit/md5_init/php_lookup */ 1806 stored_ xce= NULL;1811 stored_entry = NULL; 1807 1812 stored_php = NULL; 1808 1813 ENTER_LOCK_EX(cache) { 1809 stored_ xce = (xc_entry_php_t *) xc_entry_find_dmz(XC_TYPE_PHP, cache, entry_hash->entryslotid, (xc_entry_t *) xceTSRMLS_CC);1810 if (stored_ xce) {1814 stored_entry = (xc_entry_php_t *) xc_entry_find_dmz(XC_TYPE_PHP, cache, compiler->entry_hash.entryslotid, (xc_entry_t *) &compiler->new_entry TSRMLS_CC); 1815 if (stored_entry) { 1811 1816 xc_cache_hit_dmz(cache TSRMLS_CC); 1812 1817 1813 TRACE("hit %s, holding", stored_xce->entry.name.str.val); 1814 xc_entry_hold_php_dmz(cache, stored_xce TSRMLS_CC); 1815 } 1816 else { 1817 cache->misses ++; 1818 TRACE("miss %s", xce->entry.name.str.val); 1819 1820 if (xc_entry_init_key_php_md5(cache, xce->php, xce TSRMLS_CC) != SUCCESS) { 1821 gaveup = 1; 1822 break; 1823 } 1824 1825 stored_php = xc_php_find_dmz(cache, xce->php TSRMLS_CC); 1826 1827 /* miss but compiling */ 1828 if (!stored_php) { 1829 if (XG(request_time) - cache->compiling < 30) { 1830 TRACE("%s", "miss but compiling"); 1831 cache->clogs ++; 1832 gaveup = 1; 1833 break; 1834 } 1835 TRACE("%s", "php_lookup miss"); 1836 } 1837 else { 1838 TRACE("%s", "php_lookup hit"); 1839 } 1840 1841 cache->compiling = XG(request_time); 1842 } 1818 TRACE(" hit %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val); 1819 xc_entry_hold_php_dmz(cache, stored_entry TSRMLS_CC); 1820 stored_php = stored_entry->php; 1821 break; 1822 } 1823 1824 cache->misses ++; 1825 TRACE("miss entry %d:%s", compiler->new_entry.file_inode, compiler->new_entry.entry.name.str.val); 1826 1827 if (xc_entry_init_key_php_md5(cache, compiler TSRMLS_CC) != SUCCESS) { 1828 gaveup = 1; 1829 break; 1830 } 1831 1832 stored_php = xc_php_find_dmz(cache, &compiler->new_php TSRMLS_CC); 1833 1834 /* miss but compiling */ 1835 if (stored_php) { 1836 compiler->new_entry.php = stored_php; 1837 xc_php_addref_dmz(stored_php); 1838 if (!compiler->opened_path) { 1839 compiler->opened_path = expand_filepath(compiler->filename, compiler->opened_path_buffer TSRMLS_CC); 1840 } 1841 xc_entry_init_key_php_entry(&compiler->new_entry, compiler->opened_path TSRMLS_CC); 1842 stored_entry = xc_entry_php_store_dmz(cache, compiler->entry_hash.entryslotid, &compiler->new_entry TSRMLS_CC); 1843 TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val); 1844 xc_entry_hold_php_dmz(cache, stored_entry TSRMLS_CC); 1845 break; 1846 } 1847 1848 if (XG(request_time) - cache->compiling < 30) { 1849 TRACE("%s", "miss php, but compiling"); 1850 cache->clogs ++; 1851 gaveup = 1; 1852 break; 1853 } 1854 1855 TRACE("%s", "miss php, going to compile"); 1856 cache->compiling = XG(request_time); 1843 1857 } LEAVE_LOCK_EX(cache); 1844 1858 … … 1848 1862 } 1849 1863 1850 /* hit*/1851 if (stored_ xce) {1852 return xc_compile_restore(stored_ xce, h TSRMLS_CC);1864 /* found entry */ 1865 if (stored_entry) { 1866 return xc_compile_restore(stored_entry, stored_php, h TSRMLS_CC); 1853 1867 } 1854 1868 … … 1858 1872 } 1859 1873 /* }}} */ 1874 1860 1875 op_array = NULL; 1861 1876 /* {{{ compile */ 1862 if (stored_php) { 1863 newlycompiled = 0; 1864 xc_entry_init_key_php_entry(xce, h->opened_path ? h->opened_path : h->filename TSRMLS_CC); 1865 xce->php = stored_php; 1866 } 1867 else { 1868 newlycompiled = 1; 1869 1870 /* make compile inside sandbox */ 1871 xc_sandbox_init(&sandbox, h->opened_path ? h->opened_path : h->filename TSRMLS_CC); 1877 /* make compile inside sandbox */ 1878 xc_sandbox_init(&sandbox, h->opened_path ? h->opened_path : h->filename TSRMLS_CC); 1872 1879 1873 1880 #ifdef HAVE_XCACHE_CONSTANT 1874 xce->php->constinfos = NULL;1875 #endif 1876 xce->php->funcinfos = NULL;1877 xce->php->classinfos = NULL;1881 compiler->new_php.constinfos = NULL; 1882 #endif 1883 compiler->new_php.funcinfos = NULL; 1884 compiler->new_php.classinfos = NULL; 1878 1885 #ifdef ZEND_ENGINE_2_1 1879 xce->php->autoglobals = NULL; 1880 #endif 1881 1882 memset(&xce->php->op_array_info, 0, sizeof(xce->php->op_array_info)); 1883 1884 zend_try { 1885 op_array = xc_compile_php(xce, xce->php, h, type TSRMLS_CC); 1886 } zend_catch { 1887 catched = 1; 1888 } zend_end_try(); 1889 1890 if (catched || !op_array) { 1891 goto err_aftersandbox; 1892 } 1893 1894 /* not cachable */ 1895 if (!xce->php->op_array) { 1896 cache->compiling = 0; 1897 /* it's not cachable, but don't scare the users with high misses */ 1898 cache->misses --; 1899 xc_sandbox_free(&sandbox, XC_InstallNoBinding TSRMLS_CC); 1900 return op_array; 1901 } 1886 compiler->new_php.autoglobals = NULL; 1887 #endif 1888 memset(&compiler->new_php.op_array_info, 0, sizeof(compiler->new_php.op_array_info)); 1889 1890 zend_try { 1891 op_array = xc_compile_php(compiler, h, type TSRMLS_CC); 1892 } zend_catch { 1893 catched = 1; 1894 } zend_end_try(); 1895 1896 if (catched || !op_array) { 1897 goto err_aftersandbox; 1898 } 1899 1900 /* not cachable */ 1901 if (!compiler->new_php.op_array) { 1902 cache->compiling = 0; 1903 /* it's not cachable, but don't scare the users with high misses */ 1904 cache->misses --; 1905 xc_sandbox_free(&sandbox, XC_InstallNoBinding TSRMLS_CC); 1906 return op_array; 1902 1907 } 1903 1908 /* }}} */ 1904 #ifdef HAVE_INODE1905 /* {{{ path name fix1906 * inode enabled entry hash/compare on name1907 * do not update to its name to real pathname1908 * WARNING: this code is required to be after compile1909 */1910 if (xce->file_inode) {1911 const char *filename = h->opened_path ? h->opened_path : h->filename;1912 if (xce->entry.name.str.val != filename) {1913 xce->entry.name.str.val = (char *) filename;1914 xce->entry.name.str.len = strlen(filename);1915 }1916 }1917 /* }}} */1918 #endif1919 1909 #ifdef SHOW_DPRINT 1920 xc_dprint(xce, 0 TSRMLS_CC);1921 #endif 1922 stored_xce = NULL; 1910 compiler->new_entry.php = &compiler->new_php; 1911 xc_dprint(&compiler->new_entry, 0 TSRMLS_CC); 1912 #endif 1923 1913 ENTER_LOCK_EX(cache) { /* {{{ php_store/entry_store */ 1924 1914 /* php_store */ 1925 if (newlycompiled) { 1926 stored_php = xc_php_store_dmz(cache, xce->php TSRMLS_CC); 1927 if (!stored_php) { 1928 /* error */ 1929 break; 1930 } 1915 stored_php = xc_php_store_dmz(cache, &compiler->new_php TSRMLS_CC); 1916 if (!stored_php) { 1917 /* error */ 1918 break; 1931 1919 } 1932 1920 /* entry_store */ 1921 compiler->new_entry.php = stored_php; 1933 1922 xc_php_addref_dmz(stored_php); 1934 stored_xce = xc_entry_php_store_dmz(cache, entry_hash->entryslotid, xce TSRMLS_CC); 1935 if (stored_xce) { 1936 stored_xce->php = stored_php; 1937 } 1938 else { 1939 /* error */ 1923 stored_entry = xc_entry_php_store_dmz(cache, compiler->entry_hash.entryslotid, &compiler->new_entry TSRMLS_CC); 1924 if (!stored_entry) { 1940 1925 xc_php_release_dmz(cache, stored_php); 1941 1926 } 1942 1927 } LEAVE_LOCK_EX(cache); 1943 1928 /* }}} */ 1944 TRACE("%s", stored_ xce? "stored" : "store failed");1929 TRACE("%s", stored_entry ? "stored" : "store failed"); 1945 1930 1946 1931 cache->compiling = 0; … … 1949 1934 } 1950 1935 1951 if (newlycompiled) { 1952 xc_free_php(xce->php TSRMLS_CC); 1953 } 1954 1955 if (stored_xce) { 1936 xc_free_php(&compiler->new_php TSRMLS_CC); 1937 1938 if (stored_entry) { 1956 1939 if (op_array) { 1957 1940 #ifdef ZEND_ENGINE_2 … … 1963 1946 h = NULL; 1964 1947 } 1965 if (newlycompiled) { 1966 xc_sandbox_free(&sandbox, XC_NoInstall TSRMLS_CC); 1967 } 1968 return xc_compile_restore(stored_xce, h TSRMLS_CC); 1948 xc_sandbox_free(&sandbox, XC_NoInstall TSRMLS_CC); 1949 return xc_compile_restore(stored_entry, stored_php, h TSRMLS_CC); 1969 1950 } 1970 1951 else { 1971 if (newlycompiled) { 1972 zend_op_array *old_active_op_array = CG(active_op_array); 1973 /* install it */ 1974 CG(active_op_array) = op_array; 1975 xc_sandbox_free(&sandbox, XC_Install TSRMLS_CC); 1976 CG(active_op_array) = old_active_op_array; 1977 } 1952 zend_op_array *old_active_op_array = CG(active_op_array); 1953 /* install it */ 1954 CG(active_op_array) = op_array; 1955 xc_sandbox_free(&sandbox, XC_Install TSRMLS_CC); 1956 CG(active_op_array) = old_active_op_array; 1978 1957 } 1979 1958 return op_array; 1980 1959 1981 1960 err_aftersandbox: 1982 if (newlycompiled) { 1983 xc_free_php(xce->php TSRMLS_CC); 1984 xc_sandbox_free(&sandbox, XC_NoInstall TSRMLS_CC); 1985 } 1961 xc_free_php(&compiler->new_php TSRMLS_CC); 1962 xc_sandbox_free(&sandbox, XC_NoInstall TSRMLS_CC); 1986 1963 1987 1964 if (catched) { … … 1995 1972 static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /* {{{ */ 1996 1973 { 1974 xc_compiler_t compiler; 1997 1975 zend_op_array *op_array; 1998 xc_entry_php_t xce;1999 xc_entry_hash_t entry_hash;2000 xc_entry_data_php_t php;2001 const char *filename;2002 1976 2003 1977 assert(xc_initized); 2004 1978 2005 TRACE(" type = %d\n", h->type);1979 TRACE("xc_compile_file: type=%d name=%s", h->type, h->filename ? h->filename : "NULL"); 2006 1980 if (!XG(cacher)) { 2007 1981 op_array = old_compile_file(h, type TSRMLS_CC); 1982 TRACE("%s", "cacher not enabled"); 2008 1983 return op_array; 2009 1984 } 2010 1985 2011 1986 /* {{{ entry_init_key */ 2012 filename = h->opened_path ? h->opened_path : h->filename;2013 xce.php = &php;2014 if (xc_entry_init_key_php(& entry_hash, &xce, filenameTSRMLS_CC) != SUCCESS) {2015 TRACE("failed to init key for %s", filename);1987 compiler.opened_path = h->opened_path; 1988 compiler.filename = compiler.opened_path ? compiler.opened_path : h->filename; 1989 if (xc_entry_init_key_php(&compiler TSRMLS_CC) != SUCCESS) { 1990 TRACE("failed to init key for %s", compiler.filename); 2016 1991 return old_compile_file(h, type TSRMLS_CC); 2017 1992 } 2018 1993 /* }}} */ 2019 1994 2020 op_array = xc_compile_file_ex(& entry_hash, &xce, h, type TSRMLS_CC);2021 2022 xc_entry_free_key_php(& xceTSRMLS_CC);1995 op_array = xc_compile_file_ex(&compiler, h, type TSRMLS_CC); 1996 1997 xc_entry_free_key_php(&compiler.new_entry TSRMLS_CC); 2023 1998 2024 1999 return op_array; … … 2676 2651 hv = xc_entry_hash_var((xc_entry_t *) xce TSRMLS_CC); 2677 2652 2678 entry_hash->cache slotid = (hv & xc_var_hcache.mask);2653 entry_hash->cacheid = (hv & xc_var_hcache.mask); 2679 2654 hv >>= xc_var_hcache.bits; 2680 2655 entry_hash->entryslotid = (hv & xc_var_hentry.mask); … … 2700 2675 } 2701 2676 xc_entry_init_key_var(&entry_hash, &xce, name TSRMLS_CC); 2702 cache = xc_var_caches[entry_hash.cache slotid];2677 cache = xc_var_caches[entry_hash.cacheid]; 2703 2678 2704 2679 ENTER_LOCK(cache) { … … 2742 2717 2743 2718 xc_entry_init_key_var(&entry_hash, &xce, name TSRMLS_CC); 2744 cache = xc_var_caches[entry_hash.cache slotid];2719 cache = xc_var_caches[entry_hash.cacheid]; 2745 2720 2746 2721 ENTER_LOCK(cache) { … … 2772 2747 } 2773 2748 xc_entry_init_key_var(&entry_hash, &xce, name TSRMLS_CC); 2774 cache = xc_var_caches[entry_hash.cache slotid];2749 cache = xc_var_caches[entry_hash.cacheid]; 2775 2750 2776 2751 ENTER_LOCK(cache) { … … 2806 2781 } 2807 2782 xc_entry_init_key_var(&entry_hash, &xce, name TSRMLS_CC); 2808 cache = xc_var_caches[entry_hash.cache slotid];2783 cache = xc_var_caches[entry_hash.cacheid]; 2809 2784 2810 2785 ENTER_LOCK(cache) { … … 2879 2854 2880 2855 xc_entry_init_key_var(&entry_hash, &xce, name TSRMLS_CC); 2881 cache = xc_var_caches[entry_hash.cache slotid];2856 cache = xc_var_caches[entry_hash.cacheid]; 2882 2857 2883 2858 ENTER_LOCK(cache) { … … 2918 2893 xce.entry.ctime = stored_xce->entry.ctime; 2919 2894 xce.entry.hits = stored_xce->entry.hits; 2920 xc_entry_remove_dmz(XC_TYPE_VAR, cache, entry_hash. cacheslotid, (xc_entry_t *) stored_xce TSRMLS_CC);2921 } 2922 xc_entry_var_store_dmz(cache, entry_hash. cacheslotid, &xce TSRMLS_CC);2895 xc_entry_remove_dmz(XC_TYPE_VAR, cache, entry_hash.entryslotid, (xc_entry_t *) stored_xce TSRMLS_CC); 2896 } 2897 xc_entry_var_store_dmz(cache, entry_hash.entryslotid, &xce TSRMLS_CC); 2923 2898 2924 2899 } LEAVE_LOCK(cache); -
trunk/xcache.h
r855 r859 374 374 zend_ulong refcount; /* count of entries referencing to this data */ 375 375 376 size_t file_size;377 376 zend_ulong hits; /* hits of this php */ 378 377 size_t size; … … 432 431 zend_ulong refcount; /* count of php instances holding this entry */ 433 432 time_t file_mtime; 433 size_t file_size; 434 434 #ifdef HAVE_INODE 435 435 int file_device; … … 456 456 /* }}} */ 457 457 typedef struct xc_entry_hash_t { /* {{{ */ 458 xc_hash_value_t cache slotid;458 xc_hash_value_t cacheid; 459 459 xc_hash_value_t entryslotid; 460 460 } xc_entry_hash_t; 461 /* }}} */ 462 typedef struct xc_compiler_t { /* {{{ */ 463 const char *filename; 464 const char *opened_path; 465 char opened_path_buffer[MAXPATHLEN]; 466 467 xc_entry_hash_t entry_hash; 468 xc_entry_php_t new_entry; 469 xc_entry_data_php_t new_php; 470 } xc_compiler_t; 461 471 /* }}} */ 462 472
Note: See TracChangeset
for help on using the changeset viewer.

