Class SecureCompiler
java.lang.Object
com.google.javascript.jscomp.jsonml.SecureCompiler
Compilation of JavaScript code which guarantees that all security
capabilities are preserved after the process. In particular, it can be
safely applied to cajoled source.
JS Compiler is used for code analysis and optimization. It runs a series
of passes which try to improve the code.
For safety reasons, only a subset of local passes, which are provided by
JS Compiler, are processed. Currently it includes:
- elimination of temporary variables
Using SecureCompiler is quite straightforward. A user just needs to create
a new instance and call compile() method. Currently the only input which
is supported is JsonML.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Returns compiled source in JsonML format.Returns report from the last compilation.Returns compiled source as a JavaScript.
-
Constructor Details
-
SecureCompiler
public SecureCompiler()
-
-
Method Details
-
getJsonML
Returns compiled source in JsonML format. -
getString
Returns compiled source as a JavaScript. -
getReport
Returns report from the last compilation. -
compile
-
enableFoldConstant
public void enableFoldConstant()
-