Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Expr_result Struct Reference

#include <expr_result.h>

Collaboration diagram for Expr_result:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Kind {
  k_RValue, k_LValue, k_Function, k_BoundMember,
  k_BoundPMF
}

Public Methods

Ptreeget_tree () const
const Typeget_type () const
Function_symbolget_function () const
Kind get_kind () const
Ptreeget_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

Ptreetree
Type type
Function_symbolsymbol
Kind kind
Ptreeobj_tree

Member Enumeration Documentation

enum Expr_result::Kind
 

Enumeration values:
k_RValue 
k_LValue 
k_Function 
k_BoundMember 
k_BoundPMF 

Definition at line 23 of file expr_result.h.

Referenced by Expr_result(), get_kind(), set_kind(), and Expr_annotator::visit_name().


Constructor & Destructor Documentation

Expr_result::Expr_result   [inline]
 

Definition at line 72 of file expr_result.h.

Expr_result::Expr_result Dummy *    [inline]
 

Definition at line 73 of file expr_result.h.

template<class T>
Expr_result::Expr_result Annotated< T > *    tree,
Kind    k
[inline]
 

Definition at line 77 of file expr_result.h.

References Type::is_valid(), kind, and Kind.

Expr_result::Expr_result Ptree   tree,
Type    t,
Kind    k
[inline]
 

Definition at line 81 of file expr_result.h.

References Type::is_valid(), kind, and Kind.

template<class T>
Expr_result::Expr_result Annotated< T > *    tree,
Function_symbol   sym
[inline]
 

Definition at line 87 of file expr_result.h.

References k_Function, and kind.

Expr_result::Expr_result Ptree   object,
Ptree   function,
Function_symbol   sym
[inline]
 

Definition at line 91 of file expr_result.h.

References k_BoundMember, and kind.

Expr_result::Expr_result Ptree   object,
Ptree   function,
Type    t
[inline]
 

Definition at line 94 of file expr_result.h.

References k_BoundPMF, and kind.


Member Function Documentation

void Expr_result::adjust_reference  
 

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.

void Expr_result::convert_to Type    t [inline]
 

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().

void Expr_result::convert_to_bool  
 

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().

void Expr_result::convert_to_fpointer  
 

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().

void Expr_result::convert_to_pointer  
 

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().

void Expr_result::convert_to_qual Type    t [inline]
 

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().

void Expr_result::convert_to_rvalue  
 

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().

void Expr_result::do_integral_promotions   [inline]
 

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().

void Expr_result::do_std_conversions  
 

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().

Function_symbol* Expr_result::get_function   const [inline]
 

Definition at line 40 of file expr_result.h.

Referenced by Expr_annotator::do_funcall(), and gen_candidates().

Kind Expr_result::get_kind   const [inline]
 

Definition at line 41 of file expr_result.h.

References kind, and Kind.

Referenced by gen_conv_ops(), Implicit_conversion::Implicit_conversion(), Expr_annotator::process_member_access(), and Expr_annotator::process_pm_expr().

Ptree* Expr_result::get_object   const [inline]
 

Definition at line 42 of file expr_result.h.

Referenced by Expr_annotator::do_funcall().

Ptree* Expr_result::get_tree   const [inline]
 

Definition at line 38 of file expr_result.h.

Referenced by Expr_annotator::do_funcall(), gen_candidates(), Init_handler::get_default_initializer_for_type(), Init_handler::make_constructor_call(), Implicit_conversion::make_tree(), Expr_annotator::process_binary_operator(), Init_handler::process_brace(), Init_handler::process_class(), Expr_annotator::process_member_access(), Expr_annotator::process_pm_expr(), Expr_annotator::process_unary_operator(), Enum_symbol::process_value(), Expr_annotator::visit_array(), Expr_annotator::visit_arrowmember(), Expr_annotator::visit_assign(), Annotator::visit_case(), Expr_annotator::visit_comma(), Expr_annotator::visit_cond(), Expr_annotator::visit_delete(), Annotator::visit_do(), Annotator::visit_exprstatement(), Annotator::visit_for(), Annotator::visit_if(), Expr_annotator::visit_new(), Expr_annotator::visit_pm(), Expr_annotator::visit_postfix(), Annotator::visit_return(), Annotator::visit_switch(), Expr_annotator::visit_throw(), Expr_annotator::visit_unary(), and Annotator::visit_while().

const Type& Expr_result::get_type   const [inline]
 

Definition at line 39 of file expr_result.h.

Referenced by Expr_annotator::do_funcall(), do_mptr_arith_conversions(), do_pointer_arith_conversions(), do_usual_conversions(), enumerate_conversion_ops(), gen_candidates(), gen_conv_ops(), generate_ics_for_ternary(), generate_implicit_conversion(), get_composite_mptr_type(), get_composite_pointer_type(), has_type(), Implicit_conversion::Implicit_conversion(), Expr_annotator::process_binary_operator(), Expr_annotator::process_member_access(), Expr_annotator::process_pm_expr(), Expr_annotator::process_unary_operator(), Enum_symbol::process_value(), try_reinterpret_cast(), Expr_annotator::try_static_cast(), Expr_annotator::visit_array(), Expr_annotator::visit_arrowmember(), Expr_annotator::visit_assign(), Annotator::visit_case(), Expr_annotator::visit_comma(), Expr_annotator::visit_cond(), Expr_annotator::visit_delete(), Expr_annotator::visit_dotmember(), Expr_annotator::visit_infix(), Expr_annotator::visit_pm(), Expr_annotator::visit_postfix(), Annotator::visit_return(), Expr_annotator::visit_sizeof(), Annotator::visit_switch(), Expr_annotator::visit_throw(), and Expr_annotator::visit_unary().

bool Expr_result::is_bound_member   const [inline]
 

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().

bool Expr_result::is_bound_pmf   const [inline]
 

Definition at line 46 of file expr_result.h.

References k_BoundPMF, and kind.

Referenced by Expr_annotator::do_funcall().

bool Expr_result::is_function   const [inline]
 

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().

bool Expr_result::is_lvalue   const [inline]
 

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().

bool Expr_result::is_modifyable_lvalue   const
 

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().

bool Expr_result::is_npc   const
 

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().

bool Expr_result::is_value   const [inline]
 

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().

void Expr_result::set_kind Kind    k [inline]
 

Definition at line 48 of file expr_result.h.

References kind, and Kind.

Referenced by Implicit_conversion::make_tree().

void Expr_result::set_tree Ptree   t [inline]
 

Definition at line 49 of file expr_result.h.

Referenced by Expr_annotator::visit_comma().

void Expr_result::set_value Ptree   value,
Type    t
 

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().


Member Data Documentation

Kind Expr_result::kind [private]
 

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().

Ptree* Expr_result::obj_tree [private]
 

Definition at line 36 of file expr_result.h.

Referenced by set_value().

Function_symbol* Expr_result::symbol [private]
 

Definition at line 34 of file expr_result.h.

Referenced by set_value().

Ptree* Expr_result::tree [private]
 

Definition at line 32 of file expr_result.h.

Referenced by convert_to(), convert_to_qual(), is_npc(), and set_value().

Type Expr_result::type [private]
 

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().


The documentation for this struct was generated from the following files:
Generated on Mon Feb 10 17:35:34 2003 for VFiasco Semantics Compiler by doxygen1.2.15