wine/ dlls/gdi/Makefile.in dlls/gdi/bidi16.c d ...

Dimitrie O. Paun dpaun at rogers.com
Fri Aug 16 00:08:54 CDT 2002


On August 15, 2002 08:42 pm, Alexandre Julliard wrote:
[...]
> Log message:
> 	Moved a large number of 16-bit functions to a separate gdi16.c file.

This is a great idea that I've been advocating for a loooong time now <g>.

I think moving 16 bit code into separate files is cool:
  -- runtime efficiency: If 16 bit code is not invoked, it's not going to be
     paged in during execution
  -- code neatness: developers working on the 32-bit code (which is
     _the_ code in Wine) will not get distracted by silly 16-to-32-to-16 bit 
     conversions.
  -- helps correctness: 16-bit code is in general a simple:
	16-to-32 bit conversion
	call the 32-bit equivalent function
	32-to-16 bit conversion
     Which means there is a lot of repetition, template-like coding. Any
     departure from the usual pattern is a *lot* more easily spotted by
     the naked eye if it's present in a file that does just that.
  -- 16-to-32 bit: we can more easily see (and fix) cases where 32 bit
     code calls 16 bit code.

For all these reasons, I think we should have _all_ 16-bit code into 
separate files. Always. Who knows, maybe we can have makefiles
done such a way that we can avoid compiling 16 bit code altogether! :)
Even if only as a simple check that no 32 bit code calls down to 16 bit...

And again, the _same_ rationale applies to xxxW & xxxA functions,
but I'll not pursue this point for now ;).

-- 
Dimi.




More information about the wine-devel mailing list