Changeset 804
- Timestamp:
- 04/27/2011 06:57:58 AM (2 years ago)
- Files:
-
- 1 modified
-
trunk/Decompiler.class.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Decompiler.class.php
r803 r804 750 750 751 751 $this->recognizeAndDecompileClosedBlocks($EX, array($range[0], $range[0]), $indent . INDENT); 752 $op1 = $this->getOpVal($firstOp[' op1'], $EX, true);752 $op1 = $this->getOpVal($firstOp['result'], $EX, true); 753 753 754 754 $this->recognizeAndDecompileClosedBlocks($EX, array($range[0] + 1, $range[1]), $indent . INDENT); 755 $op2 = $this->getOpVal($lastOp[' op1'], $EX, true);755 $op2 = $this->getOpVal($lastOp['result'], $EX, true); 756 756 757 757 $T[$firstOp['result']['var']] = new Decompiler_Binop($this, $op1, $firstOp['opcode'], $op2); … … 772 772 $condition = $this->getOpVal($firstOp['op1'], $EX); 773 773 $this->recognizeAndDecompileClosedBlocks($EX, $trueRange, $indent . INDENT); 774 $trueValue = $this->getOpVal($opcodes[$trueRange[1]][' op1'], $EX, true);774 $trueValue = $this->getOpVal($opcodes[$trueRange[1]]['result'], $EX, true); 775 775 $this->recognizeAndDecompileClosedBlocks($EX, $falseRange, $indent . INDENT); 776 $falseValue = $this->getOpVal($opcodes[$falseRange[1]][' op1'], $EX, true);776 $falseValue = $this->getOpVal($opcodes[$falseRange[1]]['result'], $EX, true); 777 777 $T[$opcodes[$trueRange[1]]['result']['var']] = new Decompiler_TriOp($condition, $trueValue, $falseValue); 778 778 return false; … … 877 877 $this->beginComplexBlock($EX); 878 878 879 echo $indent, 'switch (', str($this->getOpVal($caseOp['op1'], $EX , true, true), $EX), ") {", PHP_EOL;879 echo $indent, 'switch (', str($this->getOpVal($caseOp['op1'], $EX), $EX), ") {", PHP_EOL; 880 880 $caseIsOut = false; 881 881 foreach ($cases as $caseFirst => $caseLast) { … … 1957 1957 $resvar = new Decompiler_Binop($this, $this->getOpVal($op1, $EX), XC_JMP_SET, null); 1958 1958 break; 1959 case XC_JMPZ_EX: // and 1960 case XC_JMPNZ_EX: // or 1961 $resvar = $this->getOpVal($op1, $EX); 1962 break; 1963 1959 1964 case XC_JMPNZ: // while 1960 1965 case XC_JMPZNZ: // for 1961 case XC_JMPZ_EX: // and1962 case XC_JMPNZ_EX: // or1963 1966 case XC_JMPZ: // {{{ 1964 1967 if ($opc == XC_JMP_NO_CTOR && $EX['object']) { … … 1978 1981 var_dump($op);// exit; 1979 1982 } 1980 if ($opc == XC_JMPZ_EX || $opc == XC_JMPNZ_EX) { 1981 $targetop = &$EX['opcodes'][$op2['opline_num']]; 1982 if ($opc == XC_JMPNZ_EX) { 1983 $targetop['cond_true'][] = foldToCode($rvalue, $EX); 1984 } 1985 else { 1986 $targetop['cond_false'][] = foldToCode($rvalue, $EX); 1987 } 1988 unset($targetop); 1989 } 1990 else { 1991 $op['cond'] = $rvalue; 1992 $op['isjmp'] = true; 1993 } 1983 $op['cond'] = $rvalue; 1984 $op['isjmp'] = true; 1994 1985 break; 1995 1986 // }}}

