Changeset 356 for eaccelerator


Ignore:
Timestamp:
06/22/09 09:48:49 (15 months ago)
Author:
bart
Message:

Sync with  http://hg.vanbrabant.eu/hg/bart/eaccelerator/

Location:
eaccelerator/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • eaccelerator/trunk/cache.c

    r350 r356  
    357357            p = p->next; 
    358358        } 
    359         EACCELERATOR_UNLOCK_RW(); 
    360         EACCELERATOR_PROTECT(); 
    361359        if (x) { 
    362360            memcpy(return_value, &x->value, sizeof(zval)); 
    363361            restore_zval(return_value TSRMLS_CC); 
     362            EACCELERATOR_UNLOCK_RW(); 
     363            EACCELERATOR_PROTECT(); 
    364364            if (xlen != key_len) { 
    365365                efree(xkey); 
     
    367367            return 1; 
    368368        } 
     369        EACCELERATOR_UNLOCK_RW(); 
     370        EACCELERATOR_PROTECT(); 
    369371    } 
    370372 
  • eaccelerator/trunk/config.m4

    r269 r356  
    369369  fi 
    370370 
    371   AC_CHECK_FUNC(sched_yield,[ 
    372       AC_DEFINE(HAVE_SCHED_YIELD, 1, [Define if ou have sched_yield function]) 
    373     ]) 
    374  
    375371  AC_CHECK_FUNC(mprotect,[ 
    376372      AC_DEFINE(HAVE_MPROTECT, 1, [Define if ou have mprotect function]) 
  • eaccelerator/trunk/ea_restore.c

    r352 r356  
    277277    restore_zval(p TSRMLS_CC); 
    278278    /* hrak: reset refcount to make sure there is one reference to this val, and prevent memleaks */ 
    279     RESET_PZVAL_REFCOUNT(p); 
     279#ifdef ZEND_ENGINE_2_3 
     280    Z_SET_REFCOUNT_P(p, 1); 
     281#else 
     282    p->refcount = 1; 
     283#endif 
    280284    return p; 
    281285} 
     
    352356    case IS_OBJECT: 
    353357    case IS_STRING: 
    354         if (Z_STRVAL_P(zv) == NULL || Z_STRLEN_P(zv) == 0) { 
     358        if (Z_STRVAL_P(zv) == NULL || Z_STRVAL_P(zv) == "" || Z_STRLEN_P(zv) == 0) { 
    355359            Z_STRLEN_P(zv) = 0; 
    356360            Z_STRVAL_P(zv) = empty_string; 
     
    541545#ifdef ZEND_ENGINE_2_3 
    542546    to->this_var = from->this_var; 
     547    to->early_binding = from->early_binding; 
    543548#else 
    544549    to->uses_this = from->uses_this; 
     
    557562        to->static_variables = restore_zval_hash(NULL, from->static_variables); 
    558563        to->static_variables->pDestructor = ZVAL_PTR_DTOR; 
    559         if (EAG(class_entry) != NULL) { 
    560             Bucket *p = to->static_variables->pListHead; 
    561             while (p != NULL) { 
    562                 RESET_PZVAL_REFCOUNT((zval*) p->pDataPtr); 
    563                 p = p->pListNext; 
    564             } 
    565         } 
    566564    } 
    567565 
  • eaccelerator/trunk/ea_store.c

    r348 r356  
    563563#ifdef ZEND_ENGINE_2_3 
    564564    to->this_var = from->this_var; 
     565    to->early_binding = from->early_binding; 
    565566#else 
    566567    to->uses_this = from->uses_this; 
  • eaccelerator/trunk/eaccelerator.h

    r350 r356  
    204204        zend_uchar type; 
    205205#ifdef ZEND_ENGINE_2_3 
     206    zend_uint early_binding; 
    206207    zend_uint this_var; 
    207208#else 
  • eaccelerator/trunk/opcodes.c

    r346 r356  
    3636#endif 
    3737 
    38 #define OP1_VAR_2 OP1_STD 
     38#  define OP1_VAR_2 OP1_STD 
    3939 
    4040#define LAST_OPCODE (sizeof(opcodes)/sizeof(opcodes[0])) 
     
    101101  OPDEF("END_SILENCE",               EXT_UNUSED | OP1_TMP    | OP2_UNUSED | RES_UNUSED), /* 58 */ 
    102102  OPDEF("INIT_FCALL_BY_NAME",        EXT_INIT_FCALL | OP1_STD | OP2_STD   | RES_UNUSED), /* 59 */ 
    103   OPDEF("DO_FCALL",                  EXT_FCALL  | OP1_STD    | OP2_OPLINE | RES_VAR), /* 60 */ 
    104   OPDEF("DO_FCALL_BY_NAME",          EXT_FCALL  | OP1_STD    | OP2_OPLINE | RES_VAR), /* 61 */ 
     103  OPDEF("DO_FCALL",                  EXT_FCALL  | OP1_STD    | OP2_UNUSED | RES_VAR), /* 60 */ 
     104  OPDEF("DO_FCALL_BY_NAME",          EXT_FCALL  | OP1_UNUSED | OP2_UNUSED | RES_VAR), /* 61 */ 
    105105  OPDEF("RETURN",                    EXT_UNUSED | OP1_STD    | OP2_UNUSED | RES_UNUSED), /* 62 */ 
    106106  OPDEF("RECV",                      EXT_UNUSED | OP1_ARG    | OP2_UNUSED | RES_VAR), /* 63 */ 
     
    145145  OPDEF("FETCH_DIM_TMP_VAR",         EXT_UNUSED | OP1_STD    | OP2_STD    | RES_VAR), /* 98 */ 
    146146  OPDEF("FETCH_CONSTANT",            EXT_UNUSED | OP1_UCLASS | OP2_STD    | RES_TMP), /* 99 */ 
    147   OPDEF("FETCH_CONSTANT",            EXT_UNUSED | OP1_STD    | OP2_UNUSED | RES_TMP), /* 99 */ 
    148147  OPDEF("DECLARE_FUNCTION_OR_CLASS", EXT_DECLARE| OP1_STD    | OP2_STD    | RES_UNUSED), /* 100 */ 
    149148  OPDEF("EXT_STMT",                  EXT_STD    | OP1_STD    | OP2_STD    | RES_STD), /* 101 */ 
     
    199198  OPDEF("ASSIGN_DIM",                EXT_UNUSED | OP1_STD    | OP2_STD    | RES_VAR),  /* 147 */ 
    200199  OPDEF("ISSET_ISEMPTY_PROP_OBJ",    EXT_ISSET  | OP1_STD    | OP2_STD    | RES_TMP), /* 148 */ 
    201   OPDEF("HANDLE_EXCEPTION",          EXT_STD    | OP1_UNUSED | OP2_UNUSED | RES_STD)  /* 149 */ 
     200  OPDEF("HANDLE_EXCEPTION",          EXT_STD    | OP1_UNUSED | OP2_UNUSED | RES_STD),  /* 149 */ 
     201  OPDEF("USER_OPCODE",               EXT_STD    | OP1_UNUSED | OP2_UNUSED | RES_STD)  /* 150 */ 
    202202# ifdef ZEND_ENGINE_2_3 
    203203  , 
Note: See TracChangeset for help on using the changeset viewer.