Title: [164927] trunk/Source/_javascript_Core
Revision
164927
Author
[email protected]
Date
2014-03-01 15:05:02 -0800 (Sat, 01 Mar 2014)

Log Message

JSCell::fastGetOwnProperty() should get the Structure more efficiently.
<https://webkit.org/b/129560>

Now that structure() is nontrivial and we have a faster structure(VM&),
make use of that in fastGetOwnProperty() since we already have VM.

Reviewed by Sam Weinig.

* runtime/JSCellInlines.h:
(JSC::JSCell::fastGetOwnProperty):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (164926 => 164927)


--- trunk/Source/_javascript_Core/ChangeLog	2014-03-01 22:27:40 UTC (rev 164926)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-03-01 23:05:02 UTC (rev 164927)
@@ -1,5 +1,18 @@
 2014-03-01  Andreas Kling  <[email protected]>
 
+        JSCell::fastGetOwnProperty() should get the Structure more efficiently.
+        <https://webkit.org/b/129560>
+
+        Now that structure() is nontrivial and we have a faster structure(VM&),
+        make use of that in fastGetOwnProperty() since we already have VM.
+
+        Reviewed by Sam Weinig.
+
+        * runtime/JSCellInlines.h:
+        (JSC::JSCell::fastGetOwnProperty):
+
+2014-03-01  Andreas Kling  <[email protected]>
+
         Avoid going through ExecState for VM when we already have it (in some places.)
         <https://webkit.org/b/129554>
 

Modified: trunk/Source/_javascript_Core/runtime/JSCellInlines.h (164926 => 164927)


--- trunk/Source/_javascript_Core/runtime/JSCellInlines.h	2014-03-01 22:27:40 UTC (rev 164926)
+++ trunk/Source/_javascript_Core/runtime/JSCellInlines.h	2014-03-01 23:05:02 UTC (rev 164927)
@@ -216,10 +216,11 @@
 // case by checking whether the hash has yet been set for this string.
 ALWAYS_INLINE JSValue JSCell::fastGetOwnProperty(VM& vm, const String& name)
 {
-    if (!structure()->typeInfo().overridesGetOwnPropertySlot() && !structure()->hasGetterSetterProperties()) {
+    Structure& structure = *this->structure(vm);
+    if (!structure.typeInfo().overridesGetOwnPropertySlot() && !structure.hasGetterSetterProperties()) {
         PropertyOffset offset = name.impl()->hasHash()
-            ? structure()->get(vm, Identifier(&vm, name))
-            : structure()->get(vm, name);
+            ? structure.get(vm, Identifier(&vm, name))
+            : structure.get(vm, name);
         if (offset != invalidOffset)
             return asObject(this)->locationForOffset(offset)->get();
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to