Re: Switch statement code generation

Walter Banks <walter@bytecraft.com>
Thu, 05 Nov 2009 15:12:30 -0500

          From comp.compilers

Related articles
[2 earlier articles]
Re: Switch statement code generation kkylheku@gmail.com (Kaz Kylheku) (2009-11-04)
Re: Switch statement code generation cr88192@hotmail.com (BGB / cr88192) (2009-11-04)
Re: Switch statement code generation ian@airs.com (Ian Lance Taylor) (2009-11-03)
Re: Switch statement code generation gah@ugcs.caltech.edu (glen herrmannsfeldt) (2009-11-04)
Re: Switch statement code generation anton@mips.complang.tuwien.ac.at (2009-11-04)
Re: Switch statement code generation Pidgeot18@verizon.invalid (Joshua Cranmer) (2009-11-04)
Re: Switch statement code generation walter@bytecraft.com (Walter Banks) (2009-11-05)
Re: Switch statement code generation bartc@freeuk.com (bartc) (2009-11-05)
Re: Switch statement code generation nathan.mccauley@gmail.com (nathan.mccauley@gmail.com) (2009-11-07)
Re: Switch statement code generation DrDiettrich1@aol.com (Hans-Peter Diettrich) (2009-11-08)
Re: Switch statement code generation bear@sonic.net (Ray) (2009-11-09)
Re: Switch statement code generation DrDiettrich1@aol.com (Hans-Peter Diettrich) (2009-11-11)
Re: Switch statement code generation derek@knosof.co.uk (Derek M. Jones) (2009-11-11)
[5 later articles]
| List of all articles for this month |

From: Walter Banks <walter@bytecraft.com>
Newsgroups: comp.compilers
Date: Thu, 05 Nov 2009 15:12:30 -0500
Organization: Compilers Central
References: 09-11-002
Keywords: code
Posted-Date: 05 Nov 2009 15:19:32 EST

Joshua Cranmer wrote:


> I'm trying to put together a list of various methods to do code generate
> for switch statements.
>
> This is what I have so far:
> * Successive if/else branches


I have seen / have implemented if/else as either buried as part of the
switch body or as a separate if/else code block that jumps into the
switch body. The determining factor is the distance a conditional
branch can jump.


Regards,


Walter..
--
Walter Banks
Byte Craft Limited
Tel. (519) 888-6911
http://www.bytecraft.com



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.