public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Platform...? Java Bytecode!!!!
@ 2002-04-22 11:10 Per Bothner
  0 siblings, 0 replies; 8+ messages in thread
From: Per Bothner @ 2002-04-22 11:10 UTC (permalink / raw)
  To: gcc

Luxspes wrote:

>  why not? think about it.... right now you can only develop for the JVM 
> using the java language, and java has a large code base, but c, c++ 
> objective-c, fortran and ada are older... a lot older... if someone (why 
> not us) builds a gcc to jvm compiler, every JVM (and any platform where 
> they run) would instantly gain a tremendous codebase) and I would bring 
> "back to life" to languages in risk of dying (or practically already
> death for most of the developers like ada or objective-c) i love 
> objective-c but right now,

This has all been discussed and considered many times.  The JVM is
not a good match for C or C++, because C has a low-level type-unsafe
memory model.  You can of course simulate the C/C++ memory model,
but there are a number of trade-offs.  I.e. do you want compatibility 
with existing ABIs?  Do you want to generate pure Java, or are you
willing to use some native helper methods?  How do you want to handle
C++ objecs?  (Using Java objects will be difficult.)

There is no point in trying to convince any of us:  If you want to
do it, then do it.  Unfortunately, the people who would be most
qualified to help you are too busy with more useful projects.
(Not to say that this might not be useful - it's just that we're
all busy with other projects.)  However, I'm sure it can be a very
educational project if you attempt it.
-- 
   --Per Bothner
per@bothner.com   http://www.bothner.com/per/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Platform...? Java Bytecode!!!!
@ 2002-04-22 11:30 Per Bothner
  0 siblings, 0 replies; 8+ messages in thread
From: Per Bothner @ 2002-04-22 11:30 UTC (permalink / raw)
  To: gcc

Per Bothner <per@bothner.com> wrote:
> This has all been discussed and considered many times.  The JVM is
> not a good match for C or C++, because C has a low-level type-unsafe
> memory model.

Florian Weimer wrote:
> Not quite correct.  Many C programmers assume that this is the case
> (and their code tends to break when chaging platforms or compilers),
> and most implementations behave this way, but this isn't really
> required by the language definition. ;-)

Er - look up "strawman argument".  I said "the JVM is not a good match
for C", and you're responding as if I said you cannot implement C on the
JVM.  In the part you did not quote I said "You can of course simulate
the C/C++ memory model, but there are a number of trade-offs."
--
	--Per Bothner
per@bothner.com http://www.bothner.com/per/ 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Platform...? Java Bytecode!!!!
       [not found]     ` <3CC44B3F.4090000@bothner.com>
@ 2002-04-22 10:52       ` Florian Weimer
  0 siblings, 0 replies; 8+ messages in thread
From: Florian Weimer @ 2002-04-22 10:52 UTC (permalink / raw)
  To: Per Bothner; +Cc: Luxspes, gcc

Per Bothner <per@bothner.com> writes:

> This has all been discussed and considered many times.  The JVM is
> not a good match for C or C++, because C has a low-level type-unsafe
> memory model.

Not quite correct.  Many C programmers assume that this is the case
(and their code tends to break when chaging platforms or compilers),
and most implementations behave this way, but this isn't really
required by the language definition. ;-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Platform...? Java Bytecode!!!!
  2002-04-22  9:36   ` Luxspes
@ 2002-04-22 10:46     ` Florian Weimer
       [not found]     ` <3CC44B3F.4090000@bothner.com>
  1 sibling, 0 replies; 8+ messages in thread
From: Florian Weimer @ 2002-04-22 10:46 UTC (permalink / raw)
  To: Luxspes; +Cc: gcc

Luxspes <luxspesmex@netscape.net> writes:

>> I'm not sure if a JVM target is useful.  Maybe a different bytecode
>> target, but the JVM?

>   why not? think about it.... right now you can only develop for the
> JVM using the java language, and java has a large code base, but c,
> c++ objective-c, fortran and ada are older... a lot older...

For GNAT (the Ada compiler), there is already a different (non-GCC)
backend which produces JVM bytecode.  AFAIK, there isn't much interest
in this compiler, and 

> and I would bring "back to life" to languages in risk of dying (or
> practically already death for most of the developers like ada or
> objective-c)

Well, JGNAT hasn't brought Ada back to life (if it had been dead), so
much for your projections.

You are overestimating the importance of the JVM.  Ubiquitous Java
isn't going to happen.  Never.

> And then again, maybe I am just crazy and wrong, but I would like to
> know why this can't be done...

There are technically disadvantages of the JVM: all objects have to be
allocated on the heap, there is no function pointer support, just to
name two.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Platform...? Java Bytecode!!!!
  2002-04-22  8:55 Luxspes
  2002-04-22  9:25 ` Florian Weimer
