Changeset 1564 in svn


Ignore:
Timestamp:
2014-11-11T13:48:34Z (4 years ago)
Author:
Xuefer
Message:

cacher: fix recursive object caching, fix multiple object caching (typo of SRC)

Location:
trunk/processor
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/foot.m4

    r1561 r1564  
    132132        zend_hash_add(&processor.zvalptrs, (char *)src->value, sizeof(src->value), (void *) &dst, sizeof(dst), NULL);
    133133    }
    134     processor.entry_var_src = src;
    135134    processor.index_to_ce = index_to_ce;
    136135
     
    138137    if (src->objects_count) {
    139138        processor.object_handles = emalloc(sizeof(*processor.object_handles) * src->objects_count);
    140         xc_vector_init(zend_object_handle, &processor.objects, 0);
    141139        for (i = 0; i < src->objects_count; ++i) {
    142140            zend_object *object = emalloc(sizeof(*object));
     141            processor.object_handles[i] = zend_objects_store_put(object, (zend_objects_store_dtor_t) zend_objects_destroy_object, (zend_objects_free_object_storage_t) zend_objects_free_object_storage, NULL TSRMLS_CC);
    143142            xc_restore_zend_object(&processor, object, &src->objects[i] TSRMLS_CC);
    144             processor.object_handles[i] = zend_objects_store_put(object, (zend_objects_store_dtor_t) zend_objects_destroy_object, (zend_objects_free_object_storage_t) zend_objects_free_object_storage, NULL TSRMLS_CC);
    145143        }
    146144    }
  • trunk/processor/processor.m4

    r1561 r1564  
    124124        DONE(ce)
    125125    ', `IFSTORE(`
    126         DST(ce) = (zend_class_entry *) xc_var_store_ce(processor, DST(ce) TSRMLS_CC);
     126        DST(ce) = (zend_class_entry *) xc_var_store_ce(processor, SRC(ce) TSRMLS_CC);
    127127        DONE(ce)
    128128    ', `IFRESTORE(`
    129129        assert(processor->index_to_ce);
    130         DST(ce) = processor->index_to_ce[(size_t) DST(ce)];
     130        DST(ce) = processor->index_to_ce[(size_t) SRC(ce)];
    131131        DONE(ce)
    132132    ', `
     
    150150        DONE(handle)
    151151    ', `IFSTORE(`
    152         DST(handle) = (zend_object_handle) xc_var_store_handle(processor, DST(handle) TSRMLS_CC);
     152        DST(handle) = (zend_object_handle) xc_var_store_handle(processor, SRC(handle) TSRMLS_CC);
    153153        DONE(handle)
    154154    ', `IFRESTORE(`
    155         DST(handle) = xc_var_restore_handle(processor, (size_t) DST(handle) TSRMLS_CC);
     155        DST(handle) = xc_var_restore_handle(processor, (size_t) SRC(handle) TSRMLS_CC);
    156156        DONE(handle)
    157157    ', `
     
    13851385DEF_STRUCT_P_FUNC(`xc_entry_var_t', , `dnl {{{
    13861386    IFCALCSTORE(`xc_entry_var_t *vsrc = /* const_cast */ (xc_entry_var_t *) src;')
     1387    IFRESTORE(`processor->entry_var_src = src;')
    13871388
    13881389    dnl restore is done in foot.m4
  • trunk/processor/var-helper.h

    r1562 r1564  
    2121
    2222    if (zend_hash_index_find(&processor->handle_to_index, handle, (void **) &index) != SUCCESS) {
    23         php_error_docref(NULL TSRMLS_CC, E_CORE_ERROR, "Internal error: handle not found in objects");
     23        php_error_docref(NULL TSRMLS_CC, E_CORE_ERROR, "Internal error: handle %d not found in objects", handle);
    2424        return (size_t) -1;
    2525    }
Note: See TracChangeset for help on using the changeset viewer.