Title: [188972] trunk/Source/_javascript_Core
Revision
188972
Author
commit-qu...@webkit.org
Date
2015-08-26 11:34:38 -0700 (Wed, 26 Aug 2015)

Log Message

Remove the unused *Executable::unlinkCalls() and CodeBlock::unlinkCalls()
https://bugs.webkit.org/show_bug.cgi?id=148469

Patch by Sukolsak Sakshuwong <sukol...@gmail.com> on 2015-08-26
Reviewed by Geoffrey Garen.

We use CodeBlock::unlinkIncomingCalls() to unlink calls.
(...)Executable::unlinkCalls() and CodeBlock::unlinkCalls() are no longer used.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::unlinkCalls): Deleted.
* bytecode/CodeBlock.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::unlinkCalls): Deleted.
(JSC::ProgramExecutable::unlinkCalls): Deleted.
(JSC::FunctionExecutable::unlinkCalls): Deleted.
* runtime/Executable.h:
(JSC::ScriptExecutable::unlinkCalls): Deleted.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (188971 => 188972)


--- trunk/Source/_javascript_Core/ChangeLog	2015-08-26 18:18:14 UTC (rev 188971)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-08-26 18:34:38 UTC (rev 188972)
@@ -1,3 +1,23 @@
+2015-08-26  Sukolsak Sakshuwong  <sukol...@gmail.com>
+
+        Remove the unused *Executable::unlinkCalls() and CodeBlock::unlinkCalls()
+        https://bugs.webkit.org/show_bug.cgi?id=148469
+
+        Reviewed by Geoffrey Garen.
+
+        We use CodeBlock::unlinkIncomingCalls() to unlink calls.
+        (...)Executable::unlinkCalls() and CodeBlock::unlinkCalls() are no longer used.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::unlinkCalls): Deleted.
+        * bytecode/CodeBlock.h:
+        * runtime/Executable.cpp:
+        (JSC::EvalExecutable::unlinkCalls): Deleted.
+        (JSC::ProgramExecutable::unlinkCalls): Deleted.
+        (JSC::FunctionExecutable::unlinkCalls): Deleted.
+        * runtime/Executable.h:
+        (JSC::ScriptExecutable::unlinkCalls): Deleted.
+
 2015-08-25  Brian Burg  <bb...@apple.com>
 
         Web Inspector: no need to allocate protocolErrors array for every dispatched backend command

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (188971 => 188972)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2015-08-26 18:18:14 UTC (rev 188971)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2015-08-26 18:34:38 UTC (rev 188972)
@@ -2973,27 +2973,6 @@
 }
 
 #if ENABLE(JIT)
-void CodeBlock::unlinkCalls()
-{
-    if (!!m_alternative)
-        m_alternative->unlinkCalls();
-    for (size_t i = 0; i < m_llintCallLinkInfos.size(); ++i) {
-        if (m_llintCallLinkInfos[i].isLinked())
-            m_llintCallLinkInfos[i].unlink();
-    }
-    if (m_callLinkInfos.isEmpty())
-        return;
-    if (!m_vm->canUseJIT())
-        return;
-    RepatchBuffer repatchBuffer(this);
-    for (auto iter = m_callLinkInfos.begin(); !!iter; ++iter) {
-        CallLinkInfo& info = **iter;
-        if (!info.isLinked())
-            continue;
-        info.unlink(repatchBuffer);
-    }
-}
-
 void CodeBlock::linkIncomingCall(ExecState* callerFrame, CallLinkInfo* incoming)
 {
     noticeIncomingCall(callerFrame);

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.h (188971 => 188972)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.h	2015-08-26 18:18:14 UTC (rev 188971)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.h	2015-08-26 18:34:38 UTC (rev 188972)
@@ -230,8 +230,6 @@
     void unlinkIncomingCalls();
 
 #if ENABLE(JIT)
-    void unlinkCalls();
-        
     void linkIncomingCall(ExecState* callerFrame, CallLinkInfo*);
     void linkIncomingPolymorphicCall(ExecState* callerFrame, PolymorphicCallNode*);
 #endif // ENABLE(JIT)

Modified: trunk/Source/_javascript_Core/runtime/Executable.cpp (188971 => 188972)


--- trunk/Source/_javascript_Core/runtime/Executable.cpp	2015-08-26 18:18:14 UTC (rev 188971)
+++ trunk/Source/_javascript_Core/runtime/Executable.cpp	2015-08-26 18:34:38 UTC (rev 188972)
@@ -442,16 +442,6 @@
     visitor.append(&thisObject->m_unlinkedEvalCodeBlock);
 }
 
