Package org.apache.flex.compiler.internal.as.codegen

Examples of org.apache.flex.compiler.internal.as.codegen.InstructionListNode


     * @return An MXMLBindingNode with the source and destination expressions
     */
    private MXMLBindingNode generateBindingNode(IMXMLUnitData tag, IMXMLTagAttributeData attr, IMXMLSingleDataBindingNode dbnode)
    {
        // Build the destination expression
        InstructionListNode destExpr = getTargetExprNode(tag, attr);

        MXMLBindingNode bindingNode = new MXMLBindingNode(parent);

        MXMLBindingAttributeNode target = new MXMLBindingAttributeNode(bindingNode, destExpr);
        destExpr.setParent(target);
        MXMLBindingAttributeNode source = new MXMLBindingAttributeNode(bindingNode, dbnode.getExpressionNode());

        bindingNode.setDestinationAttributeNode(target);
        bindingNode.setSourceAttributeNode(source);

View Full Code Here


     * @return An InstructionListNode that can be used as the destination
     * expression for an MXMLBindingNode
     */
    private InstructionListNode getTargetExprNode(IMXMLUnitData data, IMXMLTagAttributeData attr)
    {
        InstructionListNode expr = null;
        InstructionList il = getTargetInstructions(data, attr);
        if (il != null)
        {
            expr = new InstructionListNode(il);
        }

        return expr;
    }
View Full Code Here

                boolean last = nodeIndex == (nodes.size()-1);
                generateOne(insns, n, last);
                ++nodeIndex;
            }

           ret = new InstructionListNode(insns);    // Wrap the IL in a node and return it
        }
        else if (parent instanceof IMXMLPropertySpecifierNode && dbnode instanceof IMXMLSingleDataBindingNode)
        {
            IMXMLPropertySpecifierNode psn = (IMXMLPropertySpecifierNode)parent;
            IDefinition d = psn.getDefinition();
            Binding b = host.getInstanceScope().getBinding(d);
            INamespaceReference ns = psn.getDefinition().getNamespaceReference();
            if (ns != NamespaceDefinition.getPublicNamespaceDefinition())
            {
                InstructionList insns = new InstructionList();
                insns.addInstruction(OP_getlocal0);
                insns.addInstruction(OP_getlocal1);
                insns.addInstruction(OP_setproperty, b.getName());
                ret = new InstructionListNode(insns);    // Wrap the IL in a node and return it
            }
        }
        return ret;  
    }
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.internal.as.codegen.InstructionListNode

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.