Changeset 757 for trunk/Decompiler.class.php
- Timestamp:
- 2011-04-17T09:57:23+02:00 (2 years ago)
- File:
-
- 1 edited
-
trunk/Decompiler.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Decompiler.class.php
r756 r757 162 162 function toCode($indent) 163 163 { 164 $opstr = $this->parent->binops[$this->opc]; 165 164 166 $op1 = foldToCode($this->op1, $indent); 165 167 if (is_a($this->op1, 'Decompiler_Binop') && $this->op1->opc != $this->opc) { 166 $op1 = "($op1)"; 167 } 168 $opstr = $this->parent->binops[$this->opc]; 169 if ($op1 == '0' && $this->opc == XC_SUB) { 170 return $opstr . str($this->op2, $indent); 171 } 172 return str($op1) . ' ' . $opstr . ' ' . str($this->op2, $indent); 168 $op1 = "(" . str($op1, $indent) . ")"; 169 } 170 $op2 = foldToCode($this->op2, $indent); 171 if (is_a($this->op2, 'Decompiler_Binop') && $this->op2->opc != $this->opc && substr($opstr, -1) != '=') { 172 $op2 = "(" . str($op2, $indent) . ")"; 173 } 174 175 if (str($op1) == '0' && ($this->opc == XC_ADD || $this->opc == XC_SUB)) { 176 return $opstr . str($op2, $indent); 177 } 178 179 return str($op1) . ' ' . $opstr . ' ' . str($op2); 173 180 } 174 181 } … … 900 907 $op1val = $this->getOpVal($op1, $EX); 901 908 $myop = $this->unaryops[$opc]; 902 $rvalue = "$myop$op1val";909 $rvalue = $myop . str($op1val); 903 910 $resvar = $rvalue; 904 911 // }}}
Note: See TracChangeset
for help on using the changeset viewer.

