ROSE 0.11.145.147
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated Class Reference

Description

A storage pool for explicit locations.

This pool holds an ordered sequence of explicit (usually register) locations.

Definition at line 142 of file StoragePool.h.

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

Inheritance diagram for Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated:
Collaboration graph
[legend]

Public Types

using Ptr = StoragePoolEnumeratedPtr
 Shared-ownership pointer.
 
using ConstPtr = StoragePoolEnumeratedConstPtr
 Shared-ownership pointer.
 
- Public Types inherited from Rose::BinaryAnalysis::CallingConvention::StoragePoolBase
using Ptr = StoragePoolBasePtr
 Shared-ownership pointer.
 
using ConstPtr = StoragePoolBaseConstPtr
 Shared-ownership pointer.
 

Public Member Functions

void append (const ConcreteLocation &)
 Append an additional location.
 
StoragePoolBasePtr copy () const override
 Copy constructor.
 
std::vector< ConcreteLocationconstantLocations () const override
 List of constant storage locations.
 
std::vector< ConcreteLocationconsume (SgAsmType *) override
 Consume a storage location.
 
void reset () override
 Reset allocation.
 
- Public Member Functions inherited from Rose::BinaryAnalysis::CallingConvention::StoragePoolBase
virtual bool canStore (SgAsmType *) const
 Test whether locations can store type.
 

Static Public Member Functions

static Ptr instance (const std::string &name, const TypePredicateConstPtr &)
 Constructor.
 

Protected Member Functions

 StoragePoolEnumerated (const std::string &name, const TypePredicateConstPtr &)
 
- Protected Member Functions inherited from Rose::BinaryAnalysis::CallingConvention::StoragePoolBase
 StoragePoolBase (const std::string &name, const TypePredicateConstPtr &)
 

Member Typedef Documentation

◆ Ptr

Shared-ownership pointer.

Definition at line 147 of file StoragePool.h.

◆ ConstPtr

Shared-ownership pointer.

Definition at line 148 of file StoragePool.h.

Member Function Documentation

◆ instance()

static Ptr Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated::instance ( const std::string &  name,
const TypePredicateConstPtr  
)
static

Constructor.

Return a new storage pool that can potentially satisfy requests for types for which the predicate returns true. The returned storage pool has no storage (see append).

◆ append()

void Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated::append ( const ConcreteLocation )

Append an additional location.

An exception is thrown if the new location already exists in this pool. It is the caller's responsibility to ensure that the location is capable of storing instances of all types for which canStore returns true.

◆ copy()

StoragePoolBasePtr Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated::copy ( ) const
overridevirtual

Copy constructor.

Makes a new copy of this pool.

Implements Rose::BinaryAnalysis::CallingConvention::StoragePoolBase.

◆ constantLocations()

std::vector< ConcreteLocation > Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated::constantLocations ( ) const
overridevirtual

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 from Rose::BinaryAnalysis::CallingConvention::StoragePoolBase.

◆ consume()

std::vector< ConcreteLocation > Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated::consume ( SgAsmType )
overridevirtual

Consume a storage location.

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

Implements Rose::BinaryAnalysis::CallingConvention::StoragePoolBase.

◆ reset()

void Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated::reset ( )
overridevirtual

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.

Implements Rose::BinaryAnalysis::CallingConvention::StoragePoolBase.


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