Title: [131258] trunk/Source/WebCore
- Revision
- 131258
- Author
- [email protected]
- Date
- 2012-10-13 09:46:10 -0700 (Sat, 13 Oct 2012)
Log Message
I pity da foo' who's converting numbers to strings
https://bugs.webkit.org/show_bug.cgi?id=99197
Reviewed by Gavin Barraclough.
40% speedup on PerformanceTests/Dromaeo/dom-traverse.html. Probably speeds
some other things up too.
Credit to Eric Seidel for spotting this.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): getOwnPropertySlotByIndex doesn't need to prefer
string lookup in the static table because our static tables don't contain
properties that are numbers.
I believe this is low-hanging fruit left behind by Phil's
getOwnPropertySlotByIndex optimization, but it's also possible that this was a
regression at some point. I didn't check.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (131257 => 131258)
--- trunk/Source/WebCore/ChangeLog 2012-10-13 13:20:06 UTC (rev 131257)
+++ trunk/Source/WebCore/ChangeLog 2012-10-13 16:46:10 UTC (rev 131258)
@@ -1,3 +1,24 @@
+2012-10-12 Geoffrey Garen <[email protected]>
+
+ I pity da foo' who's converting numbers to strings
+ https://bugs.webkit.org/show_bug.cgi?id=99197
+
+ Reviewed by Gavin Barraclough.
+
+ 40% speedup on PerformanceTests/Dromaeo/dom-traverse.html. Probably speeds
+ some other things up too.
+
+ Credit to Eric Seidel for spotting this.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateImplementation): getOwnPropertySlotByIndex doesn't need to prefer
+ string lookup in the static table because our static tables don't contain
+ properties that are numbers.
+
+ I believe this is low-hanging fruit left behind by Phil's
+ getOwnPropertySlotByIndex optimization, but it's also possible that this was a
+ regression at some point. I didn't check.
+
2012-10-13 Adam Barth <[email protected]>
Remove dead code in Node.idl
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (131257 => 131258)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2012-10-13 13:20:06 UTC (rev 131257)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2012-10-13 16:46:10 UTC (rev 131258)
@@ -1768,10 +1768,8 @@
push(@implContent, " ${className}* thisObject = jsCast<${className}*>(cell);\n");
push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);\n");
- # This attempts to sink the somewhat expensive int-to-string conversion that happens when we create PropertyName
- # to the point where we actually need it. In particular, when we generate this method for classes that can
- # attempt their indexed getter first, we try to ensure that if that getter succeeds then we don't pay for the
- # creation of the PropertyName.
+ # Sink the int-to-string conversion that happens when we create a PropertyName
+ # to the point where we actually need it.
my $generatedPropertyName = 0;
my $propertyNameGeneration = sub {
if ($generatedPropertyName) {
@@ -1781,22 +1779,6 @@
$generatedPropertyName = 1;
};
- my $manualLookupGetterGeneration = sub {
- my $requiresManualLookup = $dataNode->extendedAttributes->{"IndexedGetter"} || $dataNode->extendedAttributes->{"NamedGetter"};
- if ($requiresManualLookup) {
- push(@implContent, " const HashEntry* entry = ${className}Table.entry(exec, propertyName);\n");
- push(@implContent, " if (entry) {\n");
- push(@implContent, " slot.setCustom(thisObject, entry->propertyGetter());\n");
- push(@implContent, " return true;\n");
- push(@implContent, " }\n");
- }
- };
-
- if ($dataNode->extendedAttributes->{"NamedGetter"} && !$dataNode->extendedAttributes->{"CustomNamedGetter"}) {
- &$propertyNameGeneration();
- &$manualLookupGetterGeneration();
- }
-
if ($dataNode->extendedAttributes->{"IndexedGetter"} || $dataNode->extendedAttributes->{"NumericIndexedGetter"}) {
if (IndexGetterReturnsStrings($implClassName)) {
push(@implContent, " if (index <= MAX_ARRAY_INDEX) {\n");
@@ -1820,11 +1802,6 @@
push(@implContent, " }\n");
$implIncludes{"wtf/text/AtomicString.h"} = 1;
}
-
- if ($dataNode->extendedAttributes->{"CustomNamedGetter"}) {
- &$propertyNameGeneration();
- &$manualLookupGetterGeneration();
- }
if ($dataNode->extendedAttributes->{"JSCustomGetOwnPropertySlotAndDescriptor"}) {
&$propertyNameGeneration();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes