ScummVM API documentation
Sci::DataStack Struct Reference

#include <segment.h>

Inheritance diagram for Sci::DataStack:
Sci::SegmentObj Common::Serializable

Public Member Functions

bool isValidOffset (uint32 offset) const override
 
SegmentRef dereference (reg_t pointer) override
 
reg_t findCanonicAddress (SegManager *segMan, reg_t addr) const override
 
Common::Array< reg_tlistAllOutgoingReferences (reg_t object) const override
 
void saveLoadWithSerializer (Common::Serializer &ser) override
 
- Public Member Functions inherited from Sci::SegmentObj
 SegmentObj (SegmentType type)
 
SegmentType getType () const
 
virtual void freeAtAddress (SegManager *segMan, reg_t sub_addr)
 
virtual Common::Array< reg_tlistAllDeallocatable (SegmentId segId) const
 

Public Attributes

uint _capacity
 
reg_t_entries
 
- Public Attributes inherited from Sci::SegmentObj
SegmentType _type
 

Additional Inherited Members

- Static Public Member Functions inherited from Sci::SegmentObj
static SegmentObjcreateSegmentObj (SegmentType type)
 

Detailed Description

Data stack

Member Function Documentation

◆ isValidOffset()

bool Sci::DataStack::isValidOffset ( uint32  offset) const
inlineoverridevirtual

Check whether the given offset into this memory object is valid, i.e., suitable for passing to dereference.

Implements Sci::SegmentObj.

◆ dereference()

SegmentRef Sci::DataStack::dereference ( reg_t  pointer)
overridevirtual

Dereferences a raw memory pointer.

Parameters
regreference to dereference
Returns
the data block referenced

Reimplemented from Sci::SegmentObj.

◆ findCanonicAddress()

reg_t Sci::DataStack::findCanonicAddress ( SegManager segMan,
reg_t  sub_addr 
) const
inlineoverridevirtual

Finds the canonic address associated with sub_reg. Used by the garbage collector.

For each valid address a, there exists a canonic address c(a) such that c(a) = c(c(a)). This address "governs" a in the sense that deallocating c(a) will deallocate a.

Parameters
sub_addrbase address whose canonic address is to be found

Reimplemented from Sci::SegmentObj.

◆ listAllOutgoingReferences()

Common::Array<reg_t> Sci::DataStack::listAllOutgoingReferences ( reg_t  object) const
overridevirtual

Iterates over all references reachable from the specified object. Used by the garbage collector.

Parameters
objectobject (within the current segment) to analyze
Returns
a list of outgoing references within the object
Note
This function may also choose to report numbers (segment 0) as adresses

Reimplemented from Sci::SegmentObj.

Member Data Documentation

◆ _capacity

uint Sci::DataStack::_capacity

Number of stack entries


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