This is an automated email from the ASF dual-hosted git repository.
harbs 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 f44a17eca6 More performant
new e13843a11c Merge branch 'develop' of
https://github.com/apache/royale-asjs into develop
f44a17eca6 is described below
commit f44a17eca66b30fcf657eb6620d75a96561940e2
Author: Harbs <[email protected]>
AuthorDate: Fri Jun 7 00:12:23 2024 +0300
More performant
---
frameworks/projects/XML/src/main/royale/XMLList.as | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/frameworks/projects/XML/src/main/royale/XMLList.as
b/frameworks/projects/XML/src/main/royale/XMLList.as
index b15d37b708..c12363e056 100644
--- a/frameworks/projects/XML/src/main/royale/XMLList.as
+++ b/frameworks/projects/XML/src/main/royale/XMLList.as
@@ -253,11 +253,14 @@ package
b. Call the [[Put]] method of x[0] with arguments P
and V
4. Return
*/
+ private static var counter:int = -1;
private function addIndex(idx:int):void
{
- var idxStr:String = "" + idx;
- if(idxStr in XMLList.prototype)
+ if(idx <= counter)
return;
+
+ counter = idx;
+ var idxStr:String = "" + idx;
Object.defineProperty(XMLList.prototype,idxStr,
{
"get": function():* { return
this._xmlArray[idx]; },