Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
2010-03-05 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough. JSC should cache int to Identifier conversion as it does for ordinary strings https://bugs.webkit.org/show_bug.cgi?id=35814 Make the NumericStrings cache cache unsigned ints in addition to signed. We keep them separate from the int cache as it both simplifies code, and also because the unsigned path is exclusive to property access and therefore seems to have different usage patterns. The primary trigger for the unsigned to Identifier propertyName conversion is the construction of array-like objects out of normal objects. Given these tend to be relative small numbers, and the array-like behaviour lends itself to sequential values this patch also adds a non-colliding cache for all small numbers. * JavaScriptCore.exp: * runtime/Identifier.cpp: (JSC::Identifier::from): * runtime/Identifier.h: * runtime/NumericStrings.h: (JSC::NumericStrings::add): (JSC::NumericStrings::lookup): (JSC::NumericStrings::lookupSmallString): Canonical link: https://commits.webkit.org/46896@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@55599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
5 changed files
with
71 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters