Package org.apache.flex.abc.instructionlist

Examples of org.apache.flex.abc.instructionlist.InstructionList.addAll()


                    default_case_label = current_case.statement.getLabel();
                else
                    currentScope.addProblem(new MultipleSwitchDefaultsProblem(current_case.site));
            }

            result.addAll(current_case.statement);
        }

        switchTail = addInterstitialControlFlow(result, switchTail);

        //  No continue here, and thus there is no need
View Full Code Here


        Label default_case_label = null;
        Label switch_tail = null;

        //  Get the switch value and save it in a temp.
        Binding switch_temp = currentScope.allocateTemp();
        result.addAll(switch_expr);
        result.addInstruction(switch_temp.setlocal());

        //  First, jump to the switch table.
        if ( ! cases.elementAt(0).isUnconditionalAlternative() || cases.size() == 1 )
            result.addInstruction(OP_jump, cases.elementAt(0).getLabel());
View Full Code Here

            //  so we can branch back to it.
            if ( current_case.statement.isEmpty() || current_case.statement.firstElement().getOpcode() != OP_label )
            {
                InstructionList labeled_list = createInstructionList(iNode);
                labeled_list.addInstruction(OP_label);
                labeled_list.addAll(current_case.statement);
                current_case.statement = labeled_list;
            }

            if ( current_case.isUnconditionalAlternative() )
            {
View Full Code Here

    }

    private InstructionList reduce_trivial_switchStmt(IASNode iNode, InstructionList switch_expr)
    {
        InstructionList result = createInstructionList(iNode);
        result.addAll(switch_expr);
        //  Balance the stack!
        result.addInstruction(OP_pop);
        currentScope.getFlowManager().finishSwitchControlFlowContext(result);
        return result;
    }
View Full Code Here

        boolean need_coerce = false;
       
        InstructionList result = createInstructionList(iNode, test.size() + when_true.size() + when_false.size() + 2);
        Label tail = new Label();

        result.addAll(test);
        result.addInstruction(OP_iffalse, when_false.getLabel());
        result.addAll(when_true);
        valueNode = ternaryNode.getLeftOperandNode();
        type_def = valueNode.resolveType(currentScope.getProject());
        need_coerce = type_def != null && !type_def.equals(destinationType);
View Full Code Here

        InstructionList result = createInstructionList(iNode, test.size() + when_true.size() + when_false.size() + 2);
        Label tail = new Label();

        result.addAll(test);
        result.addInstruction(OP_iffalse, when_false.getLabel());
        result.addAll(when_true);
        valueNode = ternaryNode.getLeftOperandNode();
        type_def = valueNode.resolveType(currentScope.getProject());
        need_coerce = type_def != null && !type_def.equals(destinationType);
        if (need_coerce && isBracketAssign)
            coerce(result, destinationType);
View Full Code Here

        type_def = valueNode.resolveType(currentScope.getProject());
        need_coerce = type_def != null && !type_def.equals(destinationType);
        if (need_coerce && isBracketAssign)
            coerce(result, destinationType);
        result.addInstruction(OP_jump, tail);
        result.addAll(when_false);
        valueNode = ternaryNode.getRightOperandNode();
        type_def = valueNode.resolveType(currentScope.getProject());
        need_coerce = type_def != null && !type_def.equals(destinationType);
        if (need_coerce && isBracketAssign)
            coerce(result, destinationType);
View Full Code Here

    public InstructionList reduce_throwStmt(IASNode iNode, InstructionList tossable)
    {
        currentScope.getMethodBodySemanticChecker().checkThrow(iNode);

        InstructionList result = createInstructionList(iNode, tossable.size() + 1);
        result.addAll(tossable);
        result.addInstruction(OP_throw);
        return result;
    }

    public InstructionList reduce_tryCatchFinallyStmt(IASNode iNode, InstructionList try_stmt, InstructionList finally_stmt, Vector<CatchPrototype> catch_blocks)
View Full Code Here

            try_stmt.addInstruction(OP_nop);
        }

        Label catch_tail = new Label();

        result.addAll(try_stmt);
        result.addInstruction(OP_jump, catch_tail);

        //  Get labels for the start and end of the try block.
        Label try_start = result.getLabel();
        Label try_end   = result.getLastLabel();
View Full Code Here

        InstructionList result = createInstructionList(iNode);


        for ( InstructionList decl: chained_decls )
            result.addAll(decl);

        return result;
    }

    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.