Polly 20.0.0git
|
#include <generator.h>
Public Member Functions | |
generator (SourceManager &SM, set< RecordDecl * > &exported_types, set< FunctionDecl * > exported_functions, set< FunctionDecl * > functions) | |
virtual void | generate ()=0 |
virtual | ~generator () |
Static Public Member Functions | |
static std::string | drop_suffix (const std::string &s, const std::string &suffix) |
static void | die (const char *msg) __attribute__((noreturn)) |
static void | die (string msg) __attribute__((noreturn)) |
static vector< string > | find_superclasses (Decl *decl) |
static bool | is_subclass (FunctionDecl *decl) |
static bool | is_overload (Decl *decl) |
static bool | is_constructor (Decl *decl) |
static bool | takes (Decl *decl) |
static bool | keeps (Decl *decl) |
static bool | gives (Decl *decl) |
static bool | is_isl_ctx (QualType type) |
static bool | first_arg_is_isl_ctx (FunctionDecl *fd) |
static bool | is_isl_type (QualType type) |
static bool | is_isl_neg_error (QualType type) |
static bool | is_isl_bool (QualType type) |
static bool | is_isl_stat (QualType type) |
static bool | is_isl_size (QualType type) |
static bool | is_long (QualType type) |
static bool | is_callback (QualType type) |
static bool | is_callback_arg (FunctionDecl *fd, int i) |
static bool | is_string (QualType type) |
static bool | is_static (const isl_class &clazz, FunctionDecl *method) |
static bool | is_mutator (const isl_class &clazz, FunctionDecl *fd) |
static string | extract_type (QualType type) |
static const FunctionProtoType * | extract_prototype (QualType type) |
static int | prototype_n_args (QualType type) |
static ParmVarDecl * | persistent_callback_arg (FunctionDecl *fd) |
Protected Member Functions | |
void | add_subclass (RecordDecl *decl, const string &name, const string &sub_name) |
void | add_class (RecordDecl *decl) |
void | add_type_subclasses (FunctionDecl *method) |
isl_class * | method2class (FunctionDecl *fd) |
bool | callback_takes_argument (ParmVarDecl *param, int pos) |
FunctionDecl * | find_by_name (const string &name, bool required) |
Protected Attributes | |
SourceManager & | SM |
map< string, isl_class > | classes |
map< string, FunctionDecl * > | functions_by_name |
std::map< const Type *, ParmVarDecl * > | conversions |
Private Member Functions | |
void | extract_automatic_conversion (FunctionDecl *fd) |
void | extract_class_automatic_conversions (const isl_class &clazz) |
void | extract_automatic_conversions () |
Static Private Attributes | |
static const std::set< std::string > | automatic_conversion_functions |
Definition at line 144 of file generator.h.
generator::generator | ( | SourceManager & | SM, |
set< RecordDecl * > & | exported_types, | ||
set< FunctionDecl * > | exported_functions, | ||
set< FunctionDecl * > | functions | ||
) |
Definition at line 385 of file generator.cc.
References add_class(), add_type_subclasses(), isl_class::constructors, die, extract_automatic_conversions(), functions_by_name, handled_sets_enum(), is_constructor(), is_subclass(), less_name(), method2class(), isl_class::method_name(), isl_class::methods, name, isl_class::persistent_callbacks, sets_persistent_callback(), and takes_enums().
|
inlinevirtual |
Definition at line 156 of file generator.h.
|
protected |
|
protected |
Definition at line 196 of file generator.cc.
References classes, find_by_name(), and name.
Referenced by add_class(), and add_type_subclasses().
|
protected |
Definition at line 225 of file generator.cc.
References add_subclass(), isl_class::fn_type, method2class(), name, isl_class::subclass_name, isl_class::type, isl_class::type_subclasses, and val.
Referenced by generator().
|
protected |
Definition at line 628 of file generator.cc.
References die, keeps(), pos(), prefixcmp(), SM, and takes().
Referenced by python_generator::print_callback(), and plain_cpp_generator::impl_printer::print_callback_body().
|
static |
Definition at line 442 of file generator.cc.
Referenced by template_cpp_arg_type_printer::kind(), cpp_type_printer::param(), param_renamer(), print_callback_lambdas(), and type_suffix().
|
static |
Definition at line 450 of file generator.cc.
References die.
|
static |
Definition at line 824 of file generator.cc.
Referenced by callback_name(), and isl_class::name_without_type_suffixes().
|
private |
Definition at line 145 of file generator.cc.
References conversions, die, is_isl_ctx(), is_isl_type(), and type.
Referenced by extract_class_automatic_conversions().
|
private |
Definition at line 181 of file generator.cc.
References classes, and extract_class_automatic_conversions().
Referenced by generator().
|
private |
Definition at line 165 of file generator.cc.
References automatic_conversion_functions, isl_class::constructors, extract_automatic_conversion(), and name.
Referenced by extract_automatic_conversions().
|
static |
Definition at line 789 of file generator.cc.
References type.
Referenced by callback_name(), cpp_type_printer::generate_callback_args(), cpp_type_printer::generate_callback_type(), python_generator::print_callback(), plain_cpp_generator::impl_printer::print_callback_body(), print_callback_lambda(), plain_cpp_generator::impl_printer::print_callback_local(), plain_cpp_generator::plain_printer::print_persistent_callback_prototype(), prototype_n_args(), and total_params().
|
static |
Definition at line 779 of file generator.cc.
Referenced by isl_class::first_arg_matches_class(), print_argument_check(), python_generator::print_argument_checks(), python_generator::print_callback(), python_generator::print_copy(), python_generator::print_method_return(), python_generator::print_type_checks(), cpp_generator::set_class_construction_types(), and type_suffix().
|
protected |
Definition at line 117 of file generator.cc.
References die, functions_by_name, and name.
Referenced by add_subclass().
|
static |
Definition at line 471 of file generator.cc.
References sub().
Referenced by cpp_generator::copy_super_methods(), is_subclass(), cpp_generator::is_subclass(), and python_generator::print().
|
static |
Definition at line 582 of file generator.cc.
References is_isl_ctx().
Referenced by first_arg_is_ctx(), python_generator::print_constructor(), python_generator::print_method(), and python_generator::print_method_overload().
|
pure virtual |
Implemented in cpp_conversion_generator, plain_cpp_generator, python_generator, and template_cpp_generator.
Referenced by generate().
|
static |
Definition at line 538 of file generator.cc.
References has_annotation().
Referenced by is_mutator(), plain_cpp_generator::impl_printer::print_method_return(), and python_generator::print_method_return().
|
static |
Definition at line 730 of file generator.cc.
References type.
Referenced by find_callback_args(), is_callback_arg(), Method::on_fd_arg_list(), cpp_type_printer::param(), Method::param_needs_copy(), python_generator::print_arg_in_call(), python_generator::print_argtypes(), template_cpp_generator::method_impl_printer::print_callback_method_body(), python_generator::print_method(), Method::print_param_use(), and sets_persistent_callback().
|
static |
Definition at line 740 of file generator.cc.
References is_callback(), and type.
Referenced by python_generator::print_method(), and python_generator::print_method_call().
|
static |
Definition at line 517 of file generator.cc.
References has_annotation().
Referenced by generator(), and get_kind().
|
static |
Definition at line 709 of file generator.cc.
References is_isl_primitive(), and type.
Referenced by is_isl_neg_error(), cpp_type_printer::param(), python_generator::print_callback(), template_cpp_generator::method_impl_printer::print_callback_method_body(), python_generator::print_method_return(), and plain_cpp_generator::impl_printer::print_wrapped_call().
|
static |
Definition at line 569 of file generator.cc.
References type.
Referenced by extract_automatic_conversion(), first_arg_is_isl_ctx(), cpp_generator::is_implicit_conversion(), python_generator::print_arg_in_call(), python_generator::print_argtypes(), plain_cpp_generator::impl_printer::print_argument_validity_check(), and plain_cpp_generator::impl_printer::print_save_ctx().
|
static |
Definition at line 689 of file generator.cc.
References is_isl_bool(), is_isl_size(), is_isl_stat(), and type.
Referenced by plain_cpp_generator::impl_printer::print_exceptional_execution_check(), plain_cpp_generator::impl_printer::print_method_return(), and python_generator::print_method_return().
|
static |
Definition at line 723 of file generator.cc.
References is_isl_primitive(), and type.
Referenced by is_isl_neg_error(), cpp_type_printer::param(), and python_generator::print_method_return().
|
static |
Definition at line 716 of file generator.cc.
References is_isl_primitive(), and type.
Referenced by is_isl_neg_error(), cpp_type_printer::param(), python_generator::print_callback(), template_cpp_generator::method_impl_printer::print_callback_method_body(), plain_cpp_generator::impl_printer::print_method_return(), and plain_cpp_generator::impl_printer::print_wrapped_call().
|
static |
Definition at line 671 of file generator.cc.
References type.
Referenced by extract_automatic_conversion(), isl_class::first_arg_matches_class(), has_single_isl_argument(), cpp_generator::is_implicit_conversion(), cpp_type_printer::param(), param_is_anon(), NoCopyMethod::param_needs_copy(), plain_cpp_generator::impl_printer::print_arg_conversion(), python_generator::print_argtypes(), print_argument_check(), plain_cpp_generator::impl_printer::print_argument_validity_check(), python_generator::print_callback(), plain_cpp_generator::impl_printer::print_exceptional_execution_check(), plain_cpp_generator::impl_printer::print_method_return(), python_generator::print_method_return(), python_generator::print_restype(), plain_cpp_generator::impl_printer::print_save_ctx(), python_generator::print_type_checks(), and type_suffix().
|
static |
Definition at line 762 of file generator.cc.
References type.
Referenced by python_generator::print_argtypes().
|
static |
Definition at line 93 of file generator.cc.
References gives(), is_static(), takes(), and type.
Referenced by handled_sets_enum(), Method::is_subclass_mutator(), plain_cpp_generator::impl_printer::print_method_return(), python_generator::print_method_return(), and sets_persistent_callback().
|
static |
Definition at line 510 of file generator.cc.
References has_annotation().
Referenced by isl_class::name_without_type_suffixes(), and python_generator::print_method().
|
static |
Definition at line 84 of file generator.cc.
References isl_class::is_static().
Referenced by cpp_generator::copy_methods(), get_kind(), is_mutator(), python_generator::print_argument_checks(), python_generator::print_method(), python_generator::print_method_header(), python_generator::print_method_return(), and python_generator::print_set_enum().
|
static |
Definition at line 750 of file generator.cc.
References type.
Referenced by cpp_type_printer::param(), Method::param_needs_copy(), python_generator::print_arg_in_call(), python_generator::print_argtypes(), plain_cpp_generator::impl_printer::print_method_return(), python_generator::print_method_return(), Method::print_param_use(), and python_generator::print_restype().
|
static |
Definition at line 503 of file generator.cc.
References find_superclasses().
Referenced by generator().
|
static |
Definition at line 531 of file generator.cc.
References has_annotation().
Referenced by callback_takes_argument(), Method::param_needs_copy(), and Method::print_param_use().
|
protected |
Definition at line 546 of file generator.cc.
Referenced by add_type_subclasses(), cpp_generator::copy_methods(), and generator().
|
static |
Definition at line 317 of file generator.cc.
Referenced by plain_cpp_generator::decl_printer::print_persistent_callback_data(), plain_cpp_generator::plain_printer::print_persistent_callback_prototype(), plain_cpp_generator::plain_printer::print_persistent_callback_setter_prototype(), plain_cpp_generator::impl_printer::print_set_persistent_callback(), and sets_persistent_callback().
|
static |
Definition at line 797 of file generator.cc.
References extract_prototype(), and type.
Referenced by Method::on_fd_arg_list(), and print_callback_lambdas().
|
static |
Definition at line 524 of file generator.cc.
References has_annotation().
Referenced by callback_takes_argument(), is_mutator(), and python_generator::print_arg_in_call().
|
staticprivate |
Definition at line 168 of file generator.h.
Referenced by extract_class_automatic_conversions().
Definition at line 147 of file generator.h.
Referenced by add_subclass(), cpp_conversion_generator::cast(), cpp_generator::copy_super_methods(), extract_automatic_conversions(), cpp_conversion_generator::generate(), python_generator::generate(), cpp_generator::is_subclass(), method2class(), python_generator::print(), plain_cpp_generator::print_declarations(), cpp_generator::class_printer::print_descendent_overloads(), plain_cpp_generator::print_forward_declarations(), plain_cpp_generator::print_implementations(), cpp_generator::set_construction_types(), and template_cpp_generator::template_cpp_generator().
|
protected |
Definition at line 166 of file generator.h.
Referenced by extract_automatic_conversion(), cpp_generator::class_printer::get_param(), cpp_generator::class_printer::next_variant(), and python_generator::print_argument_checks().
|
protected |
Definition at line 148 of file generator.h.
Referenced by find_by_name(), and generator().
|
protected |
Definition at line 146 of file generator.h.
Referenced by callback_takes_argument().