[JSC] Make visitChildren implementation more idiomatic
authorysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jul 2019 18:28:53 +0000 (18:28 +0000)
committerysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jul 2019 18:28:53 +0000 (18:28 +0000)
commitfde6f5142f91d835646c57af0d88e3f86796b62a
tree1deab4f4ba9ff3ac3c100dc614813950c6fafdec
parenta33d9505f914ea12918e393b013c930ee983fe96
[JSC] Make visitChildren implementation more idiomatic
https://bugs.webkit.org/show_bug.cgi?id=200121

Reviewed by Mark Lam.

This patch makes visitChildren implementations more idiomatic: cast, assert, and calling Base::visitChildren.
While this does not find interesting issues, it is still nice to have consistent implementations.
StructureChain::visitChildren missed Base::visitChildren, but it does not have much effect since StructureChain
is immortal cell.

* bytecode/ExecutableToCodeBlockEdge.cpp:
(JSC::ExecutableToCodeBlockEdge::visitChildren):
* runtime/AbstractModuleRecord.cpp:
(JSC::AbstractModuleRecord::visitChildren):
* runtime/FunctionRareData.cpp:
(JSC::FunctionRareData::visitChildren):
* runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::visitChildren):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::visitChildren):
* runtime/JSImmutableButterfly.cpp:
(JSC::JSImmutableButterfly::visitChildren):
* runtime/JSModuleEnvironment.cpp:
(JSC::JSModuleEnvironment::visitChildren):
* runtime/JSModuleRecord.cpp:
(JSC::JSModuleRecord::visitChildren):
* runtime/JSPropertyNameEnumerator.cpp:
(JSC::JSPropertyNameEnumerator::visitChildren):
* runtime/JSString.cpp:
(JSC::JSString::visitChildren):
* runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayValueMap::visitChildren):
* runtime/StructureChain.cpp:
(JSC::StructureChain::visitChildren):
* runtime/SymbolTable.cpp:
(JSC::SymbolTable::visitChildren):
* tools/JSDollarVM.cpp:
(JSC::Root::visitChildren):
(JSC::ImpureGetter::visitChildren):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::visitChildren):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/ExecutableToCodeBlockEdge.cpp
Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp
Source/JavaScriptCore/runtime/FunctionRareData.cpp
Source/JavaScriptCore/runtime/JSArrayBufferView.cpp
Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h
Source/JavaScriptCore/runtime/JSImmutableButterfly.cpp
Source/JavaScriptCore/runtime/JSModuleEnvironment.cpp
Source/JavaScriptCore/runtime/JSModuleRecord.cpp
Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.cpp
Source/JavaScriptCore/runtime/JSString.cpp
Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp
Source/JavaScriptCore/runtime/StructureChain.cpp
Source/JavaScriptCore/runtime/SymbolTable.cpp
Source/JavaScriptCore/tools/JSDollarVM.cpp
Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp