Browse Source

dasm: fix include opcode spec

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1592 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
master
Xuefer 7 years ago
parent
commit
95da04c9f2
  1. 7
      processor/processor.m4
  2. 5
      xcache/xc_utils.c

7
processor/processor.m4

@ -662,7 +662,12 @@ define(`UNION_znode_op', `dnl {{{
', `
IFDASM(`{
zval *zv;
zval *srczv = &dasm->active_op_array_src->literals[SRC(`$1.constant')].constant;
zval *srczv;
if (SRC(`$1.constant') >= dasm->active_op_array_src->last_literal) {
fprintf(stderr, "opcode %s $1 want literal %d\n", xc_get_opcode(SRC(`opcode')), SRC(`$1.constant'));
break;
}
srczv = &dasm->active_op_array_src->literals[SRC(`$1.constant')].constant;
ALLOC_ZVAL(zv);
MAKE_COPY_ZVAL(&srczv, zv);
add_assoc_zval_ex(DST(), XCACHE_STRS("$1.constant"), zv);

5
xcache/xc_utils.c

@ -302,7 +302,10 @@ static void xc_fix_opcode_ex_znode(int tofix, xc_op_spec_t spec, Z_OP_TYPEOF_TYP
}
switch (*op_type) {
case IS_CONST:
if (spec == OPSPEC_UNUSED || spec == OPSPEC_OPLINE) {
if (spec == OPSPEC_UNUSED
|| spec == OPSPEC_OPLINE
|| spec == OPSPEC_INCLUDE
) {
*op_type = IS_UNUSED;
}
break;

Loading…
Cancel
Save