Re: AMPC 1.4.3 released (C to Java Class Files compiler suite)

glen herrmannsfeldt <gah@ugcs.caltech.edu>
16 May 2006 15:43:28 -0400

          From comp.compilers

Related articles
AMPC 1.4.3 released (C to Java Class Files compiler suite) napi@axiomsol.com (napi) (2006-05-11)
Re: AMPC 1.4.3 released (C to Java Class Files compiler suite) englere.geo@yahoo.com (Eric) (2006-05-15)
Re: AMPC 1.4.3 released (C to Java Class Files compiler suite) gah@ugcs.caltech.edu (glen herrmannsfeldt) (2006-05-16)
Re: AMPC 1.4.3 released (C to Java Class Files compiler suite) englere.geo@yahoo.com (Eric) (2006-05-18)
Re: AMPC 1.4.3 released (C to Java Class Files compiler suite) DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-05-22)
Re: AMPC 1.4.3 released (C to Java Class Files compiler suite) gah@ugcs.caltech.edu (glen herrmannsfeldt) (2006-05-22)
| List of all articles for this month |
From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: 16 May 2006 15:43:28 -0400
Organization: Compilers Central
References: 06-05-038 06-05-053
Keywords: Java
Posted-Date: 16 May 2006 15:43:28 EDT

Eric wrote:


> If you don't mind talking a little about the internals, I'm always
> interested in how people get around the pointer dereferencing issue in
> the JVM. The JVM doesn't inherantly support this (it doesn't let you
> load a value given a memory address) and many of the work-arounds are
> klunky.


I don't know about AMPC, but the obvious one to me is that a pointer
variable has an array object reference and offset into the array.
Pointer arithmetic adds or subtracts from the offset, and the offset is
used when the pointer is dereferenced. When pointers are subtracted or
compared with relational operators other than == and !=, only the offset
is subtracted or compared. C makes no guarantee of the results of
subtraction or non-equality comparison of pointers to different objects.


(A pointer variable might also need some type information so that
functions like memcpy() can properly handle copies to/from unsigned char.)


-- glen


Post a followup to this message

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