one pass switch code (was forward references in typedefs)

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Jul 29 05:19:48 AEST 1989


In article <18764 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>In article <67 at motto.UUCP> dave at motto.UUCP (dave brown) writes:
>>I understand direct and jump table switches, but what's a heap switch?
>This might be PCC's private name for it; everyone else seems to call
>it a binary switch.  ...

Maybe it would help to explain that one of the several meanings for
the term "heap" is a data structure that in effect implements a binary
tree, usually as an array.  So far as I can tell, most compilers that
support this form of code generation actually generate individual test
instructions, using branches to construct the binary tree, rather than
using an explicit heap data structure.



More information about the Comp.lang.c mailing list