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

Last change on this file since 253140 was 253140, checked in by Tadeu Zagallo, 5 years ago

[WebAssembly] Validate and generate bytecode in one pass
https://bugs.webkit.org/show_bug.cgi?id=204474

Reviewed by Saam Barati.

Currently, we traverse the WebAssembly code twice:

  • a first serial pass that validates all functions
  • a second concurrent pass that compiles all functions.

In this patch, we move the validation into the parser and update the LLIntPlan so that we no longer have
the first pass. Instead, we now validate concurrently at the same time we generate bytecode.

As a result, when we call WebAssembly.validate, we'll still generate bytecode for the module, but it will
be thrown away. If the module is constructed with new WebAssembly.Module, we'll also eagerly generate
bytecode, but in this case the bytecode is kept and shared across all instantiations of this module.

This is a 1.5x speedup when compiling the ZenGarden demo.

  • DerivedSources.make:
  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::ControlData::ControlData):
(JSC::Wasm::AirIRGenerator::ControlData::isIf):
(JSC::Wasm::AirIRGenerator::ControlData::isTopLevel):
(JSC::Wasm::AirIRGenerator::ControlData::branchTargetArity const):
(JSC::Wasm::AirIRGenerator::ControlData::branchTargetType const):
(JSC::Wasm::AirIRGenerator::emptyExpression):
(JSC::Wasm::AirIRGenerator::emitCallPatchpoint):
(JSC::Wasm::AirIRGenerator::tmpsForSignature):
(JSC::Wasm::AirIRGenerator::emitPatchpoint):
(JSC::Wasm::AirIRGenerator::AirIRGenerator):
(JSC::Wasm::AirIRGenerator::addRefIsNull):
(JSC::Wasm::AirIRGenerator::addTableGet):
(JSC::Wasm::AirIRGenerator::addTableSet):
(JSC::Wasm::AirIRGenerator::addTableGrow):
(JSC::Wasm::AirIRGenerator::addTableFill):
(JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::AirIRGenerator::addLoop):
(JSC::Wasm::AirIRGenerator::addBlock):
(JSC::Wasm::AirIRGenerator::addIf):
(JSC::Wasm::AirIRGenerator::addReturn):
(JSC::Wasm::AirIRGenerator::addEndToUnreachable):
(JSC::Wasm::AirIRGenerator::addCall):
(JSC::Wasm::AirIRGenerator::addCallIndirect):
(JSC::Wasm::AirIRGenerator::unify):
(JSC::Wasm::dumpExpressionStack):
(JSC::Wasm::AirIRGenerator::dump):
(JSC::Wasm::parseAndCompileAir):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncUF64>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncUF32>):

  • wasm/WasmAirIRGenerator.h:
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::ControlData::ControlData):
(JSC::Wasm::B3IRGenerator::ControlData::isIf):
(JSC::Wasm::B3IRGenerator::ControlData::isTopLevel):
(JSC::Wasm::B3IRGenerator::ControlData::signature const):
(JSC::Wasm::B3IRGenerator::ControlData::hasNonVoidresult const):
(JSC::Wasm::B3IRGenerator::ControlData::branchTargetArity const):
(JSC::Wasm::B3IRGenerator::ControlData::branchTargetType const):
(JSC::Wasm::B3IRGenerator::emptyExpression):
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::addRefIsNull):
(JSC::Wasm::B3IRGenerator::addTableGet):
(JSC::Wasm::B3IRGenerator::addTableSet):
(JSC::Wasm::B3IRGenerator::addTableGrow):
(JSC::Wasm::B3IRGenerator::addTableFill):
(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::B3IRGenerator::addLoop):
(JSC::Wasm::B3IRGenerator::addBlock):
(JSC::Wasm::B3IRGenerator::addIf):
(JSC::Wasm::B3IRGenerator::addReturn):
(JSC::Wasm::B3IRGenerator::endBlock):
(JSC::Wasm::B3IRGenerator::addEndToUnreachable):
(JSC::Wasm::dumpExpressionStack):
(JSC::Wasm::B3IRGenerator::dump):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmB3IRGenerator.h:
  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::BBQPlan):
(JSC::Wasm::BBQPlan::work):
(JSC::Wasm::BBQPlan::compileFunction):
(JSC::Wasm::BBQPlan::initializeCallees):
(JSC::Wasm::BBQPlan::didReceiveFunctionData):

  • wasm/WasmBBQPlan.h:
  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::create):
(JSC::Wasm::CodeBlock::CodeBlock):

  • wasm/WasmCodeBlock.h:

(JSC::Wasm::CodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace):

  • wasm/WasmEntryPlan.cpp:

(JSC::Wasm::EntryPlan::EntryPlan):
(JSC::Wasm::EntryPlan::parseAndValidateModule):
(JSC::Wasm::EntryPlan::prepare):
(JSC::Wasm::EntryPlan::compileFunctions):
(JSC::Wasm::EntryPlan::complete):

  • wasm/WasmEntryPlan.h:
  • wasm/WasmFunctionParser.h:

(JSC::Wasm::splitStack):
(JSC::Wasm::FunctionParser::TypedExpression::TypedExpression):
(JSC::Wasm::FunctionParser::TypedExpression::type const):
(JSC::Wasm::FunctionParser::TypedExpression::value const):
(JSC::Wasm::FunctionParser::TypedExpression::operator ExpressionType const):
(JSC::Wasm::FunctionParser::TypedExpression::operator-> const):
(JSC::Wasm::FunctionParser::controlStack):
(JSC::Wasm::FunctionParser::validationFail const):
(JSC::Wasm::FunctionParser<Context>::parse):
(JSC::Wasm::FunctionParser<Context>::binaryCase):
(JSC::Wasm::FunctionParser<Context>::unaryCase):
(JSC::Wasm::FunctionParser<Context>::load):
(JSC::Wasm::FunctionParser<Context>::store):
(JSC::Wasm::FunctionParser<Context>::checkBranchTarget):
(JSC::Wasm::FunctionParser<Context>::unify):
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::ControlType::topLevel):
(JSC::Wasm::LLIntGenerator::ControlType::loop):
(JSC::Wasm::LLIntGenerator::ControlType::isIf):
(JSC::Wasm::LLIntGenerator::ControlType::isTopLevel):
(JSC::Wasm::LLIntGenerator::ControlType::stackSize const):
(JSC::Wasm::LLIntGenerator::ControlType::signature const):
(JSC::Wasm::LLIntGenerator::ControlType::branchTargetArity const):
(JSC::Wasm::LLIntGenerator::ControlType::branchTargetType const):
(JSC::Wasm::LLIntGenerator::emptyExpression):
(JSC::Wasm::LLIntGenerator::dump):
(JSC::Wasm::LLIntGenerator::getDropKeepCount):
(JSC::Wasm::LLIntGenerator::materializeConstantsAndLocals):
(JSC::Wasm::LLIntGenerator::splitStack):
(JSC::Wasm::parseAndCompileBytecode):
(JSC::Wasm::LLIntGenerator::LLIntGenerator):
(JSC::Wasm::LLIntGenerator::callInformationForCaller):
(JSC::Wasm::LLIntGenerator::addLocal):
(JSC::Wasm::LLIntGenerator::setLocal):
(JSC::Wasm::LLIntGenerator::addLoop):
(JSC::Wasm::LLIntGenerator::addBlock):
(JSC::Wasm::LLIntGenerator::addIf):
(JSC::Wasm::LLIntGenerator::addEndToUnreachable):
(JSC::Wasm::LLIntGenerator::addCall):
(JSC::Wasm::LLIntGenerator::addCallIndirect):

  • wasm/WasmLLIntGenerator.h:
  • wasm/WasmLLIntPlan.cpp:

(JSC::Wasm::LLIntPlan::LLIntPlan):
(JSC::Wasm::LLIntPlan::compileFunction):
(JSC::Wasm::LLIntPlan::didCompleteCompilation):
(JSC::Wasm::LLIntPlan::work):
(JSC::Wasm::LLIntPlan::didReceiveFunctionData):

  • wasm/WasmLLIntPlan.h:
  • wasm/WasmModule.cpp:

