https://bugs.webkit.org/show_bug.cgi?id=148469
Patch by Sukolsak Sakshuwong <sukolsak@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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188972
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-08-26 Sukolsak Sakshuwong <sukolsak@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 <bburg@apple.com>
Web Inspector: no need to allocate protocolErrors array for every dispatched backend command
}
#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);
void unlinkIncomingCalls();
#if ENABLE(JIT)
- void unlinkCalls();
-
void linkIncomingCall(ExecState* callerFrame, CallLinkInfo*);
void linkIncomingPolymorphicCall(ExecState* callerFrame, PolymorphicCallNode*);
#endif // ENABLE(JIT)
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;
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);
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)
bool* addressOfDidTryToEnterInLoop() { return &m_didTryToEnterInLoop; }
- void unlinkCalls();
-
CodeFeatures features() const { return m_features; }
DECLARE_INFO;
DECLARE_INFO;
- void unlinkCalls();
-
void clearCode();
ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false, false, ConstructorKind::None, false); }
}
DECLARE_INFO;
-
- void unlinkCalls();
void clearCode();
}
DECLARE_INFO;
-
- void unlinkCalls();
void clearCode();
}
}
-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