Automate WebCore JS builtins generation and build system
authoryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Oct 2015 09:55:30 +0000 (09:55 +0000)
committeryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Oct 2015 09:55:30 +0000 (09:55 +0000)
commitf22754c5aca2c18bae1028d3eba0afa018c92387
tree31f8a8419739135ed111e1e4aa0eb6b7e296a043
parentffc6ba2e695be1c34c94dd14eb07fa2bd9ff29ea
Automate WebCore JS builtins generation and build system
https://bugs.webkit.org/show_bug.cgi?id=149751

Reviewed by Darin Adler.

Source/JavaScriptCore:

* generate-js-builtins: updating the part related to WebCore JS binding.

Source/WebCore:

Adding annotations to JS files to know whether they should be under a compilation flag and
whether they are JS internals or JS tied to WebIDL.
If a file is said as JS internals, all function names are exported automatically.
Added auto generation of WebCoreJSBuiltins.cpp
Added auto generation of JSBuiltinFunctions class inside WebCoreJSBuiltins that takes the role of
WebCoreJSClientData as wrapper for builtins.
Added auto generation of WebCoreJSBuiltinInternals.h which contain a wrapper around all private functions, used by
JSDOMWindowBase. The class is named JSBuiltinInternalFunctions.
Renamed WebCoreJSClientData to JSVMClientData.

The remaining manual part for private functions is the pairing between private identifiers and
the private JS functions within JSDOMWindowBase::finishCreation.

Covered by existing tests.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/streams/ByteLengthQueuingStrategy.js:
* Modules/streams/CountQueuingStrategy.js:
* Modules/streams/ReadableStream.js:
* Modules/streams/ReadableStreamInternals.js:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::DOMWrapperWorld):
(WebCore::DOMWrapperWorld::~DOMWrapperWorld):
(WebCore::normalWorld):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::JSDOMWindowBase):
(WebCore::JSDOMWindowBase::finishCreation):
(WebCore::JSDOMWindowBase::visitChildren):
(WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::getAllWorlds):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::transferArrayBuffers):
* bindings/js/WebCoreJSClientData.h:
(WebCore::JSClientData::JSClientData):
(WebCore::JSClientData::~JSClientData):
(WebCore::JSClientData::builtinFunctions):
(WebCore::initNormalWorldClientData):
(WebCore::WebCoreJSClientData::WebCoreJSClientData): Deleted.
(WebCore::WebCoreJSClientData::~WebCoreJSClientData): Deleted.
(WebCore::WebCoreJSClientData::readableStreamBuiltins): Deleted.
(WebCore::WebCoreJSClientData::readableStreamControllerBuiltins): Deleted.
(WebCore::WebCoreJSClientData::readableStreamInternalsBuiltins): Deleted.
(WebCore::WebCoreJSClientData::readableStreamReaderBuiltins): Deleted.
(WebCore::WebCoreJSClientData::byteLengthQueuingStrategyBuiltins): Deleted.
(WebCore::WebCoreJSClientData::countQueuingStrategyBuiltins): Deleted.
* generate-js-builtins-allinone: Added.
(retrieveGenerationParameters):
(retrieveFilesWithParameters):
(retrieveFilesWithParameters.FileInput):
(writeConditional):
(JSBuiltinFunctions):
(Private):
(JSBuiltinInternalFunctions):
(copytempfile):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/generate-js-builtins
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Modules/streams/ByteLengthQueuingStrategy.js
Source/WebCore/Modules/streams/CountQueuingStrategy.js
Source/WebCore/Modules/streams/ReadableStream.js
Source/WebCore/Modules/streams/ReadableStreamInternals.js
Source/WebCore/WebCore.order
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/DOMWrapperWorld.cpp
Source/WebCore/bindings/js/JSDOMWindowBase.cpp
Source/WebCore/bindings/js/JSDOMWindowBase.h
Source/WebCore/bindings/js/ScriptController.cpp
Source/WebCore/bindings/js/SerializedScriptValue.cpp
Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp [deleted file]
Source/WebCore/bindings/js/WebCoreJSClientData.h
Source/WebCore/generate-js-builtins-allinone [new file with mode: 0644]