Author Topic: jscompile  (Read 51 times)

0 Members and 1 Guest are viewing this topic.

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 396
  • Country: au
    • 8bitology
  • Liked: 181
  • Likes Given: 104
jscompile
« on: 22:19, 17 July 19 »
Hi,


I have made a small update to jscompile, it isn't finished but enough to demo for the first time. 


It could be expanded to include assets (graphics and maps), integration with 8bitology API (for achievements), direct sending to CPC, modules etc.  Modules should be there, with classes allocated on the heap, not static, local variables on the stack to allow recursion and some code optimisations.  With modules the ability to make them public with versioning so coders can include them directly.


http://8bitology.net/poc/jscompile/


What are your thoughts on this? Should I finish it? Would anyone want to use it if it could generate CPC code?


To demo it, just type something in from scratch, eg: (yes, it is sensitive to spacing for now)



function Main1()
{
    var TEST1 = 1;
    var TEST2 = TEST1 * 5;
    var TEST3 = (TEST2 + TEST1) * 2;
   
    var loopCounter = 10;
    while (loopCounter > 0)
    {
        loopCounter --;
    }
}


Also, does anyone want to help me finish it? I prefer to make it free for any purpose.
« Last Edit: 22:24, 17 July 19 by zhulien »