Changeset 788
- Timestamp:
- 2011-04-25T12:14:07+02:00 (2 years ago)
- File:
-
- 1 edited
-
trunk/Decompiler.class.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Decompiler.class.php
r787 r788 653 653 function decompileBasicBlock(&$EX, $first, $last, $indent) // {{{ 654 654 { 655 if (isset($EX['lastBlock'])) { 656 echo PHP_EOL; 657 } 655 658 $this->dasmBasicBlock($EX, $first, $last); 656 659 // $this->dumpRange($EX, $first, $last); … … 671 674 } 672 675 // }}} 676 function beginComplexBlock(&$EX) // {{{ 677 { 678 if (isset($EX['lastBlock'])) { 679 echo PHP_EOL; 680 $EX['lastBlock'] = null; 681 } 682 } 683 // }}} 684 function endComplexBlock(&$EX) // {{{ 685 { 686 $EX['lastBlock'] = 'complex'; 687 } 688 // }}} 673 689 function decompileComplexBlock(&$EX, $first, $last, $indent) // {{{ 674 690 { … … 681 697 && $lastOp['jmpouts'][0] == $first) { 682 698 $this->removeJmpInfo($EX, $last); 699 $this->beginComplexBlock($EX); 683 700 echo $indent, 'do {', PHP_EOL; 684 701 $this->recognizeAndDecompileClosedBlocks($EX, $first, $last, $indent . INDENT); 685 702 echo $indent, '} while (', str($this->getOpVal($lastOp['op1'], $EX)), ');', PHP_EOL; 703 $this->endComplexBlock($EX); 686 704 return; 687 705 } … … 704 722 $this->removeJmpInfo($EX, $last); 705 723 724 $this->beginComplexBlock($EX); 706 725 ob_start(); 707 726 $this->recognizeAndDecompileClosedBlocks($EX, $first, $last, $indent . INDENT); … … 710 729 echo $code; 711 730 echo $indent, '}', PHP_EOL; 731 $this->endComplexBlock($EX); 712 732 return; 713 733 } … … 719 739 { 720 740 $opcodes = &$EX['opcodes']; 721 $firstComplex = false;722 741 723 742 $i = $starti = $first;
Note: See TracChangeset
for help on using the changeset viewer.

