bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#4470: Acknowledgement (23.1; threaded interpreter)


From: Andreas Schwab
Subject: bug#4470: Acknowledgement (23.1; threaded interpreter)
Date: Fri, 18 Sep 2009 20:25:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Tom Tromey <tromey@redhat.com> writes:

> +      static int initialized;
> +
> +      if (!initialized)
> +     {
> +       int i;
> +       initialized = 1;
> +       /* We must initialize every slot in the table.  An empty
> +          slot before Bconstant should just abort.  All the opcodes
> +          after Bconstant should use the same code as Bconstant.  */
> +       for (i = 0; i < 256; ++i)
> +         {
> +           if (!targets[i])
> +             targets[i] = i < Bconstant ? &&insn_default : &&insn_Bconstant;
> +         }
> +     }
> +#endif

You can use [0 ... 255] = &&insn_default, [Bconstant ... 255] =
&&insn_Bconstant to statically initialize the array, avoiding the
runtime initialisation.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





reply via email to

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