Class AccessGlobal

    • Constructor Detail

      • AccessGlobal

        public AccessGlobal​(CFG cfg,
                            CodeLocation location,
                            Unit container,
                            Global target)
        Builds the global access, happening at the given location in the program. The type of this expression is the one of the accessed global.
        Parameters:
        cfg - the cfg that this expression belongs to
        location - the location where the expression is defined within the program
        container - the unit containing the accessed global
        target - the accessed global
    • Method Detail

      • getContainer

        public Unit getContainer()
        Yields the Unit where the global targeted by this access is defined.
        Returns:
        the container of the global
      • getTarget

        public Global getTarget()
        Yields the Global targeted by this expression.
        Returns:
        the global
      • setOffset

        public int setOffset​(int offset)
        Description copied from interface: CodeNode
        Sets the offset of this node to the given value, and then proceeds by setting the one of its nested nodes (if any) to subsequent values. The last offset used is returned.
        Parameters:
        offset - the offset to set
        Returns:
        the last offset used while setting the offsets of nested nodes
      • accept

        public <V> boolean accept​(GraphVisitor<CFG,​Statement,​Edge,​V> visitor,
                                  V tool)
        Description copied from interface: Node
        Accepts the given GraphVisitor. Implementors of this method are responsible for invoking GraphVisitor.visit(Object, Graph, Node) on this node after Node.accept(GraphVisitor, Object) has been invoked on all nested nodes, if any. The visiting should stop at the first of such calls that return false.
        Type Parameters:
        V - the type of auxiliary tool that visitor can use
        Parameters:
        visitor - the visitor that is visiting the Graph containing this node
        tool - the auxiliary tool that visitor can use
        Returns:
        whether or not the visiting should stop when this call returns, as decided by the visitor itself
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class Expression
      • toString

        public java.lang.String toString()
        Specified by:
        toString in class Statement