Add strictest possible compiler flags to the publisher.

Signed-off-by: Erik de Bruin <e...@ixsoftware.nl>


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/2b6d8928
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/2b6d8928
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/2b6d8928

Branch: refs/heads/develop
Commit: 2b6d8928ceff0d4f63f2200d755cc8c6b3345c98
Parents: 1228aca
Author: Erik de Bruin <e...@ixsoftware.nl>
Authored: Tue Nov 12 21:09:18 2013 +0100
Committer: Erik de Bruin <e...@ixsoftware.nl>
Committed: Wed Nov 13 11:49:33 2013 +0100

----------------------------------------------------------------------
 .../codegen/mxml/flexjs/MXMLFlexJSPublisher.java     | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2b6d8928/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
----------------------------------------------------------------------
diff --git 
a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
 
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
index 551e65a..beb9764 100644
--- 
a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
+++ 
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSPublisher.java
@@ -25,9 +25,9 @@ import org.apache.flex.compiler.internal.graph.GoogDepsWriter;
 import org.apache.flex.compiler.internal.projects.FlexJSProject;
 import org.apache.flex.compiler.utils.JSClosureCompilerUtil;
 
-//import com.google.javascript.jscomp.ErrorManager;
 import com.google.javascript.jscomp.SourceFile;
 import com.google.javascript.jscomp.SourceMap;
+//import com.google.javascript.jscomp.ErrorManager;
 //import com.google.javascript.jscomp.deps.DepsGenerator;
 //import com.google.javascript.jscomp.deps.DepsGenerator.InclusionStrategy;
 
@@ -223,6 +223,19 @@ public class MXMLFlexJSPublisher extends JSGoogPublisher 
implements
             optionList.add("--js=" + file.getCanonicalPath());
         }
 
+        // (erikdebruin) set compiler flags to 'strictest' to allow maximum
+        //               code optimization
+        // start 'really strict'
+        optionList.add("--define='goog.DEBUG=false'");
+        optionList.add("--language_in=ECMASCRIPT5_STRICT");
+        optionList.add("--warning_level=VERBOSE");
+        optionList.add("--jscomp_warning=accessControls");
+        optionList.add("--jscomp_warning=const");
+        optionList.add("--jscomp_warning=constantProperty");
+        optionList.add("--jscomp_warning=strictModuleDepCheck");
+        optionList.add("--jscomp_warning=visibility");
+        // end 'really strict'
+        
         optionList.add("--closure_entry_point=" + projectName);
         optionList.add("--only_closure_dependencies");
         optionList.add("--compilation_level=ADVANCED_OPTIMIZATIONS");

Reply via email to