Changeset 1461 in svn for trunk/processor/main.m4


Ignore:
Timestamp:
2013-11-09T08:38:23+01:00 (20 months ago)
Author:
Xuefer
Message:

relocate: update dst/src to compile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/main.m4

    r1460 r1461  
    2020define(`XCACHE_STRS', `($1), (sizeof($1))')
    2121define(`XCACHE_STRL', `($1), (sizeof($1) - 1)')
    22 define(`DST', `dst->$1')
    23 define(`SRC', `src->$1')
     22define(`SRC', `ifelse(`$1', `', `src', `src->$1')')
     23define(`DST', `ifelse(`$1', `', `dst', `dst->$1')')
    2424dnl ============
    2525define(`INDENT', `xc_dprint_indent(indent);')
     
    101101        IFRESTORE(`$1 = xc_get_class(processor, (zend_ulong) $2);')
    102102#ifdef IS_UNICODE
    103         IFDASM(`add_assoc_unicodel_ex(dst, XCACHE_STRS("$3"), ZSTR_U($2->name), $2->name_length, 1);')
     103        IFDASM(`add_assoc_unicodel_ex(DST(), XCACHE_STRS("$3"), ZSTR_U($2->name), $2->name_length, 1);')
    104104#else
    105         IFDASM(`add_assoc_stringl_ex(dst, XCACHE_STRS("$3"), (char *) $2->name, $2->name_length, 1);')
     105        IFDASM(`add_assoc_stringl_ex(DST(), XCACHE_STRS("$3"), (char *) $2->name, $2->name_length, 1);')
    106106#endif
    107107    }
     
    165165dnl {{{ COPYNULL_EX(1:dst, 2:elm-name)
    166166define(`COPYNULL_EX', `
    167     IFDASM(`add_assoc_null_ex(dst, XCACHE_STRS("$2"));')
     167    IFDASM(`add_assoc_null_ex(DST(), XCACHE_STRS("$2"));')
    168168    IFNOTMEMCPY(`IFCOPY(`$1 = NULL;')')
    169     assert(patsubst($1, dst, src) == NULL);
     169    assert(patsubst($1, DST(), SRC()) == NULL);
    170170')
    171171dnl }}}
     
    177177dnl {{{ COPYZERO_EX(1:dst, 2:elm-name)
    178178define(`COPYZERO_EX', `
    179     IFDASM(`add_assoc_long_ex(dst, XCACHE_STRS("$2"), 0);')
     179    IFDASM(`add_assoc_long_ex(DST(), XCACHE_STRS("$2"), 0);')
    180180    IFNOTMEMCPY(`IFCOPY(`$1 = 0;')')
    181     assert(patsubst($1, dst, src) == 0);
     181    assert(patsubst($1, DST(), SRC()) == 0);
    182182')
    183183dnl }}}
     
    266266REDEF(`PROCESSOR_TYPE', `restore') include(srcdir`/processor/processor.m4')
    267267
    268 define(`DSTPTR_EX', `ptradd($1 *, notnullable($2), ptrdiff)')
     268pushdef(`DSTPTR_EX', `ptradd($1 *, notnullable($2), ptrdiff)')
    269269pushdef(`FIXPOINTER_EX', `$2 = ptradd($1 *, notnullable($2), relocatediff);')
    270 define(`SRC', `DST(`$1')')
     270pushdef(`SRC', defn(`DST'))
    271271REDEF(`PROCESSOR_TYPE', `relocate') include(srcdir`/processor/processor.m4')
    272272popdef(`SRC')
Note: See TracChangeset for help on using the changeset viewer.