Re:Closure Compiler in JavaScript
by likeclockwork on Tuesday December 06, 2016 @03:17PM
(#13117911)
It compiles the Java source, not the Java bytecode, but even if it did....
Take your malloc example, you can compile a C program that uses malloc to JS, you just have write a malloc in JS that will behave the way you expect it to.
C gets compiled to assembly, assembly to machine code.
Their compiler just takes Java source and emits JS source instead of JVM bytecode.
Take your malloc example, you can compile a C program that uses malloc to JS, you just have write a malloc in JS that will behave the way you expect it to.
C gets compiled to assembly, assembly to machine code.
Their compiler just takes Java source and emits JS source instead of JVM bytecode.