Rémi Bernon
ee908ad076
widl: Use mangled namespace names in typedef pointer types.
2024-06-03 23:24:59 +02:00
Elizabeth Figura
93d50fd9de
widl: Do not write type definitions for types defined in an imported header.
...
midl does not, and this would result in redefinition errors.
An equivalent (and arguably a bit more declarative) way to do this would be to
keep track in the parser whether a type or typedef statement is actually a
definition or not, and record that information in the statement_t. However, this
would require passing additional information alongside the type_t from each
relevant bison rule, which would thrash a lot of code.
2024-06-03 23:24:59 +02:00
Elizabeth Figura
1db2eaf0b3
widl: Update the type location in define_type().
...
This improves error reporting for the following IDL:
interface apple;
[uuid(12345678-1234-1234-1234-123456654321)]
interface apple {void func(void);}
[uuid(12345678-1234-1234-1234-123456654321)]
interface apple {void func(void);}
Previously widl would report:
test2.idl:19:34: error: type apple already defined at test2.idl:2
This changes it to refer to line 5, where the interface is actually defined.
2024-06-03 23:24:59 +02:00
Elizabeth Figura
1522d7b727
widl: Factor out a define_type() helper.
2024-06-03 23:24:59 +02:00
Elizabeth Figura
da8d81c63d
widl: Invert "declonly".
...
This makes the logic around it a bit simpler, and I find it easier to understand as well.
2024-06-03 23:24:59 +02:00
Elizabeth Figura
9839a0d68d
widl: Allow using UDTs with the keyword even when the identifier is also a typedef.
...
E.g. in cases like
typedef int apple;
struct apple { ... };
allow subsequently using "struct apple" in future expressions.
Note that this already worked for UDT definitions (so the above example by
itself was legal in widl), but any attempt to use the defined type would result
in a syntax error.
2024-06-03 23:24:59 +02:00
Elizabeth Figura
07243c4e12
widl: Assign to the right location variable.
...
yyloc is an internal variable; we want to assign to yylloc here.
This fixes error reporting.
Fixes: 3b12583db0
2024-06-03 23:24:59 +02:00
Alexandre Julliard
6b4ab3be97
widl: Don't generate empty interface registrations.
2024-05-07 22:49:44 +02:00
Alexandre Julliard
64923f3fee
widl: Default to fully interpreted stubs mode.
2024-05-02 09:22:40 +02:00
Alexandre Julliard
323cff8f63
widl: Fix correlation offset for unencapsulated unions in interpreted mode.
2024-05-01 12:41:37 +02:00
Brendan Shanks
563ef82416
widl: Use hardcoded build time in TLB custom data.
...
This makes builds reproducible, and matches the current MIDL behavior
(except that MIDL's string representation will vary with the build machine
timezone).
2024-04-29 17:35:26 +02:00
Dmitry Timoshkov
ce6fe5d06e
widl: Fix calculation of the SLTG library block size.
...
This patch fixes a regression in comparison with SLTG generator in wine-staging,
and allows oleview.exe from PSDK correctly load SLTG typelib generated by widl.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-25 21:10:27 +02:00
Dmitry Timoshkov
13e1259754
widl: Add support for function parameter flags to SLTG typelib generator.
...
This makes stdole32.tlb generated by widl have proper [in,out,retval]
parameter flags.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-23 22:14:19 +02:00
Dmitry Timoshkov
202acc52eb
widl: Set the lowest bit in the param name to indicate whether type description follows the name.
...
It looks like the lowest bit in the param name offset actually indicates
whether type description follows the name, and since the name offsets are
always aligned that makes sense.
This makes oleview.exe from PSDK running under Windows7 correctly show mix
of different very complex and relatively simple type descriptions generated
by widl's SLTG generator.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-23 22:14:17 +02:00
Dmitry Timoshkov
918425bbe9
widl: Create library block index right after the CompObj one.
...
Otherwise Wine's oleaut32 refuses to load a typelib.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-23 22:14:14 +02:00
Dmitry Timoshkov
62223ed995
widl: Make automatic dispid generation scheme better match what midl does.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-23 22:14:14 +02:00
Alexandre Julliard
2c2ac005f5
widl: Use x64 calling convention for ARM64EC.
2024-04-18 20:54:24 +02:00
Alexandre Julliard
57b145e468
widl: Clear RobustEarly flag also for data structure conformance.
2024-04-16 21:26:50 +02:00
Alexandre Julliard
235f76594e
widl: Output register parameter assignments on ARM platforms.
2024-04-16 18:39:13 +02:00
Alexandre Julliard
2f532567ff
widl: Don't use a structure for NdrClientCall2 parameters on ARM.
2024-04-15 18:10:44 +02:00
Alexandre Julliard
84509acb16
widl: Correctly align stack parameters on ARM.
2024-04-15 18:10:44 +02:00
Alexandre Julliard
377f9f8de9
widl: Only pass power of 2 structures by value on x86-64.
2024-04-15 18:10:44 +02:00
Alexandre Julliard
9cda4233df
widl: Pass 16-byte structures by value on ARM64.
2024-04-15 18:10:44 +02:00
Dmitry Timoshkov
1d0eb24ce1
widl: Add support for inherited interfaces to SLTG typelib generator.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-09 08:28:46 -05:00
Dmitry Timoshkov
7db6c30aea
widl: Add support for interfaces to SLTG typelib generator.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-09 08:28:46 -05:00
Dmitry Timoshkov
61583ec2cd
widl: Add support for recursive type references to SLTG typelib generator.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-09 08:27:56 -05:00
Dmitry Timoshkov
b8921b414e
widl: In old style typelibs all types are public.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-09 08:27:56 -05:00
Alexandre Julliard
047b7fc293
widl: Map VT_USERDEFINED to VT_I4 for default values in typelibs.
2024-04-04 20:49:43 +02:00
Jacek Caban
a8fc62d1a2
widl: Don't use old typelib format in do_everything mode.
...
Fixes a regression from 0bffa32226
.
2024-04-04 16:03:26 +02:00
Dmitry Timoshkov
1eeebc3190
widl: Add support for VT_USERDEFINED to SLTG typelib generator.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-03 23:03:38 +02:00
Dmitry Timoshkov
9d26c6d75a
widl: Properly align name table entries.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-03 23:03:38 +02:00
Dmitry Timoshkov
f3ca3044fe
widl: Add support for structures.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-03 23:03:38 +02:00
Dmitry Timoshkov
5df4c5f06d
widl: Add more traces.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-03 23:03:38 +02:00
Dmitry Timoshkov
b83410936e
widl: Use generic 'struct sltg_data' for collecting data.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-04-03 23:03:38 +02:00
Alexandre Julliard
a1997507e8
widl: Clear /robust flags when no descriptor is present.
...
For compatibility with midl.
2024-04-03 23:03:36 +02:00
Alexandre Julliard
af058da893
widl: Use padding instead of alignment in structure format strings.
...
For compatibility with midl.
2024-04-03 12:34:39 +02:00
Alexandre Julliard
855eb3afcd
widl: Always pass the top-level attributes to detect interface pointers.
2024-04-03 12:30:59 +02:00
Alexandre Julliard
4f8958eb56
widl: Use the correct type for non-encapsulated union discriminants.
2024-04-02 23:30:10 +02:00
Alexandre Julliard
66bec19434
widl: Output more correct /robust flags.
2024-04-02 23:30:10 +02:00
Alexandre Julliard
4d8ee6bb18
widl: Add /robust flags in correlation descriptors.
2024-04-02 23:30:10 +02:00
Alexandre Julliard
896b4f05ea
widl: Always use new-style format strings in interpreted mode.
2024-04-02 23:30:03 +02:00
Alexandre Julliard
dd68561c4a
widl: Fix method number for call_as functions.
2024-03-28 15:44:46 +01:00
Alexandre Julliard
53bb4117ac
widl: Don't output the explicit handle argument.
2024-03-28 14:30:47 +01:00
Alexandre Julliard
7ff6c6316e
widl: Merge interpreted stubs header and parameters output into a single function.
2024-03-28 14:30:42 +01:00
Alexandre Julliard
69849bd2ee
widl: Don't skip a pointer level for pointers to pointers to strings.
2024-03-27 11:26:10 +01:00
Jacek Caban
3b12583db0
widl: Always close parsed input file.
...
Fixes a regression from 9d537999e3
, which removed closing the file.
This causes Windows widl build to be to remove the temporary file on exit.
2024-03-21 22:19:58 +01:00
Dmitry Timoshkov
0bffa32226
widl: Add initial implementation of SLTG typelib generator.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-03-21 22:19:57 +01:00
Alexandre Julliard
64b2e44697
widl: Use the official definitions for exception flags.
2024-02-29 18:14:48 +01:00
Fabian Maurer
dbf303b00b
widl: In type_has_full_pointer recurse for pointer types as well.
2023-11-29 20:44:44 +01:00
Fabian Maurer
f59807c587
widl: Prevent infinite loop when structure contains array of itself.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55115
2023-11-29 20:44:42 +01:00