Author Topic: OxygenBasic self compiling source  (Read 166 times)

0 Members and 1 Guest are viewing this topic.

Aurel

  • Sr. Member
  • ****
  • Posts: 256
OxygenBasic self compiling source
« on: April 25, 2018, 08:13:20 AM »
I've also included the source files for self-compiling, which is rolling along nicely.

WOW ...  :)  NICE !
Charles ...is that first release?

John

  • Hero Member
  • *****
  • Posts: 3175
Re: OxygenBasic self compiling source
« Reply #1 on: April 25, 2018, 10:14:50 AM »
Hi Roland,

Thanks for spotting those. I've fixed the dot-coding and posted an update.

I've also included the source files for self-compiling, which is rolling along nicely. These are stored in inc/o2, and I will endeavour to expose manageable pieces of code and make them available for other programs to use. Some of the obvious ones are HashStore, Lexer, MacroEngine, MetaLanguage and Assembler.

https://github.com/Charles-Pegge/OxygenBasic/blob/master/OxygenProgress.zip

This deserves a mention in the O2 announcements section of the forum.

Curious, are you getting any sleep Charles?

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 3719
    • Oxygen Basic
Re: OxygenBasic self compiling source
« Reply #2 on: April 25, 2018, 10:35:57 AM »
Not ready to release yet. The source code produces o2g1.exe which then produces o2g2.exe. This is my test configuration for O2 over 3 generations, so to speak.

jcfuller

  • Full Member
  • ***
  • Posts: 143
Re: OxygenBasic self compiling source
« Reply #3 on: April 25, 2018, 12:18:40 PM »
Not ready to release yet. The source code produces o2g1.exe which then produces o2g2.exe. This is my test configuration for O2 over 3 generations, so to speak.
Similar to bcx/bc9 I guess?
With them it takes 3 translate/compiles to produce the final producrt

James

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 3719
    • Oxygen Basic
Re: OxygenBasic self compiling source
« Reply #4 on: April 25, 2018, 01:55:04 PM »
Yes, it is a bit like walking through a hall of mirrors.

g0, the current Oxygen.dll is produced with FreeBasic.

g0 compiles g1 using the adapted o2 source code

g1 compiles  g2 using the same source code

If the source code is correct, both g1 and g2 should have identical binaries, and we have a viable self-compiling system.

Mike Lobanovsky

  • Admin Support Member
  • *****
  • Posts: 1854
Re: OxygenBasic self compiling source
« Reply #5 on: April 25, 2018, 03:07:31 PM »
Amazing work, Charles!

Do you plan on generating a 64-bit Oxygen.dll to enable a 64 bit JIT mode too?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, 2 x nVidia GTX 650Ti w/ 2GB VRAM, Windows 7 Ultimate Sp1)

John

  • Hero Member
  • *****
  • Posts: 3175
Re: OxygenBasic self compiling source
« Reply #6 on: April 25, 2018, 04:47:45 PM »
Does FreeBASIC have a native 64 bit compiler for Windows that isn't a translation to gcc?

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 3719
    • Oxygen Basic
Re: OxygenBasic self compiling source
« Reply #7 on: April 25, 2018, 07:08:22 PM »
Yes Mike, making a 64bit oxygen.dll should be as simple as switching from RTL32 to RTL64.Though there may be some Assembler to shift from hdr.inc to the RTLs.

John, I have not tried any of FreeBasic's alternative modes but I think it is either C-emitter, or GAS-emitter for GCC. And yes, I sleep quite often. It is the best way I know to solve coding problems :)

Mike Lobanovsky

  • Admin Support Member
  • *****
  • Posts: 1854
Re: OxygenBasic self compiling source
« Reply #8 on: April 25, 2018, 10:49:50 PM »
... making a 64bit oxygen.dll should be as simple as switching from RTL32 to RTL64.

Excellent!

Quote
I sleep quite often. It is the best way I know to solve coding problems :)

+100500 :D

Does FreeBASIC have a native 64 bit compiler for Windows that isn't a translation to gcc?

If there were, there would've been noone alive on the PowerBASIC forum long long time ago. ;)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, 2 x nVidia GTX 650Ti w/ 2GB VRAM, Windows 7 Ultimate Sp1)