flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erikdebr...@apache.org
Subject [4/4] git commit: [flex-asjs] [refs/heads/develop] - If the 'interfaces' array is implemented as a class constant, the Closure Compiler (release mode) "optimises" it to a global variable, thereby making it unreachable with a class member access. When ins
Date Tue, 05 Nov 2013 12:44:59 GMT
If the 'interfaces' array is implemented as a class constant, the Closure Compiler (release
mode) "optimises" it to a global variable, thereby making it unreachable with a class member
access. When instead using a class member for storage, and using an instance for access, the
code is no longer optimised into oblivion.

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


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

Branch: refs/heads/develop
Commit: ad7786071f4f501e8906541701c59d09285dec07
Parents: 63b5f7f
Author: Erik de Bruin <erik@ixsoftware.nl>
Authored: Tue Nov 5 13:40:47 2013 +0100
Committer: Erik de Bruin <erik@ixsoftware.nl>
Committed: Tue Nov 5 13:40:47 2013 +0100

----------------------------------------------------------------------
 frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ad778607/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
index a4784ca..e9f919f 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
@@ -78,8 +78,10 @@ org.apache.flex.utils.Language.is = function(leftOperand, rightOperand)
{
 		for (i = interfaces.length - 1; i > -1; i--) {
 			if (interfaces[i] === rightOperand) {
 				return true;
-			} else if (interfaces[i].AFJS_INTERFACES) {
-				return checkInterfaces(interfaces[i]);
+			} 
+			
+			if (interfaces[i].prototype.AFJS_INTERFACES) {
+				return checkInterfaces(new interfaces[i]());
 			}
 		}
 	
@@ -89,7 +91,7 @@ org.apache.flex.utils.Language.is = function(leftOperand, rightOperand)
{
 	if (leftOperand instanceof rightOperand) {
 		return true;
 	} else if (leftOperand.AFJS_INTERFACES) {
-		return checkInterfaces(leftOperand)
+		return checkInterfaces(leftOperand);
 	}
 
 	return false;


Mime
View raw message