harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodrigo Kumpera <kump...@gmail.com>
Subject Re: Compilation of other languages
Date Sun, 15 May 2005 02:35:34 GMT
It's never that simple. Python have some HUGE diference in terms of
semantics and runtime behavior for Java or .NET. People already
mentioned about the fact that it uses reference counting, this makes
object lifetime more predictable and all libs uses this fact.
Emulating this big semantic diference is not a simple talk.

Not to mention the fact about the C native api that must be present as
most libs use that and that it uses cooperative multi-threading.

ORP seens to be the JVM with more work on this area, it allows the
plugged GC to interfere with the JIT process (insert write barriers /
card marking) in a nice modular way.

Using Java for writing a JVM is good for academic and educational
purpoises only. I mean, even JikesRVM doesn't use Java, it's a
proprietary extension with provisionings for pointer arithmetic and
unsafe operations.

Compare that to C/C++, that once the code is generated it's a single
system call away from execution.

There is too much kludge required to have Java doing trivial things
like atomic compare and swap, flushing the TLB, using memory barriers,
doing a cpu id, changing the some bits of the configuration register
for the FPU, etc...

Again compare that to C/C++, most of then are trivial inline asm statements.


On 5/14/05, acoliver@apache.org <acoliver@apache.org> wrote:
> I'm disinterested in the discussion of the value of other language
> support from the perspective that you've given, but I
> do disagree with your premise that multiple language support at the VM
> level requires API agreement.
> API agreement is only required if you do not have open implementations
> or bytecode implementations of the API.  Meaning
> if I have all of the python APIs and a way to interpret/compile python
> bytecodes then no API agreement is required.  There
> might be issues required for cross language expression.  (calling
> conventions etc)  That however is another issue entirely.
> I do not think it is practical to create this type of VM for C/C++.  I
> think harmony's focus should be a JVM but if a desire is expressed
> for more cross langauge capabilities, then basically focus on higher
> level languages like Java, C#, Python etc.. C/C++ require a much lower
> level effort in my opinion.  (though it is a very interesting idea :-) )
> -andy
> Matthew French wrote:
> >On Sat, 2005-05-14 at 12:19 -0700, acoliver@apache.org wrote:
> >
> >
> >>I'd actually like to at least entertain the architectural idea implied
> >>by other "language" support.
> >>
> >>
> >
> >I think supporting other languages should be easy enough. Structs and
> >enumerations, for example, can be mapped to specific types of classes. A
> >VB variant is just another class. Pointer arithmetic would require some
> >interesting hacks but could be done.
> >
> >The problem for me would be mapping API's to the class libraries. To get
> >code written in other languages to work in a Java would require not only
> >a mapping from the API of the original language, but also an
> >understanding of the semantics.
> >
> >.Not[1], er, .Net manages this by, for example, making Visual Basic .Net
> >a different language to the previous versions. AFAIK it also requires
> >C/C++ developers to learn a new API, but C/C++ developers should be used
> >to that by now. :(
> >
> >So you either have the ability to write Java code in other programming
> >languages but cannot compile something written for a different set of
> >API's (interesting, but not particularly helpful). Or you use an
> >enormous amount of effort to produce something with dubious value.
> >
> >- Matthew
> >
> >[1] My own private joke, not to be taken literally: Java is write once,
> >run anywhere. .Net is write many times, run once.
> >
> >
> >
> --
> Andrew C. Oliver
> SuperLink Software, Inc.
> Java to Excel using POI
> http://www.superlinksoftware.com/services/poi
> Commercial support including features added/implemented, bugs fixed.

View raw message