Remove JSDollarVMPrototype.
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Nov 2017 21:16:24 +0000 (21:16 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Nov 2017 21:16:24 +0000 (21:16 +0000)
commit4b528fd14d82d273d4279fa301493a48e0e5232e
tree14b6dbc9813be467ac8269bf34252d0e63c53402
parentb9ddca080b7593aea2e119cd5b9cde914b5be0a0
Remove JSDollarVMPrototype.
https://bugs.webkit.org/show_bug.cgi?id=179685

Reviewed by Saam Barati.

1. Move the JSDollarVMPrototype C++ utility functions into VMInspector.cpp.

   This allows us to call these functions during lldb debugging sessions using
   VMInspector::foo() instead of JSDollarVMPrototype::foo().  It makes sense that
   VMInspector provides VM debugging utility methods.  It doesn't make sense to
   have a JSDollarVMPrototype object provide these methods.

   Plus, it's shorter to type VMInspector than JSDollarVMPrototype.

2. Move the JSDollarVMPrototype JS functions into JSDollarVM.cpp.

   JSDollarVM is a special object used only for debugging purposes.  There's no
   gain in requiring its methods to be stored in a prototype object other than to
   conform to typical JS convention.  We can remove this complexity.

* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* tools/JSDollarVM.cpp:
(JSC::JSDollarVM::addFunction):
(JSC::functionCrash):
(JSC::functionDFGTrue):
(JSC::CallerFrameJITTypeFunctor::CallerFrameJITTypeFunctor):
(JSC::CallerFrameJITTypeFunctor::operator() const):
(JSC::CallerFrameJITTypeFunctor::jitType):
(JSC::functionLLintTrue):
(JSC::functionJITTrue):
(JSC::functionGC):
(JSC::functionEdenGC):
(JSC::functionCodeBlockForFrame):
(JSC::codeBlockFromArg):
(JSC::functionCodeBlockFor):
(JSC::functionPrintSourceFor):
(JSC::functionPrintBytecodeFor):
(JSC::functionPrint):
(JSC::functionPrintCallFrame):
(JSC::functionPrintStack):
(JSC::functionValue):
(JSC::functionGetPID):
(JSC::JSDollarVM::finishCreation):
* tools/JSDollarVM.h:
(JSC::JSDollarVM::create):
* tools/JSDollarVMPrototype.cpp: Removed.
* tools/JSDollarVMPrototype.h: Removed.
* tools/VMInspector.cpp:
(JSC::VMInspector::currentThreadOwnsJSLock):
(JSC::ensureCurrentThreadOwnsJSLock):
(JSC::VMInspector::gc):
(JSC::VMInspector::edenGC):
(JSC::VMInspector::isInHeap):
(JSC::CellAddressCheckFunctor::CellAddressCheckFunctor):
(JSC::CellAddressCheckFunctor::operator() const):
(JSC::VMInspector::isValidCell):
(JSC::VMInspector::isValidCodeBlock):
(JSC::VMInspector::codeBlockForFrame):
(JSC::PrintFrameFunctor::PrintFrameFunctor):
(JSC::PrintFrameFunctor::operator() const):
(JSC::VMInspector::printCallFrame):
(JSC::VMInspector::printStack):
(JSC::VMInspector::printValue):
* tools/VMInspector.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/Sources.txt
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/tools/JSDollarVM.cpp
Source/JavaScriptCore/tools/JSDollarVM.h
Source/JavaScriptCore/tools/JSDollarVMPrototype.cpp [deleted file]
Source/JavaScriptCore/tools/JSDollarVMPrototype.h [deleted file]
Source/JavaScriptCore/tools/VMInspector.cpp
Source/JavaScriptCore/tools/VMInspector.h