source: webkit/trunk/Source/JavaScriptCore/DerivedSources.make@ 174892

Last change on this file since 174892 was 174892, checked in by Joseph Pecoraro, 11 years ago

Web Inspector: Generate all Inspector domains together in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=137748

Reviewed by Brian Burg.

  • Source/PlatformEfl.cmake:

Source/JavaScriptCore:

  • inspector/protocol/ApplicationCache.json: Renamed from Source/WebCore/inspector/protocol/ApplicationCache.json.
  • inspector/protocol/CSS.json: Renamed from Source/WebCore/inspector/protocol/CSS.json.
  • inspector/protocol/DOM.json: Renamed from Source/WebCore/inspector/protocol/DOM.json.
  • inspector/protocol/DOMDebugger.json: Renamed from Source/WebCore/inspector/protocol/DOMDebugger.json.
  • inspector/protocol/DOMStorage.json: Renamed from Source/WebCore/inspector/protocol/DOMStorage.json.
  • inspector/protocol/Database.json: Renamed from Source/WebCore/inspector/protocol/Database.json.
  • inspector/protocol/IndexedDB.json: Renamed from Source/WebCore/inspector/protocol/IndexedDB.json.
  • inspector/protocol/LayerTree.json: Renamed from Source/WebCore/inspector/protocol/LayerTree.json.
  • inspector/protocol/Network.json: Renamed from Source/WebCore/inspector/protocol/Network.json.
  • inspector/protocol/Page.json: Renamed from Source/WebCore/inspector/protocol/Page.json.
  • inspector/protocol/Replay.json: Renamed from Source/WebCore/inspector/protocol/Replay.json.
  • inspector/protocol/Timeline.json: Renamed from Source/WebCore/inspector/protocol/Timeline.json.
  • inspector/protocol/Worker.json: Renamed from Source/WebCore/inspector/protocol/Worker.json.

Move all protocol files into this directory.

  • inspector/InspectorProtocolTypesBase.h: Renamed from Source/JavaScriptCore/inspector/InspectorProtocolTypes.h.

Renamed the base types file to not clash with the generated types file.

Update build phases for new JSON files and new filenames.

  • inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
  • inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
  • inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
  • inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
  • inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
  • inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-array-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:

Updated names of things now that prefixes are no longer needed.

  • inspector/ConsoleMessage.h:
  • inspector/ContentSearchUtilities.cpp:
  • inspector/ContentSearchUtilities.h:
  • inspector/InjectedScript.h:
  • inspector/InjectedScriptBase.h:
  • inspector/ScriptCallFrame.h:
  • inspector/ScriptCallStack.h:
  • inspector/agents/InspectorAgent.h:
  • inspector/agents/InspectorConsoleAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::breakpointActionTypeForString):

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorRuntimeAgent.h:
  • runtime/TypeProfiler.cpp:
  • runtime/TypeSet.cpp:

Update includes and update a few function names that are generated.

  • inspector/scripts/codegen/generate_protocol_types_header.py:

(ProtocolTypesHeaderGenerator.output_filename):
(ProtocolTypesHeaderGenerator.generate_output):
Include an export macro for type string constants defined in the implementation file.

  • inspector/scripts/codegen/generate_backend_commands.py:

(BackendCommandsGenerator.output_filename):

  • inspector/scripts/codegen/generate_backend_dispatcher_header.py:

(BackendDispatcherHeaderGenerator.output_filename):
(BackendDispatcherHeaderGenerator.generate_output):

  • inspector/scripts/codegen/generate_backend_dispatcher_implementation.py:

(BackendDispatcherImplementationGenerator.output_filename):
(BackendDispatcherImplementationGenerator.generate_output):
(BackendDispatcherImplementationGenerator._generate_async_dispatcher_class_for_domain):
(BackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):

  • inspector/scripts/codegen/generate_frontend_dispatcher_header.py:

