Re: What is byte-code ?

glen herrmannsfeldt <>
13 May 2005 17:56:26 -0400

          From comp.compilers

Related articles
[18 earlier articles]
Re: What is byte-code ? (John Slimick) (2005-04-11)
Re: What is byte-code ? (Chris Dollin) (2005-04-11)
Re: What is byte-code ? (2005-04-11)
Re: What is byte-code ? (Nathan Moore) (2005-04-16)
Re: What is byte-code ? (glen herrmannsfeldt) (2005-04-16)
Re: What is byte-code ? (2005-05-09)
Re: What is byte-code ? (glen herrmannsfeldt) (2005-05-13)
| List of all articles for this month |

From: glen herrmannsfeldt <>
Newsgroups: comp.compilers
Date: 13 May 2005 17:56:26 -0400
Organization: Compilers Central
References: 05-03-015 05-03-026 05-03-053 05-03-088 05-03-125 05-04-005 05-04-037
Keywords: interpreter, performance
Posted-Date: 13 May 2005 17:56:26 EDT

Anton Ertl wrote:

(snip regarding switch statements or statement label arrays)

>>This will save you about 2 jumps per instructoin since the jump tables
>>that are usually spit out by compilers are:

>>jump ip+(constant*case)

> I have never seen that kind of code generated. Which compiler does it
> that way? Big, dense switch statements have been translated into a
> range check, an array access (for the target address), and an indirect
> jump to the target in the code I looked at (usually by gcc).

IBM S/360 (S/370, ESA/390, etc.) compilers generate that for computed
GOTO in Fortran, and switch in languages with that.

S/360 has pretty much only one memory addressing mode with is
12 bit constant plus register plus register.

The exit codes (return codes) of all IBM supplied S/360 programs are
multiples of four, convenient for use in indexed branch instructions.
(Hopefully after bounds testing.)

-- glen

Post a followup to this message

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