#include <init_handler.h>
Collaboration diagram for Init_handler:
Public Methods | |
Init_handler (Abstract_scope *scope, Ptree *tree, bool zero_init) | |
Create an Init_handler. More... | |
~Init_handler () | |
Ptree * | make_constructor_call (Type t, Ptree *args) |
Build a constructor call for type T, with given args. More... | |
Ptree * | process_initializer (Type t) |
Main entry point. More... | |
Ptree * | get_default_initializer_for_type (Type t) |
Return a default initializer for type t. More... | |
Private Methods | |
Ptree * | process_brace (Type t, Init_reader *reader) |
Process a brace initializer. More... | |
Ptree * | process_array (Type t, Init_reader *reader) |
Ptree * | process_class (Class_symbol *csym, Init_reader *reader) |
Private Attributes | |
Ptree * | tree |
Abstract_scope * | scope |
bool | zero_init |
|
Create an Init_handler.
Definition at line 111 of file init_handler.cc. |
|
Definition at line 118 of file init_handler.cc. |
|
Return a default initializer for type t.
Definition at line 399 of file init_handler.cc. References Overload_resolver::add_function(), compile_error(), compile_warning(), Symbol_name::CONSTRUCTOR_NAME, Overload_candidate::fsig, generate_implicit_conversion(), Overload_resolver::get_best(), Type::get_human_readable_type(), Type::get_kind(), Expr_result::get_tree(), Type::get_type_symbol(), Class_symbol::is_aggregate(), Type::is_class_type(), Type::is_scalar_type(), Type::k_Array, Type::k_Reference, Expr_result::k_RValue, Class_symbol::lookup_helper(), make_name(), Implicit_conversion::make_tree(), process_class(), Symbol_pair::untag, and zero_init. Referenced by process_brace(), and process_initializer(). |
|
Build a constructor call for type T, with given args.
Definition at line 158 of file init_handler.cc. References Annotated_funcall_maker::add_arg(), Overload_resolver::add_function(), compile_error(), Symbol_name::CONSTRUCTOR_NAME, Ptree::First(), Overload_candidate::fsig, generate_implicit_conversion(), Overload_resolver::get_arg(), Overload_resolver::get_arg_count(), Overload_resolver::get_best(), Type::get_kind(), Symbol::get_name(), Expr_result::get_tree(), Type::get_type_symbol(), Source::instance(), Type::is_class_type(), Type::is_scalar_type(), Type::k_Reference, Ptree::Length(), Class_symbol::lookup_helper(), Annotated_funcall_maker::make_funcall(), make_name(), make_static_leaf(), Implicit_conversion::make_tree(), scope, and Symbol_pair::untag. Referenced by process_initializer(). |
|
Definition at line 345 of file init_handler.cc. References Init_maker::add(), compile_warning(), Init_reader::empty(), Init_reader::get_nondestructive(), Init_maker::make_init(), and process_brace(). Referenced by process_brace(). |
|
Process a brace initializer.
Definition at line 266 of file init_handler.cc. References compile_error(), compile_warning(), generate_implicit_conversion(), Init_reader::get(), Type::get_basis_type(), get_default_initializer_for_type(), Type::get_kind(), Symbol::get_name(), Init_reader::get_nondestructive(), get_string_literal(), Expr_result::get_tree(), Type::get_type_symbol(), Source::instance(), Class_symbol::is_aggregate(), is_character_type(), Type::is_class_type(), Init_reader::is_compound(), Type::is_scalar_type(), Ptree::IsLeaf(), Type::k_Array, Implicit_conversion::make_tree(), process_array(), process_class(), scope, Ptree::Second(), and tree. Referenced by process_array(), process_class(), and process_initializer(). |
|
Definition at line 360 of file init_handler.cc. References Init_maker::add(), generate_implicit_conversion(), Init_reader::get(), Class_symbol::get_kind(), Init_reader::get_nondestructive(), Expr_result::get_tree(), Variable_symbol::get_type(), Type_symbol::get_type(), Source::instance(), Init_reader::is_compound(), Variable_symbol::is_member_variable(), Symbol::k_Union, Init_maker::make_init(), Implicit_conversion::make_tree(), Class_symbol::mem_begin(), Class_symbol::mem_end(), process_brace(), and scope. Referenced by get_default_initializer_for_type(), and process_brace(). |
|
Main entry point. Parse our tree as an initializer for type T. Returns the initializer:
Definition at line 217 of file init_handler.cc. References bogus_ptree_error(), compile_error(), Ptree::Eq(), expect_ptree(), Ptree::First(), Type::get_basis_type(), get_default_initializer_for_type(), Type::get_kind(), get_string_literal(), is_character_type(), Type::is_class_type(), Type::is_scalar_type(), Type::k_Array, make_constructor_call(), process_brace(), Ptree::Second(), Ptree::Third(), and tree. |
|
Definition at line 30 of file init_handler.h. Referenced by make_constructor_call(), process_brace(), and process_class(). |
|
Definition at line 29 of file init_handler.h. Referenced by process_brace(), and process_initializer(). |
|
Definition at line 31 of file init_handler.h. Referenced by get_default_initializer_for_type(). |