(FrontendDispatcherHeaderGenerator.output_filename):
(FrontendDispatcherHeaderGenerator.generate_output):

  • inspector/scripts/codegen/generate_frontend_dispatcher_implementation.py:

(FrontendDispatcherImplementationGenerator.output_filename):
(FrontendDispatcherImplementationGenerator.generate_output):
(FrontendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_event):
(_generate_class_for_object_declaration):
(_generate_builder_setter_for_member):
(_generate_unchecked_setter_for_member):

  • inspector/scripts/codegen/generate_protocol_types_implementation.py:

(ProtocolTypesImplementationGenerator.output_filename):
(ProtocolTypesImplementationGenerator.generate_output):
(ProtocolTypesImplementationGenerator._generate_enum_mapping):

  • inspector/scripts/codegen/models.py:

(Framework.fromString):
(Frameworks):

  • inspector/scripts/generate-inspector-protocol-bindings.py:

Simplify generator now that prefixes are no longer needed. This updates
filenames, includes, and the list of supported directories.

Source/WebCore:

After moving the json files into JavaScriptCore update the includes,
and names of functions that were previously prefixed.

  • CMakeLists.txt:
  • DerivedSources.make:
  • ForwardingHeaders/inspector/InspectorBackendDispatchers.h: Added.
  • ForwardingHeaders/inspector/InspectorFrontendDispatchers.h: Added.
  • ForwardingHeaders/inspector/InspectorJSBackendDispatchers.h: Removed.
  • ForwardingHeaders/inspector/InspectorJSFrontendDispatchers.h: Removed.
  • ForwardingHeaders/inspector/InspectorJSProtocolTypes.h: Removed.
  • ForwardingHeaders/inspector/InspectorProtocolTypesBase.h: Added.
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.vcxproj/copyForwardingHeaders.cmd:
  • WebCore.xcodeproj/project.pbxproj:
  • inspector/CommandLineAPIHost.cpp:
  • inspector/InspectorApplicationCacheAgent.cpp:
  • inspector/InspectorApplicationCacheAgent.h:
  • inspector/InspectorCSSAgent.cpp:
  • inspector/InspectorCSSAgent.h:
  • inspector/InspectorController.cpp:
  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

  • 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/InspectorFrontendClientLocal.cpp:
  • inspector/InspectorIndexedDBAgent.cpp:
  • inspector/InspectorIndexedDBAgent.h:
  • inspector/InspectorLayerTreeAgent.cpp:
  • inspector/InspectorLayerTreeAgent.h:
  • inspector/InspectorPageAgent.cpp:
  • inspector/InspectorPageAgent.h:
  • inspector/InspectorReplayAgent.cpp:
  • inspector/InspectorReplayAgent.h:
  • inspector/InspectorResourceAgent.cpp:
  • inspector/InspectorResourceAgent.h:
  • inspector/InspectorStyleSheet.cpp:
  • inspector/InspectorStyleSheet.h:
  • inspector/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::addRecordToTimeline):

  • inspector/InspectorTimelineAgent.h:
  • inspector/InspectorWorkerAgent.cpp:
  • inspector/InspectorWorkerAgent.h:
  • inspector/PageRuntimeAgent.h:
  • inspector/TimelineRecordFactory.cpp:
  • inspector/WorkerInspectorController.cpp:

Source/WebInspectorUI:

Change the frontend to always load all agents, but only activate a subset
of the agents depending on the type of the backend.

  • UserInterface/Base/Main.js:

(WebInspector.loaded):

  • UserInterface/Protocol/InspectorBackend.js:

(InspectorBackendClass.prototype.activateDomains):
(InspectorBackendClass.prototype.activateAllDomains):
(InspectorBackendClass.prototype._agentForDomain):
(InspectorBackendClass.prototype._dispatchEvent):
(InspectorBackend.Agent):
(InspectorBackend.Agent.prototype.get active):
(InspectorBackend.Agent.prototype.activate):

  • UserInterface/Base/Test.js:

Only expose "window.FooAgent" or allow dispatches in the "Foo" domain
when that particular agent is activated. Currently we hardcode the list
of agents to activate for a debuggable type. This should be generated.

  • UserInterface/Protocol/LoadInspectorBackendCommands.js:

Now there should always be a single "InspectorBackendCommands.js" file to load.
We may want to change the RWI path to return a single file instead of an array.

  • Scripts/update-LegacyInspectorBackendCommands.rb:
  • UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Protocol/Legacy/6.0/InspectorWebBackendCommands.js.
  • UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Protocol/Legacy/7.0/InspectorWebBackendCommands.js.
  • UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Protocol/Legacy/8.0/InspectorWebBackendCommands.js.
  • UserInterface/Protocol/Legacy/8.0/InspectorJSBackendCommands.js: Removed.
  • Versions/Inspector-iOS-8.0.json: Renamed from Source/WebInspectorUI/Versions/InspectorWeb-iOS-8.0.json.
  • Versions/InspectorJS-iOS-8.0.json: Removed.

Update Legacy versions to output a single InspectorBackendCommands.js file.
Do a straightforward merge of the iOS 8 JS/Web inputs to a single json file.

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • Configurations/WebInspectorUIFramework.xcconfig:
  • Scripts/copy-user-interface-resources-dryrun.rb:
  • Scripts/copy-user-interface-resources.pl:
  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
  • WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
  • WebInspectorUI.vcxproj/build-webinspectorui.pl:

We no longer needed WebCore's Private Headers, so simplify build files
and update file names where appropriate.

Source/WebKit2:

  • PlatformGTK.cmake:
  • Property svn:eol-style set to native
