Polly 20.0.0git
|
#include <python.h>
Public Member Functions | |
python_generator (SourceManager &SM, set< RecordDecl * > &exported_types, set< FunctionDecl * > exported_functions, set< FunctionDecl * > functions) | |
virtual void | generate () |
Public Member Functions inherited from generator | |
generator (SourceManager &SM, set< RecordDecl * > &exported_types, set< FunctionDecl * > exported_functions, set< FunctionDecl * > functions) | |
virtual void | generate ()=0 |
virtual | ~generator () |
Private Member Functions | |
void | print (const isl_class &clazz) |
void | print_method_arguments (int first, int n_arg) |
void | print_method_header (bool is_static, const string &name, int n_arg) |
void | print_class_header (const isl_class &clazz, const string &name, const vector< string > &super) |
void | print_type_check (int indent, const string &type, const char *fmt, int pos, bool upcast, const string &super, const string &name, int n) |
void | print_type_checks (const string &cname, FunctionDecl *method, bool first_is_ctx, int n, const vector< string > &super) |
void | print_copy (QualType type) |
void | print_callback (ParmVarDecl *param, int arg) |
void | print_arg_in_call (FunctionDecl *fd, const char *fmt, int arg, int skip) |
void | print_argtypes (FunctionDecl *fd) |
void | print_method_return (int indent, const isl_class &clazz, FunctionDecl *method, const char *fmt) |
void | print_restype (FunctionDecl *fd) |
void | print (map< string, isl_class > &classes, set< string > &done) |
void | print_constructor (const isl_class &clazz, FunctionDecl *method) |
void | print_special_constructors (const isl_class &clazz) |
void | print_special_methods (const isl_class &clazz) |
void | print_upcast_constructors (const isl_class &clazz) |
void | print_new (const isl_class &clazz, const string &python_name) |
void | print_representation (const isl_class &clazz, const string &python_name) |
void | print_copy_callbacks (const isl_class &clazz) |
void | print_method_type (FunctionDecl *fd) |
void | print_method_types (const isl_class &clazz) |
void | print_get_method (const isl_class &clazz, FunctionDecl *fd) |
void | print_method (const isl_class &clazz, FunctionDecl *method, vector< string > super) |
void | print_method_call (int indent, const isl_class &clazz, FunctionDecl *method, const char *fmt, int drop_ctx) |
void | print_argument_checks (const isl_class &clazz, FunctionDecl *fd, int drop_ctx) |
void | print_method_overload (const isl_class &clazz, FunctionDecl *method) |
void | print_method (const isl_class &clazz, const string &fullname, const function_set &methods, vector< string > super) |
void | print_set_enum (const isl_class &clazz, FunctionDecl *fd, int value, const string &name, const vector< string > &super) |
void | print_set_enum (const isl_class &clazz, FunctionDecl *fd, const vector< string > &super) |
Private Attributes | |
set< string > | done |
Additional Inherited Members | |
Static Public Member Functions inherited from generator | |
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 inherited from generator | |
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 inherited from generator | |
SourceManager & | SM |
map< string, isl_class > | classes |
map< string, FunctionDecl * > | functions_by_name |
std::map< const Type *, ParmVarDecl * > | conversions |
|
virtual |
|
private |
Definition at line 1116 of file python.cc.
References generator::classes, isl_class::constructors, done, generator::find_superclasses(), isl_class::is_type_subclass(), isl_class::methods, isl_class::name, isl_class::persistent_callbacks, print(), print_class_header(), print_constructor(), print_copy_callbacks(), print_method(), print_method_types(), print_new(), print_representation(), print_set_enum(), print_special_constructors(), print_special_methods(), print_upcast_constructors(), isl_class::set_enums, isl_class::subclass_name, isl_class::type, and type2python().
Referenced by generate(), and print().
|
private |
Definition at line 296 of file python.cc.
References arg, generator::is_callback(), generator::is_isl_ctx(), generator::is_string(), print_copy(), generator::takes(), and type.
Referenced by print_constructor(), print_method_call(), and print_set_enum().
|
private |
Definition at line 925 of file python.cc.
References generator::is_callback(), generator::is_isl_ctx(), generator::is_isl_type(), generator::is_long(), generator::is_string(), n, and type.
Referenced by print_method_type().
|
private |
Definition at line 599 of file python.cc.
References any(), generator::conversions, generator::extract_type(), generator::is_static(), print_argument_check(), print_indent(), print_type_check(), type, type2python(), and var_arg_fmt.
Referenced by print_constructor(), and print_method_overload().
|
private |
Definition at line 213 of file python.cc.
References arg, generator::callback_takes_argument(), die, generator::extract_prototype(), generator::extract_type(), fn, generator::is_isl_bool(), generator::is_isl_stat(), generator::is_isl_type(), n_arg(), print_copy(), type, and type2python().
Referenced by print_method().
|
private |
Definition at line 881 of file python.cc.
References isl_class::is_type_subclass(), name, isl_class::superclass_name, and type2python().
Referenced by print().
|
private |
Definition at line 753 of file python.cc.
References generator::first_arg_is_isl_ctx(), isl_class::method_name(), print_arg_in_call(), print_argument_checks(), and var_arg_fmt.
Referenced by print().
|
private |
Definition at line 190 of file python.cc.
References generator::extract_type(), and type.
Referenced by print_arg_in_call(), and print_callback().
|
private |
Definition at line 1041 of file python.cc.
References callback_name(), isl_class::has_persistent_callbacks(), isl_class::persistent_callback_name(), and isl_class::persistent_callbacks.
Referenced by print().
|
private |
Definition at line 444 of file python.cc.
References isl_class::base_method_name(), isl_class::method_name(), name, print_method_arguments(), and print_method_header().
Referenced by print_method().
|
private |
Definition at line 671 of file python.cc.
References generator::is_overload(), generator::is_static(), isl_class::method_name(), print_method(), print_method_def(), and print_method_overload().
|
private |
Definition at line 524 of file python.cc.
References generator::first_arg_is_isl_ctx(), fixed_arg_fmt, generator::is_callback(), generator::is_callback_arg(), isl_class::is_get_method(), generator::is_static(), isl_class::method_name(), print_callback(), print_get_method(), print_method_call(), print_method_header(), print_type_checks(), and type.
Referenced by print(), and print_method().
|
private |
Definition at line 63 of file python.cc.
References n_arg().
Referenced by print_get_method(), and print_method_header().
|
private |
Definition at line 467 of file python.cc.
References generator::is_callback_arg(), print_arg_in_call(), print_indent(), print_method_return(), and print_rethrow().
Referenced by print_method(), and print_method_overload().
|
private |
Definition at line 96 of file python.cc.
References generator::is_static(), n_arg(), name, print_method_arguments(), and print_method_def().
Referenced by print_get_method(), print_method(), and print_set_enum().
|
private |
Definition at line 653 of file python.cc.
References generator::first_arg_is_isl_ctx(), print_argument_checks(), print_method_call(), and var_arg_fmt.
Referenced by print_method().
|
private |
Definition at line 389 of file python.cc.
References callback_name(), generator::extract_type(), generator::gives(), isl_class::has_persistent_callbacks(), generator::is_isl_bool(), generator::is_isl_neg_error(), generator::is_isl_size(), generator::is_isl_type(), generator::is_mutator(), generator::is_static(), generator::is_string(), isl_class::persistent_callback_name(), isl_class::persistent_callbacks, print_indent(), print_persistent_callback_failure_check(), type, and type2python().
Referenced by print_method_call(), and print_set_enum().
|
private |
Definition at line 957 of file python.cc.
References print_argtypes(), and print_restype().
Referenced by print_method_types().
|
private |
Definition at line 1070 of file python.cc.
References isl_class::constructors, isl_class::fn_copy, isl_class::fn_free, isl_class::fn_to_str, isl_class::fn_type, isl_class::methods, isl_class::persistent_callbacks, print_method_type(), and isl_class::set_enums.
Referenced by print().
|
private |
Definition at line 971 of file python.cc.
References isl_class::fn_type, isl_class::is_type_subclass(), type2python(), and isl_class::type_subclasses.
Referenced by print().
|
private |
Definition at line 1014 of file python.cc.
References fixed_arg_fmt, isl_class::fn_to_str, and print_type_check().
Referenced by print().
|
private |
Definition at line 910 of file python.cc.
References generator::is_isl_type(), generator::is_string(), and type.
Referenced by print_method_type().
|
private |
Definition at line 737 of file python.cc.
References isl_class::method_name(), print_set_enum(), and isl_class::set_enums.
|
private |
Definition at line 707 of file python.cc.
References fixed_arg_fmt, generator::is_static(), name, print_arg_in_call(), print_method_header(), print_method_return(), and print_type_checks().
Referenced by print(), and print_set_enum().
|
private |
Definition at line 809 of file python.cc.
References id_constructor_user, and isl_class::name.
Referenced by print().
|
private |
Definition at line 844 of file python.cc.
References id_user, and isl_class::name.
Referenced by print().
|
private |
Definition at line 128 of file python.cc.
References n, name, pos(), print_indent(), type, and type2python().
Referenced by print_argument_checks(), print_representation(), and print_type_checks().
|
private |
Definition at line 167 of file python.cc.
References generator::extract_type(), fixed_arg_fmt, generator::is_isl_type(), n, print_type_check(), type, and type2python().
Referenced by print_method(), and print_set_enum().
|
private |
Definition at line 856 of file python.cc.
References isl_class::fn_type, isl_class::name, type2python(), and isl_class::type_subclasses.
Referenced by print().
|
private |
Definition at line 10 of file python.h.
Referenced by generate(), and print().