Browse Source

merged r487,r491,r492,r495 from trunk

git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.3@618 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.3
Xuefer 12 years ago
parent
commit
3d330fdd9c
  1. 1
      ChangeLog
  2. 30
      const_string.c
  3. 18
      processor/processor.m4
  4. 3
      xcache.h

1
ChangeLog

@ -6,6 +6,7 @@
1.2.2 2007-12-29
== ChangeLog ==
* added module dependency
* added module dependency
* live with wrong system time: allow caching files with mtime in further
* bug fix for compatibility with Zend Optimizer and other non-cachable

30
const_string.c

@ -47,27 +47,7 @@ static const char *const data_type_names[] = {
/* 7 */ "IS_RESOURCE",
/* 8 */ "IS_CONSTANT",
/* 9 */ "IS_CONSTANT_ARRAY",
/* 10 */ "IS_UNICODE",
#if 0
/* 11 */ "",
/* 12 */ "",
/* 13 */ "",
/* 14 */ "",
/* 15 */ "", "", "", "", "",
/* IS_CONSTANT_INDEX */
/* 20 */ "CIDX IS_NULL",
/* 21 */ "CIDX IS_LONG",
/* 22 */ "CIDX IS_DOUBLE",
/* 23 */ "CIDX IS_BOOL",
/* 24 */ "CIDX IS_ARRAY",
/* 25 */ "CIDX IS_OBJECT",
/* 26 */ "CIDX IS_STRING",
/* 27 */ "CIDX IS_RESOURCE",
/* 28 */ "CIDX IS_CONSTANT",
/* 29 */ "CIDX IS_CONSTANT_ARRAY"
/* 20 */ "CIDX IS_UNICODE",
#endif
/* 10 */ "IS_UNICODE"
};
zend_uchar xc_get_data_type_count()
@ -77,13 +57,7 @@ zend_uchar xc_get_data_type_count()
const char *xc_get_data_type(zend_uchar data_type)
{
#if 0
if (data_type & IS_CONSTANT_INDEX) {
data_type = (data_type & ~IS_CONSTANT_INDEX) + 20;
}
#endif
data_type &= ~IS_CONSTANT_INDEX;
return data_type_names[data_type];
return data_type_names[(data_type & IS_CONSTANT_TYPE_MASK)];
}
/* }}} */
/* {{{ xc_get_opcode */

18
processor/processor.m4

@ -78,7 +78,7 @@ DEF_STRUCT_P_FUNC(`zval', , `dnl {{{
zval_dtor(dst);
*dst = *src;
zval_copy_ctor(dst);
ZVAL_REFCOUNT(dst) = 1;
Z_SET_REFCOUNT(*dst, 1);
DONE(value)
DONE(type)
#ifdef ZEND_ENGINE_2_3
@ -95,7 +95,7 @@ DEF_STRUCT_P_FUNC(`zval', , `dnl {{{
/* Variable information */
dnl {{{ zvalue_value
DISABLECHECK(`
switch (src->type & ~IS_CONSTANT_INDEX) {
switch ((Z_TYPE_P(src) & IS_CONSTANT_TYPE_MASK)) {
case IS_LONG:
case IS_RESOURCE:
case IS_BOOL:
@ -755,7 +755,11 @@ DEF_STRUCT_P_FUNC(`xc_entry_data_php_t', , `dnl {{{
#ifdef HAVE_XCACHE_CONSTANT
DISPATCH(zend_uint, constinfo_cnt)
STRUCT_ARRAY(constinfo_cnt, xc_constinfo_t, constinfos)
IFRESTORE(`
COPY(constinfos)
', `
STRUCT_ARRAY(constinfo_cnt, xc_constinfo_t, constinfos)
')
#endif
DISPATCH(zend_uint, funcinfo_cnt)
@ -768,12 +772,16 @@ DEF_STRUCT_P_FUNC(`xc_entry_data_php_t', , `dnl {{{
')
')
STRUCT_ARRAY(classinfo_cnt, xc_classinfo_t, classinfos)
popdef(`BEFORE_LOOP')
#ifdef ZEND_ENGINE_2_1
DISPATCH(zend_uint, autoglobal_cnt)
STRUCT_ARRAY(autoglobal_cnt, xc_autoglobal_t, autoglobals)
IFRESTORE(`
COPY(autoglobals)
', `
STRUCT_ARRAY(autoglobal_cnt, xc_autoglobal_t, autoglobals)
')
#endif
DISPATCH(zend_bool, have_early_binding)
popdef(`BEFORE_LOOP')
')
dnl }}}
DEF_STRUCT_P_FUNC(`xc_entry_data_var_t', , `dnl {{{

3
xcache.h

@ -55,6 +55,9 @@
#ifndef Z_SET_REFCOUNT
# define Z_SET_REFCOUNT(z, rc) (z).refcount = rc;
#endif
#ifndef IS_CONSTANT_TYPE_MASK
# define IS_CONSTANT_TYPE_MASK 0xf
#endif
/* {{{ dirty fix for PHP 6 */
#ifdef add_assoc_long_ex

Loading…
Cancel
Save