#include "annotation.h"
#include "annotation_i.h"
Include dependency graph for annotation.cc:
Go to the source code of this file.
Defines | |
#define | COLOR_(c) #c |
#define | COLOR(c) (colors ? "\033[" COLOR_(c) "m" : "") |
#define | cBlack 30 |
#define | cRed 31 |
#define | cGreen 32 |
#define | cYellow 33 |
#define | cBlue 34 |
#define | cMagenta 35 |
#define | cCyan 36 |
#define | cWhite 37 |
Functions | |
const char * | unmangle (const char *name) |
Ptree * | make_static_leaf (const char *txt) |
Ptree * | make_dup_leaf (const char *txt) |
Ptree * | make_dup_leaf (std::string txt) |
Annotated< LeafThis > * | make_this (Type type) |
Annotated< LeafName > * | make_name (const char *txt, Type type, Symbol *sym) |
Annotated< LeafName > * | make_name (std::string str, Type type, Symbol *sym) |
Annotated< LeafName > * | make_name (Function_signature *fsig) |
Annotated< LeafName > * | make_name (Variable_symbol *vsym) |
Annotated< PtreeFstyleCastExpr > * | make_cast_expr_unchecked (Ptree *expr, const Type &target_type) |
Annotated< PtreeFstyleCastExpr > * | make_cast_expr (Ptree *expr, Type target_type) |
Create a function-style cast. More... | |
Annotated< PtreeFstyleCastExpr > * | make_derived_to_base_cast (Ptree *expr, Type target_type) |
Create a derived-to-base cast. More... | |
Annotated< PtreeCommaExpr > * | make_comma_expr (Ptree *lhs, Ptree *rhs) |
Create a comma expression. More... | |
Annotated< PtreeDeclaration > * | make_declaration (Variable_symbol *vsym) |
void | fill_in_overload_annotation (Ptree *tree, Symbol *sym, Type t) |
Fill in result of overload resolution. More... | |
Ptree * | make_unary_funcall (Ptree *function, Type result, Ptree *arg) |
void | print_annotated_tree (std::ostream &out, std::string indent, Ptree *tree, bool colors) |
|
Definition at line 312 of file annotation.cc. |
|
Definition at line 320 of file annotation.cc. Referenced by print_annotated_tree(). |
|
Definition at line 324 of file annotation.cc. |
|
Definition at line 316 of file annotation.cc. Referenced by print_annotated_tree(). |
|
Definition at line 322 of file annotation.cc. |
|
Definition at line 310 of file annotation.cc. Referenced by print_annotated_tree(). |
|
Definition at line 308 of file annotation.cc. |
|
Definition at line 314 of file annotation.cc. Referenced by print_annotated_tree(). |
|
Definition at line 326 of file annotation.cc. |
|
Definition at line 318 of file annotation.cc. |
|
Fill in result of overload resolution. Comma expressions must be handled specially. Definition at line 209 of file annotation.cc. References Annotation::set_symbol(), Annotation::set_type(), and Ptree::Third(). Referenced by Expr_annotator::do_funcall(), and Implicit_conversion::make_tree(). |
|
Create a function-style cast. This one's used for built-in types. Definition at line 131 of file annotation.cc. References Type::is_class_type(), Type::is_valid(), and make_cast_expr_unchecked(). Referenced by Expr_result::convert_to(). |
|
Definition at line 113 of file annotation.cc. References Ptree::List(), make_name(), and make_static_leaf(). Referenced by Expr_result::convert_to_qual(), make_cast_expr(), make_derived_to_base_cast(), and Implicit_conversion::make_tree(). |
|
Create a comma expression. These are handled specially: (a, (b, c)) is converted into ((a, b), c) so that the RHS of a comma expression never is a comma expression itself. Definition at line 156 of file annotation.cc. References Ptree::First(), Annotation::get_type(), Ptree::List(), make_static_leaf(), and Ptree::Third(). Referenced by Expr_annotator::do_funcall(), Annotated_funcall_maker::make_funcall(), Expr_annotator::process_member_access(), and Expr_annotator::visit_comma(). |
|
Definition at line 180 of file annotation.cc. References Type::get_encoded_type(), Symbol::get_name(), Variable_symbol::get_type(), Ptree::List(), make_dup_leaf(), and make_static_leaf(). Referenced by Simple_declaration_reader::declare_variable(). |
|
Create a derived-to-base cast. Right now, this generates the same tree as make_cast_expr. Definition at line 143 of file annotation.cc. References Type::is_class_type(), Type::is_valid(), and make_cast_expr_unchecked(). Referenced by Expr_annotator::process_member_access(), and Expr_annotator::process_pm_expr(). |
|
Definition at line 48 of file annotation.cc. Referenced by make_declaration(). |
|
Definition at line 37 of file annotation.cc. References ntName. |
|
Definition at line 103 of file annotation.cc. References Symbol::get_name(), and Variable_symbol::get_type(). Referenced by Expr_annotator::do_funcall(), Init_handler::get_default_initializer_for_type(), make_cast_expr_unchecked(), Init_handler::make_constructor_call(), make_name(), make_sizeof_expr(), Implicit_conversion::make_tree(), process_initializers(), Expr_annotator::process_member_access(), Expr_annotator::visit_array(), Expr_annotator::visit_arrowmember(), Expr_annotator::visit_assign(), Expr_annotator::visit_comma(), Expr_annotator::visit_name(), Expr_annotator::visit_new(), Expr_annotator::visit_postfix(), and Expr_annotator::visit_unary(). |
|
Definition at line 89 of file annotation.cc. References Function_signature::get_call_type(), Function_signature::get_function(), Symbol::get_name(), and make_name(). |
|
Definition at line 81 of file annotation.cc. References make_name(). |
|
Definition at line 68 of file annotation.cc. References ntName. |
|
Definition at line 29 of file annotation.cc. Referenced by Init_maker::add(), Annotated_funcall_maker::add_arg(), Annotator::get_output_as_block(), make_cast_expr_unchecked(), make_comma_expr(), make_cond_expr(), Init_handler::make_constructor_call(), make_declaration(), Annotated_funcall_maker::make_funcall(), Init_maker::make_init(), make_null_statement(), make_sizeof_expr(), make_this_star(), process_initializers(), Expr_annotator::process_member_access(), Expr_annotator::process_pm_expr(), Expr_annotator::visit_arrowmember(), Expr_annotator::visit_name(), Expr_annotator::visit_new(), Expr_annotator::visit_pm(), and Annotator::visit_return(). |
|
Definition at line 56 of file annotation.cc. References Type::make_pointer_type(), Type::q_Const, THIS, and Type::with_qualifier(). Referenced by make_this_star(), and Expr_annotator::visit_this(). |
|
Definition at line 281 of file annotation.cc. References Annotated_funcall_maker::add_arg(), and Annotated_funcall_maker::make_funcall(). Referenced by Implicit_conversion::make_tree(), Expr_annotator::visit_arrowmember(), and Expr_annotator::visit_unary(). |
|
Definition at line 335 of file annotation.cc. References Annotation::af_DirectCall, Ptree::Car(), cBlue, Ptree::Cdr(), cGreen, COLOR, cRed, Type::get_encoded_type(), Symbol::get_name(), Annotation::get_symbol(), Annotation::get_type(), Symbol_table::has_dump_flag(), Annotation::has_flag(), Type::is_valid(), Ptree::IsLeaf(), Type::make_pointer_type(), Ptree::ToString(), and unmangle(). Referenced by Function_signature::dump(), Variable_symbol::dump(), and main(). |
|
Definition at line 291 of file annotation.cc. Referenced by print_annotated_tree(). |