This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 86ec921 Language.string: concatenation is faster than String()
(references apache/royale-compiler#74)
86ec921 is described below
commit 86ec92187da146a05d976afe2212464b02fa30b0
Author: Josh Tynjala <[email protected]>
AuthorDate: Tue Jan 29 12:19:09 2019 -0800
Language.string: concatenation is faster than String() (references
apache/royale-compiler#74)
---
.../Language/src/main/royale/org/apache/royale/utils/Language.as | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
b/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
index 233583f..5800347 100644
---
a/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
+++
b/frameworks/projects/Language/src/main/royale/org/apache/royale/utils/Language.as
@@ -115,7 +115,9 @@ package org.apache.royale.utils
{
return null;
}
- return String(value);
+ //toString() leads the compiler to emit type coercion,
+ //and concatenation is generally faster than String()
+ return "" + value;
}
/**