@ 2002-04-22  9:38 ` Diego Novillo
  1 sibling, 0 replies; 8+ messages in thread
From: Diego Novillo @ 2002-04-22  9:38 UTC (permalink / raw)
  To: Luxspes; +Cc: gcc

On Mon, 2002-04-22 at 12:52, Luxspes wrote:

> Any one in this list is aware of a group of developers working to do 
> that? 
>
Try http://www.itee.uq.edu.au/~csmweb/uqbt.html#gcc-jvm


Diego.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Platform...? Java Bytecode!!!!
  2002-04-22  9:25 ` Florian Weimer
@ 2002-04-22  9:36   ` Luxspes
  2002-04-22 10:46     ` Florian Weimer
       [not found]     ` <3CC44B3F.4090000@bothner.com>
  0 siblings, 2 replies; 8+ messages in thread
From: Luxspes @ 2002-04-22  9:36 UTC (permalink / raw)
  To: fw; +Cc: gcc



fw@deneb.enyo.de wrote:

> Luxspes <luxspesmex@netscape.net> writes:
> 
> 
>>Any one in this list is aware of a group of developers working to do
>>that?
>>
> 
> You can download a GCC C front end together with some ad-hoc (non-GCC)
> backend somewhere.
> 
> I'm not sure if a JVM target is useful.  Maybe a different bytecode
> target, but the JVM?
> 

Hi!
  why not? think about it.... right now you can only develop for the JVM 
using the java language, and java has a large code base, but c, c++ 
objective-c, fortran and ada are older... a lot older... if someone (why 
not us) builds a gcc to jvm compiler, every JVM (and any platform where 
they run) would instantly gain a tremendous codebase) and I would bring 
"back to life" to languages in risk of dying (or practically already 
death for most of the developers like ada or objective-c) i love 
objective-c but right now, i can only use it with GNUStep (still to 
unstable or in MacOSX (I have a Pentium IV and buying an iMac is beyond 
my budget)). I imagine taking all the objective-c code of Apple's 
Project Builder and conveting it to a java-bytecodes, or all the c++ of 
   QT (Troll Tech) and generating bytecodes with it... i know that it is 
not as simple as that, i need to communicate with the windowing 
subsystem, etc, etc... but it would be a nice step forthward ¿don't you 
think?
And then again, maybe I am just crazy and wrong, but I would like to 
know why this can't be done...
bye
LUXSPES

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Platform...? Java Bytecode!!!!
  2002-04-22  8:55 Luxspes
@ 2002-04-22  9:25 ` Florian Weimer
  2002-04-22  9:36   ` Luxspes
  2002-04-22  9:38 ` Diego Novillo
  1 sibling, 1 reply; 8+ messages in thread
From: Florian Weimer @ 2002-04-22  9:25 UTC (permalink / raw)
  To: Luxspes; +Cc: gcc

Luxspes <luxspesmex@netscape.net> writes:

> Any one in this list is aware of a group of developers working to do
> that?

You can download a GCC C front end together with some ad-hoc (non-GCC)
backend somewhere.

I'm not sure if a JVM target is useful.  Maybe a different bytecode
target, but the JVM?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Platform...? Java Bytecode!!!!
@ 2002-04-22  8:55 Luxspes
  2002-04-22  9:25 ` Florian Weimer
  2002-04-22  9:38 ` Diego Novillo
  0 siblings, 2 replies; 8+ messages in thread
From: Luxspes @ 2002-04-22  8:55 UTC (permalink / raw)
  To: gcc

Hi!
I awaked this mornig with the following idea, it might sound crazy but 
since microsoft has visual studio net with a lot of languages (C, C++, 
C#, VBasic, Fox) for its ".Net platform"....

I know gcc can compile from "c, c++, objective-c, fortan, ada" to a lot 
of platforms (IA32, IA64, PPC, Alpha, etc, etc)... ¿It would be VERY 
HARD to treat "java virtual machine and java bytecodes" as another 
microprocessor platform? ¿and make a "java bytecode output" from "c, 
c++, objective-c, fortran and ada? (i am specially interested in the c++ 
and objective-c output to java-bytecode)

Any one in this list is aware of a group of developers working to do 
that? I know I am new to this list, and i am surely not a very 
experienced compiler developer ( but I know that gcc has been ported to 
A LOT of platforms... ¿is porting it to java-bytecodes VERY HARD TO DO?
¿are there anyone interested in developing this? because I would be 
REALLY VERY INTERESTED in helping him, or her, or them. (I am a good 
C++, Java and Objective-C programmer)

bye
LUXSPES

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-04-22 18:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-22 11:10 Platform...? Java Bytecode!!!! Per Bothner
  -- strict thread matches above, loose matches on Subject: below --
2002-04-22 11:30 Per Bothner
2002-04-22  8:55 Luxspes
2002-04-22  9:25 ` Florian Weimer
2002-04-22  9:36   ` Luxspes
2002-04-22 10:46     ` Florian Weimer
     [not found]     ` <3CC44B3F.4090000@bothner.com>
2002-04-22 10:52       ` Florian Weimer
2002-04-22  9:38 ` Diego Novillo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).