Browse Source

remove debug code

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1588 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
master
Xuefer 6 years ago
parent
commit
1fc55df227
  1. 2
      bin/phpdc.phpr
  2. 24
      lib/Decompiler.class.php
  3. 7
      processor/processor.m4

2
bin/phpdc.phpr

@ -2,7 +2,7 @@
<?php
$srcdir = dirname(__FILE__);
require_once("$srcdir/../lib/orig/Decompiler.class.php");
require_once("$srcdir/../lib/Decompiler.class.php");
if (file_exists("$srcdir/phpdc.debug.php")) {
include("$srcdir/phpdc.debug.php");
}

24
lib/Decompiler.class.php

@ -1395,12 +1395,20 @@ class Decompiler
case XC_GOTO:
$target = $op['op1']['var'];
if (!isset($opcodes[$target])) {
fprintf(STDERR, "%d: internal error\n", __LINE__);
break;
}
$op['goto'] = $target;
$opcodes[$target]['gofrom'][] = $i;
break;
case XC_JMP:
$target = $op['op1']['var'];
if (!isset($opcodes[$target])) {
fprintf(STDERR, "%d: internal error\n", __LINE__);
break;
}
$op['jmpouts'] = array($target);
$opcodes[$target]['jmpins'][] = $i;
break;
@ -1408,6 +1416,14 @@ class Decompiler
case XC_JMPZNZ:
$jmpz = $op['op2']['opline_num'];
$jmpnz = $op['extended_value'];
if (!isset($opcodes[$jmpz])) {
fprintf(STDERR, "%d: internal error\n", __LINE__);
break;
}
if (!isset($opcodes[$jmpnz])) {
fprintf(STDERR, "%d: internal error\n", __LINE__);
break;
}
$op['jmpouts'] = array($jmpz, $jmpnz);
$opcodes[$jmpz]['jmpins'][] = $i;
$opcodes[$jmpnz]['jmpins'][] = $i;
@ -1423,10 +1439,10 @@ class Decompiler
case XC_FE_FETCH:
// case XC_JMP_NO_CTOR:
$target = $op['op2']['opline_num'];
//if (!isset($target)) {
// $this->dumpop($op, $EX);
// var_dump($op); exit;
//}
if (!isset($opcodes[$target])) {
fprintf(STDERR, "%d: internal error\n", __LINE__);
break;
}
$op['jmpouts'] = array($target);
$opcodes[$target]['jmpins'][] = $i;
break;

7
processor/processor.m4

@ -662,12 +662,7 @@ define(`UNION_znode_op', `dnl {{{
', `
IFDASM(`{
zval *zv;
zval *srczv;
srczv = &dasm->active_op_array_src->literals[SRC(`$1.constant')].constant;
if (Z_TYPE_P(srczv) == IS_STRING) {
size_t index = SRC(`$1.constant');
fprintf(stderr, "%p %p %s\n", srczv, Z_STRVAL_P(srczv), Z_STRVAL_P(srczv));
}
zval *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);

Loading…
Cancel
Save