C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: [OT]Re: C to Java Byte Code

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Chris Dollin
Guest





PostPosted: Thu Oct 28, 2004 11:34 am    Post subject: Re: [OT]Re: C to Java Byte Code Reply with quote



Galga wrote:

Quote:
The product says it will compile into Java Byte Code, Not, I repeat,
NOT, Java Source; Those are two COMPLETELY seperate tasks. Get it right
or shut up Paul, because you're jsut diggering your own usenet grave
deeper and deeper.

I must point out that Java bytecodes *that pass the bytecode verifier*
can almost always be back-translated to Java methods, and that the
exceptions (that I know of) are trivial [1] rather than interesting.

So, while Paul may be wrong, I don't think it's for that reason.

[1] I don't think the verifier complains about unreachable code, nor
about code-not-involving-this before the superconstructor gets
called; directly expressed in Java these provoke diagnostics.

--
Chris "electric hedgehog" Dollin

Back to top
Old Wolf
Guest





PostPosted: Thu Oct 28, 2004 7:52 pm    Post subject: Re: [OT]Re: C to Java Byte Code Reply with quote



Chris Dollin <kers (AT) hpl (DOT) hp.com> wrote:
Quote:
Galga wrote:

The product says it will compile into Java Byte Code, Not, I repeat,
NOT, Java Source; Those are two COMPLETELY seperate tasks.

I should mention that this is not a particularly
odd thing to claim; MS's C++.net can compile C or C++
into a bytecode which I understand is not majorly different
to Java bytecode.

Quote:
I must point out that Java bytecodes *that pass the bytecode verifier*
can almost always be back-translated to Java methods

So if this compiler does what it claims, then we have a
method for transforming conforming C source into Java source
and it still runs correctly. I wonder if the converse is
possible? (converting a Java program to a conforming C
program that runs correctly).

Back to top
goose
Guest





PostPosted: Fri Oct 29, 2004 8:00 am    Post subject: Re: [OT]Re: C to Java Byte Code Reply with quote



Chris Dollin <kers (AT) hpl (DOT) hp.com> wrote

Quote:
Galga wrote:

The product says it will compile into Java Byte Code, Not, I repeat,
NOT, Java Source; Those are two COMPLETELY seperate tasks. Get it right
or shut up Paul, because you're jsut diggering your own usenet grave
deeper and deeper.

I must point out that Java bytecodes *that pass the bytecode verifier*
can almost always be back-translated to Java methods, and that the
exceptions (that I know of) are trivial [1] rather than interesting.


<WARNING: Clueless about java bytecode>
ISTR that the mnemonics(sp?) that I've seen for java have
seperate instructions for working with different primitive
types.

So, assuming an "uc_push" and "uc_pop" instruction
for "push unsigned char on stack" and "pop unsigned char
from stack" respectively, and "f_push" and "f_pop" for
the floating point equivalents, it then follows that
the union code that paul posted can be trivially written
in java bytecode.

f_push 3.14
uc_pop first_byte
uc_pop secnd_byte
uc_pop third_byte
uc_pop forth_byte

Now I really am curious, is there anyone here (maybe the OP
who created the c->java bytecode product) who can verify
that the JVM does indeed work as I think it does?

Quote:
So, while Paul may be wrong, I don't think it's for that reason.

[1] I don't think the verifier complains about unreachable code, nor
about code-not-involving-this before the superconstructor gets
called; directly expressed in Java these provoke diagnostics.


Yes, but will it complain about code like above (if above
code is actually java bytecode).

goose,
WTH was this crossposted to alt.sex.gay?

Back to top
Joona I Palaste
Guest





PostPosted: Fri Oct 29, 2004 8:43 am    Post subject: Re: [OT]Re: C to Java Byte Code Reply with quote

goose <ruse (AT) webmail (DOT) co.za> scribbled the following
on comp.lang.c:
Quote:
goose,
WTH was this crossposted to alt.sex.gay?

That was Galga's idea. He is apparently quite fixated on personally
insulting Paul Lutus.

--
/-- Joona Palaste (palaste (AT) cc (DOT) helsinki.fi) ------------- Finland --------
-------------------------------------------------------- rules! --------/
"It sure is cool having money and chicks."
- Beavis and Butt-head

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.