Re: What is byte-code ?

Nathan Moore <>
16 Apr 2005 11:09:10 -0400

          From comp.compilers

Related articles
[15 earlier articles]
Re: What is byte-code ? (2005-03-31)
Re: What is byte-code ? (Chris Dollin) (2005-03-31)
Re: What is byte-code ? (Nathan Moore) (2005-04-02)
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: Nathan Moore <>
Newsgroups: comp.compilers
Date: 16 Apr 2005 11:09:10 -0400
Organization: Cox Communications
References: 05-03-015 05-03-026 05-03-053 05-03-088 05-03-125 05-04-005 05-04-026
Keywords: interpreter, VM
Posted-Date: 16 Apr 2005 11:09:10 EDT

>>Rather than the array of f() * , if you use gcc,
> I didn't want to commit to gcc (especially since one of my targets
> was the ARM).
>>and because you won't have to jump back to the initial jump to begin the
>>next instruction. If you were to do this, I would suggest that you make
>>an automated process of building the C source file that has the
>>implementation of the instructions in it from one or more files that
>>contain the per-instruction implementations and make it so that the
>>method of jump table can be changed for different compilers.
> Indeed. My friend Steve Leach has done some VM investigation where the
> same code fragments for the instructions) are stitched together in
> different ways for comparison purposes: switch cases, functions, and
> GCC label targets. If I remember rightly, label targets were fastest
> on x86 machines, but functions were fastest on Power PC. Were I to
> be doing another round of VM exercises, I'd play the same kind of
> trick.

One other thing that you could do if you were to create a tool to take
your implementations of the instructions and make them into the
different types of jump tables (*F(), label[], switch/case) would be
to use that same instruction implementation code to make a simple jit
compiler, with a little fiddling w/ the variables used, so that the
system's C compiler could be fed the output from the jit/vm and then
load the code from it (possibly after running the system's linker over
it). This should be really simple.


Post a followup to this message

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