Unreviewed, rolling out r164812.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Mar 2014 21:30:59 +0000 (21:30 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Mar 2014 21:30:59 +0000 (21:30 +0000)
http://trac.webkit.org/changeset/164812
https://bugs.webkit.org/show_bug.cgi?id=129699

it made things run slower (Requested by pizlo on #webkit).

* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* jsc.cpp:
(GlobalObject::finishCreation):
* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
(JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/interpreter/Interpreter.cpp
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/runtime/BatchedTransitionOptimizer.h

index 98be612..2714956 100644 (file)
@@ -1,3 +1,19 @@
+2014-03-04  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r164812.
+        http://trac.webkit.org/changeset/164812
+        https://bugs.webkit.org/show_bug.cgi?id=129699
+
+        it made things run slower (Requested by pizlo on #webkit).
+
+        * interpreter/Interpreter.cpp:
+        (JSC::Interpreter::execute):
+        * jsc.cpp:
+        (GlobalObject::finishCreation):
+        * runtime/BatchedTransitionOptimizer.h:
+        (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
+        (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
+
 2014-03-02  Filip Pizlo  <fpizlo@apple.com>
 
         GetMyArgumentByVal in FTL
index fc7a996..c219bcb 100644 (file)
@@ -1179,26 +1179,18 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSValue
         if (variableObject->next())
             variableObject->globalObject()->varInjectionWatchpoint()->fireAll();
 
-        {
-            SamplingRegion samplingRegion("variable puts");
-            
-            for (unsigned i = 0; i < numVariables; ++i) {
-                const Identifier& ident = codeBlock->variable(i);
-                if (!variableObject->hasProperty(callFrame, ident)) {
-                    PutPropertySlot slot(variableObject);
-                    variableObject->methodTable()->put(variableObject, callFrame, ident, jsUndefined(), slot);
-                }
+        for (unsigned i = 0; i < numVariables; ++i) {
+            const Identifier& ident = codeBlock->variable(i);
+            if (!variableObject->hasProperty(callFrame, ident)) {
+                PutPropertySlot slot(variableObject);
+                variableObject->methodTable()->put(variableObject, callFrame, ident, jsUndefined(), slot);
             }
         }
 
-        {
-            SamplingRegion samplingRegion("function puts");
-            
-            for (int i = 0; i < numFunctions; ++i) {
-                FunctionExecutable* function = codeBlock->functionDecl(i);
-                PutPropertySlot slot(variableObject);
-                variableObject->methodTable()->put(variableObject, callFrame, function->name(), JSFunction::create(vm, function, scope), slot);
-            }
+        for (int i = 0; i < numFunctions; ++i) {
+            FunctionExecutable* function = codeBlock->functionDecl(i);
+            PutPropertySlot slot(variableObject);
+            variableObject->methodTable()->put(variableObject, callFrame, function->name(), JSFunction::create(vm, function, scope), slot);
         }
     }
 
index 35081fe..68feb68 100644 (file)
@@ -25,7 +25,6 @@
 #include "APIShims.h"
 #include "ButterflyInlines.h"
 #include "BytecodeGenerator.h"
-#include "CodeCache.h"
 #include "Completion.h"
 #include "CopiedSpaceInlines.h"
 #include "ExceptionHelpers.h"
@@ -241,7 +240,6 @@ static EncodedJSValue JSC_HOST_CALL functionTransferArrayBuffer(ExecState*);
 static NO_RETURN_WITH_VALUE EncodedJSValue JSC_HOST_CALL functionQuit(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionFalse(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionEffectful42(ExecState*);
-static EncodedJSValue JSC_HOST_CALL functionClearCodeCache(ExecState*);
 
 #if ENABLE(SAMPLING_FLAGS)
 static EncodedJSValue JSC_HOST_CALL functionSetSamplingFlags(ExecState*);
@@ -379,7 +377,6 @@ protected:
         putDirectNativeFunction(vm, this, Identifier(&vm, "DFGTrue"), 0, functionFalse, DFGTrue, DontEnum | JSC::Function);
         
         addFunction(vm, "effectful42", functionEffectful42, 0);
-        addFunction(vm, "clearCodeCache", functionClearCodeCache, 0);
         
         JSArray* array = constructEmptyArray(globalExec(), 0);
         for (size_t i = 0; i < arguments.size(); ++i)
@@ -751,13 +748,6 @@ EncodedJSValue JSC_HOST_CALL functionEffectful42(ExecState*)
     return JSValue::encode(jsNumber(42));
 }
 
-EncodedJSValue JSC_HOST_CALL functionClearCodeCache(ExecState* exec)
-{
-    if (CodeCache* cache = exec->vm().codeCache())
-        cache->clear();
-    return JSValue::encode(jsUndefined());
-}
-
 // Use SEH for Release builds only to get rid of the crash report dialog
 // (luckily the same tests fail in Release and Debug builds so far). Need to
 // be in a separate main function because the jscmain function requires object
index 4b521b8..76def71 100644 (file)
@@ -1,5 +1,6 @@
+// -*- mode: c++; c-basic-offset: 4 -*-
 /*
- * Copyright (C) 2008, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -35,13 +36,13 @@ class BatchedTransitionOptimizer {
 public:
     BatchedTransitionOptimizer(VM& vm, JSObject* object)
         : m_vm(&vm)
-        , m_object(object->structure()->isDictionary() ? nullptr : object)
+        , m_object(object)
     {
     }
 
     ~BatchedTransitionOptimizer()
     {
-        if (m_object && m_object->structure()->isDictionary())
+        if (m_object->structure()->isDictionary())
             m_object->flattenDictionaryObject(*m_vm);
     }