flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From josebarra...@apache.org
Subject [31/50] git commit: [flex-falcon] [refs/heads/maven] - Enabled some extra optimisations in the GCC.
Date Wed, 09 Jul 2014 23:31:43 GMT
Enabled some extra optimisations in the GCC.

Signed-off-by: Erik de Bruin <erik@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/fc8df1ba
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/fc8df1ba
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/fc8df1ba

Branch: refs/heads/maven
Commit: fc8df1ba494e73c9501331aa1826d580ffb71041
Parents: fe8c466
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Tue Jun 24 20:05:12 2014 +0200
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Tue Jun 24 20:05:21 2014 +0200

----------------------------------------------------------------------
 .../utils/JSClosureCompilerWrapper.java         | 73 ++++++++++++++++++++
 1 file changed, 73 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/fc8df1ba/compiler.jx/src/org/apache/flex/compiler/utils/JSClosureCompilerWrapper.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/utils/JSClosureCompilerWrapper.java
b/compiler.jx/src/org/apache/flex/compiler/utils/JSClosureCompilerWrapper.java
index e09ad62..a940aa6 100644
--- a/compiler.jx/src/org/apache/flex/compiler/utils/JSClosureCompilerWrapper.java
+++ b/compiler.jx/src/org/apache/flex/compiler/utils/JSClosureCompilerWrapper.java
@@ -145,12 +145,85 @@ public class JSClosureCompilerWrapper
             
             options_.setLanguageIn(LanguageMode.ECMASCRIPT5_STRICT);
             
+            options_.setPreferSingleQuotes(true);
+            
+            options_.setFoldConstants(true);
+            options_.setDeadAssignmentElimination(true);
+            options_.setInlineConstantVars(true);
+            options_.setInlineFunctions(true);
+            options_.setInlineLocalFunctions(true);
+            options_.setCrossModuleCodeMotion(true);
+            options_.setCoalesceVariableNames(true);
+            options_.setCrossModuleMethodMotion(true);
+            options_.setInlineGetters(true);
+            options_.setInlineVariables(true);
+            options_.setSmartNameRemoval(true);
+            options_.setRemoveDeadCode(true);
+            options_.setCheckMissingReturn(CheckLevel.WARNING);
+            options_.setExtractPrototypeMemberDeclarations(true);
+            options_.setRemoveUnusedPrototypeProperties(true);
+            options_.setRemoveUnusedPrototypePropertiesInExterns(true);
+            options_.setRemoveUnusedClassProperties(true);
+            options_.setRemoveUnusedVars(true);
+            options_.setRemoveUnusedLocalVars(true);
+            options_.setAliasExternals(true);
+            options_.setCollapseVariableDeclarations(true);
+            options_.setCollapseAnonymousFunctions(true);
+            options_.setAliasAllStrings(true);
+            options_.setConvertToDottedProperties(true);
+            options_.setRewriteFunctionExpressions(true);
+            options_.setOptimizeParameters(true);
+            options_.setOptimizeReturns(true);
+            options_.setOptimizeCalls(true);
+            options_.setOptimizeArgumentsArray(true);
+            
+            // warnings already activated in previous incarnation
             options_.setWarningLevel(DiagnosticGroups.ACCESS_CONTROLS, CheckLevel.WARNING);
             options_.setWarningLevel(DiagnosticGroups.CONST, CheckLevel.WARNING);
             options_.setWarningLevel(DiagnosticGroups.CONSTANT_PROPERTY, CheckLevel.WARNING);
             options_.setWarningLevel(DiagnosticGroups.STRICT_MODULE_DEP_CHECK, CheckLevel.WARNING);
             options_.setWarningLevel(DiagnosticGroups.VISIBILITY, CheckLevel.WARNING);
             options_.setWarningLevel(DiagnosticGroups.DEPRECATED, CheckLevel.OFF);
+            
+            /*
+            // the 'full' set of warnings
+            options_.setWarningLevel(DiagnosticGroups.AMBIGUOUS_FUNCTION_DECL, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.CHECK_EVENTFUL_OBJECT_DISPOSAL, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.CHECK_PROVIDES, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.CHECK_REGEXP, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.CHECK_STRUCT_DICT_INHERITANCE, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.CHECK_TYPES, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.CHECK_USELESS_CODE, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.CHECK_VARIABLES, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.DEBUGGER_STATEMENT_PRESENT, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.DUPLICATE_MESSAGE, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.DUPLICATE_VARS, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.ES3, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.ES5_STRICT, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.EXTERNS_VALIDATION, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.GLOBAL_THIS, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.FILEOVERVIEW_JSDOC, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.INTERNET_EXPLORER_CHECKS, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.INVALID_CASTS, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.LINT_CHECKS, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.MISPLACED_TYPE_ANNOTATION, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.MISSING_PROPERTIES, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.MISSING_PROVIDE, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.MISSING_REQUIRE, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.MISSING_RETURN, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.NEW_CHECK_TYPES, CheckLevel.OFF);
+            options_.setWarningLevel(DiagnosticGroups.NON_STANDARD_JSDOC, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.REPORT_UNKNOWN_TYPES, CheckLevel.OFF);
+            options_.setWarningLevel(DiagnosticGroups.SUSPICIOUS_CODE, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.TWEAKS, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.TYPE_INVALIDATION, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.UNDEFINED_NAMES, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.UNDEFINED_VARIABLES, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.UNKNOWN_DEFINES, CheckLevel.WARNING);
+            options_.setWarningLevel(DiagnosticGroups.UNNECESSARY_CASTS, CheckLevel.OFF);
+            options_.setWarningLevel(DiagnosticGroups.USE_OF_GOOG_BASE, CheckLevel.OFF);
+            options_.setWarningLevel(DiagnosticGroups.VIOLATED_MODULE_DEP, CheckLevel.WARNING);
+            //*/
         }
         
         options_.sourceMapFormat = SourceMap.Format.V3;


Mime
View raw message