Rob Shearman
d2c4ff2305
widl: Add aliased types to the typelib for statements in the library block if the typedef itself doesn't need to be added.
...
Otherwise, the order of types in the typelib will be wrong or types
will be missing.
2009-01-03 14:55:31 +01:00
Rob Shearman
10a422ae14
widl: Use is_string_type instead of is_attr(..., ATTR_STRING) for detecting strings.
...
Detecting strings is a bit harder than just looking for the string
attribute, so make sure to use the function which has the purpose of
doing just that.
Fixes compilation of generated server/proxy code when a parameter has
both the [out] and [string] attributes.
2009-01-02 14:27:43 +01:00
Michael Karcher
2fe1f36793
widl: Recurse search for need of delegation.
...
If any ancestor of an interface needs delegation, the interface itself
has holes in the vtables and thus needs delegation, too.
2009-01-02 12:53:20 +01:00
Rob Shearman
36c03f6a94
widl: Remove duplicate pointer handling code in get_struct_type.
...
Only make the structure complex if there is an interface pointer, not
if there is a pointer to a union or complex struct since these are
handled perfectly well by the pointer marshalling code.
Fix the detection of structures with ref-pointers or pointers in 64-bit code.
2008-12-31 12:35:49 +01:00
Rob Shearman
c6e7609b01
widl: Don't add NULL pointer checks in generated code for user types.
2008-12-31 12:30:40 +01:00
Rob Shearman
6b955b514d
widl: Generate header files from the parse tree instead of using hooks in the parser.
2008-12-29 14:54:34 +01:00
Rob Shearman
bf5a9cb61e
widl: Write the local stubs file based on the parsed list of statements, rather than using hooks in the parser code.
2008-12-29 14:47:03 +01:00
Rob Shearman
7d7dd182c1
widl: Write the generated file containing IID, DIID, CLSID and LIBID data based on the parsed list of statements instead of using hooks in the parser code.
2008-12-29 14:46:41 +01:00
Rob Shearman
5223d04a7c
widl: Write the typelib based on the statement list generated in the typelib_t object instead of using hooks in the parser code.
2008-12-29 14:46:27 +01:00
Rob Shearman
1a71479fbd
widl: Create a separate type_t object for each structure declaration or defintion.
...
Set the details of the structure to the previously defined version if
available, or add it to a list of incomplete types otherwise. Only set
the defined flag when the structure is actually defined in the IDL
file so that the type is written out in the exact order that it is
mentioned in the file.
2008-12-29 14:46:02 +01:00
Rob Shearman
efdd020514
widl: Don't create a temporary variable in the t_ident rule.
...
The identifier doesn't have any properties of a variable and we only
use it for holding the name before it is freed.
Use get_type instead of get_typev in the type_new_* functions and get
rid of get_typev.
2008-12-29 14:45:28 +01:00
Rob Shearman
213f32744f
widl: Store the type-specific information in a union in the type_t structure.
...
Use pointers for the information for structures, enumerations,
functions and interfaces so that we can determine whether or not the
type has been defined yet and to enable more information to be stored.
2008-12-29 14:45:16 +01:00
Rob Shearman
04a22cc412
widl: Hide the details of where arguments, fields, values and cases are stored in the type_t structure for functions, structures, enums and unions.
2008-12-29 14:42:47 +01:00
Rob Shearman
fbffe4a229
widl: Follow aliases in check_remoting_fields so that the fields for the type are correctly enumerated.
2008-12-29 14:42:18 +01:00
Rob Shearman
2e0aefc1fd
widl: Structures and arrays with pointers should be complex when generating code for 64-bit platforms.
...
The non-complex variants depend on the wire size of the
structure/array matching the buffer size, but this no longer applies
when pointers are 8 bytes instead of 4.
2008-12-27 20:23:19 +01:00
Alexandre Julliard
53626dbd93
widl: Add support for generating 32-bit and/or 64-bit code for proxies/clients/servers.
2008-12-26 17:22:25 +01:00
Alexandre Julliard
b1ab7d88b3
widl: Add --win32/--win64 options to select the type of code generated.
2008-12-26 17:21:12 +01:00
Alexandre Julliard
9ca1382eae
widl: Store the size of a pointer in a variable instead of hardcoding the value of the host compiler.
2008-12-26 17:20:53 +01:00
Alexandre Julliard
a011f0cd5b
widl: Move determination of the exact type of structures and array to the code generation phase.
...
The exact type can depend on the size of the type in memory, and that
can vary depending on whether we are generating 32-bit or 64-bit code.
2008-12-26 17:16:06 +01:00
Alexandre Julliard
34613835a7
widl: Use ULONG_PTR instead of unsigned long for pointer casts in generated code.
2008-12-15 20:08:39 +01:00
Alexandre Julliard
014dcb81e8
widl: Use local functions where possible instead of STUB_FORWARDING_FUNCTION in stub vtables.
2008-12-08 16:05:38 +01:00
Andrew Talbot
d7f9d92b47
widl: Remove unneeded address-of operators from function names.
2008-12-08 11:27:53 +01:00
Andrew Talbot
e05b8aa301
widl: Remove unneeded address-of operators from array names.
2008-12-08 11:27:50 +01:00
Vincent Povirk
479f5a1b21
widl: Fix string format warning.
...
yyerror takes a single string argument, not a format string.
2008-12-05 12:30:31 +01:00
Alexandre Julliard
9bf60549a5
widl: Sort the proxy interfaces by iid and use a binary search in IID_Lookup.
2008-12-01 16:25:45 +01:00
Alexandre Julliard
61d600f42f
widl: Output vtable information even for interfaces that don't define new functions.
2008-12-01 14:51:17 +01:00
Alexandre Julliard
36519069b3
widl: Don't define PROXY_DELEGATION unconditionally.
2008-12-01 14:45:43 +01:00
Alexandre Julliard
0ad28a8592
widl: Make the generated global variables and functions hidden.
2008-12-01 14:39:39 +01:00
Rob Shearman
cc51c30a63
widl: Fix optimisation for writing out ref pointers to simple structs and base types.
...
The optimisation in write_remoting_arg for sizing, marshalling,
unmarshalling and freeing ref pointers to base types directly was
broken in d458a599eb
and caused
unnecessary calls to pointer marshalling functions.
The same was true for a similar optimisation for simple structures
where their size can be pre-calculated, freeing omitted and the
NdrSimpleStructMarshall/Unmarshall functions called directly instead
of calling NdrPointerMarshall/Unmarshall first.
Fix this by looking at the type of the referrent instead of the type
of the pointer, making sure to not classify user types as simple
structures.
Additionally remove some dead code that would never be executed
because the code is in an RPC_FC_RP case, inside a !is_ptr if block
(and RPC_FC_RP is a pointer type).
2008-12-01 12:46:46 +01:00
Rob Shearman
41152b7929
widl: Output the correct buffer size required for parameters whose sizes are known at type-generation time.
...
Replace code to calculate the size of RPC_FC_STRUCT types with
fields_memsize since the memory size of these types will always be
equal to the buffer size.
Remove dead code in get_required_buffer_size.
2008-12-01 12:46:19 +01:00
Alexandre Julliard
584d2c9118
widl: Do not make the stub vtbl const for delegating interfaces since it needs to be patched up at run-time.
2008-12-01 11:30:05 +01:00
Alexandre Julliard
cb7a0da5db
widl: Fix the handling of proxy delegation.
...
Generate a BaseIIDList for delegated interface, and point directly to
the methods that have been defined in the same file instead of
delegating them.
2008-11-28 12:55:59 +01:00
Alexandre Julliard
0b7478a79f
widl: Make sure format strings for structure and union types are only output once.
2008-11-25 21:47:47 +01:00
Daniel Zimmermann
89cf227601
widl: Fix check for interface type in get_size_procformatstring.
2008-11-18 14:05:22 +01:00
Andrew Talbot
08c6f507b8
widl: Remove superfluous semicolons.
2008-11-17 13:11:47 +01:00
Dmitry Timoshkov
d560b7bbb0
widl: Make the generated string pointers const as well.
2008-11-11 11:40:50 +01:00
Huw Davies
81bab55a94
widl: Include errno.h.
2008-10-20 22:33:40 +02:00
Rob Shearman
cb3ea6843c
widl: Check for overflow when parsing integer constants.
2008-10-18 19:33:18 +02:00
Alexandre Julliard
b4b8a342d7
widl: Add support for attributes on enum, struct and union definitions.
2008-10-10 12:54:05 +02:00
Rob Shearman
2e8dec4115
widl: Don't automatically add DUMMYUNIONNAME and DUMMYSTRUCTNAME names to anonymous unions and structs.
...
It doesn't match what MIDL does.
2008-09-18 14:18:28 +02:00
Alexandre Julliard
f203263528
widl: Remove unnecessary casts in the generated code.
2008-09-15 19:40:51 +02:00
Alexandre Julliard
cdfec4da31
widl: Implemented RpcAbnormalTermination in the generic exception handling code.
2008-09-15 18:18:16 +02:00
Alexandre Julliard
654e78aa38
widl: Implemented __finally support in client functions.
2008-09-15 18:03:56 +02:00
Alexandre Julliard
0f12f358cd
widl: Implemented __finally support in server functions.
2008-09-15 18:03:49 +02:00
Alexandre Julliard
3bab54cf04
widl: Implemented __finally support in stub functions.
2008-09-15 18:03:44 +02:00
Alexandre Julliard
b8fb66c71a
widl: Separate declaration and initialisation for indirect arguments.
2008-09-15 16:46:33 +02:00
Alexandre Julliard
bf011b0f53
widl: Infrastructure for adding a prefix to local variable references.
2008-09-15 16:46:01 +02:00
Alexandre Julliard
3bdaba2a93
widl: Make the exception handling macros more general and use the same code everywhere.
2008-09-15 14:05:26 +02:00
Alexandre Julliard
1218aff94d
widl: Create an explicit structure for the function frame of all generated functions.
...
Store _StubMsg in the frame structure since it's needed for exception handling.
2008-09-15 14:02:26 +02:00
Rob Shearman
e0dd72162a
widl: Remove redundant code.
...
dispinterfaces now have a type of RPC_FC_IP instead of 0, so this code
will never be reached.
2008-09-11 11:45:33 +02:00