#include <address.h>
Inheritance diagram for expression_address:

Public Member Functions | |
| virtual | ~expression_address () |
| expression_address (const location &locn, unsigned offset, const type::pointer &type) | |
| virtual expression::pointer | fast_load () const=0 |
| virtual expression::pointer | fast_store (const expression::pointer &rhs) const=0 |
| virtual expression::pointer | advance_by_words (long nwords, const type::pointer &new_type, const symbol *new_hint) const=0 |
Protected Member Functions | |
| int | get_precedence () const |
| void | logical_traversal (int pprec, label::pointer &true_branch, label::pointer &false_branch, bool fall_through_preference) |
| type::pointer | get_type () const |
| bool | is_lvalue () const |
| side_effect_t | has_side_effect () const |
| expression::pointer | optimize () const |
| unsigned | get_offset () const |
Private Member Functions | |
| expression_address () | |
| expression_address (const expression_address &) | |
| expression_address & | operator= (const expression_address &) |
Private Attributes | |
| unsigned | offset |
| type::pointer | type |
Definition at line 30 of file address.h.
| virtual expression_address::~expression_address | ( | ) | [virtual] |
The destructor.
| expression_address::expression_address | ( | const location & | locn, | |
| unsigned | offset, | |||
| const type::pointer & | type | |||
| ) |
The constructor.
| expression_address::expression_address | ( | ) | [private] |
The default constructor. Do not use.
| expression_address::expression_address | ( | const expression_address & | ) | [private] |
The copy constructor. Do not use.
| virtual expression::pointer expression_address::fast_load | ( | ) | const [pure virtual] |
The fast_load method is used by the expression_load_indirect::optimize method to produce smaller code, if possible.
Implemented in expression_address_global, expression_address_intermediate, and expression_address_local.
| virtual expression::pointer expression_address::fast_store | ( | const expression::pointer & | rhs | ) | const [pure virtual] |
The fast_store method is used by the expression_store_indirect::optimize method to produce smaller code, if possible.
| rhs | The value to be stored. |
Implemented in expression_address_global, expression_address_intermediate, and expression_address_local.
| virtual expression::pointer expression_address::advance_by_words | ( | long | nwords, | |
| const type::pointer & | new_type, | |||
| const symbol * | new_hint | |||
| ) | const [pure virtual] |
The advance_by_words method is used to create a new pointer constant from an old one, with the offset advanced by the given number of words.
| nwords | The number of words to advance. | |
| new_type | the new type of pointer, because usually the original is a record pointer, and the new one is a member pointer (i.e. not the same type). | |
| new_hint | New hit to attach to the new pointer node |
Implemented in expression_address_global, expression_address_intermediate, and expression_address_local.
| int expression_address::get_precedence | ( | ) | const [protected, virtual] |
The get_precedence method is used to obtain the precedence of this expression node.
The highest precedence has the highest absolute value, the lowest precedence gets the lowest absolute value.
Implements expression.
| void expression_address::logical_traversal | ( | int | pprec, | |
| label::pointer & | true_branch, | |||
| label::pointer & | false_branch, | |||
| bool | fall_through_preference | |||
| ) | [protected] |
| type::pointer expression_address::get_type | ( | ) | const [protected, virtual] |
The get_type method is used to get the type of this expression.
Implements expression.
| bool expression_address::is_lvalue | ( | ) | const [protected, virtual] |
The is_lvalue method is used to determine whether or not this expression is suitable to appear on the left hand side of an assignment expression.
Implements expression.
| side_effect_t expression_address::has_side_effect | ( | ) | const [protected, virtual] |
The has_side_effect method is used to determine if an expression has any effect. It is used by the parse to produce "statement with no effect" warnings.
Implements expression.
| expression::pointer expression_address::optimize | ( | ) | const [protected, virtual] |
The optimize method may be used to evaluate constant expressions, or substitute more efficient expressions.
This is intended to be called by the translator:: expression_statement method, or similar, where the expression is in its final form, and will get no deeper. In other words, when all available information has been provided.
There is no default implementation, even though most optimize implementations return self(), because this gives the compiler no opportunity to remind the authors of new classes that they have forgotten something.
Implements expression.
| unsigned expression_address::get_offset | ( | ) | const [inline, protected] |
| expression_address& expression_address::operator= | ( | const expression_address & | ) | [private] |
The assignment operator. Do not use.
unsigned expression_address::offset [private] |
type::pointer expression_address::type [private] |
1.5.1