javascript compiler?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tomasz Chmielewski

    javascript compiler?

    I have a program written in JavaScript.

    I start it under Windows with "cscript program.js".

    I would like to modify it, but unfortunately, I don't know JavaScript much.

    So I imagined this might be my "workaround ":

    1) compile JavaScript code into an .exe binary
    2) decompile it into C/C++ code.

    And I will have it rewritten into C/C++ (which I know better than
    JavaScript) :)

    Perhaps my approach is a bit naive, but maybe thera are any JavaScript
    compilers, that produce binary .exe files out of the JavaScript code?


    --
    Tomek
  • Mick Sharpe

    #2
    Re: javascript compiler?

    It would be easier to learn JavaScript


    Comment

    • Tomasz Chmielewski

      #3
      Re: javascript compiler?

      Mick Sharpe schrieb:[color=blue]
      > It would be easier to learn JavaScript[/color]

      This is what I expected :)


      --
      Tomek

      Comment

      • J Wynia

        #4
        Re: javascript compiler?

        Tomasz Chmielewski wrote:[color=blue]
        > Perhaps my approach is a bit naive, but maybe thera are any JavaScript
        > compilers, that produce binary .exe files out of the JavaScript code?[/color]

        Most commandline Javascript can be compiled as-is using jsc.exe from the
        ..NET SDK. However, using it as a Rube Goldberg device to get to C++ code
        isn't a wise idea.

        C/C++ syntax is pretty similar to Javascript. It's pretty likely that
        the .js file you're dealing with is either so poorly written as to be
        unintelligable on those merits alone or is using a lot of COM objects
        that won't be any clearer in another language.

        Comment

        Working...