Package ru.andrew.jclazz.decompiler.engine

Examples of ru.andrew.jclazz.decompiler.engine.CodeItem


//    11 invokespecial <init>
//    14 return
    protected String codeBlockSource(Block block)
    {
        this.block = block;
        CodeItem mainOp;
        do
        {
            List ops = getNext();
            mainOp = (CodeItem) ops.get(ops.size() - 1);
            if (mainOp instanceof PutFieldView)
View Full Code Here


    private List getNext()
    {
        List ops = new ArrayList();

        CodeItem op;
        do
        {
            op = block.getOperationAfter(current);
            current = (int) op.getStartByte();
            ops.add(op);
        }
        while (op instanceof PushVariableView);

        return ops;
View Full Code Here

            }
            else
            {
                objectref = refOp.source3();
                // Case If with assignment
                CodeItem nextDup = block.getOperationAfter(refOp.getStartByte());
                if (block instanceof Condition &&
                        nextDup instanceof DupView &&
                        block.getLastOperation() instanceof IfView)
                {
                    CodeItem nextPop = block.getOperationAfter(nextDup.getStartByte());
                    if (nextPop instanceof PopView)
                    {
                        PopView popView = (PopView) nextPop;
                        LocalVariable popedLV = block.getLocalVariable(popView.getLocalVariableNumber(), null, (int) getStartByte());
                        //popedLV.setPrinted(true);
View Full Code Here

    public void analyze(Block block)
    {
        block.reset();
        while (block.hasMoreOperations())
        {
            CodeItem citem = block.next();
            if (!(citem instanceof GoToView)) continue;

            GoToView gt = (GoToView) citem;
            if (gt.isBreak() || gt.isContinue() || gt.getLoop() != null) continue;
            if (!gt.isForwardBranch())
View Full Code Here

    private boolean isLastGoToWithSameTarget(Block block, GoToView gt)
    {
        List ops = block.getOperations();
        for (int i = 0; i < ops.size(); i++)
        {
            CodeItem citem = (CodeItem) ops.get(i);
            if (!(citem instanceof GoToView) || citem.getStartByte() <= gt.getStartByte()) continue;
            GoToView gt2 = (GoToView) citem;
            if (gt2.getTargetOperation() == gt.getTargetOperation())
            {
                return false;
            }
View Full Code Here

    private void createBackLoop(Block block, GoToView gotoView)
    {
        // Searching for outermost block for loop
        Block parent = block;
        Block foundBlock;
        CodeItem target;
        do
        {
            target = parent.getOperationByStartByte(gotoView.getTargetOperation());
            foundBlock = parent;
            parent = parent.getParent();
View Full Code Here

        List orConditions = new ArrayList();
        List newOps = new ArrayList();
        Iterator i = ops.iterator();
        while (i.hasNext())
        {
            CodeItem ci = (CodeItem) i.next();
            newOps.add(ci);
            if (ci instanceof IfView)
            {
                orConditions.add(new Condition((IfView) ci, this, new ArrayList(newOps)));
                newOps.clear();
View Full Code Here

TOP

Related Classes of ru.andrew.jclazz.decompiler.engine.CodeItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.