#include <expr_result.h>
Collaboration diagram for Expr_result:
Public Types | |
enum | Kind { k_RValue, k_LValue, k_Function, k_BoundMember, k_BoundPMF } |
Public Methods | |
Ptree * | get_tree () const |
const Type & | get_type () const |
Function_symbol * | get_function () const |
Kind | get_kind () const |
Ptree * | get_object () const |
bool | is_function () const |
bool | is_bound_member () const |
bool | is_bound_pmf () const |
void | set_kind (Kind k) |
void | set_tree (Ptree *t) |
Expr_result () | |
Expr_result (Dummy *) | |
template<class T> | Expr_result (Annotated< T > *tree, Kind k) |
Expr_result (Ptree *tree, Type t, Kind k) | |
template<class T> | Expr_result (Annotated< T > *tree, Function_symbol *sym) |
Expr_result (Ptree *object, Ptree *function, Function_symbol *sym) | |
Expr_result (Ptree *object, Ptree *function, Type t) | |
bool | is_lvalue () const |
True iff this is a lvalue, 3.10p1. More... | |
bool | is_value () const |
void | convert_to (Type t) |
void | convert_to_qual (Type t) |
void | set_value (Ptree *value, Type t) |
void | convert_to_rvalue () |
lvalue to rvalue conversion, 4.1. More... | |
void | convert_to_pointer () |
Array to pointer conversion, 4.2. More... | |
void | convert_to_fpointer () |
Function-to-pointer conversion, 4.3. More... | |
void | do_integral_promotions () |
Integral promotions, 4.5. More... | |
void | convert_to_bool () |
Convert to boolean, 4.10. More... | |
void | adjust_reference () |
Adjust reference types, 5p6. More... | |
void | do_std_conversions () |
Standard conversions, 5p8. More... | |
bool | is_modifyable_lvalue () const |
bool | is_npc () const |
True iff this is (may be) a null pointer constant. More... | |
Private Attributes | |
Ptree * | tree |
Type | type |
Function_symbol * | symbol |
Kind | kind |
Ptree * | obj_tree |
|
Definition at line 23 of file expr_result.h. Referenced by Expr_result(), get_kind(), set_kind(), and Expr_annotator::visit_name(). |
|
Definition at line 72 of file expr_result.h. |
|
Definition at line 73 of file expr_result.h. |
|
Definition at line 77 of file expr_result.h. References Type::is_valid(), kind, and Kind. |
|
Definition at line 81 of file expr_result.h. References Type::is_valid(), kind, and Kind. |
|
Definition at line 87 of file expr_result.h. References k_Function, and kind. |
|
Definition at line 91 of file expr_result.h. References k_BoundMember, and kind. |
|
Definition at line 94 of file expr_result.h. References k_BoundPMF, and kind. |
|
Adjust reference types, 5p6.
Definition at line 95 of file expr_result.cc. References convert_to(), Type::get_basis_type(), Type::get_kind(), k_LValue, Type::k_Reference, kind, and type. |
|
Definition at line 161 of file expr_result.h. References Type::is_class_type(), Type::is_valid(), make_cast_expr(), set_value(), tree, and type. Referenced by adjust_reference(), convert_to_bool(), convert_to_fpointer(), convert_to_pointer(), convert_to_rvalue(), do_integral_promotions(), do_mptr_arith_conversions(), do_pointer_arith_conversions(), do_usual_conversions(), try_reinterpret_cast(), Expr_annotator::try_static_cast(), Expr_annotator::visit_array(), and Expr_annotator::visit_assign(). |
|
Convert to boolean, 4.10.
Definition at line 81 of file expr_result.cc. References compile_error(), convert_to(), do_std_conversions(), Type::get_human_readable_type(), Type::get_kind(), Type::is_arithmetic_type(), Type::is_enum_type(), Type::k_Member, Type::k_Pointer, and type. Referenced by Expr_annotator::process_binary_operator(), and Expr_annotator::process_unary_operator(). |
|
Function-to-pointer conversion, 4.3.
Definition at line 65 of file expr_result.cc. References compile_error(), convert_to(), Type::get_kind(), Type::is_valid(), Type::k_Function, k_RValue, kind, Type::make_pointer_type(), and type. Referenced by do_std_conversions(), try_reinterpret_cast(), and Expr_annotator::visit_throw(). |
|
Array to pointer conversion, 4.2.
Definition at line 49 of file expr_result.cc. References compile_error(), convert_to(), Type::get_basis_type(), Type::get_kind(), Type::is_valid(), Type::k_Array, k_RValue, kind, Type::make_pointer_type(), and type. Referenced by do_std_conversions(), try_reinterpret_cast(), and Expr_annotator::visit_throw(). |
|
Definition at line 171 of file expr_result.h. References Type::is_same_unqualified_type(), Type::is_valid(), make_cast_expr_unchecked(), set_value(), tree, and type. Referenced by Expr_annotator::visit_throw(). |
|
lvalue to rvalue conversion, 4.1.
Definition at line 30 of file expr_result.cc. References compile_error(), convert_to(), Type::get_kind(), Type::get_unqualified_type(), Type::is_class_type(), Type::is_complete(), is_lvalue(), Type::is_valid(), Type::k_Array, Type::k_Function, k_RValue, kind, and type. Referenced by do_integral_promotions(), do_std_conversions(), and generate_ics_for_ternary(). |
|
Integral promotions, 4.5.
Definition at line 181 of file expr_result.h. References convert_to(), convert_to_rvalue(), Type::get_promoted_integer(), and type. Referenced by do_usual_conversions(), Expr_annotator::process_binary_operator(), Expr_annotator::process_unary_operator(), and Enum_symbol::process_value(). |
|
Standard conversions, 5p8. This corresponds to loading the value into a register or somesuch. Definition at line 108 of file expr_result.cc. References convert_to_fpointer(), convert_to_pointer(), and convert_to_rvalue(). Referenced by convert_to_bool(), Expr_annotator::process_binary_operator(), Expr_annotator::process_unary_operator(), Expr_annotator::visit_array(), and Expr_annotator::visit_cond(). |
|
Definition at line 40 of file expr_result.h. Referenced by Expr_annotator::do_funcall(), and gen_candidates(). |
|
Definition at line 41 of file expr_result.h. Referenced by gen_conv_ops(), Implicit_conversion::Implicit_conversion(), Expr_annotator::process_member_access(), and Expr_annotator::process_pm_expr(). |
|
Definition at line 42 of file expr_result.h. Referenced by Expr_annotator::do_funcall(). |
|
|
|
Definition at line 45 of file expr_result.h. References k_BoundMember, k_BoundPMF, and kind. Referenced by Expr_annotator::do_funcall(), and gen_candidates(). |
|
Definition at line 46 of file expr_result.h. References k_BoundPMF, and kind. Referenced by Expr_annotator::do_funcall(). |
|
Definition at line 44 of file expr_result.h. References k_Function, and kind. Referenced by Expr_annotator::do_funcall(), gen_candidates(), Implicit_conversion::make_tree(), Expr_annotator::process_unary_operator(), and Expr_annotator::visit_comma(). |
|
True iff this is a lvalue, 3.10p1.
Definition at line 147 of file expr_result.h. References k_LValue, and kind. Referenced by convert_to_rvalue(), gen_candidates(), generate_ics_for_ternary(), Expr_annotator::process_unary_operator(), try_reinterpret_cast(), and Expr_annotator::visit_cond(). |
|
Definition at line 118 of file expr_result.cc. References Type::is_qualified(), k_LValue, kind, Type::q_Const, and type. Referenced by Expr_annotator::process_unary_operator(), Expr_annotator::visit_assign(), and Expr_annotator::visit_postfix(). |
|
True iff this is (may be) a null pointer constant.
Definition at line 127 of file expr_result.cc. References Type::is_int(), Ptree::ToString(), tree, and type. Referenced by do_mptr_arith_conversions(), do_pointer_arith_conversions(), get_composite_mptr_type(), get_composite_pointer_type(), Implicit_conversion::Implicit_conversion(), Expr_annotator::process_binary_operator(), and Expr_annotator::visit_cond(). |
|
Definition at line 154 of file expr_result.h. References k_LValue, k_RValue, and kind. Referenced by Expr_annotator::do_funcall(), Implicit_conversion::Implicit_conversion(), Expr_annotator::process_unary_operator(), Expr_annotator::try_static_cast(), Expr_annotator::visit_assign(), Annotator::visit_case(), Expr_annotator::visit_comma(), Annotator::visit_exprstatement(), Annotator::visit_for(), Annotator::visit_return(), and Annotator::visit_switch(). |
|
Definition at line 48 of file expr_result.h. Referenced by Implicit_conversion::make_tree(). |
|
Definition at line 49 of file expr_result.h. Referenced by Expr_annotator::visit_comma(). |
|
Definition at line 10 of file expr_result.cc. References Type::get_basis_type(), Type::get_kind(), Type::is_valid(), k_LValue, Type::k_Reference, k_RValue, kind, obj_tree, symbol, tree, and type. Referenced by convert_to(), convert_to_qual(), Expr_annotator::do_fstyle_cast(), Expr_annotator::do_funcall(), gen_candidates(), gen_conv_ops(), Implicit_conversion::make_tree(), Expr_annotator::visit_array(), Expr_annotator::visit_arrowmember(), Expr_annotator::visit_assign(), Expr_annotator::visit_comma(), Expr_annotator::visit_postfix(), and Expr_annotator::visit_unary(). |
|
Definition at line 35 of file expr_result.h. Referenced by adjust_reference(), convert_to_fpointer(), convert_to_pointer(), convert_to_rvalue(), Expr_result(), get_kind(), is_bound_member(), is_bound_pmf(), is_function(), is_lvalue(), is_modifyable_lvalue(), is_value(), set_kind(), and set_value(). |
|
Definition at line 36 of file expr_result.h. Referenced by set_value(). |
|
Definition at line 34 of file expr_result.h. Referenced by set_value(). |
|
Definition at line 32 of file expr_result.h. Referenced by convert_to(), convert_to_qual(), is_npc(), and set_value(). |
|
Definition at line 33 of file expr_result.h. Referenced by adjust_reference(), convert_to(), convert_to_bool(), convert_to_fpointer(), convert_to_pointer(), convert_to_qual(), convert_to_rvalue(), do_integral_promotions(), is_modifyable_lvalue(), is_npc(), and set_value(). |