Re: alternatives to Java byte-codes

jerpat@iastate.edu (Jeremiah S Patterson)
5 Feb 1999 17:20:06 -0500

          From comp.compilers

Related articles
alternatives to java byte-codes jafrutos@eui.upm.es (Juan Alberto de Frutos Velasco) (1999-01-27)
Re: alternatives to java byte-codes olivier.lefevre@wdr.com (Olivier Lefevre) (1999-01-31)
Re: alternatives to java byte-codes niall@cuc.ucc.ie (Niall Dalton) (1999-02-01)
Re: alternatives to java byte-codes dgay@barnowl.CS.Berkeley.EDU (David Gay) (1999-02-03)
Re: alternatives to Java byte-codes jerpat@iastate.edu (1999-02-05)
Re: alternatives to Java byte-codes kistler@ics.uci.edu (Thomas Kistler) (1999-02-07)
Re: alternatives to Java byte-codes Paulo@PlanetSmart.com (Paulo Machado) (1999-02-10)
Re: optimization data structures, wasalternatives to Java byte-codes chase@world.std.com (David Chase) (1999-02-10)
Re: alternatives to java byte-codes jcea@argo.es (Jesus Cea Avion) (1999-02-10)
Re: alternatives to java byte-codes niall@cuc.ucc.ie (Niall Dalton) (1999-02-12)
Re: alternatives to java byte-codes chase@world.std.com (David Chase) (1999-02-15)
[1 later articles]
| List of all articles for this month |

From: jerpat@iastate.edu (Jeremiah S Patterson)
Newsgroups: comp.compilers
Date: 5 Feb 1999 17:20:06 -0500
Organization: Iowa State University, Ames, Iowa, USA
References: 99-01-096
Keywords: Java, interpreter

Juan Alberto de Frutos Velasco <jafrutos@eui.upm.es> writes:
>I'm looking for works about alternatives for java byte-codes used by
>java.


>More precisely, I'd like to study the advantages of using structures
>like AST (abstract syntax tree).


Hi Juan,


    I think there are at least two reasons why the designers of Java use
byte codes. One is ease of optimization and the other is security. I
could be wrong, of course. AST's are typically hard to optimize
because (at least this is my experience) it is difficult to come up
with general optimizations that are not trivial. Byte codes, on the
other hand, provide a linear (step-by-step) structure rather than a
tree structure which makes it easy to define "atomic" sections of code
and optimize those sections. AST's on the other hand can be easier to
generate and interpret.


    As far as security goes, it seems like it would be easier to check
for valid byte strings than valid trees but I haven't tried either, so
I don't know this for certain.


    It also seems like it would be easier and more efficient to stream a
byte code program out over a network. I guess these are more
advantages for byte codes rather than AST's. This is mostly opinion
based on experience (which is not exactly years and years).


    It wouldn't hurt to try using ASTs as the medium for executables.


Enjoy,
Jerry
---
Jerry Patterson
Graduate Student, Computer Science
Iowa State University
jerpat@cs.iastate.edu


Post a followup to this message

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