Without eval (), is it possible to compile JavaScript into binary files?

From everything I read, it seems that the only thing mentioned does not allow JavaScript compilation: once, run-around (or at least for the browser) is a stupid operator eval(). Is there anything else in JavaScript that makes achievement impossible?

Instead of spending all this time on every computer and every browser, JIT-ting and downloading multiple source code files, I would like to see the browser launch JavaScript using fewer bytes, using fewer connections and quickly trying, optimized code.

How can I do that?

+3
source share
2 answers

.

  • (, -), JS , , . . , -, -JS. .py .txt bytecode, , - CPython . !
  • ... , JS AOT, , . , , ( , - JIT- ), . , :
    • . , ( ), - , , , , - , ( / ).
    • . . , , - . , , . ?
    • , JS .. - , ( JS ). , JS.
    • - (, , architectures * OSs architectures * OSs * browsers ) DOM.
    • , . , . ( ) HTML, CSS JS . .
    • ( ), JIT , . , ( , ) ( , gzipping, ..) ( , . .
+2
, . JavaScript JavaScript, . , JavaScript , JavaScript script, ZIP - . .
+2

Source: https://habr.com/ru/post/1793249/


All Articles