(JSC::Wasm::Module::Module):
(JSC::Wasm::makeValidationResult):
(JSC::Wasm::makeValidationCallback):
(JSC::Wasm::Module::validateSync):
(JSC::Wasm::Module::validateAsync):
(JSC::Wasm::Module::getOrCreateCodeBlock):
(JSC::Wasm::Module::compileSync):
(JSC::Wasm::Module::compileAsync):

  • wasm/WasmModule.h:

(JSC::Wasm::Module::create):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::Plan):

  • wasm/WasmPlan.h:

(JSC::Wasm::Plan::dontFinalize):

  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::slow_path_wasm_throw_exception):

  • wasm/WasmThunks.cpp:

(JSC::Wasm::throwExceptionFromWasmThunkGenerator):

  • wasm/WasmThunks.h:
  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::ControlData::isIf):
(JSC::Wasm::Validate::ControlData::isTopLevel):
(JSC::Wasm::Validate::ControlData::blockType const):
(JSC::Wasm::Validate::ControlData::signature const):
(JSC::Wasm::Validate::ControlData::branchTargetArity const):
(JSC::Wasm::Validate::ControlData::branchTargetType const):
(JSC::Wasm::Validate::emptyExpression):
(JSC::Wasm::Validate::addConstant):
(JSC::Wasm::Validate::Validate):
(JSC::Wasm::Validate::addArguments):
(JSC::Wasm::Validate::addTableGet):
(JSC::Wasm::Validate::addTableSet):
(JSC::Wasm::Validate::addTableSize):
(JSC::Wasm::Validate::addTableGrow):
(JSC::Wasm::Validate::addTableFill):
(JSC::Wasm::Validate::addRefIsNull):
(JSC::Wasm::Validate::addRefFunc):
(JSC::Wasm::Validate::addLocal):
(JSC::Wasm::Validate::getLocal):
(JSC::Wasm::Validate::setLocal):
(JSC::Wasm::Validate::getGlobal):
(JSC::Wasm::Validate::setGlobal):
(JSC::Wasm::Validate::addBlock):
(JSC::Wasm::Validate::addLoop):
(JSC::Wasm::Validate::addSelect):
(JSC::Wasm::Validate::addIf):
(JSC::Wasm::Validate::addElse):
(JSC::Wasm::Validate::addElseToUnreachable):
(JSC::Wasm::Validate::addReturn):
(JSC::Wasm::Validate::addBranch):
(JSC::Wasm::Validate::addSwitch):
(JSC::Wasm::Validate::addGrowMemory):
(JSC::Wasm::Validate::addCurrentMemory):
(JSC::Wasm::Validate::endBlock):
(JSC::Wasm::Validate::addEndToUnreachable):
(JSC::Wasm::Validate::addCall):
(JSC::Wasm::Validate::addCallIndirect):
(JSC::Wasm::Validate::load):
(JSC::Wasm::Validate::store):
(JSC::Wasm::Validate::addOp):
(JSC::Wasm::dumpExpressionStack):
(JSC::Wasm::Validate::dump):
(JSC::Wasm::validateFunction):

  • wasm/WasmWorklist.cpp:

(JSC::Wasm::Worklist::enqueue):

  • wasm/generateWasmOpsHeader.py:

(cppType):
(cppMacro):
(opcodeMacroizer):
(opcodeWithTypesMacroizer):
(opcodeWithTypesMacroizer.modifier):
(memoryLoadMacroizer):
(memoryLoadMacroizer.modifier):
(memoryStoreMacroizer):
(memoryStoreMacroizer.modifier):

  • wasm/generateWasmValidateInlinesHeader.py: Removed.
  • wasm/js/JSWebAssembly.cpp:

(JSC::instantiate):
(JSC::webAssemblyValidateFunc):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • Property svn:eol-style set to native
File size: 16.9 KB
Line 
1# Copyright (C) 2006, 2007, 2008, 2009, 2011, 2013, 2015 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 $(JavaScriptCore)/wasm/js \
35#
36
37PYTHON = python
38PERL = perl
39RUBY = ruby
40
41JavaScriptCore_SCRIPTS_DIR = $(JavaScriptCore)/Scripts
42
43ifeq ($(OS),Windows_NT)
44 DELETE = cmd //C del
45else
46 DELETE = rm -f
47endif
48
49# --------
50
51.PHONY : all
52all : \
53 udis86_itab.h \
54 InjectedScriptSource.h \
55 IntlCanonicalizeLanguage.h \
56 JSCBuiltins.h \
57 Lexer.lut.h \
58 KeywordLookup.h \
59 RegExpJitTables.h \
60 UnicodePatternTables.h \
61 yarr/YarrCanonicalizeUnicode.cpp \
62 WasmOps.h \
63 WasmB3IRGeneratorInlines.h \
64#
65
66# JavaScript builtins.
67
68BUILTINS_GENERATOR_SCRIPTS = \
69 $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/__init__.py \
70 $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/wkbuiltins.py \
71 $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_generator.py \
72 $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_model.py \
73 $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_templates.py \
74 $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_generate_combined_header.py \
75 $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_generate_combined_implementation.py \
76 $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_generate_separate_header.py \
77 $(JavaScriptCore_SCRIPTS_DIR)/wkbuiltins/builtins_generate_separate_implementation.py \
78 ${JavaScriptCore_SCRIPTS_DIR}/wkbuiltins/builtins_generate_wrapper_header.py \
79 ${JavaScriptCore_SCRIPTS_DIR}/wkbuiltins/builtins_generate_wrapper_implementation.py \
80 ${JavaScriptCore_SCRIPTS_DIR}/wkbuiltins/builtins_generate_internals_wrapper_header.py \
81 ${JavaScriptCore_SCRIPTS_DIR}/wkbuiltins/builtins_generate_internals_wrapper_implementation.py \
82 $(JavaScriptCore_SCRIPTS_DIR)/generate-js-builtins.py \
83 $(JavaScriptCore_SCRIPTS_DIR)/lazywriter.py \
84#
85
86JavaScriptCore_BUILTINS_SOURCES = \
87 $(JavaScriptCore)/builtins/AsyncFromSyncIteratorPrototype.js \
88 $(JavaScriptCore)/builtins/ArrayConstructor.js \
89 $(JavaScriptCore)/builtins/ArrayIteratorPrototype.js \
90 $(JavaScriptCore)/builtins/ArrayPrototype.js \
91 $(JavaScriptCore)/builtins/AsyncIteratorPrototype.js \
92 $(JavaScriptCore)/builtins/AsyncFunctionPrototype.js \
93 $(JavaScriptCore)/builtins/AsyncGeneratorPrototype.js \
94 $(JavaScriptCore)/builtins/DatePrototype.js \
95 $(JavaScriptCore)/builtins/FunctionPrototype.js \
96 $(JavaScriptCore)/builtins/GeneratorPrototype.js \
97 $(JavaScriptCore)/builtins/GlobalObject.js \
98 $(JavaScriptCore)/builtins/GlobalOperations.js \
99 $(JavaScriptCore)/builtins/InspectorInstrumentationObject.js \
100 $(JavaScriptCore)/builtins/InternalPromiseConstructor.js \
101 $(JavaScriptCore)/builtins/IteratorHelpers.js \
102 $(JavaScriptCore)/builtins/IteratorPrototype.js \
103 $(JavaScriptCore)/builtins/MapIteratorPrototype.js \
104 $(JavaScriptCore)/builtins/MapPrototype.js \
105 $(JavaScriptCore)/builtins/ModuleLoader.js \
106 $(JavaScriptCore)/builtins/NumberConstructor.js \
107 $(JavaScriptCore)/builtins/ObjectConstructor.js \
108 $(JavaScriptCore)/builtins/PromiseConstructor.js \
109 $(JavaScriptCore)/builtins/PromiseOperations.js \
110 $(JavaScriptCore)/builtins/PromisePrototype.js \
111 $(JavaScriptCore)/builtins/ReflectObject.js \
112 $(JavaScriptCore)/builtins/RegExpPrototype.js \
113 ${JavaScriptCore}/builtins/RegExpStringIteratorPrototype.js \
114 $(JavaScriptCore)/builtins/SetIteratorPrototype.js \
115 $(JavaScriptCore)/builtins/SetPrototype.js \
116 $(JavaScriptCore)/builtins/StringConstructor.js \
117 $(JavaScriptCore)/builtins/StringIteratorPrototype.js \
118 $(JavaScriptCore)/builtins/StringPrototype.js \
119 $(JavaScriptCore)/builtins/TypedArrayConstructor.js \
120 $(JavaScriptCore)/builtins/TypedArrayPrototype.js \
121 $(JavaScriptCore)/builtins/WebAssembly.js \
122#
123
124# The combined output file depends on the contents of builtins and generator scripts, so
125# adding, modifying, or removing builtins or scripts will trigger regeneration of files.
126
127JavaScriptCore_BUILTINS_DEPENDENCIES_LIST : $(JavaScriptCore_SCRIPTS_DIR)/UpdateContents.py DerivedSources.make
128 $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/UpdateContents.py '$(JavaScriptCore_BUILTINS_SOURCES) $(BUILTINS_GENERATOR_SCRIPTS)' $@
129
130JSCBuiltins.h: $(BUILTINS_GENERATOR_SCRIPTS) $(JavaScriptCore_BUILTINS_SOURCES) JavaScriptCore_BUILTINS_DEPENDENCIES_LIST
131 $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/generate-js-builtins.py --combined --output-directory . --framework JavaScriptCore $(JavaScriptCore_BUILTINS_SOURCES)
132
133# Perfect hash lookup tables for JavaScript classes.
134
135OBJECT_LUT_HEADERS = \
136 AsyncFromSyncIteratorPrototype.lut.h \
137 ArrayConstructor.lut.h \
138 AsyncGeneratorPrototype.lut.h \
139 BigIntConstructor.lut.h \
140 BigIntPrototype.lut.h \
141 BooleanPrototype.lut.h \
142 DateConstructor.lut.h \
143 DatePrototype.lut.h \
144 ErrorPrototype.lut.h \
145 GeneratorPrototype.lut.h \
146 InspectorInstrumentationObject.lut.h \
147 IntlCollatorConstructor.lut.h \
148 IntlCollatorPrototype.lut.h \
149 IntlDateTimeFormatConstructor.lut.h \
150 IntlDateTimeFormatPrototype.lut.h \
151 IntlNumberFormatConstructor.lut.h \
152 IntlNumberFormatPrototype.lut.h \
153 IntlObject.lut.h \
154 IntlPluralRulesConstructor.lut.h \
155 IntlPluralRulesPrototype.lut.h \
156 JSDataViewPrototype.lut.h \
157 JSGlobalObject.lut.h \
158 JSInternalPromiseConstructor.lut.h \
159 JSModuleLoader.lut.h \
160 JSONObject.lut.h \
161 JSPromiseConstructor.lut.h \
162 JSPromisePrototype.lut.h \
163 JSWebAssembly.lut.h \
164 MapPrototype.lut.h \
165 NumberConstructor.lut.h \
166 NumberPrototype.lut.h \
167 ObjectConstructor.lut.h \
168 ReflectObject.lut.h \
169 RegExpConstructor.lut.h \
170 SetPrototype.lut.h \
171 StringConstructor.lut.h \
172 StringPrototype.lut.h \
173 SymbolConstructor.lut.h \
174 SymbolPrototype.lut.h \
175 WebAssemblyCompileErrorConstructor.lut.h \
176 WebAssemblyCompileErrorPrototype.lut.h \
177 WebAssemblyGlobalConstructor.lut.h \
178 WebAssemblyGlobalPrototype.lut.h \
179 WebAssemblyInstanceConstructor.lut.h \
180 WebAssemblyInstancePrototype.lut.h \
181 WebAssemblyLinkErrorConstructor.lut.h \
182 WebAssemblyLinkErrorPrototype.lut.h \
183 WebAssemblyMemoryConstructor.lut.h \
184 WebAssemblyMemoryPrototype.lut.h \
185 WebAssemblyModuleConstructor.lut.h \
186 WebAssemblyModulePrototype.lut.h \
187 WebAssemblyRuntimeErrorConstructor.lut.h \
188 WebAssemblyRuntimeErrorPrototype.lut.h \
189 WebAssemblyTableConstructor.lut.h \
190 WebAssemblyTablePrototype.lut.h \
191#
192
193$(OBJECT_LUT_HEADERS): %.lut.h : %.cpp $(JavaScriptCore)/create_hash_table
194 $(PERL) $(JavaScriptCore)/create_hash_table $< > $@
195
196Lexer.lut.h: Keywords.table $(JavaScriptCore)/create_hash_table
197 $(PERL) $(JavaScriptCore)/create_hash_table $< > $@
198
199# character tables for Yarr
200
201RegExpJitTables.h: yarr/create_regex_tables
202 $(PYTHON) $^ > $@
203
204KeywordLookup.h: KeywordLookupGenerator.py Keywords.table
205 $(PYTHON) $^ > $@
206
207# udis86 instruction tables
208
209udis86_itab.h: $(JavaScriptCore)/disassembler/udis86/ud_itab.py $(JavaScriptCore)/disassembler/udis86/optable.xml
210 $(PYTHON) $(JavaScriptCore)/disassembler/udis86/ud_itab.py $(JavaScriptCore)/disassembler/udis86/optable.xml .
211
212# Bytecode files
213
214BYTECODE_FILES = \
215 Bytecodes.h \
216 BytecodeIndices.h \
217 BytecodeStructs.h \
218 InitBytecodes.asm \
219 WasmLLIntGeneratorInlines.h \
220 InitWasm.asm \
221#
222BYTECODE_FILES_PATTERNS = $(subst .,%,$(BYTECODE_FILES))
223
224all : $(BYTECODE_FILES)
225
226$(BYTECODE_FILES_PATTERNS): $(wildcard $(JavaScriptCore)/generator/*.rb) $(JavaScriptCore)/bytecode/BytecodeList.rb $(JavaScriptCore)/wasm/wasm.json
227 $(RUBY) $(JavaScriptCore)/generator/main.rb $(JavaScriptCore)/bytecode/BytecodeList.rb \
228 --bytecode_structs_h BytecodeStructs.h \
229 --init_bytecodes_asm InitBytecodes.asm \
230 --bytecodes_h Bytecodes.h \
231 --bytecode_indices_h BytecodeIndices.h \
232 --wasm_json $(JavaScriptCore)/wasm/wasm.json \
233 --wasm_llint_generator_h WasmLLIntGeneratorInlines.h \
234 --init_wasm_llint InitWasm.asm \
235
236# Inspector interfaces
237
238INSPECTOR_DOMAINS := \
239 $(JavaScriptCore)/inspector/protocol/Animation.json \
240 $(JavaScriptCore)/inspector/protocol/ApplicationCache.json \
241 $(JavaScriptCore)/inspector/protocol/Audit.json \
242 $(JavaScriptCore)/inspector/protocol/CSS.json \
243 $(JavaScriptCore)/inspector/protocol/Canvas.json \
244 $(JavaScriptCore)/inspector/protocol/Console.json \
245 $(JavaScriptCore)/inspector/protocol/DOM.json \
246 $(JavaScriptCore)/inspector/protocol/DOMDebugger.json \
247 $(JavaScriptCore)/inspector/protocol/DOMStorage.json \
248 $(JavaScriptCore)/inspector/protocol/Database.json \
249 $(JavaScriptCore)/inspector/protocol/Debugger.json \
250 $(JavaScriptCore)/inspector/protocol/GenericTypes.json \
251 $(JavaScriptCore)/inspector/protocol/Heap.json \
252 $(JavaScriptCore)/inspector/protocol/Inspector.json \
253 $(JavaScriptCore)/inspector/protocol/LayerTree.json \
254 $(JavaScriptCore)/inspector/protocol/Network.json \
255 $(JavaScriptCore)/inspector/protocol/Page.json \
256 $(JavaScriptCore)/inspector/protocol/Recording.json \
257 $(JavaScriptCore)/inspector/protocol/Runtime.json \
258 $(JavaScriptCore)/inspector/protocol/ScriptProfiler.json \
259 $(JavaScriptCore)/inspector/protocol/Security.json \
260 $(JavaScriptCore)/inspector/protocol/Target.json \
261 $(JavaScriptCore)/inspector/protocol/Timeline.json \
262 $(JavaScriptCore)/inspector/protocol/Worker.json \
263#
264
265ifeq ($(findstring ENABLE_INDEXED_DATABASE,$(FEATURE_DEFINES)), ENABLE_INDEXED_DATABASE)
266 INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/IndexedDB.json
267endif
268
269ifeq ($(findstring ENABLE_RESOURCE_USAGE,$(FEATURE_DEFINES)), ENABLE_RESOURCE_USAGE)
270 INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/CPUProfiler.json
271 INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/Memory.json
272endif
273
274ifeq ($(findstring ENABLE_SERVICE_WORKER,$(FEATURE_DEFINES)), ENABLE_SERVICE_WORKER)
275 INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/ServiceWorker.json
276endif
277
278INSPECTOR_GENERATOR_SCRIPTS = \
279 $(JavaScriptCore)/inspector/scripts/codegen/__init__.py \
280 $(JavaScriptCore)/inspector/scripts/codegen/cpp_generator_templates.py \
281 $(JavaScriptCore)/inspector/scripts/codegen/cpp_generator.py \
282 $(JavaScriptCore)/inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py \
283 $(JavaScriptCore)/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py \
284 $(JavaScriptCore)/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py \
285 $(JavaScriptCore)/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py \
286 $(JavaScriptCore)/inspector/scripts/codegen/generate_cpp_protocol_types_header.py \
287 $(JavaScriptCore)/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py \
288 $(JavaScriptCore)/inspector/scripts/codegen/generate_js_backend_commands.py \
289 $(JavaScriptCore)/inspector/scripts/codegen/generator_templates.py \
290 $(JavaScriptCore)/inspector/scripts/codegen/generator.py \
291 $(JavaScriptCore)/inspector/scripts/codegen/models.py \
292 $(JavaScriptCore)/inspector/scripts/generate-inspector-protocol-bindings.py \
293 $(JavaScriptCore_SCRIPTS_DIR)/generate-combined-inspector-json.py \
294#
295
296# TODO: Is there some way to not hardcode this? Can we get it from
297# generate-inspector-protocol-bindings.py and ./CombinedDomains.json?
298INSPECTOR_DISPATCHER_FILES = \
299 inspector/InspectorAlternateBackendDispatchers.h \
300 inspector/InspectorBackendCommands.js \
301 inspector/InspectorBackendDispatchers.cpp \
302 inspector/InspectorBackendDispatchers.h \
303 inspector/InspectorFrontendDispatchers.cpp \
304 inspector/InspectorFrontendDispatchers.h \
305 inspector/InspectorProtocolObjects.cpp \
306 inspector/InspectorProtocolObjects.h \
307#
308INSPECTOR_DISPATCHER_FILES_PATTERNS = $(subst .,%,$(INSPECTOR_DISPATCHER_FILES))
309
310all : $(INSPECTOR_DISPATCHER_FILES)
311
312# The combined JSON file depends on the actual set of domains and their file contents, so that
313# adding, modifying, or removing domains will trigger regeneration of inspector files.
314
315.PHONY: force
316EnabledInspectorDomains : $(JavaScriptCore_SCRIPTS_DIR)/UpdateContents.py force
317 $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/UpdateContents.py '$(INSPECTOR_DOMAINS)' $@
318
319CombinedDomains.json : $(JavaScriptCore_SCRIPTS_DIR)/generate-combined-inspector-json.py $(INSPECTOR_DOMAINS) EnabledInspectorDomains
320 $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/generate-combined-inspector-json.py $(INSPECTOR_DOMAINS) > ./CombinedDomains.json
321
322# Inspector Backend Dispatchers, Frontend Dispatchers, Type Builders
323$(INSPECTOR_DISPATCHER_FILES_PATTERNS) : CombinedDomains.json $(INSPECTOR_GENERATOR_SCRIPTS)
324 $(PYTHON) $(JavaScriptCore)/inspector/scripts/generate-inspector-protocol-bindings.py --framework JavaScriptCore --outputDir inspector ./CombinedDomains.json
325
326InjectedScriptSource.h : inspector/InjectedScriptSource.js $(JavaScriptCore_SCRIPTS_DIR)/jsmin.py $(JavaScriptCore_SCRIPTS_DIR)/xxd.pl
327 echo "//# sourceURL=__InjectedScript_InjectedScriptSource.js" > ./InjectedScriptSource.min.js
328 $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/jsmin.py < $(JavaScriptCore)/inspector/InjectedScriptSource.js >> ./InjectedScriptSource.min.js
329 $(PERL) $(JavaScriptCore_SCRIPTS_DIR)/xxd.pl InjectedScriptSource_js ./InjectedScriptSource.min.js InjectedScriptSource.h
330 $(DELETE) InjectedScriptSource.min.js
331
332AIR_OPCODE_FILES = \
333 AirOpcode.h \
334 AirOpcodeUtils.h \
335 AirOpcodeGenerated.h \
336#
337AIR_OPCODE_FILES_PATTERNS = $(subst .,%,$(AIR_OPCODE_FILES))
338
339all : $(AIR_OPCODE_FILES)
340
341$(AIR_OPCODE_FILES_PATTERNS) : $(JavaScriptCore)/b3/air/opcode_generator.rb $(JavaScriptCore)/b3/air/AirOpcode.opcodes
342 $(RUBY) $^
343
344UnicodePatternTables.h: $(JavaScriptCore)/yarr/generateYarrUnicodePropertyTables.py $(JavaScriptCore)/yarr/hasher.py $(JavaScriptCore)/ucd/DerivedBinaryProperties.txt $(JavaScriptCore)/ucd/DerivedCoreProperties.txt $(JavaScriptCore)/ucd/DerivedNormalizationProps.txt $(JavaScriptCore)/ucd/PropList.txt $(JavaScriptCore)/ucd/PropertyAliases.txt $(JavaScriptCore)/ucd/PropertyValueAliases.txt $(JavaScriptCore)/ucd/ScriptExtensions.txt $(JavaScriptCore)/ucd/Scripts.txt $(JavaScriptCore)/ucd/UnicodeData.txt $(JavaScriptCore)/ucd/emoji-data.txt
345 $(PYTHON) $(JavaScriptCore)/yarr/generateYarrUnicodePropertyTables.py $(JavaScriptCore)/ucd ./UnicodePatternTables.h
346
347yarr/YarrCanonicalizeUnicode.cpp: $(JavaScriptCore)/yarr/generateYarrCanonicalizeUnicode $(JavaScriptCore)/ucd/CaseFolding.txt
348 $(PYTHON) $(JavaScriptCore)/yarr/generateYarrCanonicalizeUnicode $(JavaScriptCore)/ucd/CaseFolding.txt ./yarr/YarrCanonicalizeUnicode.cpp
349
350IntlCanonicalizeLanguage.h: $(JavaScriptCore)/Scripts/generateIntlCanonicalizeLanguage.py $(JavaScriptCore)/ucd/language-subtag-registry.txt
351 $(PYTHON) $(JavaScriptCore)/Scripts/generateIntlCanonicalizeLanguage.py $(JavaScriptCore)/ucd/language-subtag-registry.txt ./IntlCanonicalizeLanguage.h
352
353WasmOps.h: $(JavaScriptCore)/wasm/generateWasmOpsHeader.py $(JavaScriptCore)/wasm/generateWasm.py $(JavaScriptCore)/wasm/wasm.json
354 $(PYTHON) $(JavaScriptCore)/wasm/generateWasmOpsHeader.py $(JavaScriptCore)/wasm/wasm.json ./WasmOps.h
355
356WasmB3IRGeneratorInlines.h: $(JavaScriptCore)/wasm/generateWasmB3IRGeneratorInlinesHeader.py $(JavaScriptCore)/wasm/generateWasm.py $(JavaScriptCore)/wasm/wasm.json
357 $(PYTHON) $(JavaScriptCore)/wasm/generateWasmB3IRGeneratorInlinesHeader.py $(JavaScriptCore)/wasm/wasm.json ./WasmB3IRGeneratorInlines.h
358
359# Dynamically-defined targets are listed below. Static targets belong up top.
360
361all : \
362 $(OBJECT_LUT_HEADERS) \
363#
Note: See TracBrowser for help on using the repository browser.