Skip to content

Object

INCLUDE FILE
#include "Entity/Object.h"

class Object

Represents an object.

DEFINITION
class Object;

constructor Object

DEFINITION
Object ( const Location & location,
Symbol  name,
std::shared_ptr< Scope >  containing_scope,
const std::shared_ptr< StructuredValue > & definition );
PARAMETERDESCRIPTION
location
name
containing_scope
definition

constructor Object

DEFINITION
Object ( const Location & location,
Symbol  name,
Visibility  visibility,
std::shared_ptr< Scope >  containing_scope,
bool  default_only,
const MemoryMap::Section * section );
PARAMETERDESCRIPTION
location
name
visibility
containing_scope
default_only
section

method emptyconst

DEFINITION
bool  empty ( ) const;
RETURNSDESCRIPTION
bool

method enter_names

DEFINITION
void  enter_names ( );

method evaluate_implementationvirtual protected

DEFINITION
virtual void  evaluate_implementation ( EvaluationContext & context );
PARAMETERDESCRIPTION
context

method has_addressconst

DEFINITION
bool  has_address ( ) const;
RETURNSDESCRIPTION
bool

method is_reservationconst

DEFINITION
bool  is_reservation ( ) const;
RETURNSDESCRIPTION
bool

method less_pointersstatic

DEFINITION
static bool  less_pointers ( const Object * a,
const Object * b );
PARAMETERDESCRIPTION
a
b
RETURNSDESCRIPTION
bool

method mark_used

DEFINITION
void  mark_used ( );

method maximum_addressconst

DEFINITION
std::optional< uint64_t >  maximum_address ( ) const;
RETURNSDESCRIPTION
std::optional< uint64_t >

method minimum_addressconst

DEFINITION
std::optional< uint64_t >  minimum_address ( ) const;
RETURNSDESCRIPTION
std::optional< uint64_t >

method operator<const

DEFINITION
bool  operator< ( const Object & other ) const;
PARAMETERDESCRIPTION
other
RETURNSDESCRIPTION
bool

method pin

DEFINITION
void  pin ( Expression  expression );
PARAMETERDESCRIPTION
expression

method reservationconst

DEFINITION
std::optional< uint64_t >  reservation ( ) const;
RETURNSDESCRIPTION
std::optional< uint64_t >

method resolve_implementationvirtual protected

Resolve names in the entity.

The default implementation calls resolve() on all sub-body-elements and sub-expressions using traverse().

DEFINITION
virtual void  resolve_implementation ( );

method serializeconst virtual

DEFINITION
virtual void  serialize ( std::ostream & stream ) const;
PARAMETERDESCRIPTION
stream

method size_rangeconst

DEFINITION
SizeRange  size_range ( ) const;
RETURNSDESCRIPTION
SizeRange

method traversevirtual protected

Traverse the Entity.

This function is used by the default implementations of resolve_implementation() and expand_calls_implementation(). Unless a subclass overrides both of these methods, it should override traverse().

DEFINITION
virtual void  traverse ( std::function< void(Entity &)>  entity_callable,
std::function< void(Body &)>  body_callable,
std::function< void(Expression &)>  expression_callable );
PARAMETERDESCRIPTION
entity_callable
body_callable

A callable to apply to each sub-body-element.

expression_callable

A callable to apply to each sub-expression.

method uses

DEFINITION
void  uses ( Symbol  name );
PARAMETERDESCRIPTION
name

member address

DEFINITION
std::optional< Address >  address;

member address_expression

DEFINITION
std::optional< Expression >  address_expression;

member alignment

DEFINITION
uint64_t  alignment;

member body

DEFINITION
Body  body;

member explicitly_used

DEFINITION
bool  explicitly_used;

member explicitly_used_objects

DEFINITION
std::set< Symbol >  explicitly_used_objects;

member reservation_expression

DEFINITION
std::optional< Expression >  reservation_expression;

member section

DEFINITION
const MemoryMap::Section * section;

member token_addressstatic private

DEFINITION
static const Token  token_address;

member token_alignmentstatic private

DEFINITION
static const Token  token_alignment;

member token_bodystatic private

DEFINITION
static const Token  token_body;

member token_reservestatic private

DEFINITION
static const Token  token_reserve;

member token_sectionstatic private

DEFINITION
static const Token  token_section;

member token_usesstatic private

DEFINITION
static const Token  token_uses;