Class MemoryAllocation

    • Constructor Detail

      • MemoryAllocation

        public MemoryAllocation​(Type staticType,
                                CodeLocation location)
        Builds the heap allocation.
        Parameters:
        staticType - the static type of this expression
        location - the code location of the statement that has generated this expression
      • MemoryAllocation

        public MemoryAllocation​(Type staticType,
                                CodeLocation location,
                                Annotations anns)
        Builds the heap allocation.
        Parameters:
        staticType - the static type of this expression
        location - the code location of the statement that has generated this expression
        anns - the annotations of this memory allocation
      • MemoryAllocation

        public MemoryAllocation​(Type staticType,
                                CodeLocation location,
                                boolean isStackAllocation)
        Builds the heap allocation.
        Parameters:
        staticType - the static type of this expression
        location - the code location of the statement that has generated this expression
        isStackAllocation - if this allocation is allocated in the stack
      • MemoryAllocation

        public MemoryAllocation​(Type staticType,
                                CodeLocation location,
                                Annotations anns,
                                boolean isStackAllocation)
        Builds the heap allocation.
        Parameters:
        staticType - the static type of this expression
        location - the code location of the statement that has generated this expression
        anns - the annotations of this memory allocation
        isStackAllocation - if this allocation is allocated in the stack
    • Method Detail

      • isStackAllocation

        public boolean isStackAllocation()
        Yields whether this memory allocation is allocated in the stack.
        Returns:
        whether this memory allocation is allocated in the stack
      • getAnnotations

        public Annotations getAnnotations()
        Yields the annotations of this expression.
        Returns:
        the annotations of this expression
      • accept

        public <T> T accept​(ExpressionVisitor<T> visitor,
                            java.lang.Object... params)
                     throws SemanticException
        Description copied from class: SymbolicExpression
        Accepts an ExpressionVisitor, visiting this expression recursively.
        Specified by:
        accept in class SymbolicExpression
        Type Parameters:
        T - the type of value produced by the visiting callbacks
        Parameters:
        visitor - the visitor
        params - additional optional parameters to pass to each visiting callback
        Returns:
        the value produced by the visiting operation
        Throws:
        SemanticException - if an error occurs during the visiting