File size: 8.4 KB
Line 
1# Copyright (C) 2006, 2007, 2008, 2009, 2011, 2013 Apple Inc. All rights reserved.
2#
3# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions
5# are met:
6#
7# 1. Redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer.
9# 2. Redistributions in binary form must reproduce the above copyright
10# notice, this list of conditions and the following disclaimer in the
11# documentation and/or other materials provided with the distribution.
12# 3. Neither the name of Apple Inc. ("Apple") nor the names of
13# its contributors may be used to endorse or promote products derived
14# from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
17# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
20# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
27VPATH = \
28 $(JavaScriptCore) \
29 $(JavaScriptCore)/parser \
30 $(JavaScriptCore)/runtime \
31 $(JavaScriptCore)/interpreter \
32 $(JavaScriptCore)/jit \
33 $(JavaScriptCore)/builtins \
34#
35
36.PHONY : all
37all : \
38 ArrayConstructor.lut.h \
39 ArrayPrototype.lut.h \
40 BooleanPrototype.lut.h \
41 DateConstructor.lut.h \
42 DatePrototype.lut.h \
43 ErrorPrototype.lut.h \
44 JSDataViewPrototype.lut.h \
45 JSONObject.lut.h \
46 JSGlobalObject.lut.h \
47 JSPromisePrototype.lut.h \
48 JSPromiseConstructor.lut.h \
49 KeywordLookup.h \
50 Lexer.lut.h \
51 NamePrototype.lut.h \
52 NumberConstructor.lut.h \
53 NumberPrototype.lut.h \
54 ObjectConstructor.lut.h \
55 RegExpConstructor.lut.h \
56 RegExpPrototype.lut.h \
57 RegExpJitTables.h \
58 RegExpObject.lut.h \
59 StringConstructor.lut.h \
60 udis86_itab.h \
61 Bytecodes.h \
62 InitBytecodes.asm \
63 JSCBuiltins \
64#
65
66# builtin functions
67.PHONY: JSCBuiltins
68
69# Windows has specific needs for specifying the path to its interpreters
70ifeq ($(OS),Windows_NT)
71 PYTHON = /usr/bin/python
72 PERL = /usr/bin/perl
73else
74 PYTHON = python
75 PERL = perl
76endif
77# --------
78
79JSCBuiltins: $(JavaScriptCore)/generate-js-builtins JSCBuiltins.h JSCBuiltins.cpp
80JSCBuiltins.h: $(JavaScriptCore)/generate-js-builtins $(JavaScriptCore)/builtins/*.js
81 $(PYTHON) $^ $@
82
83JSCBuiltins.cpp: JSCBuiltins.h
84
85# lookup tables for classes
86
87%.lut.h: create_hash_table %.cpp
88 $^ -i > $@
89Lexer.lut.h: create_hash_table Keywords.table
90 $^ > $@
91
92# character tables for Yarr
93
94RegExpJitTables.h: create_regex_tables
95 $(PYTHON) $^ > $@
96
97KeywordLookup.h: KeywordLookupGenerator.py Keywords.table
98 $(PYTHON) $^ > $@
99
100# udis86 instruction tables
101
102udis86_itab.h: $(JavaScriptCore)/disassembler/udis86/itab.py $(JavaScriptCore)/disassembler/udis86/optable.xml
103 (PYTHONPATH=$(JavaScriptCore)/disassembler/udis86 $(PYTHON) $(JavaScriptCore)/disassembler/udis86/itab.py $(JavaScriptCore)/disassembler/udis86/optable.xml || exit 1)
104
105# Bytecode files
106
107Bytecodes.h: $(JavaScriptCore)/generate-bytecode-files $(JavaScriptCore)/bytecode/BytecodeList.json
108 $(PYTHON) $(JavaScriptCore)/generate-bytecode-files --bytecodes_h Bytecodes.h $(JavaScriptCore)/bytecode/BytecodeList.json
109
110InitBytecodes.asm: $(JavaScriptCore)/generate-bytecode-files $(JavaScriptCore)/bytecode/BytecodeList.json
111 $(PYTHON) $(JavaScriptCore)/generate-bytecode-files --init_bytecodes_asm InitBytecodes.asm $(JavaScriptCore)/bytecode/BytecodeList.json
112
113# Inspector interfaces
114
115INSPECTOR_DOMAINS = \
116 $(JavaScriptCore)/inspector/protocol/ApplicationCache.json \
117 $(JavaScriptCore)/inspector/protocol/CSS.json \
118 $(JavaScriptCore)/inspector/protocol/Console.json \
119 $(JavaScriptCore)/inspector/protocol/DOM.json \
120 $(JavaScriptCore)/inspector/protocol/DOMDebugger.json \
121 $(JavaScriptCore)/inspector/protocol/DOMStorage.json \
122 $(JavaScriptCore)/inspector/protocol/Debugger.json \
123 $(JavaScriptCore)/inspector/protocol/GenericTypes.json \
124 $(JavaScriptCore)/inspector/protocol/InspectorDomain.json \
125 $(JavaScriptCore)/inspector/protocol/LayerTree.json \
126 $(JavaScriptCore)/inspector/protocol/Network.json \
127 $(JavaScriptCore)/inspector/protocol/Page.json \
128 $(JavaScriptCore)/inspector/protocol/Runtime.json \
129 $(JavaScriptCore)/inspector/protocol/Timeline.json \
130 $(JavaScriptCore)/inspector/protocol/Worker.json \
131#
132
133ifeq ($(findstring ENABLE_SQL_DATABASE,$(FEATURE_DEFINES)), ENABLE_SQL_DATABASE)
134 INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/Database.json
135endif
136
137ifeq ($(findstring ENABLE_INDEXED_DATABASE,$(FEATURE_DEFINES)), ENABLE_INDEXED_DATABASE)
138 INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/IndexedDB.json
139endif
140
141ifeq ($(findstring ENABLE_WEB_REPLAY,$(FEATURE_DEFINES)), ENABLE_WEB_REPLAY)
142 INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/Replay.json
143endif
144
145INSPECTOR_GENERATOR_SCRIPTS = \
146 $(JavaScriptCore)/inspector/scripts/codegen/__init__.py \
147 $(JavaScriptCore)/inspector/scripts/codegen/generate_backend_commands.py \
148 $(JavaScriptCore)/inspector/scripts/codegen/generate_backend_dispatcher_header.py \
149 $(JavaScriptCore)/inspector/scripts/codegen/generate_backend_dispatcher_implementation.py \
150 $(JavaScriptCore)/inspector/scripts/codegen/generate_frontend_dispatcher_header.py \
151 $(JavaScriptCore)/inspector/scripts/codegen/generate_frontend_dispatcher_implementation.py \
152 $(JavaScriptCore)/inspector/scripts/codegen/generate_protocol_types_header.py \
153 $(JavaScriptCore)/inspector/scripts/codegen/generate_protocol_types_implementation.py \
154 $(JavaScriptCore)/inspector/scripts/codegen/generator_templates.py \
155 $(JavaScriptCore)/inspector/scripts/codegen/generator.py \
156 $(JavaScriptCore)/inspector/scripts/codegen/models.py \
157 $(JavaScriptCore)/inspector/scripts/generate-combined-inspector-json.py \
158 $(JavaScriptCore)/inspector/scripts/generate-inspector-protocol-bindings.py \
159#
160
161all : \
162 Inspector.json \
163 InspectorFrontendDispatchers.h \
164 InjectedScriptSource.h \
165#
166
167# The combined JSON file depends on the actual set of domains and their file contents, so that
168# adding, modifying, or removing domains will trigger regeneration of inspector files.
169
170.PHONY: force
171EnabledInspectorDomains : force
172 echo '$(INSPECTOR_DOMAINS)' | cmp -s - $@ || echo '$(INSPECTOR_DOMAINS)' > $@
173
174Inspector.json : inspector/scripts/generate-combined-inspector-json.py $(INSPECTOR_DOMAINS) EnabledInspectorDomains
175 $(PYTHON) $(JavaScriptCore)/inspector/scripts/generate-combined-inspector-json.py $(INSPECTOR_DOMAINS) > ./Inspector.json
176
177# Inspector Backend Dispatchers, Frontend Dispatchers, Type Builders
178InspectorFrontendDispatchers.h : Inspector.json $(INSPECTOR_GENERATOR_SCRIPTS)
179 $(PYTHON) $(JavaScriptCore)/inspector/scripts/generate-inspector-protocol-bindings.py --framework JavaScriptCore --outputDir . ./Inspector.json
180
181InjectedScriptSource.h : inspector/InjectedScriptSource.js $(JavaScriptCore)/inspector/scripts/jsmin.py $(JavaScriptCore)/inspector/scripts/xxd.pl
182 echo "//# sourceURL=__WebInspectorInjectedScript__" > ./InjectedScriptSource.min.js
183 $(PYTHON) $(JavaScriptCore)/inspector/scripts/jsmin.py < $(JavaScriptCore)/inspector/InjectedScriptSource.js >> ./InjectedScriptSource.min.js
184 $(PERL) $(JavaScriptCore)/inspector/scripts/xxd.pl InjectedScriptSource_js ./InjectedScriptSource.min.js InjectedScriptSource.h
185 rm -f ./InjectedScriptSource.min.js
186
187# Web Replay inputs generator
188
189INPUT_GENERATOR_SCRIPTS = \
190 $(JavaScriptCore)/replay/scripts/CodeGeneratorReplayInputs.py \
191 $(JavaScriptCore)/replay/scripts/CodeGeneratorReplayInputsTemplates.py \
192#
193
194INPUT_GENERATOR_SPECIFICATIONS = \
195 $(JavaScriptCore)/replay/JSInputs.json \
196#
197
198all : JSReplayInputs.h
199
200JSReplayInputs.h : $(INPUT_GENERATOR_SPECIFICATIONS) $(INPUT_GENERATOR_SCRIPTS)
201 $(PYTHON) $(JavaScriptCore)/replay/scripts/CodeGeneratorReplayInputs.py --outputDir . --framework JavaScriptCore $(INPUT_GENERATOR_SPECIFICATIONS)
Note: See TracBrowser for help on using the repository browser.