[JSC] Move slowDownAndWasteMemory function to JSArrayBufferView
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2018 17:50:12 +0000 (17:50 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2018 17:50:12 +0000 (17:50 +0000)
commit7feee9991774d06d4e6037c93822946d00dc833a
tree1145058545ddf25441812c429ed907c0681c7467
parent3cfc5eff211bbe15e59cf017bc3184e5aecbaddc
[JSC] Move slowDownAndWasteMemory function to JSArrayBufferView
https://bugs.webkit.org/show_bug.cgi?id=187290

Reviewed by Saam Barati.

slowDownAndWasteMemory is just overridden by typed arrays. Since they are limited,
we do not need to add this function to MethodTable: just dispatching it in JSArrayBufferView
is fine. And slowDownAndWasteMemory only requires the sizeof(element), which can be
easily calculated from JSType.
This patch removes slowDownAndWasteMemory from MethodTable, and moves it to JSArrayBufferView.

* runtime/ClassInfo.h:
* runtime/JSArrayBufferView.cpp:
(JSC::elementSize):
(JSC::JSArrayBufferView::slowDownAndWasteMemory):
* runtime/JSArrayBufferView.h:
* runtime/JSArrayBufferViewInlines.h:
(JSC::JSArrayBufferView::possiblySharedBuffer):
* runtime/JSCell.cpp:
(JSC::JSCell::slowDownAndWasteMemory): Deleted.
* runtime/JSCell.h:
* runtime/JSDataView.cpp:
(JSC::JSDataView::slowDownAndWasteMemory): Deleted.
* runtime/JSDataView.h:
* runtime/JSGenericTypedArrayView.h:
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::slowDownAndWasteMemory): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ClassInfo.h
Source/JavaScriptCore/runtime/JSArrayBufferView.cpp
Source/JavaScriptCore/runtime/JSArrayBufferView.h
Source/JavaScriptCore/runtime/JSArrayBufferViewInlines.h
Source/JavaScriptCore/runtime/JSCell.cpp
Source/JavaScriptCore/runtime/JSCell.h
Source/JavaScriptCore/runtime/JSDataView.cpp
Source/JavaScriptCore/runtime/JSDataView.h
Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h
Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h