freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Cleaning up ttinterp


From: Behdad Esfahbod
Subject: Re: [ft-devel] Cleaning up ttinterp
Date: Tue, 14 Oct 2014 22:26:17 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

On 14-10-14 10:17 PM, Werner LEMBERG wrote:
> 
>>> +1 if you preserve English descriptions and stack specs.
> 
> Yeah, this is a good thing.  Thanks for the reminder.
> 
>> Check again.  I cleaned it up some more, and all instruction
>> implementations in the switch are limited to two lines now.
> 
> Mhmm, we are still losing a lot of descriptions and stack specs.  I
> think they should be simply moved into the big switch statement.

I find the switch quite readable in the current state of my tree.  The only
exception is MPS.  I can move that to a function.

Which other ones do you want documented?  I don't see any value in
documenting, eg, these, as they are very self-documenting:

        case 0x4E:  /* FLIPOFF */
          exc->GS.auto_flip = FALSE;
          break;

        case 0x4F:  /* DEBUG */
          exc->error = FT_THROW( Debug_OpCode );
          break;

        case 0x50:  /* LT */
          args[0] = ( args[0] < args[1] );
          break;

        case 0x51:  /* LTEQ */
          args[0] = ( args[0] <= args[1] );
          break;

        case 0x52:  /* GT */
          args[0] = ( args[0] > args[1] );
          break;

        case 0x53:  /* GTEQ */
          args[0] = ( args[0] >= args[1] );
          break;

        case 0x54:  /* EQ */
          args[0] = ( args[0] == args[1] );
          break;

        case 0x55:  /* NEQ */
          args[0] = ( args[0] != args[1] );

-- 
behdad
http://behdad.org/



reply via email to

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