Re: Why Virtual Machines? (was: C++ -> Java VM compiler)

markt@harlequin.co.uk (Mark Tillotson)
7 Feb 1997 23:46:09 -0500

          From comp.compilers

Related articles
[8 earlier articles]
Re: Why Virtual Machines? (was: C++ -> Java VM compiler) nr@adder.cs.virginia.edu (Norman Ramsey) (1997-02-02)
Re: Why Virtual Machines? (was: C++ -> Java VM compiler) Bronikov@srv2.ic.net (Dmitri Bronnikov) (1997-02-02)
Re: Why Virtual Machines? (was: C++ -> Java VM compiler) apalanis@students.uwf.edu (1997-02-03)
Re: Why Virtual Machines? (was: C++ -> Java VM compiler) robison@kai.com (Arch Robison) (1997-02-03)
Re: Why Virtual Machines? (was: C++ -> Java VM compiler) bothner@cygnus.com (1997-02-07)
Re: Why Virtual Machines? (was: C++ -> Java VM compiler) haahr@netcom.com (1997-02-07)
Re: Why Virtual Machines? (was: C++ -> Java VM compiler) markt@harlequin.co.uk (1997-02-07)
Re: Why Virtual Machines? (was: C++ -> Java VM compiler) robison@kai.com (Arch Robison) (1997-02-11)
Re: Why Virtual Machines? (was: C++ -> Java VM compiler) gah@u.washington.edu (1997-02-22)
| List of all articles for this month |

From: markt@harlequin.co.uk (Mark Tillotson)
Newsgroups: comp.compilers
Date: 7 Feb 1997 23:46:09 -0500
Organization: Harlequin Limited, Cambridge, England
References: <01bbfca0$a284a6f0$041b6682@tecel> 97-01-094 97-01-120 97-01-139 97-01-225 97-02-031
Keywords: Java, design

Arch Robison <robison@kai.com> wrote:


> No. The Java VM has a static typing rule that distinguishes it from
> other virtual machines. See:


The point is verifiability - the JVM and it semantics are designed
with efficient type-safety verification in mind - for instance
stack-depth and types must be statically determinable at each point,
down-casting is explicit.


> Quite the opposite. The Java VM does define object reference size:
> it's 32 bits. The reason for the JVM addressing (and much more) is
> explained by Gosling himself (from the SIGPLAN article):


You sound quite convincing, but are simply wrong: there is _no defined
object reference size_ (see section 3.4 of the JVM Spec - in fact the
notion of a "word" described is unnecessary, because if you compile
away the operand stack it is straightforward to re-map stack-slots,
locals and constants to any memory layout you want.) However, array
length size is limited to 32 (well, 31) bits by the size of an int.
You could even represent object references as textual URLs if you
really wanted (hmm, a distributed JVM on the web?!)


__Mark
[ markt@harlequin.co.uk | http://www.harlequin.co.uk/ | +44(0)1954 785433 ]
--


Post a followup to this message

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