-void EvalExecutable::unlinkCalls()
-{
-#if ENABLE(JIT)
-    if (!m_jitCodeForCall)
-        return;
-    RELEASE_ASSERT(m_evalCodeBlock);
-    m_evalCodeBlock->unlinkCalls();
-#endif
-}
-
 void EvalExecutable::clearCode()
 {
     m_evalCodeBlock = nullptr;
@@ -473,16 +463,6 @@
     return error.toErrorObject(lexicalGlobalObject, m_source);
 }
 
-void ProgramExecutable::unlinkCalls()
-{
-#if ENABLE(JIT)
-    if (!m_jitCodeForCall)
-        return;
-    RELEASE_ASSERT(m_programCodeBlock);
-    m_programCodeBlock->unlinkCalls();
-#endif
-}
-
 JSObject* ProgramExecutable::initializeGlobalProperties(VM& vm, CallFrame* callFrame, JSScope* scope)
 {
     RELEASE_ASSERT(scope);
@@ -569,20 +549,6 @@
     Base::clearCode();
 }
 
-void FunctionExecutable::unlinkCalls()
-{
-#if ENABLE(JIT)
-    if (!!m_jitCodeForCall) {
-        RELEASE_ASSERT(m_codeBlockForCall);
-        m_codeBlockForCall->unlinkCalls();
-    }
-    if (!!m_jitCodeForConstruct) {
-        RELEASE_ASSERT(m_codeBlockForConstruct);
-        m_codeBlockForConstruct->unlinkCalls();
-    }
-#endif
-}
-
 FunctionExecutable* FunctionExecutable::fromGlobalCode(
     const Identifier& name, ExecState& exec, const SourceCode& source, 
     JSObject*& exception, int overrideLineNumber)

Modified: trunk/Source/_javascript_Core/runtime/Executable.h (188971 => 188972)


--- trunk/Source/_javascript_Core/runtime/Executable.h	2015-08-26 18:18:14 UTC (rev 188971)
+++ trunk/Source/_javascript_Core/runtime/Executable.h	2015-08-26 18:34:38 UTC (rev 188972)
@@ -381,8 +381,6 @@
     
     bool* addressOfDidTryToEnterInLoop() { return &m_didTryToEnterInLoop; }
 
-    void unlinkCalls();
-        
     CodeFeatures features() const { return m_features; }
         
     DECLARE_INFO;
@@ -470,8 +468,6 @@
         
     DECLARE_INFO;
 
-    void unlinkCalls();
-
     void clearCode();
 
     ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false, false, ConstructorKind::None, false); }
@@ -525,8 +521,6 @@
     }
         
     DECLARE_INFO;
-        
-    void unlinkCalls();
 
     void clearCode();
 
@@ -656,8 +650,6 @@
     }
 
     DECLARE_INFO;
-        
-    void unlinkCalls();
 
     void clearCode();
     
@@ -694,20 +686,6 @@
     }
 }
 
-inline void ScriptExecutable::unlinkCalls()
-{
-    switch (type()) {
-    case EvalExecutableType:
-        return jsCast<EvalExecutable*>(this)->unlinkCalls();
-    case ProgramExecutableType:
-        return jsCast<ProgramExecutable*>(this)->unlinkCalls();
-    case FunctionExecutableType:
-        return jsCast<FunctionExecutable*>(this)->unlinkCalls();
-    default:
-        RELEASE_ASSERT_NOT_REACHED();
-    }
 }
 
-}
-
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to