Package org.apache.flex.abc.instructionlist

Examples of org.apache.flex.abc.instructionlist.InstructionList


     @return an InstructionList that applies the operator to the operand.
     */
    InstructionList unaryOp(IASNode iNode, InstructionList operand, int opcode)
    {
        checkUnaryOp(iNode, opcode);
        InstructionList result = createInstructionList(iNode, operand.size() + 1);
        result.addAll(operand);
        result.addInstruction(opcode);
        return result;
    }
View Full Code Here


        else
            result[0] = XMLContentState.TagLiteral;

        for ( int i = 1; i < exprs.size(); i++ )
        {
            InstructionList insns = exprs.elementAt(i);
            if ( isStringLiteral(insns) )
            {
                switch ( result[i-1] )
                {
                    case TagStart:
View Full Code Here

    public InstructionList reduce_arrayIndexExpr_to_mxmlDataBindingSetter(IASNode iNode, InstructionList stem, InstructionList index, boolean isSuper)
    {
        IDynamicAccessNode arrayIndexNode = (IDynamicAccessNode)iNode;
       
        int stemInstructionCount = isSuper ? 1 : stem.size();
        InstructionList result =
            createInstructionList(arrayIndexNode, stemInstructionCount + index.size() + 3 + 1); // +1 for the returnvoid
       
        if (isSuper)
            result.addInstruction(OP_getlocal0);
        else
            result.addAll(stem);
        result.addAll(index);
        result.addInstruction(OP_getlocal1);
        int opCode = isSuper ? OP_setsuper : OP_setproperty;
        result.addInstruction(arrayAccess(arrayIndexNode, opCode));
        return result;
    }
View Full Code Here

     * destination to: a.b = firstParam
     */
    public InstructionList reduce_memberAccessExpr_to_mxmlDataBindingSetter(IASNode memberAccessExpr, InstructionList stem, Binding member)
    {
        currentScope.getMethodBodySemanticChecker().checkLValue(memberAccessExpr, member);
        InstructionList result =
            createInstructionList(memberAccessExpr, stem.size() + 2 + 1); // +1 for the returnvoid
        result.addAll(stem);
        result.addInstruction(OP_getlocal1);
        result.addInstruction(OP_setproperty, member.getName());
        return result;
    }
View Full Code Here

        return result;
    }

    public InstructionList reduce_voidExpr_to_expression(IASNode iNode)
    {
        InstructionList il = createInstructionList(iNode);
        il.addInstruction(OP_pushundefined);
        return il;
    }
View Full Code Here

        return UNDEFINED_VALUE;
    }

    public InstructionList reduce_void0Literal_to_object_literal(IASNode iNode)
    {
        InstructionList result = createInstructionList(iNode, 1);
        result.addInstruction(OP_pushundefined);
        return result;
    }
View Full Code Here

        return ((InstructionListNode)iNode).getInstructions();
    }

    public InstructionList reduce_void0Operator(IASNode iNode)
    {
        InstructionList result = createInstructionList(iNode, 1);
        result.addInstruction(OP_pushundefined);
        return result;
    }
View Full Code Here

        return UNDEFINED_VALUE;
    }

    public InstructionList reduce_voidOperator_to_expression(IASNode iNode, InstructionList expr)
    {
        InstructionList result = createInstructionList(iNode, 1);
        result.addAll(expr);
        result.addInstruction(OP_pop);
        result.addInstruction(OP_pushundefined);
        return result;
    }
View Full Code Here

        return result;
    }

    public InstructionList reduce_whileStmt(IASNode iNode, InstructionList cond, InstructionList body)
    {
        InstructionList result = createInstructionList(iNode, cond.size() + body.size() + 5);
        currentScope.getFlowManager().resolveContinueLabel(cond);

        //  Jump to the test.
        result.addInstruction(OP_jump, cond.getLabel());

        //  Create an emitter-time label, and attach
        //  it to an OP_label instruction for the
        //  backwards branch.
        result.addInstruction(OP_label);
        Label loop = result.getLastLabel();
        result.addAll(body);

        result.addAll(cond);
        result.addInstruction(OP_iftrue, loop);

        currentScope.getFlowManager().finishLoopControlFlowContext(result);

        return result;
    }
View Full Code Here

        return result;
    }

    public InstructionList reduce_withStmt(IASNode iNode, InstructionList new_scope, InstructionList body)
    {
        InstructionList result = createInstructionList(iNode);

        result.addAll(new_scope);

        if ( currentScope.getFlowManager().hasWithStorage())
        {
            result.addInstruction(OP_dup);
            result.addInstruction(currentScope.getFlowManager().getWithStorage().setlocal());
        }

        result.addInstruction(OP_pushwith);
        result.addAll(body);
        result.addInstruction(OP_popscope);

        currentScope.getFlowManager().finishWithContext(result);
        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.flex.abc.instructionlist.InstructionList

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.