Changeset 808


Ignore:
Timestamp:
2011-04-27T08:43:43+02:00 (3 years ago)
Author:
moo
Message:

Decompiler: recognize top level goto

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Decompiler.class.php

    r807 r808  
    781781        } 
    782782        // }}} 
     783        // {{{ goto 
     784        if ($firstOp['opcode'] == XC_JMP && !empty($firstOp['jmpouts']) && $firstOp['jmpouts'][0] == $range[1] + 1) { 
     785            $this->removeJmpInfo($EX, $range[0]); 
     786            $firstOp['opcode'] = XC_GOTO; 
     787            $target = $firstOp['op1']['var']; 
     788            $firstOp['goto'] = $target; 
     789            $opcodes[$target]['gofrom'][] = $range[0]; 
     790 
     791            $this->recognizeAndDecompileClosedBlocks($EX, $range, $indent); 
     792            return false; 
     793        } 
     794        // }}} 
    783795        // {{{ try/catch 
    784796        if (!empty($firstOp['jmpins']) && $opcodes[$firstOp['jmpins'][0]]['opcode'] == XC_JMP 
Note: See TracChangeset for help on using the changeset viewer.