freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] [patch] clean up MulDiv in bytecode interpreter


From: Alexei Podtelezhnikov
Subject: [ft-devel] [patch] clean up MulDiv in bytecode interpreter
Date: Tue, 4 Dec 2012 23:00:04 -0500

Werner,

As it stands right now, ttinterp.c uses multiple forms of multiplication-division calls: macro TT_MULDIV, direct FT_MulDiv, and custom TT_MulFix14. This is confusing and unjustified IMHO, so I wanted to consolidate and harmonize those calls. The attached patch mostly does the following

1) TT_MULDIV macros are replaced with to direct calls to FT_MulDiv because they do not do anything useful
2) TT_MulFix14 is now a macro that uses FT_MulFix, no need to duplicate the code
3) FT_MulFix and FT_DivFix are called when they are meant to be called, rather than using 0x10000L explicitly
4) scaling by 64 is hardly an easy overflow trigger, so we can risk direct arithmetic, IMHO

I have done some limited testing. Objections?

Alexei


Attachment: ft-ttinterp.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]