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


Ignore:
Timestamp:
2013-11-06T19:24:29+01:00 (21 months ago)
Author:
Xuefer
Message:

relocate WIP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/main.m4

    r1443 r1444  
    2525define(`INDENT', `xc_dprint_indent(indent);')
    2626dnl }}}
    27 dnl {{{ SRCPTR(1:type, 2:elm)
    28 define(`SRCPTR', `SRCPTR_EX(`$1', `SRC(`$2')')')
    29 define(`SRCPTR_EX', `IFPTRMOVE(`(($1 *) (((char *) $2) + relocate->src))', `$2')')
    30 dnl }}}
    31 dnl {{{ DSTPTR(1:type, 2:elm)
    32 define(`DSTPTR', `DSTPTR_EX(`$1', `DST(`$2')')')
    33 define(`DSTPTR_EX', `IFPTRMOVE(`(($1 *) (((char *) $2) + relocate->dst))', `$2')')
     27dnl {{{ SRCPTR_EX(1:type, 2:elm)
     28define(`SRCPTR_EX', `IFRELOCATE(`(($1 *) (((char *) $2) + 1))', `$2')')
    3429dnl }}}
    3530dnl {{{ ALLOC(1:dst, 2:type, 3:count=1, 4:clean=false, 5:realtype=$2)
     
    130125dnl {{{ EXPORT(1:code)
    131126define(`EXPORT', `/* export: $1 :export */')
    132 define(`EXPORTED', `EXPORT(`$1;')
     127define(`EXPORTED', `EXPORT(`$1')
     128$1')
     129define(`EXPORTED_FUNCTION', `EXPORT(`$1;')
    133130$1')
    134131dnl }}}
     
    137134dnl }}}
    138135dnl {{{ FIXPOINTER(1:type, 2:ele)
    139 define(`FIXPOINTER', `FIXPOINTER_EX(`$1', `DST(`$2')', `SRCPTR(`$1', `$2')')')
    140 dnl }}}
    141 dnl {{{ FIXPOINTER_EX(1:type, 2:dst, 3:src)
     136define(`FIXPOINTER', `FIXPOINTER_EX(`$1', `DST(`$2')')')
     137dnl }}}
     138dnl {{{ FIXPOINTER_EX(1:type, 2:dst)
    142139define(`FIXPOINTER_EX', `
    143140    IFSTORE(`$2 = ($1 *) processor->shm->handlers->to_readonly(processor->shm, (void *)$2);')
    144     IFPTRMOVE(`$2 = ($1 *) (((char *) $3) + relocate->ptrdiff);')
     141    IFRELOCATE(`patsubst($2, `dst', `src') = ($1 *) (((char *) patsubst($2, `dst', `src')) + 1);')
    145142')
    146143dnl }}}
     
    242239define(`IFCALCSTORE', `IFSTORE(`$1', `IFCALC(`$1', `$2')')')
    243240define(`IFRESTORE', `ifelse(PROCESSOR_TYPE, `restore', `$1', `$2')')
    244 define(`IFPTRMOVE', `ifelse(PROCESSOR_TYPE, `relocate', `$1', `$2')')
     241define(`IFRELOCATE', `ifelse(PROCESSOR_TYPE, `relocate', `$1', `$2')')
    245242define(`IFCOPY', `IFSTORE(`$1', `IFRESTORE(`$1', `$2')')')
    246243define(`IFCALCCOPY', `IFCALC(`$1', `IFCOPY(`$1', `$2')')')
     
    253250EXPORT_PROCESSOR(`dasm', `zend_class_entry')
    254251
    255 EXPORT_PROCESSOR(`calc',    `xc_entry_data_php_t')
    256 EXPORT_PROCESSOR(`calc',    `xc_entry_php_t')
    257 EXPORT_PROCESSOR(`calc',    `xc_entry_var_t')
    258 EXPORT_PROCESSOR(`store',   `xc_entry_data_php_t')
    259 EXPORT_PROCESSOR(`store',   `xc_entry_php_t')
    260 EXPORT_PROCESSOR(`store',   `xc_entry_var_t')
    261 EXPORT_PROCESSOR(`restore', `xc_entry_data_php_t')
    262 EXPORT_PROCESSOR(`restore', `xc_entry_php_t')
    263 EXPORT_PROCESSOR(`dasm',    `xc_entry_data_php_t')
    264 EXPORT_PROCESSOR(`dprint',  `xc_entry_php_t')
    265 
    266 EXPORT_PROCESSOR(`restore', `zval')
     252dnl EXPORT_PROCESSOR(`calc',    `xc_entry_data_php_t')
     253dnl EXPORT_PROCESSOR(`calc',    `xc_entry_php_t')
     254dnl EXPORT_PROCESSOR(`calc',    `xc_entry_var_t')
     255dnl EXPORT_PROCESSOR(`store',   `xc_entry_data_php_t')
     256dnl EXPORT_PROCESSOR(`store',   `xc_entry_php_t')
     257dnl EXPORT_PROCESSOR(`store',   `xc_entry_var_t')
     258dnl EXPORT_PROCESSOR(`restore', `xc_entry_data_php_t')
     259dnl EXPORT_PROCESSOR(`restore', `xc_entry_php_t')
     260dnl EXPORT_PROCESSOR(`dasm',    `xc_entry_data_php_t')
     261dnl EXPORT_PROCESSOR(`dprint',  `xc_entry_php_t')
     262
     263dnl EXPORT_PROCESSOR(`restore', `zval')
    267264EXPORT_PROCESSOR(`dprint',  `zval')
    268265
     
    285282#endif /* HAVE_XCACHE_DISASSEMBLER */
    286283
     284include(srcdir`/processor/foot.m4')
     285
    287286ifdef(`EXIT_PENDING', `m4exit(EXIT_PENDING)')
Note: See TracChangeset for help on using the changeset viewer.