Commit 8be4912d authored by joepeck@webkit.org's avatar joepeck@webkit.org

Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain

https://bugs.webkit.org/show_bug.cgi?id=125595

Reviewed by Timothy Hatcher.

* GNUmakefile.am:

Source/JavaScriptCore:

  - Move CodeGeneration scripts from WebCore into JavaScriptCore/inspector/scripts
  - For ports that build WebKit frameworks separately, export the scripts as PrivateHeaders
  - Update CodeGeneratorInspector.py in a few ways:
    - output dynamic filenames, so JavaScriptCore generates InspectorJSFoo.* and WebCore generates InspectorWebFoo.*
    - take in more then one protocol JSON file. The first contains domains to generate, the others are dependencies
      that are generated elsewhere that we can depend on for Types.
  - Add DerivedSources build step to generate the Inspector Interfaces

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.vcxproj/copy-files.cmd:
* JavaScriptCore.xcodeproj/project.pbxproj:
Add scripts and code generation.

* inspector/protocol/Runtime.json: Renamed from Source/WebCore/inspector/protocol/Runtime.json.
Move protocol file into JavaScriptCore so its types will be generated in JavaScriptCore.

* inspector/scripts/CodeGeneratorInspector.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspector.py.
Updates to the script as listed above.

* inspector/scripts/CodeGeneratorInspectorStrings.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspectorStrings.py.
* inspector/scripts/generate-combined-inspector-json.py: Renamed from Source/WebCore/inspector/Scripts/generate-combined-inspector-json.py.
Moved from WebCore into JavaScriptCore for code generation.

Source/WebCore:

  - CodeGeneration changed to output Frontend and Backend dispatchers
    in namespace Inspector. So update all the agent's appropriately.
  - Update Derived Sources code generation to use the Scripts that had
    moved to JavaScriptCore. Some ports just use JSC/inspector/scripts
    directly, but others have to use the Scripts exported by JSC
    in JavaScriptCore's PrivateHeaders.
  - Add ForwardingHeaders for the files generated in JavaScriptCore.
  - Update the names of Inspector DerivedSources files, since they
    were renamed to InspectorWeb*.

No new tests, this only moves code around. There are no functional changes.

* CMakeLists.txt:
* DerivedSources.make:
* ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Added.
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/build-generated-files.sh:
* WebCore.xcodeproj/project.pbxproj:
Remove files, rename files, update code generation.

* make-generated-sources.sh:
Update this standalone developer script to fill in the new InspectorScripts variable.

* inspector/ConsoleMessage.h:
* inspector/InjectedScriptHost.cpp:
* inspector/InspectorAgent.cpp:
* inspector/InspectorAgent.h:
* inspector/InspectorApplicationCacheAgent.cpp:
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.h:
* inspector/InspectorCanvasAgent.cpp:
* inspector/InspectorCanvasAgent.h:
* inspector/InspectorConsoleAgent.cpp:
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorController.cpp:
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseResource.cpp:
* inspector/InspectorDatabaseResource.h:
* inspector/InspectorDebuggerAgent.cpp:
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorFrontendClientLocal.cpp:
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorInputAgent.h:
* inspector/InspectorLayerTreeAgent.cpp:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorMemoryAgent.cpp:
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorTimelineAgent.cpp:
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
* inspector/InspectorWorkerAgent.h:
* inspector/PageRuntimeAgent.h:
* inspector/ScriptCallFrame.cpp:
* inspector/WorkerInspectorController.cpp:
* inspector/WorkerRuntimeAgent.h:
Updates header names and class namespace changes.

Source/WebInspectorUI:

* Scripts/copy-user-interface-resources.sh:
Copy all the different backend commands files.

* Scripts/update-InspectorBackendCommands.rb:
Update with respect to new script location and new file names.

* WebInspectorUI.xcodeproj/project.pbxproj:
Remove Inputs and Outputs of build phase, which were wrong.
Now this build phase always runs, and not by accident.

* UserInterface/InspectorJSBackendCommands.js: Added.
* UserInterface/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/InspectorBackendCommands.js.
* UserInterface/Legacy/6.0/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Legacy/6.0/InspectorBackendCommands.js.
* UserInterface/Legacy/7.0/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Legacy/7.0/InspectorBackendCommands.js.
* UserInterface/LoadInspectorBackendCommands.js:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

