javascript equivalent of python's compile and exec -
in python, 1 can take string containing python code, compile , run resulting code exec.
can similar done javascript (any implementation good). objective javascript's eval faster.
thank you
because of dynamic nature of javascript, can't compile lower-level language. that's why spidermonkey, v8 etc just-in-time (jit) compilers - use runtime type information partially compile fragments, more efficiently ahead-of-time compiler would.
maybe want check out closure compiler? https://developers.google.com/closure/compiler/
Comments
Post a Comment