#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "widl.h"
#include "utils.h"
#include "parser.h"
#include "typetree.h"
#include "header.h"
Go to the source code of this file.
|
type_t * | duptype (type_t *t, int dupname) |
|
type_t * | make_type (enum type_type type) |
|
static const var_t * | find_arg (const var_list_t *args, const char *name) |
|
const char * | type_get_name (const type_t *type, enum name_type name_type) |
|
static char * | append_namespace (char *ptr, struct namespace *namespace, const char *separator) |
|
char * | format_namespace (struct namespace *namespace, const char *prefix, const char *separator, const char *suffix) |
|
type_t * | type_new_function (var_list_t *args) |
|
type_t * | type_new_pointer (unsigned char pointer_default, type_t *ref, attr_list_t *attrs) |
|
type_t * | type_new_alias (type_t *t, const char *name) |
|
type_t * | type_new_module (char *name) |
|
type_t * | type_new_coclass (char *name) |
|
type_t * | type_new_array (const char *name, type_t *element, int declptr, unsigned int dim, expr_t *size_is, expr_t *length_is, unsigned char ptr_default_fc) |
|
type_t * | type_new_basic (enum type_basic_type basic_type) |
|
type_t * | type_new_int (enum type_basic_type basic_type, int sign) |
|
type_t * | type_new_void (void) |
|
type_t * | type_new_enum (const char *name, struct namespace *namespace, int defined, var_list_t *enums) |
|
type_t * | type_new_struct (char *name, struct namespace *namespace, int defined, var_list_t *fields) |
|
type_t * | type_new_nonencapsulated_union (const char *name, int defined, var_list_t *fields) |
|
type_t * | type_new_encapsulated_union (char *name, var_t *switch_field, var_t *union_field, var_list_t *cases) |
|
static int | is_valid_bitfield_type (const type_t *type) |
|
type_t * | type_new_bitfield (type_t *field, const expr_t *bits) |
|
static int | compute_method_indexes (type_t *iface) |
|
void | type_interface_define (type_t *iface, type_t *inherit, statement_list_t *stmts) |
|
void | type_dispinterface_define (type_t *iface, var_list_t *props, var_list_t *methods) |
|
void | type_dispinterface_define_from_iface (type_t *dispiface, type_t *iface) |
|
void | type_module_define (type_t *module, statement_list_t *stmts) |
|
type_t * | type_coclass_define (type_t *coclass, ifref_list_t *ifaces) |
|
int | type_is_equal (const type_t *type1, const type_t *type2) |
|
◆ append_namespace()
Definition at line 94 of file typetree.c.
static int is_global_namespace(const struct namespace *namespace)
static const WCHAR separator[]
char * strcat(char *DstString, const char *SrcString)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
static char * append_namespace(char *ptr, struct namespace *namespace, const char *separator)
struct namespace * parent
Referenced by format_namespace().
◆ compute_method_indexes()
static int compute_method_indexes |
( |
type_t * |
iface | ) |
|
|
static |
◆ duptype()
Definition at line 33 of file typetree.c.
38 if (dupname &&
t->name)
type_t * alloc_type(void)
char * xstrdup(const char *s)
Referenced by type_new_alias().
◆ find_arg()
Definition at line 68 of file typetree.c.
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
int strcmp(const char *String1, const char *String2)
Referenced by type_new_function().
◆ format_namespace()
Definition at line 110 of file typetree.c.
static int is_global_namespace(const struct namespace *namespace)
static const WCHAR separator[]
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
static char * append_namespace(char *ptr, struct namespace *namespace, const char *separator)
struct namespace * parent
Referenced by write_uuid_decl().
◆ is_valid_bitfield_type()
Definition at line 365 of file typetree.c.
static enum type_basic_type type_basic_get_type(const type_t *type)
static enum type_type type_get_type(const type_t *type)
GLuint GLuint GLsizei GLenum type
Referenced by type_new_bitfield().
◆ make_type()
Definition at line 44 of file typetree.c.
53 memset(&
t->details, 0,
sizeof(
t->details));
54 t->typestring_offset = 0;
59 t->user_types_registered =
FALSE;
type_t * alloc_type(void)
void init_loc_info(loc_info_t *)
GLuint GLuint GLsizei GLenum type
Referenced by type_new_array(), type_new_basic(), type_new_bitfield(), type_new_enum(), type_new_function(), type_new_nonencapsulated_union(), type_new_pointer(), type_new_struct(), and type_new_void().
◆ type_coclass_define()
Definition at line 488 of file typetree.c.
struct coclass_details coclass
union _type_t::@4812 details
◆ type_dispinterface_define()
Definition at line 452 of file typetree.c.
static int compute_method_indexes(type_t *iface)
struct iface_details * iface
union _type_t::@4812 details
static const WCHAR props[]
type_t * find_type(const char *name, struct namespace *namespace, int t)
◆ type_dispinterface_define_from_iface()
void type_dispinterface_define_from_iface |
( |
type_t * |
dispiface, |
|
|
type_t * |
iface |
|
) |
| |
Definition at line 466 of file typetree.c.
static int compute_method_indexes(type_t *iface)
struct iface_details * iface
union _type_t::@4812 details
type_t * find_type(const char *name, struct namespace *namespace, int t)
◆ type_get_name()
◆ type_interface_define()
Definition at line 439 of file typetree.c.
static int compute_method_indexes(type_t *iface)
struct iface_details * iface
union _type_t::@4812 details
◆ type_is_equal()
Definition at line 495 of file typetree.c.
static enum type_type type_get_type_detect_alias(const type_t *type)
int strcmp(const char *String1, const char *String2)
◆ type_module_define()
Definition at line 480 of file typetree.c.
IMAGEHLP_MODULEW64 module
◆ type_new_alias()
Definition at line 190 of file typetree.c.
199 a->details =
t->details;
type_t * duptype(type_t *t, int dupname)
void init_loc_info(loc_info_t *)
GLboolean GLboolean GLboolean GLboolean a
char * xstrdup(const char *s)
◆ type_new_array()
Definition at line 226 of file typetree.c.
232 t->details.array.declptr = declptr;
233 t->details.array.length_is = length_is;
235 t->details.array.size_is = size_is;
237 t->details.array.dim = dim;
239 t->details.array.ptr_def_fc = ptr_default_fc;
type_t * make_type(enum type_type type)
char * xstrdup(const char *s)
◆ type_new_basic()
◆ type_new_bitfield()
Definition at line 398 of file typetree.c.
403 error_loc(
"bit-field has invalid type\n");
406 error_loc(
"negative width for bit-field\n");
411 t->details.bitfield.field =
field;
412 t->details.bitfield.bits =
bits;
static int is_valid_bitfield_type(const type_t *type)
type_t * make_type(enum type_type type)
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
◆ type_new_coclass()
Definition at line 215 of file typetree.c.
219 error_loc(
"%s: redefinition error; original definition was at %s:%d\n",
220 type->name,
type->loc_info.input_name,
type->loc_info.line_number);
struct hlsl_type * get_type(struct hlsl_scope *scope, const char *name, BOOL recursive) DECLSPEC_HIDDEN
GLuint GLuint GLsizei GLenum type
GLuint const GLchar * name
◆ type_new_encapsulated_union()
Definition at line 353 of file typetree.c.
358 t->details.structure =
xmalloc(
sizeof(*
t->details.structure));
360 t->details.structure->fields =
append_var(
t->details.structure->fields, union_field );
type_t * type_new_nonencapsulated_union(const char *name, int defined, var_list_t *fields)
var_t * make_var(char *name)
var_list_t * append_var(var_list_t *list, var_t *var)
struct hlsl_type * get_type(struct hlsl_scope *scope, const char *name, BOOL recursive) DECLSPEC_HIDDEN
char * xstrdup(const char *s)
◆ type_new_enum()
Definition at line 274 of file typetree.c.
279 t->namespace =
namespace;
285 t->details.enumeration =
xmalloc(
sizeof(*
t->details.enumeration));
286 t->details.enumeration->enums =
enums;
void add_incomplete(type_t *t)
type_t * make_type(enum type_type type)
static const struct encodedInt enums[]
struct enumeration_details * enumeration
type_t * reg_type(type_t *type, const char *name, struct namespace *namespace, int t)
union _type_t::@4812 details
type_t * find_type(const char *name, struct namespace *namespace, int t)
GLuint const GLchar * name
◆ type_new_function()
Definition at line 131 of file typetree.c.
155 error_loc(
"too many unnamed arguments\n");
162 name[0] =
i > 26 ?
'a' +
i / 26 :
'a' +
i;
163 name[1] =
i > 26 ?
'a' +
i % 26 : 0;
175 t->details.function =
xmalloc(
sizeof(*
t->details.function));
176 t->details.function->args =
args;
177 t->details.function->idx = -1;
static const var_t * find_arg(const var_list_t *args, const char *name)
type_t * make_type(enum type_type type)
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
__WINE_SERVER_LIST_INLINE unsigned int list_count(const struct list *list)
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
static enum type_type type_get_type(const type_t *type)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_ForwardIter unique(_ForwardIter __first, _ForwardIter __last)
char * xstrdup(const char *s)
◆ type_new_int()
Definition at line 251 of file typetree.c.
258 if (!int_types[basic_type][
sign + 1])
263 return int_types[basic_type][
sign + 1];
static size_t double int int int * sign
#define TYPE_BASIC_INT_MAX
type_t * type_new_basic(enum type_basic_type basic_type)
union _type_t::@4812 details
struct basic_details basic
Referenced by resolve_expression().
◆ type_new_module()
Definition at line 205 of file typetree.c.
209 error_loc(
"%s: redefinition error; original definition was at %s:%d\n",
210 type->name,
type->loc_info.input_name,
type->loc_info.line_number);
struct hlsl_type * get_type(struct hlsl_scope *scope, const char *name, BOOL recursive) DECLSPEC_HIDDEN
GLuint GLuint GLsizei GLenum type
GLuint const GLchar * name
◆ type_new_nonencapsulated_union()
Definition at line 330 of file typetree.c.
339 t->details.structure =
xmalloc(
sizeof(*
t->details.structure));
340 t->details.structure->fields = fields;
struct struct_details * structure
void add_incomplete(type_t *t)
type_t * make_type(enum type_type type)
type_t * reg_type(type_t *type, const char *name, struct namespace *namespace, int t)
union _type_t::@4812 details
type_t * find_type(const char *name, struct namespace *namespace, int t)
GLuint const GLchar * name
Referenced by type_new_encapsulated_union().
◆ type_new_pointer()
Definition at line 181 of file typetree.c.
185 t->details.pointer.ref =
ref;
type_t * make_type(enum type_type type)
coclass PSFactoryBuffer pointer_default(unique)] interface ObjectRpcBaseTypes
Referenced by resolve_expression().
◆ type_new_struct()
Definition at line 300 of file typetree.c.
310 t->namespace =
namespace;
316 t->details.structure =
xmalloc(
sizeof(*
t->details.structure));
317 t->details.structure->fields = fields;
struct struct_details * structure
void add_incomplete(type_t *t)
type_t * make_type(enum type_type type)
type_t * reg_type(type_t *type, const char *name, struct namespace *namespace, int t)
union _type_t::@4812 details
type_t * find_type(const char *name, struct namespace *namespace, int t)
GLuint const GLchar * name
◆ type_new_void()
Definition at line 266 of file typetree.c.
type_t * make_type(enum type_type type)