ROSE 0.11.145.147
Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::CallingConvention::StoragePoolBase Class Referenceabstract

Description

Base class for pool of locations.

A storage pool contains an ordered sequence of locations and a predicate to determine whether the locations are able to hold a value of the specified type.

Definition at line 80 of file StoragePool.h.

#include <Rose/BinaryAnalysis/CallingConvention/StoragePool.h>

Inheritance diagram for Rose::BinaryAnalysis::CallingConvention::StoragePoolBase:
Inheritance graph
[legend]

Public Types

using Ptr = StoragePoolBasePtr
 Shared-ownership pointer.
 
using ConstPtr = StoragePoolBaseConstPtr
 Shared-ownership pointer.
 

Public Member Functions

virtual Ptr copy () const =0
 Copy constructor.
 
virtual bool canStore (SgAsmType *) const
 Test whether locations can store type.
 
virtual void reset ()=0
 Reset allocation.
 
virtual std::vector< ConcreteLocationconsume (SgAsmType *)=0
 Consume a storage location.
 
virtual std::vector< ConcreteLocationconstantLocations () const
 List of constant storage locations.
 

Protected Member Functions

 StoragePoolBase (const std::string &name, const TypePredicateConstPtr &)
 

Member Typedef Documentation

◆ Ptr

Shared-ownership pointer.

Definition at line 85 of file StoragePool.h.

◆ ConstPtr

Shared-ownership pointer.

Definition at line 86 of file StoragePool.h.

Member Function Documentation

◆ copy()

virtual Ptr Rose::BinaryAnalysis::CallingConvention::StoragePoolBase::copy ( ) const
pure virtual

◆ canStore()

virtual bool Rose::BinaryAnalysis::CallingConvention::StoragePoolBase::canStore ( SgAsmType ) const
virtual

Test whether locations can store type.

If this pool contains locations that are capable of storing an instance of the specified type, then this predicate returns true, else false.

◆ reset()

virtual void Rose::BinaryAnalysis::CallingConvention::StoragePoolBase::reset ( )
pure virtual

Reset allocation.

Resets this storage pool back to its initial state. For instance, if the storage pool contains a list of three explicit locations and some or all of them have been taken by consume, then calling this function will make all three available again.

Implemented in Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated, and Rose::BinaryAnalysis::CallingConvention::StoragePoolStack.

◆ consume()

virtual std::vector< ConcreteLocation > Rose::BinaryAnalysis::CallingConvention::StoragePoolBase::consume ( SgAsmType )
pure virtual

Consume a storage location.

Given an argument type, return a location(s) if possible and remove that location from this pool.

Implemented in Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated, and Rose::BinaryAnalysis::CallingConvention::StoragePoolStack.

◆ constantLocations()

virtual std::vector< ConcreteLocation > Rose::BinaryAnalysis::CallingConvention::StoragePoolBase::constantLocations ( ) const
virtual

List of constant storage locations.

A constant location is any location whose address is known and is a constant. For example, a ConcreteLocation describing a particular register or memory location is a constant location, but a ConcreteLocation that describes a memory address which is stored in a register or a memory address that is the sum of a register value and an offset is not constant.

The constant values are used by the calling convention Analysis to check whether the callee reads from any of these locations without first writing to them.

The base implementation returns an empty vector.

Reimplemented in Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated.


The documentation for this class was generated from the following file: