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

Description

Allocates storage for an argument or return value.

This class is an ordered container of storage pools, and any allocation requests are satisfied by dispatching to the storage pools. The first storage pool that can handle the request wins. Storage pools can be things like explicit lists of storage locations (e.g., an ordered list of registers used for integer function arguments), or they can generate storage locations on the fly (e.g., pushing function arguments onto a stack).

Definition at line 308 of file StoragePool.h.

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

Public Types

using Ptr = AllocatorPtr
 Shared-ownership pointer.
 
using ConstPtr = AllocatorConstPtr
 Shared-ownership pointer.
 

Public Member Functions

void append (const StoragePoolBaseConstPtr &)
 Add a storage pool to the allocator.
 
void reset ()
 Reset the allocation algorithm.
 
std::vector< ConcreteLocationallocate (SgAsmType *)
 Allocate storage for a value.
 

Static Public Member Functions

static Ptr instance ()
 Constructor.
 

Member Typedef Documentation

◆ Ptr

Shared-ownership pointer.

Definition at line 313 of file StoragePool.h.

◆ ConstPtr

Shared-ownership pointer.

Definition at line 314 of file StoragePool.h.

Member Function Documentation

◆ instance()

static Ptr Rose::BinaryAnalysis::CallingConvention::Allocator::instance ( )
static

Constructor.

Construct an allocator with empty storage pools. Such an allocator cannot allocate anything.

◆ reset()

void Rose::BinaryAnalysis::CallingConvention::Allocator::reset ( )

Reset the allocation algorithm.

This should be called before allocating arguments and return values for a new function declaration.

◆ allocate()

std::vector< ConcreteLocation > Rose::BinaryAnalysis::CallingConvention::Allocator::allocate ( SgAsmType )

Allocate storage for a value.

Returns the location where this value would be stored. It's possible that some values are stored at more than one location. An empty result means the value cannot be allocated.


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