Changeset 25955 in webkit
- Timestamp:
- Oct 2, 2007 8:42:46 PM (17 years ago)
- Location:
- branches/feature-branch/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-branch/JavaScriptCore/ChangeLog
r25952 r25955 1 2007-10-02 Maciej Stachowiak <mjs@apple.com> 2 3 Reviewed by Oliver. 4 5 - skip extra hash lookup and avoid converting char* to UString for 19% speedup on CK JS array test 6 http://bugs.webkit.org/show_bug.cgi?id=15350 7 8 * kjs/array_object.cpp: 9 (ArrayProtoFunc::callAsFunction): Implement the two mentioned optimizations. 10 1 11 2007-10-02 Maciej Stachowiak <mjs@apple.com> 2 12 -
branches/feature-branch/JavaScriptCore/kjs/array_object.cpp
r24820 r25955 536 536 case Join: { 537 537 static HashSet<JSObject*> visitedElems; 538 if (visitedElems.contains(thisObj)) 539 return jsString(""); 540 UString separator = ","; 541 UString str = ""; 542 543 visitedElems.add(thisObj); 538 static const UString empty(""); 539 static const UString comma(","); 540 bool alreadyVisited = !visitedElems.add(thisObj).second; 541 if (alreadyVisited) 542 return jsString(empty); 543 UString separator = comma; 544 UString str = empty; 545 544 546 if (id == Join && !args[0]->isUndefined()) 545 547 separator = args[0]->toString(exec);
Note: See TracChangeset
for help on using the changeset viewer.