ReactOS 0.4.16-dev-36-g301675c
|
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
#include <limits.h>
#include "widl.h"
#include "utils.h"
#include "parser.h"
#include "header.h"
#include "typetree.h"
#include "typegen.h"
#include "expr.h"
Go to the source code of this file.
Classes | |
struct | expr_eval_routine |
Macros | |
#define | ROUND_SIZE(size, alignment) (((size) + ((alignment) - 1)) & ~((alignment) - 1)) |
#define | ROUNDING(size, alignment) (((alignment) - 1) - (((size) + ((alignment) - 1)) & ((alignment) - 1))) |
#define | WRITE_FCTYPE(file, fctype, typestring_offset) |
Enumerations | |
enum | type_context { TYPE_CONTEXT_TOPLEVELPARAM , TYPE_CONTEXT_PARAM , TYPE_CONTEXT_CONTAINER , TYPE_CONTEXT_CONTAINER_NO_POINTERS } |
Variables | |
static const type_t * | current_structure |
static const var_t * | current_func |
static const type_t * | current_iface |
static struct list | expr_eval_routines = LIST_INIT(expr_eval_routines) |
static const unsigned short | MustSize = 0x0001 |
static const unsigned short | MustFree = 0x0002 |
static const unsigned short | IsPipe = 0x0004 |
static const unsigned short | IsIn = 0x0008 |
static const unsigned short | IsOut = 0x0010 |
static const unsigned short | IsReturn = 0x0020 |
static const unsigned short | IsBasetype = 0x0040 |
static const unsigned short | IsByValue = 0x0080 |
static const unsigned short | IsSimpleRef = 0x0100 |
void assign_stub_out_args | ( | FILE * | file, |
int | indent, | ||
const var_t * | func, | ||
const char * | local_var_prefix | ||
) |
Definition at line 4676 of file typegen.c.
Referenced by gen_stub(), and write_function_stub().
Definition at line 379 of file typegen.c.
Referenced by write_pointer_checks().
Definition at line 251 of file typegen.c.
Referenced by fields_memsize(), get_padding(), and write_struct_members().
Definition at line 948 of file typegen.c.
Referenced by declare_stub_args(), gen_proxy(), print_phase_function(), write_function_stub(), and write_var_init().
Definition at line 4615 of file typegen.c.
Referenced by gen_stub(), and write_function_stub().
Definition at line 1814 of file typegen.c.
Referenced by write_conf_or_var_desc(), and write_descriptors().
Definition at line 1823 of file typegen.c.
Referenced by get_required_buffer_size_type(), and type_memsize_and_alignment().
Definition at line 3059 of file typegen.c.
Referenced by find_array_or_string_in_struct(), write_pointer_description(), and write_struct_tfs().
|
static |
Definition at line 1480 of file typegen.c.
Referenced by get_size_procformatstring(), process_tfs(), and write_procformatstring().
Definition at line 191 of file typegen.c.
Referenced by write_remoting_arg(), and write_type_tfs().
Definition at line 617 of file typegen.c.
Referenced by get_required_buffer_size_type(), write_array_tfs(), and write_remoting_arg().
Definition at line 204 of file typegen.c.
Referenced by get_parameter_fc(), get_required_buffer_size_type(), print_phase_basetype(), type_buffer_alignment(), type_memsize_and_alignment(), write_branch_type(), write_conf_or_var_desc(), write_range_tfs(), write_simple_pointer(), write_string_tfs(), write_union_tfs(), and write_user_tfs().
Definition at line 228 of file typegen.c.
Referenced by get_parameter_fc(), write_base_type(), and write_old_procformatstring_type().
Definition at line 850 of file typegen.c.
Referenced by write_remoting_arg().
|
static |
Definition at line 444 of file typegen.c.
Referenced by write_contexthandle_tfs(), and write_proc_func_header().
Definition at line 296 of file typegen.c.
Referenced by get_array_fc(), get_parameter_fc(), get_required_buffer_size_type(), get_struct_fc(), print_phase_basetype(), type_buffer_alignment(), type_memsize_and_alignment(), write_base_type(), write_branch_type(), write_conf_or_var_desc(), write_old_procformatstring_type(), write_range_tfs(), write_simple_pointer(), write_union_tfs(), and write_user_tfs().
Definition at line 1115 of file typegen.c.
Referenced by write_proc_func_header().
Referenced by write_proc_func_header(), and write_remoting_arguments().
Definition at line 3922 of file typegen.c.
|
static |
Definition at line 396 of file typegen.c.
Referenced by get_struct_fc().
|
static |
Definition at line 958 of file typegen.c.
Referenced by get_func_oi2_flags(), and write_new_procformatstring_type().
Definition at line 258 of file typegen.c.
Referenced by cant_be_null(), get_array_fc(), get_parameter_fc(), get_pointer_fc_context(), get_required_buffer_size_type(), get_struct_fc(), type_has_full_pointer(), write_contexthandle_tfs(), write_remoting_arg(), write_type_tfs(), and write_user_tfs().
|
static |
Definition at line 284 of file typegen.c.
Referenced by write_nonsimple_pointer(), write_simple_pointer(), and write_string_tfs().
|
static |
Definition at line 3896 of file typegen.c.
Referenced by get_function_buffer_size(), and write_remoting_arg().
|
static |
Definition at line 3784 of file typegen.c.
Referenced by get_parameter_fc(), get_required_buffer_size(), and get_required_buffer_size_type().
|
static |
Definition at line 4110 of file typegen.c.
Referenced by write_remoting_arg().
unsigned int get_size_procformatstring | ( | const statement_list_t * | stmts, |
type_pred_t | pred | ||
) |
Definition at line 4602 of file typegen.c.
Referenced by write_formatstringsdecl().
Definition at line 4584 of file typegen.c.
Referenced by get_size_procformatstring_iface(), write_function_stubs(), and write_proxy().
|
static |
Definition at line 4591 of file typegen.c.
Referenced by get_size_procformatstring().
unsigned int get_size_typeformatstring | ( | const statement_list_t * | stmts, |
type_pred_t | pred | ||
) |
Definition at line 4609 of file typegen.c.
Referenced by write_formatstringsdecl().
Definition at line 419 of file typegen.c.
Referenced by get_parameter_fc(), write_conf_or_var_desc(), write_old_procformatstring_type(), and write_proc_func_header().
Definition at line 478 of file typegen.c.
Referenced by get_array_fc(), get_parameter_fc(), get_required_buffer_size_type(), get_struct_fc(), is_non_complex_struct(), user_type_has_variable_size(), write_pointer_description(), write_remoting_arg(), and write_struct_tfs().
Definition at line 305 of file typegen.c.
Referenced by get_required_buffer_size_type(), is_user_type(), and write_user_tfs().
Definition at line 824 of file typegen.c.
Referenced by write_struct_tfs(), write_union_tfs(), and write_user_tfs().
|
inlinestatic |
Definition at line 4105 of file typegen.c.
Referenced by write_parameter_conf_or_var_exprs().
Definition at line 835 of file typegen.c.
Referenced by write_array_element_type(), and write_member_type().
Definition at line 2075 of file typegen.c.
Referenced by gen_proxy(), gen_stub(), write_function_stub(), and write_proc_func_header().
Definition at line 1240 of file typegen.c.
Referenced by gen_proxy(), gen_stub(), need_inline_stubs(), need_proxy_and_inline_stubs(), write_conf_or_var_desc(), write_dispatchtable(), write_function_stub(), write_nonsimple_pointer(), write_procformatstring_func(), write_proxy(), write_proxy_methods(), write_simple_pointer(), write_stub_methods(), and write_thunk_methods().
Definition at line 697 of file typegen.c.
Referenced by write_no_repeat_pointer_descriptions(), and write_pointer_description_offsets().
Definition at line 324 of file typegen.c.
Referenced by decl_indirect(), typegen_detect_type(), and write_nonsimple_pointer().
Definition at line 879 of file typegen.c.
Referenced by print_file().
Definition at line 871 of file typegen.c.
Referenced by assign_stub_out_args(), declare_stub_args(), print_phase_basetype(), print_phase_function(), print_start_tfs_comment(), write_array_tfs(), write_base_type(), write_branch_type(), write_client_call_routine(), write_conf_or_var_desc(), write_conformant_array_pointer_descriptions(), write_contexthandle_tfs(), write_descriptors(), write_end(), write_endpoints(), write_expr_eval_routine_list(), write_expr_eval_routines(), write_fixed_array_pointer_descriptions(), write_formatdesc(), write_formatstringsdecl(), write_full_pointer_free(), write_full_pointer_init(), write_func_param_struct(), write_ip_tfs(), write_member_type(), write_new_procformatstring_type(), write_no_repeat_pointer_descriptions(), write_nonsimple_pointer(), write_old_procformatstring_type(), write_parameter_conf_or_var_exprs(), write_pointer_checks(), write_pointer_description_offsets(), write_proc_func_header(), write_procformatstring(), write_procformatstring_func(), write_procformatstring_offsets(), write_range_tfs(), write_remoting_arg(), write_remoting_arguments(), write_simple_pointer(), write_string_tfs(), write_struct_members(), write_struct_tfs(), write_type_tfs(), write_typeformatstring(), write_union_tfs(), write_user_quad_list(), write_user_tfs(), write_var_init(), and write_varying_array_pointer_descriptions().
void print_phase_basetype | ( | FILE * | file, |
int | indent, | ||
const char * | local_var_prefix, | ||
enum remoting_phase | phase, | ||
enum pass pass pass | , | ||
const var_t * | var, | ||
const char * | varname | ||
) |
Definition at line 3986 of file typegen.c.
Referenced by write_remoting_arg().
|
static |
Definition at line 3946 of file typegen.c.
Referenced by write_remoting_arg().
Definition at line 2221 of file typegen.c.
Referenced by write_array_tfs(), write_contexthandle_tfs(), write_ip_tfs(), write_pointer_tfs(), write_string_tfs(), write_struct_tfs(), write_union_tfs(), and write_user_tfs().
|
static |
Definition at line 3753 of file typegen.c.
Referenced by get_size_typeformatstring(), and write_typeformatstring().
|
static |
Definition at line 3700 of file typegen.c.
Referenced by process_tfs().
Definition at line 2254 of file typegen.c.
Referenced by asciiToUTF8(), DeviceEvtIoInCallerContext(), IMLangFontLink_Test(), match_break(), match_line(), match_mod(), OutputQueue_Receive(), process_orders(), RequestDispatchProcessDirectly(), RequestDispatchSpecialIoctls(), RequestDispatchSyncWithSequentialQueue(), RequestDispatchToSequentialQueue(), ScrWrite(), UTF16BEToUTF8(), UTF16LEToUTF8(), write_array_element_type(), write_ip_tfs(), write_pointer_description_offsets(), write_string_tfs(), write_struct_tfs(), write_union_tfs(), write_user_tfs(), and xmlSwitchInputEncodingInt().
Definition at line 101 of file typegen.c.
Referenced by print_phase_basetype(), write_array_tfs(), write_base_type(), write_branch_type(), write_conf_or_var_desc(), write_contexthandle_tfs(), write_member_type(), write_new_procformatstring_type(), write_nonsimple_pointer(), write_old_procformatstring_type(), write_proc_func_header(), write_range_tfs(), write_simple_pointer(), write_string_tfs(), write_struct_members(), write_struct_tfs(), write_type_tfs(), write_union_tfs(), and write_user_tfs().
Definition at line 1981 of file typegen.c.
Referenced by type_buffer_alignment(), write_array_tfs(), write_struct_tfs(), and write_user_tfs().
|
static |
Definition at line 750 of file typegen.c.
Referenced by is_full_pointer_function(), and type_has_full_pointer().
Definition at line 703 of file typegen.c.
Referenced by assign_stub_out_args(), type_has_pointers(), write_array_tfs(), and write_struct_tfs().
Definition at line 1975 of file typegen.c.
Referenced by assign_stub_out_args(), get_array_fc(), get_parameter_fc(), get_stack_size(), write_array_tfs(), write_conformant_array_pointer_descriptions(), write_fixed_array_pointer_descriptions(), write_func_param_struct(), write_no_repeat_pointer_descriptions(), write_pointer_description(), write_pointer_description_offsets(), write_proc_func_header(), write_string_tfs(), write_struct_tfs(), write_user_tfs(), and write_varying_array_pointer_descriptions().
Definition at line 1866 of file typegen.c.
Referenced by add_typedef_typeinfo(), add_var_desc(), field_memsize(), fields_memsize(), get_padding(), type_memsize(), type_memsize_and_alignment(), union_memsize(), write_fixed_array_pointer_descriptions(), write_func_param_struct(), write_no_repeat_pointer_descriptions(), write_pointer_description_offsets(), write_struct_members(), write_union_tfs(), and write_varying_array_pointer_descriptions().
enum typegen_type typegen_detect_type | ( | const type_t * | type, |
const attr_list_t * | attrs, | ||
unsigned int | flags | ||
) |
Definition at line 329 of file typegen.c.
Referenced by assign_stub_out_args(), cant_be_null(), free_variable(), get_array_fc(), get_parameter_fc(), get_required_buffer_size_type(), get_stack_size(), get_struct_fc(), is_embedded_complex(), type_has_full_pointer(), type_has_pointers(), write_nonsimple_pointer(), write_parameter_conf_or_var_exprs(), write_pointer_tfs(), write_remoting_arg(), write_struct_tfs(), and write_type_tfs().
Definition at line 1846 of file typegen.c.
Referenced by type_memsize_and_alignment(), and write_union_tfs().
Definition at line 818 of file typegen.c.
Referenced by write_array_tfs(), write_contexthandle_tfs(), write_ip_tfs(), write_pointer_tfs(), write_range_tfs(), write_string_tfs(), write_struct_tfs(), write_type_tfs(), write_union_tfs(), and write_user_tfs().
Definition at line 2259 of file typegen.c.
Referenced by write_user_tfs().
Definition at line 804 of file typegen.c.
Referenced by write_user_tfs().
|
static |
Definition at line 2382 of file typegen.c.
Referenced by write_array_tfs().
|
static |
Definition at line 2950 of file typegen.c.
Referenced by write_string_tfs(), write_struct_tfs(), and write_type_tfs().
|
static |
Definition at line 1554 of file typegen.c.
Referenced by write_member_type().
Definition at line 3272 of file typegen.c.
Referenced by write_union_tfs().
void write_client_call_routine | ( | FILE * | file, |
const type_t * | iface, | ||
const var_t * | func, | ||
const char * | prefix, | ||
unsigned int | proc_offset | ||
) |
Definition at line 4974 of file typegen.c.
Referenced by gen_proxy(), and write_function_stub().
|
static |
Definition at line 1571 of file typegen.c.