tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] A wish for 2018? C->JVM compiler


From: Christian Jullien
Subject: Re: [Tinycc-devel] A wish for 2018? C->JVM compiler
Date: Sun, 11 Mar 2018 07:47:16 +0100

Hi Charles,

Your implementation using switch has a name, it’s called trampoline https://en.wikipedia.org/wiki/Trampoline_(computing).

This is what you have to do when backend does not support native goto, and it’s generally the case when you write a compiler having a high level language as target. Another solution may be CPS https://en.wikipedia.org/wiki/Continuation-passing_style

 

Sure, tinycc->_javascript_ looks interesting.

 

C.

 

From: Tinycc-devel [mailto:address@hidden On Behalf Of Charles Lohr
Sent: samedi 10 mars 2018 21:31
To: address@hidden
Subject: Re: [Tinycc-devel] A wish for 2018? C->JVM compiler

 

This really interests me as well.  I still am working on my tinycc-to-_javascript_ environment, and to support "goto" was quite awkward and required wrapping all code in functions inside "switch" statements.  I was hoping webassembly would accept the request to have a "goto" but as far as I understand, there's basically no possible way to do any kind of setjmp but that's probably ok because so few applications use it.

This raises another question:  Anyone else interested in a tinycc javscript target?

 

On Sat, Mar 10, 2018 at 11:43 AM, Christian Jullien <address@hidden> wrote:

First link looks especially interesting. thanks

My question is if tinycc could generate JVM code which any java engine can use.

IMHO setjmp/longjmp is probably not very easy to compile to a JVM equivalent.

 

C.

 

 

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=address@hidden] On Behalf Of Yakov
Sent: vendredi 9 mars 2018 11:56
To: address@hidden
Subject: Re: [Tinycc-devel] A wish for 2018? C->JVM compiler

 

 

2017-12-31 12:13 GMT+05:45 Christian Jullien <address@hidden>:

Hi all, I don’t how much it could cost nor it’s even feasible, but it would be nice to have a JVM backend. (as other languages already use, see https://en.wikipedia.org/wiki/List_of_JVM_languages)

This could be a nice student project.

 

Main goal:

-          Have a portable C on top on JVM

 

Second goals

-          Smooth integration with JDK libs

-          Optional GC

-          Optimization done by JIT

 

Non goals:

-          Speed of compiled program

 

Any university there willing to make this port happen?

 

C.

 


_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

 


_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]