Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!ukma!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: one pass switch code (was forward references in typedefs) Message-ID: <10621@smoke.BRL.MIL> Date: 28 Jul 89 19:19:48 GMT References: <55480@tut.cis.ohio-state.edu> <1989Jul20.152935.14872@utzoo.uucp> <67@motto.UUCP> <18764@mimsy.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 In article <18764@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >In article <67@motto.UUCP> dave@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.