2008-03-18 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Mar 2008 21:10:30 +0000 (21:10 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Mar 2008 21:10:30 +0000 (21:10 +0000)
        Reviewed by Oliver.

        - inline ActivationImp::init for 0.8% SunSpider speedup

        * kjs/Activation.h:
        (KJS::ActivationImp::init): Moved here from function.cpp
        * kjs/function.cpp:

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

JavaScriptCore/ChangeLog
JavaScriptCore/kjs/Activation.h
JavaScriptCore/kjs/function.cpp

index a5b470b0cd791768497ea285826b35a6bb16f4e0..aa2e4289ec0af204d916257c7ecf9ffb6c5c4351 100644 (file)
@@ -1,3 +1,13 @@
+2008-03-18  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Oliver.
+        
+        - inline ActivationImp::init for 0.8% SunSpider speedup
+
+        * kjs/Activation.h:
+        (KJS::ActivationImp::init): Moved here from function.cpp
+        * kjs/function.cpp:
+
 2008-03-18  Simon Hausmann  <hausmann@webkit.org>
 
         Fix the Qt build.
index f854e905342c3a83da2e49a329fe32ffe3d411ce..da238f7faefa4b41bb187d5f0d8cb898ad85302f 100644 (file)
@@ -27,6 +27,7 @@
 #include "ExecState.h"
 #include "JSVariableObject.h"
 #include "object.h"
+#include "function.h"
 
 namespace KJS {
 
@@ -81,6 +82,14 @@ namespace KJS {
         ActivationData* d() const { return static_cast<ActivationData*>(JSVariableObject::d); }
     };
 
+    inline void ActivationImp::init(ExecState* exec)
+    {
+        d()->exec = exec;
+        d()->function = exec->function();
+        d()->symbolTable = &exec->function()->body->symbolTable();
+        d()->argumentsObject = 0;
+    }
+
     const size_t activationStackNodeSize = 32;
 
     struct StackActivation {
index 38c79d52e0aab06835aec842e8f11ab209f1fad4..d7b596aba89efaf64feaa07c774c72957e9dc0b8 100644 (file)
@@ -354,14 +354,6 @@ ActivationImp::~ActivationImp()
         delete d();
 }
 
-void ActivationImp::init(ExecState* exec)
-{
-    d()->symbolTable = &exec->function()->body->symbolTable();
-    d()->exec = exec;
-    d()->function = exec->function();
-    d()->argumentsObject = 0;
-}
-
 JSValue* ActivationImp::argumentsGetter(ExecState* exec, JSObject*, const Identifier&, const PropertySlot& slot)
 {
   ActivationImp* thisObj = static_cast<ActivationImp*>(slot.slotBase());