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 | ); |
| PARAMETER | DESCRIPTION |
|---|---|
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 | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
name |
|
visibility |
|
containing_scope |
|
default_only |
|
section |
method emptyconst
DEFINITION
| bool empty | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method enter_names
DEFINITION
| void enter_names | ( | ); |
method evaluate_implementationvirtual protected
DEFINITION
| virtual void evaluate_implementation | ( | EvaluationContext & context | ); |
| PARAMETER | DESCRIPTION |
|---|---|
context |
method has_addressconst
DEFINITION
| bool has_address | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method is_reservationconst
DEFINITION
| bool is_reservation | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method less_pointersstatic
DEFINITION
| static bool less_pointers | ( | const Object * a, | |
| const Object * b | ); |
| PARAMETER | DESCRIPTION |
|---|---|
a |
|
b |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method mark_used
DEFINITION
| void mark_used | ( | ); |
method maximum_addressconst
DEFINITION
| std::optional< uint64_t > maximum_address | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< uint64_t > |
method minimum_addressconst
DEFINITION
| std::optional< uint64_t > minimum_address | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< uint64_t > |
method operator<const
DEFINITION
| bool operator< | ( | const Object & other | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
other |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method pin
DEFINITION
| void pin | ( | Expression expression | ); |
| PARAMETER | DESCRIPTION |
|---|---|
expression |
method reservationconst
DEFINITION
| std::optional< uint64_t > reservation | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
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; |
| PARAMETER | DESCRIPTION |
|---|---|
stream |
method size_rangeconst
DEFINITION
| SizeRange size_range | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
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 | ); |
| PARAMETER | DESCRIPTION |
|---|---|
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 | ); |
| PARAMETER | DESCRIPTION |
|---|---|
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;