Structure::get should instantiate DeferGC only when materializing property map
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jun 2014 20:15:30 +0000 (20:15 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jun 2014 20:15:30 +0000 (20:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=133727

Rubber-stamped by Andreas Kling.

Make materializePropertyMapIfNecessary always inline.

This is ~12% improvement on the microbenchmark attached in the bug.

* runtime/Structure.h:
(JSC::Structure::materializePropertyMapIfNecessary):
(JSC::Structure::materializePropertyMapIfNecessaryForPinning):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169822 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/Structure.h

index 4cb96709ad6eaca6327ffeb355e9cc754d453acd..a7f27fd3fe26636292599e6f09e8dc594902def6 100644 (file)
@@ -1,3 +1,18 @@
+2014-06-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Structure::get should instantiate DeferGC only when materializing property map
+        https://bugs.webkit.org/show_bug.cgi?id=133727
+
+        Rubber-stamped by Andreas Kling.
+
+        Make materializePropertyMapIfNecessary always inline.
+
+        This is ~12% improvement on the microbenchmark attached in the bug.
+
+        * runtime/Structure.h:
+        (JSC::Structure::materializePropertyMapIfNecessary):
+        (JSC::Structure::materializePropertyMapIfNecessaryForPinning):
+
 2014-06-11  Ryosuke Niwa  <rniwa@webkit.org>
 
         Structure::get should instantiate DeferGC only when materializing property map
index f1a2c2e4379a8d68d94a615cd5f29966bb417097..3c6097f9d3981ce90fab79e9e154a03a968d9361 100644 (file)
@@ -426,7 +426,7 @@ private:
     PropertyTable* copyPropertyTable(VM&, Structure* owner);
     PropertyTable* copyPropertyTableForPinning(VM&, Structure* owner);
     JS_EXPORT_PRIVATE void materializePropertyMap(VM&);
-    void materializePropertyMapIfNecessary(VM& vm, DeferGC&)
+    ALWAYS_INLINE void materializePropertyMapIfNecessary(VM& vm, DeferGC&)
     {
         ASSERT(!isCompilationThread());
         ASSERT(structure()->classInfo() == info());
@@ -434,7 +434,7 @@ private:
         if (!propertyTable() && previousID())
             materializePropertyMap(vm);
     }
-    void materializePropertyMapIfNecessary(VM& vm, PropertyTable*& table)
+    ALWAYS_INLINE void materializePropertyMapIfNecessary(VM& vm, PropertyTable*& table)
     {
         ASSERT(!isCompilationThread());
         ASSERT(structure()->classInfo() == info());