LayoutTests:

* http/tests/inspector-protocol/resources/InspectorTest.js:
(InspectorTest.importInspectorScripts):
Update for the new backend commands files.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 54fc7696
2013-12-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain
https://bugs.webkit.org/show_bug.cgi?id=125595
Reviewed by Timothy Hatcher.
* GNUmakefile.am:
2013-12-13 Zan Dobersek <zdobersek@igalia.com>
[GTK] Remove the -Wno-c++11-extensions compiler option for Clang builds
......
......@@ -41,6 +41,7 @@ GENSOURCES_WEBKITDOM := $(top_builddir)/DerivedSources/webkitdom
GENSOURCES_PLATFORM := $(top_builddir)/DerivedSources/Platform
GENPROGRAMS := $(top_builddir)/Programs
GENSOURCES_INSPECTOR := $(GENPROGRAMS)/resources/inspector
JavaScriptCore := $(srcdir)/Source/JavaScriptCore
WebCore := $(srcdir)/Source/WebCore
WebInspectorUI := $(srcdir)/Source/WebInspectorUI
WebKit := $(srcdir)/Source/WebKit/gtk
......
2013-12-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain
https://bugs.webkit.org/show_bug.cgi?id=125595
Reviewed by Timothy Hatcher.
* http/tests/inspector-protocol/resources/InspectorTest.js:
(InspectorTest.importInspectorScripts):
Update for the new backend commands files.
2013-12-13 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Adding RTCPeerConnectionErrorCallback
......@@ -178,7 +178,8 @@ InspectorTest.importInspectorScripts = function()
"InspectorBackend",
"InspectorFrontendAPI",
"InspectorFrontendHostStub",
"InspectorBackendCommands",
"InspectorJSBackendCommands",
"InspectorWebBackendCommands",
"URLUtilities",
"MessageDispatcher",
"Setting",
......
......@@ -652,6 +652,43 @@ add_custom_command(
VERBATIM)
ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h)
# Inspector Interfaces
set(JavaScriptCore_INSPECTOR_SCRIPTS_DIR "${JAVASCRIPTCORE_DIR}/inspector/scripts")
set(JavaScriptCore_INSPECTOR_DOMAINS
inspector/protocol/Runtime.json
)
add_custom_command(
OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJS.json
MAIN_DEPENDENCY ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/generate-combined-inspector-json.py
DEPENDS ${JavaScriptCore_INSPECTOR_DOMAINS}
COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/generate-combined-inspector-json.py ${JAVASCRIPTCORE_DIR}/inspector/protocol > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJS.json
VERBATIM)
# Inspector Backend Dispatchers, Frontend Dispatchers, Type Builders
add_custom_command(
OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSBackendDispatchers.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSBackendDispatchers.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSFrontendDispatchers.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSFrontendDispatchers.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.h
MAIN_DEPENDENCY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJS.json
DEPENDS ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/CodeGeneratorInspector.py ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/CodeGeneratorInspectorStrings.py
COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/CodeGeneratorInspector.py ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJS.json --output_h_dir "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}" --output_cpp_dir "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}" --output_js_dir "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}" --output_type JavaScript --write_always && mkdir -p ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector && cp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSBackendDispatchers.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSFrontendDispatchers.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector
VERBATIM)
list(APPEND JavaScriptCore_SOURCES
${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSBackendDispatchers.cpp
${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSFrontendDispatchers.cpp
${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.cpp
)
list(APPEND JavaScriptCore_HEADERS
${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSBackendDispatchers.h
${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSFrontendDispatchers.h
${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.h
)
if (WTF_CPU_ARM)
list(APPEND JavaScriptCore_SOURCES
assembler/ARMAssembler.cpp
......
2013-12-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain
https://bugs.webkit.org/show_bug.cgi?id=125595
Reviewed by Timothy Hatcher.
- Move CodeGeneration scripts from WebCore into JavaScriptCore/inspector/scripts
- For ports that build WebKit frameworks separately, export the scripts as PrivateHeaders
- Update CodeGeneratorInspector.py in a few ways:
- output dynamic filenames, so JavaScriptCore generates InspectorJSFoo.* and WebCore generates InspectorWebFoo.*
- take in more then one protocol JSON file. The first contains domains to generate, the others are dependencies
that are generated elsewhere that we can depend on for Types.
- Add DerivedSources build step to generate the Inspector Interfaces
* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.am:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.vcxproj/copy-files.cmd:
* JavaScriptCore.xcodeproj/project.pbxproj:
Add scripts and code generation.
* inspector/protocol/Runtime.json: Renamed from Source/WebCore/inspector/protocol/Runtime.json.
Move protocol file into JavaScriptCore so its types will be generated in JavaScriptCore.
* inspector/scripts/CodeGeneratorInspector.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspector.py.
Updates to the script as listed above.
* inspector/scripts/CodeGeneratorInspectorStrings.py: Renamed from Source/WebCore/inspector/CodeGeneratorInspectorStrings.py.
* inspector/scripts/generate-combined-inspector-json.py: Renamed from Source/WebCore/inspector/Scripts/generate-combined-inspector-json.py.
Moved from WebCore into JavaScriptCore for code generation.
2013-12-13 Peter Szanka <h868064@stud.u-szeged.hu>
Delete INTEL C compiler related code parts.
......
......@@ -5,13 +5,13 @@
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
# its contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
......@@ -79,3 +79,27 @@ KeywordLookup.h: KeywordLookupGenerator.py Keywords.table
udis86_itab.h: $(JavaScriptCore)/disassembler/udis86/itab.py $(JavaScriptCore)/disassembler/udis86/optable.xml
(PYTHONPATH=$(JavaScriptCore)/disassembler/udis86 python $(JavaScriptCore)/disassembler/udis86/itab.py $(JavaScriptCore)/disassembler/udis86/optable.xml || exit 1)
# Inspector interfaces
INSPECTOR_DOMAINS = \
$(JavaScriptCore)/inspector/protocol/Runtime.json \
#
INSPECTOR_GENERATOR_SCRIPTS = \
$(JavaScriptCore)/inspector/scripts/CodeGeneratorInspector.py \
$(JavaScriptCore)/inspector/scripts/CodeGeneratorInspectorStrings.py \
#
all : \
InspectorJS.json \
InspectorJSFrontendDispatchers.h \
#
InspectorJS.json : inspector/scripts/generate-combined-inspector-json.py $(INSPECTOR_DOMAINS)
python $(JavaScriptCore)/inspector/scripts/generate-combined-inspector-json.py $(JavaScriptCore)/inspector/protocol > ./InspectorJS.json
# Inspector Backend Dispatchers, Frontend Dispatchers, Type Builders
InspectorJSFrontendDispatchers.h : InspectorJS.json $(INSPECTOR_GENERATOR_SCRIPTS)
python $(JavaScriptCore)/inspector/scripts/CodeGeneratorInspector.py ./InspectorJS.json --output_h_dir . --output_cpp_dir . --output_js_dir . --output_type JavaScript
......@@ -215,3 +215,27 @@ gir_DATA += JavaScriptCore-@WEBKITGTK_API_VERSION@.gir
typelibs_DATA += JavaScriptCore-@WEBKITGTK_API_VERSION@.typelib
CLEANFILES += JavaScriptCore-@WEBKITGTK_API_VERSION@.gir JavaScriptCore-@WEBKITGTK_API_VERSION@.typelib
endif
# Inspector Interfaces
INSPECTOR_SCRIPTS_DIR := $(JavaScriptCore)/inspector/scripts
INSPECTOR_DOMAINS := \
$(JavaScriptCore)/inspector/protocol/Runtime.json
DerivedSources/JavaScriptCore/InspectorJS.json: $(INSPECTOR_SCRIPTS_DIR)/generate-combined-inspector-json.py $(INSPECTOR_DOMAINS)
$(AM_V_GEN)$(PYTHON) $(INSPECTOR_SCRIPTS_DIR)/generate-combined-inspector-json.py $(JavaScriptCore)/inspector/protocol > $(GENSOURCES_JAVASCRIPTCORE)/InspectorJS.json
# Inspector Backend Dispatchers, Frontend Dispatchers, Type Builders
# Copy generated header files to DerivedSources/JavaScriptCore/inspector so that WebCore's ForwardingHeader style of #include <inspector/Foo.h> will work.
DerivedSources/JavaScriptCore/InspectorJSBackendDispatchers.cpp: DerivedSources/JavaScriptCore/InspectorJS.json $(INSPECTOR_SCRIPTS_DIR)/CodeGeneratorInspector.py $(INSPECTOR_SCRIPTS_DIR)/CodeGeneratorInspectorStrings.py
$(AM_V_GEN)$(PYTHON) $(INSPECTOR_SCRIPTS_DIR)/CodeGeneratorInspector.py $< --output_h_dir $(GENSOURCES_JAVASCRIPTCORE) --output_cpp_dir $(GENSOURCES_JAVASCRIPTCORE) --output_js_dir $(GENSOURCES_JAVASCRIPTCORE) --output_type JavaScript
mkdir -p DerivedSources/JavaScriptCore/inspector
cp DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.h DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.h DerivedSources/JavaScriptCore/InspectorJSBackendDispatchers.h DerivedSources/JavaScriptCore/inspector
DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.h: DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.cpp
DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.cpp: DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.h
DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.h: DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.cpp
DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.cpp: DerivedSources/JavaScriptCore/InspectorJSBackendCommands.js
DerivedSources/JavaScriptCore/InspectorJSBackendCommands.js: DerivedSources/JavaScriptCore/InspectorJSBackendDispatchers.h
DerivedSources/JavaScriptCore/InspectorJSBackendDispatchers.h: DerivedSources/JavaScriptCore/InspectorJSBackendDispatchers.cpp
......@@ -1186,7 +1186,13 @@ javascriptcore_sources += \
Source/JavaScriptCore/yarr/YarrPattern.cpp \
Source/JavaScriptCore/yarr/YarrPattern.h \
Source/JavaScriptCore/yarr/YarrSyntaxChecker.cpp \
Source/JavaScriptCore/yarr/YarrSyntaxChecker.h
Source/JavaScriptCore/yarr/YarrSyntaxChecker.h \
DerivedSources/JavaScriptCore/InspectorJSBackendDispatchers.cpp \
DerivedSources/JavaScriptCore/InspectorJSBackendDispatchers.h \
DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.cpp \
DerivedSources/JavaScriptCore/InspectorJSFrontendDispatchers.h \
DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.cpp \
DerivedSources/JavaScriptCore/InspectorJSTypeBuilders.h
llint_nosources += \
Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm \
......
......@@ -692,6 +692,9 @@
<ClCompile Include="..\yarr\YarrJIT.cpp" />
<ClCompile Include="..\yarr\YarrPattern.cpp" />
<ClCompile Include="..\yarr\YarrSyntaxChecker.cpp" />
<ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSBackendDispatchers.cpp" />
<ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSFrontendDispatchers.cpp" />
<ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSTypeBuilders.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\ArrayConstructor.lut.h" />
......@@ -701,6 +704,9 @@
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\DatePrototype.lut.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\ErrorPrototype.lut.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\HeaderDetection.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSBackendDispatchers.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSFrontendDispatchers.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSTypeBuilders.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSDataViewPrototype.lut.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSGlobalObject.lut.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSONObject.lut.h" />
......@@ -1368,4 +1374,4 @@
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
</Project>
\ No newline at end of file
</Project>
......@@ -1296,6 +1296,15 @@
<ClCompile Include="..\runtime\ArrayBufferNeuteringWatchpoint.cpp">
<Filter>runtime</Filter>
</ClCompile>
<ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSBackendDispatchers.cpp">
<Filter>Derived Sources</Filter>
</ClCompile>
<ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSFrontendDispatchers.cpp">
<Filter>Derived Sources</Filter>
</ClCompile>
<ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSTypeBuilders.cpp">
<Filter>Derived Sources</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\API\APICallbackFunction.h">
......@@ -2448,6 +2457,15 @@
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\HeaderDetection.h">
<Filter>Derived Sources</Filter>
</ClInclude>
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSBackendDispatchers.h">
<Filter>Derived Sources</Filter>
</ClInclude>
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSFrontendDispatchers.h">
<Filter>Derived Sources</Filter>
</ClInclude>
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorJSTypeBuilders.h">
<Filter>Derived Sources</Filter>
</ClInclude>
<ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSGlobalObject.lut.h">
<Filter>Derived Sources</Filter>
</ClInclude>
......@@ -3239,4 +3257,4 @@
<Filter>jit</Filter>
</MASM>
</ItemGroup>
</Project>
\ No newline at end of file
</Project>
......@@ -3,6 +3,7 @@
set PublicHeadersDirectory=%CONFIGURATIONBUILDDIR%\include\JavaScriptCore
set PrivateHeadersDirectory=%CONFIGURATIONBUILDDIR%\include\private\JavaScriptCore
set ResourcesDirectory=%CONFIGURATIONBUILDDIR%\bin%PlatformArchitecture%\JavaScriptCore.resources
set DerivedSourcesDirectory=%CONFIGURATIONBUILDDIR%\obj%PlatformArchitecture%\JavaScriptCore\DerivedSources
if "%1" EQU "clean" goto :clean
if "%1" EQU "rebuild" call :clean
......@@ -57,6 +58,19 @@ for %%d in (
xcopy /y /d ..\%%d\*.h "%PrivateHeadersDirectory%" >NUL
)
echo Copying Inspector scripts as if they were private headers...
for %%d in (
inspector\scripts
) do (
xcopy /y /d ..\%%d\*.py "%PrivateHeadersDirectory%" >NUL
)
echo Copying Inspector generated files as if they were private headers...
xcopy /y "%DerivedSourcesDirectory%\InspectorJS.json" "%PrivateHeadersDirectory%" >NUL
xcopy /y "%DerivedSourcesDirectory%\InspectorJSTypeBuilders.h" "%PrivateHeadersDirectory%" >NUL
xcopy /y "%DerivedSourcesDirectory%\InspectorJSBackendDispatchers.h" "%PrivateHeadersDirectory%" >NUL
xcopy /y "%DerivedSourcesDirectory%\InspectorJSFrontendDispatchers.h" "%PrivateHeadersDirectory%" >NUL
echo Copying resources...
mkdir "%ResourcesDirectory%" 2>NUL
xcopy /y /d JavaScriptCore.resources\* "%ResourcesDirectory%" >NUL
......
......@@ -31,9 +31,9 @@
# Its syntax is a Python syntax subset, suitable for manual parsing.
frontend_domain_class = (
"""class $domainClassName {
"""class ${exportMacro} ${domainClassName} {
public:
$domainClassName(InspectorFrontendChannel* inspectorFrontendChannel) : m_inspectorFrontendChannel(inspectorFrontendChannel) { }
${domainClassName}(InspectorFrontendChannel* inspectorFrontendChannel) : m_inspectorFrontendChannel(inspectorFrontendChannel) { }
${frontendDomainMethodDeclarations}private:
InspectorFrontendChannel* m_inspectorFrontendChannel;
};
......@@ -122,16 +122,16 @@ ${code} sendIfActive(jsonMessage, ErrorString());
""")
frontend_h = (
"""#ifndef InspectorFrontend_h
#define InspectorFrontend_h
"""#ifndef Inspector${outputFileNamePrefix}FrontendDispatchers_h
#define Inspector${outputFileNamePrefix}FrontendDispatchers_h
#include "InspectorWebTypeBuilders.h"
#include "InspectorForwarding.h"
#include "Inspector${outputFileNamePrefix}TypeBuilders.h"
#include <inspector/InspectorFrontendChannel.h>
#include <inspector/InspectorValues.h>
#include <wtf/PassRefPtr.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
namespace Inspector {
#if ENABLE(INSPECTOR)
......@@ -139,52 +139,48 @@ $domainClassList
#endif // ENABLE(INSPECTOR)
} // namespace WebCore
} // namespace Inspector
#endif // !defined(InspectorFrontend_h)
#endif // !defined(Inspector${outputFileNamePrefix}FrontendDispatchers_h)
""")
backend_h = (
"""#ifndef InspectorBackendDispatchers_h
#define InspectorBackendDispatchers_h
"""#ifndef Inspector${outputFileNamePrefix}BackendDispatchers_h
#define Inspector${outputFileNamePrefix}BackendDispatchers_h
#include "InspectorWebTypeBuilders.h"
#include "Inspector${outputFileNamePrefix}TypeBuilders.h"
#include <inspector/InspectorBackendDispatcher.h>
#include <wtf/PassRefPtr.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
namespace Inspector {
typedef String ErrorString;
$handlerInterfaces
$dispatcherInterfaces
} // namespace WebCore
} // namespace Inspector
#endif // !defined(InspectorBackendDispatchers_h)
#endif // !defined(Inspector${outputFileNamePrefix}BackendDispatchers_h)
""")
backend_cpp = (
"""
#include "config.h"
#include "Inspector${outputFileNamePrefix}BackendDispatchers.h"
#if ENABLE(INSPECTOR)
#include "InspectorBackendDispatchers.h"
#include "InspectorAgent.h"
#include "InspectorForwarding.h"
#include <inspector/InspectorFrontendChannel.h>
#include <inspector/InspectorValues.h>
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
using namespace Inspector;
namespace WebCore {
namespace Inspector {
$methods
} // namespace WebCore
} // namespace Inspector
#endif // ENABLE(INSPECTOR)
""")
......@@ -193,34 +189,31 @@ frontend_cpp = (
"""
#include "config.h"
#include "Inspector${outputFileNamePrefix}FrontendDispatchers.h"
#if ENABLE(INSPECTOR)
#include "InspectorFrontend.h"
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
using namespace Inspector;
namespace WebCore {
namespace Inspector {
$methods
} // namespace WebCore
} // namespace Inspector
#endif // ENABLE(INSPECTOR)
""")
typebuilder_h = (
"""
// FIXME: TYPE.
#ifndef InspectorWebTypeBuilders_h
#define InspectorWebTypeBuilders_h
#ifndef Inspector${outputFileNamePrefix}TypeBuilders_h
#define Inspector${outputFileNamePrefix}TypeBuilders_h
#if ENABLE(INSPECTOR)
#include <inspector/InspectorTypeBuilder.h>
${typeBuilderDependencies}
#include <wtf/Assertions.h>
#include <wtf/PassRefPtr.h>
......@@ -239,7 +232,7 @@ ${typeBuilders}
#endif // ENABLE(INSPECTOR)
#endif // !defined(InspectorWebTypeBuilders_h)
#endif // !defined(Inspector${outputFileNamePrefix}TypeBuilders_h)
""")
......@@ -247,13 +240,12 @@ typebuilder_cpp = (
"""
#include "config.h"
#include "Inspector${outputFileNamePrefix}TypeBuilders.h"
#if ENABLE(INSPECTOR)
#include "InspectorWebTypeBuilders.h"
#include <wtf/text/CString.h>
using namespace Inspector;
namespace Inspector {
namespace TypeBuilder {
......
......@@ -112,6 +112,7 @@ set(WebCore_INCLUDE_DIRECTORIES
"${JAVASCRIPTCORE_DIR}/runtime"
"${JAVASCRIPTCORE_DIR}/yarr"
"${WTF_DIR}"
"${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
"${DERIVED_SOURCES_WEBCORE_DIR}"
"${CMAKE_SOURCE_DIR}/Source"
"${CMAKE_BINARY_DIR}"
......@@ -750,6 +751,8 @@ list(APPEND WebCore_IDL_FILES
${WebCore_SVG_IDL_FILES}
)
set(WebCore_INSPECTOR_SCRIPTS_DIR "${JAVASCRIPTCORE_DIR}/inspector/scripts")
set(WebCore_INSPECTOR_DOMAINS
inspector/protocol/ApplicationCache.json
inspector/protocol/CSS.json
......@@ -770,7 +773,6 @@ set(WebCore_INSPECTOR_DOMAINS
inspector/protocol/Network.json
inspector/protocol/Page.json
inspector/protocol/Profiler.json
inspector/protocol/Runtime.json
inspector/protocol/Timeline.json
inspector/protocol/Worker.json
)
......@@ -3038,22 +3040,27 @@ add_custom_command(
VERBATIM)
# Generate Inspector.json
# Generate InspectorWeb.json
add_custom_command(
OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/Inspector.json
MAIN_DEPENDENCY ${WEBCORE_DIR}/inspector/Scripts/generate-combined-inspector-json.py
OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWeb.json
MAIN_DEPENDENCY ${WebCore_INSPECTOR_SCRIPTS_DIR}/generate-combined-inspector-json.py
DEPENDS ${WebCore_INSPECTOR_DOMAINS}
COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/inspector/Scripts/generate-combined-inspector-json.py ${WEBCORE_DIR}/inspector/protocol > ${DERIVED_SOURCES_WEBCORE_DIR}/Inspector.json
COMMAND ${PYTHON_EXECUTABLE} ${WebCore_INSPECTOR_SCRIPTS_DIR}/generate-combined-inspector-json.py ${WEBCORE_DIR}/inspector/protocol > ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWeb.json
VERBATIM)
# All Web Inspector generated files are created with this one call to CodeGeneratorInspector.pm
add_custom_command(
OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendDispatchers.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendDispatchers.h ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorFrontend.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorFrontend.h ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWebTypeBuilders.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWebTypeBuilders.h
MAIN_DEPENDENCY ${DERIVED_SOURCES_WEBCORE_DIR}/Inspector.json
DEPENDS ${WEBCORE_DIR}/inspector/CodeGeneratorInspector.py ${WEBCORE_DIR}/inspector/CodeGeneratorInspectorStrings.py
COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/inspector/CodeGeneratorInspector.py ${DERIVED_SOURCES_WEBCORE_DIR}/Inspector.json --output_h_dir "${DERIVED_SOURCES_WEBCORE_DIR}" --output_cpp_dir "${DERIVED_SOURCES_WEBCORE_DIR}" --output_js_dir "${DERIVED_SOURCES_WEBCORE_DIR}" --write_always
OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWebBackendDispatchers.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWebBackendDispatchers.h ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWebFrontendDispatchers.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWebFrontendDispatchers.h ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWebTypeBuilders.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWebTypeBuilders.h
MAIN_DEPENDENCY ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWeb.json
DEPENDS ${WebCore_INSPECTOR_SCRIPTS_DIR}/CodeGeneratorInspector.py ${WebCore_INSPECTOR_SCRIPTS_DIR}/CodeGeneratorInspectorStrings.py ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJS.json ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJSTypeBuilders.h
COMMAND ${PYTHON_EXECUTABLE} ${WebCore_INSPECTOR_SCRIPTS_DIR}/CodeGeneratorInspector.py ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWeb.json ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InspectorJS.json --output_h_dir "${DERIVED_SOURCES_WEBCORE_DIR}" --output_cpp_dir "${DERIVED_SOURCES_WEBCORE_DIR}" --output_js_dir "${DERIVED_SOURCES_WEBCORE_DIR}" --output_type Web --write_always
VERBATIM)
list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendDispatchers.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorFrontend.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWebTypeBuilders.cpp)
list(APPEND WebCore_SOURCES
${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWebBackendDispatchers.cpp
${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWebFrontendDispatchers.cpp
${DERIVED_SOURCES_WEBCORE_DIR}/InspectorWebTypeBuilders.cpp
)
# Generate InspectorOverlayPage.h
......
2013-12-13 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain
https://bugs.webkit.org/show_bug.cgi?id=125595
Reviewed by Timothy Hatcher.
- CodeGeneration changed to output Frontend and Backend dispatchers
in namespace Inspector. So update all the agent's appropriately.
- Update Derived Sources code generation to use the Scripts that had
moved to JavaScriptCore. Some ports just use JSC/inspector/scripts
directly, but others have to use the Scripts exported by JSC
in JavaScriptCore's PrivateHeaders.
- Add ForwardingHeaders for the files generated in JavaScriptCore.
- Update the names of Inspector DerivedSources files, since they
were renamed to InspectorWeb*.
No new tests, this only moves code around. There are no functional changes.
* CMakeLists.txt:
* DerivedSources.make:
* ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Added.
* ForwardingHeaders/inspector/InspectorJSTypeBuilders.h: Added.
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/build-generated-files.sh:
* WebCore.xcodeproj/project.pbxproj:
Remove files, rename files, update code generation.
* make-generated-sources.sh:
Update this standalone developer script to fill in the new InspectorScripts variable.
* inspector/ConsoleMessage.h:
* inspector/InjectedScriptHost.cpp:
* inspector/InspectorAgent.cpp:
* inspector/InspectorAgent.h:
* inspector/InspectorApplicationCacheAgent.cpp:
* inspector/InspectorApplicationCacheAgent.h:
* inspector/InspectorCSSAgent.h:
* inspector/InspectorCanvasAgent.cpp:
* inspector/InspectorCanvasAgent.h:
* inspector/InspectorConsoleAgent.cpp:
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorController.cpp:
* inspector/InspectorDOMAgent.cpp:
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.cpp:
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.cpp:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseResource.cpp:
* inspector/InspectorDatabaseResource.h:
* inspector/InspectorDebuggerAgent.cpp:
* inspector/InspectorDebuggerAgent.h:
* inspector/InspectorFrontendClientLocal.cpp:
* inspector/InspectorHeapProfilerAgent.h:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorIndexedDBAgent.h:
* inspector/InspectorInputAgent.h:
* inspector/InspectorLayerTreeAgent.cpp:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorMemoryAgent.cpp:
* inspector/InspectorMemoryAgent.h:
* inspector/InspectorPageAgent.cpp:
* inspector/InspectorPageAgent.h:
* inspector/InspectorProfilerAgent.cpp:
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorResourceAgent.cpp:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorTimelineAgent.cpp:
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.cpp:
* inspector/InspectorWorkerAgent.h:
* inspector/PageRuntimeAgent.h:
* inspector/ScriptCallFrame.cpp:
* inspector/WorkerInspectorController.cpp:
* inspector/WorkerRuntimeAgent.h:
Updates header names and class namespace changes.
2013-12-13 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Adding RTCPeerConnectionErrorCallback
......@@ -661,31 +661,6 @@ BINDING_IDLS = \
InternalSettingsGenerated.idl
#
INSPECTOR_DOMAINS = \
$(WebCore)/inspector/protocol/ApplicationCache.json \
$(WebCore)/inspector/protocol/CSS.json \
$(WebCore)/inspector/protocol/Canvas.json \
$(WebCore)/inspector/protocol/Console.json \
$(WebCore)/inspector/protocol/DOM.json \
$(WebCore)/inspector/protocol/DOMDebugger.json \
$(WebCore)/inspector/protocol/DOMStorage.json \
$(WebCore)/inspector/protocol/Database.json \
$(WebCore)/inspector/protocol/Debugger.json \
$(WebCore)/inspector/protocol/FileSystem.json \
$(WebCore)/inspector/protocol/HeapProfiler.json \
$(WebCore)/inspector/protocol/IndexedDB.json \
$(WebCore)/inspector/protocol/Input.json \
$(WebCore)/inspector/protocol/InspectorDomain.json \
$(WebCore)/inspector/protocol/LayerTree.json \
$(WebCore)/inspector/protocol/Memory.json \
$(WebCore)/inspector/protocol/Network.json \
$(WebCore)/inspector/protocol/Page.json \
$(WebCore)/inspector/protocol/Profiler.json \
$(WebCore)/inspector/protocol/Runtime.json \
$(WebCore)/inspector/protocol/Timeline.json \
$(WebCore)/inspector/protocol/Worker.json
#
.PHONY : all
DOM_CLASSES=$(basename $(notdir $(BINDING_IDLS)))
......@@ -1093,17 +1068,44 @@ JS%.h : %.idl $(JS_BINDINGS_SCRIPTS) $(IDL_ATTRIBUTES_FILE) $(WINDOW_CONSTRUCTOR
# Inspector interfaces generator
all : Inspector.json
INSPECTOR_DOMAINS = \
$(WebCore)/inspector/protocol/ApplicationCache.json \
$(WebCore)/inspector/protocol/CSS.json \
$(WebCore)/inspector/protocol/Canvas.json \
$(WebCore)/inspector/protocol/Console.json \
$(WebCore)/inspector/protocol/DOM.json \
$(WebCore)/inspector/protocol/DOMDebugger.json \
$(WebCore)/inspector/protocol/DOMStorage.json \
$(WebCore)/inspector/protocol/Database.json \
$(WebCore)/inspector/protocol/Debugger.json \
$(WebCore)/inspector/protocol/FileSystem.json \
$(WebCore)/inspector/protocol/HeapProfiler.json \
$(WebCore)/inspector/protocol/IndexedDB.json \
$(WebCore)/inspector/protocol/Input.json \