Author Topic: RED Cross compiler  (Read 5958 times)

0 Members and 1 Guest are viewing this topic.

efgee

  • Guest
RED Cross compiler
« on: January 05, 2012, 12:12:19 PM »
Charles,
maybe an interesting read for you:

http://www.red-lang.org/2011/12/arm-support-released.html
http://www.red-lang.org/2011/07/mac-os-x-port-released.html
http://www.red-lang.org/2011/03/taking-redsystem-pill.html

These guys also create a compiler that is even able to cross compile (Windows/Linux/MacOS/LinuxARM/Android etc.)
For now 32 bit console-only though, but looking at their road-map x64 is planned (after AVR, JVM, AVM2 and CLR; strange decision...)

On my machine a native 32bit  "Hello World!" app compiles to 6kb.

For now you need to download Rebol/Core in order to use it, instructions here: https://github.com/dockimbel/Red

Have fun...
« Last Edit: January 05, 2012, 12:14:24 PM by efgee »

Charles Pegge

  • Guest
Re: RED Cross compiler
« Reply #1 on: January 05, 2012, 02:25:13 PM »
Hi Frank,

Thanks for the links. I had a look at REBOL too:

http://en.wikipedia.org/wiki/REBOL
http://rebol.com/
http://www.rebol.org/script-index.r
http://musiclessonz.com/rebol_tutorial.html

I am currently exploring Javascript as one of the possible Oxygen emitters

Charles

jcfuller

  • Guest
Re: RED Cross compiler
« Reply #2 on: January 06, 2012, 05:16:37 AM »
Charles,
  How goes the LLVM emitter?

James

Charles Pegge

  • Guest
Re: RED Cross compiler
« Reply #3 on: January 06, 2012, 10:10:44 AM »
Hi James,

I'm gradually getting an overview of several possible emitters, to see what infrastructure is needed. LLVM will need a different kind of expression analyser, since the one I use is stack-based.

Charles

kryton9

  • Guest
Re: RED Cross compiler
« Reply #4 on: September 16, 2013, 11:41:51 AM »
Charles, I know you have put a lot of effort into emitters, but I don't think you should go that route as LLVM and GCC offer front ends and then there is SWIG that does almost all the work for you.

On the other hand, I think you got into all of this because you liked making your own stuff and that is where your main interest is and you couldn't help that you came up with a language we want to use everywhere :)

Charles Pegge

  • Guest
Re: RED Cross compiler
« Reply #5 on: September 16, 2013, 06:36:52 PM »

Emitting C, is probably the easiest to go for. I put in an abstract assembly code layer to remove most of the x86-specifics from the early compilation stages, and C would sit somewhere above this.

Welding GCC onto the back-end is a whole new game :)

kryton9

  • Guest
Re: RED Cross compiler
« Reply #6 on: September 16, 2013, 10:06:56 PM »
Looking at the front end stuff, it is not easy at all to grasp, but heck if you can write assembly code to layer away the x86 stuff, it would probably be a piece of cake for you and your abilities :)

JRS

  • Guest
Re: RED Cross compiler
« Reply #7 on: September 16, 2013, 10:11:28 PM »

kryton9

  • Guest
Re: RED Cross compiler
« Reply #8 on: September 16, 2013, 10:23:42 PM »
You forgot to title that masterful gif John to the "Welsh Wizard"

JRS

  • Guest
Re: RED Cross compiler
« Reply #9 on: September 16, 2013, 10:54:29 PM »
Charles needs no introduction.