ROSE 0.11.145.192
|
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>
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< ConcreteLocation > | constantLocations () const override |
List of constant storage locations. | |
std::vector< ConcreteLocation > | consume (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 &) | |
using Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated::Ptr = StoragePoolEnumeratedPtr |
Shared-ownership pointer.
Definition at line 147 of file StoragePool.h.
using Rose::BinaryAnalysis::CallingConvention::StoragePoolEnumerated::ConstPtr = StoragePoolEnumeratedConstPtr |
Shared-ownership pointer.
Definition at line 148 of file StoragePool.h.
|
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).
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.
|
overridevirtual |
Copy constructor.
Makes a new copy of this pool.
Implements Rose::BinaryAnalysis::CallingConvention::StoragePoolBase.
|
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.
|
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.
|
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.