Changeset 1474


Ignore:
Timestamp:
2013-11-13T06:01:22+01:00 (19 months ago)
Author:
moo
Message:

relocate: fix ifrelocate()

Location:
trunk/processor
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/hashtable.m4

    r1472 r1474  
    4848    dnl }}}
    4949    Bucket *srcBucket;
    50     IFRELOCATE(`Bucket *next;')
     50    IFCOPY(`Bucket *first = NULL, *last = NULL;')
    5151    IFRELOCATE(`Bucket *dstBucket = NULL;')
    52     IFCOPY(`Bucket *dstBucket = NULL, *first = NULL, *last = NULL;')
    53     dnl only used for copy
    54     IFCOPY(`uint n;')
     52    IFRESTORE(`Bucket *dstBucket = NULL;')
    5553    IFRELOCATE(`uint n;')
     54    IFRESTORE(`uint n;')
    5655    IFCALCCOPY(`size_t bucketSize;')
    5756
     
    148147        for (n = 0; n < SRC(`nTableSize'); ++n) {
    149148            if (SRC(`arBuckets[n]')) {
    150                 next = PTR_FROM_VIRTUAL_EX(`Bucket', `DST(`arBuckets[n]')');
     149                Bucket *next = PTR_FROM_VIRTUAL_EX(`Bucket', `DST(`arBuckets[n]')');
    151150                do {
    152151                        dstBucket = next;
  • trunk/processor/main.m4

    r1473 r1474  
    242242define(`IFCOPY', `IFSTORE(`$1', `IFRESTORE(`$1', `$2')')')
    243243define(`IFCALCCOPY', `IFCALC(`$1', `IFCOPY(`$1', `$2')')')
    244 define(`IFRELOCATE', `ifelse(PROCESSOR_TYPE, `relocate', `$1', `$2')')
    245 define(`IFRELOCATE', `IFSTORE(`$1', `IFRELOCATE(`$1', `$2')')')
     244define(`IFRELOCATEONLY', `ifelse(PROCESSOR_TYPE, `relocate', `$1', `$2')')
     245define(`IFRELOCATE', `IFSTORE(`$1', `IFRELOCATEONLY(`$1', `$2')')')
    246246define(`IFDPRINT', `ifelse(PROCESSOR_TYPE, `dprint', `$1', `$2')')
    247247define(`IFDASM', `ifelse(PROCESSOR_TYPE, `dasm', `$1', `$2')')
  • trunk/processor/struct.m4

    r1472 r1474  
    1515        IFSTORE(  `xc_processor_t *processor, $1 *dst, const $1 * const src')
    1616        IFRESTORE(`xc_processor_t *processor, $1 *dst, const $1 * const src')
    17         IFRELOCATE(`$1 *const dst, ptrdiff_t ptrdiff, ptrdiff_t relocatediff')
     17        IFRELOCATEONLY(`$1 *const dst, ptrdiff_t ptrdiff, ptrdiff_t relocatediff')
    1818        IFDASM(`xc_dasm_t *dasm, zval *dst, const $1 * const src')
    1919        TSRMLS_DC
     
    148148        IFSTORE(  `processor, $6 $2, $6 $3')
    149149        IFRESTORE(`processor, $6 $2, $6 $3')
    150         IFRELOCATE(`
     150        IFRELOCATEONLY(`
    151151            ifelse(`$6', `', `PTR_FROM_VIRTUAL_EX(`$1', `$3')', `$6 $3')
    152152            , ptrdiff
Note: See TracChangeset for help on using the changeset viewer.