Python 3: Add support in webkitpy.common.config
[WebKit-https.git] / Source / JavaScriptCore / CMakeLists.txt
1 cmake_minimum_required(VERSION 3.10)
2 include(WebKitCommon)
3 set_property(DIRECTORY . PROPERTY FOLDER "JavaScriptCore")
4
5 list(APPEND JavaScriptCore_UNIFIED_SOURCE_LIST_FILES
6     "Sources.txt"
7 )
8
9 set(JavaScriptCore_INCLUDE_DIRECTORIES
10     "${JavaScriptCore_FRAMEWORK_HEADERS_DIR}"
11 )
12
13 set(JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES
14     "${CMAKE_BINARY_DIR}"
15     "${JAVASCRIPTCORE_DIR}"
16     "${JAVASCRIPTCORE_DIR}/API"
17     "${JAVASCRIPTCORE_DIR}/assembler"
18     "${JAVASCRIPTCORE_DIR}/b3"
19     "${JAVASCRIPTCORE_DIR}/b3/air"
20     "${JAVASCRIPTCORE_DIR}/bindings"
21     "${JAVASCRIPTCORE_DIR}/builtins"
22     "${JAVASCRIPTCORE_DIR}/bytecode"
23     "${JAVASCRIPTCORE_DIR}/bytecompiler"
24     "${JAVASCRIPTCORE_DIR}/dfg"
25     "${JAVASCRIPTCORE_DIR}/disassembler"
26     "${JAVASCRIPTCORE_DIR}/disassembler/ARM64"
27     "${JAVASCRIPTCORE_DIR}/disassembler/udis86"
28     "${JAVASCRIPTCORE_DIR}/domjit"
29     "${JAVASCRIPTCORE_DIR}/ftl"
30     "${JAVASCRIPTCORE_DIR}/heap"
31     "${JAVASCRIPTCORE_DIR}/debugger"
32     "${JAVASCRIPTCORE_DIR}/inspector"
33     "${JAVASCRIPTCORE_DIR}/inspector/agents"
34     "${JAVASCRIPTCORE_DIR}/inspector/augmentable"
35     "${JAVASCRIPTCORE_DIR}/inspector/remote"
36     "${JAVASCRIPTCORE_DIR}/interpreter"
37     "${JAVASCRIPTCORE_DIR}/jit"
38     "${JAVASCRIPTCORE_DIR}/llint"
39     "${JAVASCRIPTCORE_DIR}/parser"
40     "${JAVASCRIPTCORE_DIR}/profiler"
41     "${JAVASCRIPTCORE_DIR}/runtime"
42     "${JAVASCRIPTCORE_DIR}/tools"
43     "${JAVASCRIPTCORE_DIR}/wasm"
44     "${JAVASCRIPTCORE_DIR}/wasm/js"
45     "${JAVASCRIPTCORE_DIR}/yarr"
46     "${JavaScriptCore_DERIVED_SOURCES_DIR}"
47     "${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector"
48     "${JavaScriptCore_DERIVED_SOURCES_DIR}/runtime"
49     "${JavaScriptCore_DERIVED_SOURCES_DIR}/yarr"
50 )
51
52 if (USE_CAPSTONE)
53     list(APPEND JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES "${THIRDPARTY_DIR}/capstone/Source/include")
54 endif ()
55
56 set(JavaScriptCore_OBJECT_LUT_SOURCES
57     runtime/ArrayConstructor.cpp
58     runtime/AsyncFromSyncIteratorPrototype.cpp
59     runtime/AsyncGeneratorPrototype.cpp
60     runtime/BigIntConstructor.cpp
61     runtime/BigIntPrototype.cpp
62     runtime/BooleanPrototype.cpp
63     runtime/DateConstructor.cpp
64     runtime/DatePrototype.cpp
65     runtime/ErrorPrototype.cpp
66     runtime/GeneratorPrototype.cpp
67     runtime/InspectorInstrumentationObject.cpp
68     runtime/IntlCollatorConstructor.cpp
69     runtime/IntlCollatorPrototype.cpp
70     runtime/IntlDateTimeFormatConstructor.cpp
71     runtime/IntlDateTimeFormatPrototype.cpp
72     runtime/IntlNumberFormatConstructor.cpp
73     runtime/IntlNumberFormatPrototype.cpp
74     runtime/IntlObject.cpp
75     runtime/IntlPluralRulesConstructor.cpp
76     runtime/IntlPluralRulesPrototype.cpp
77     runtime/JSDataViewPrototype.cpp
78     runtime/JSGlobalObject.cpp
79     runtime/JSInternalPromiseConstructor.cpp
80     runtime/JSModuleLoader.cpp
81     runtime/JSONObject.cpp
82     runtime/JSPromiseConstructor.cpp
83     runtime/JSPromisePrototype.cpp
84     runtime/MapPrototype.cpp
85     runtime/NumberConstructor.cpp
86     runtime/NumberPrototype.cpp
87     runtime/ObjectConstructor.cpp
88     runtime/ReflectObject.cpp
89     runtime/RegExpConstructor.cpp
90     runtime/RegExpPrototype.cpp
91     runtime/RegExpStringIteratorPrototype.cpp
92     runtime/SetPrototype.cpp
93     runtime/StringConstructor.cpp
94     runtime/StringPrototype.cpp
95     runtime/SymbolConstructor.cpp
96     runtime/SymbolPrototype.cpp
97
98     wasm/js/JSWebAssembly.cpp
99     wasm/js/JSToWasmICCallee.cpp
100     wasm/js/WebAssemblyCompileErrorConstructor.cpp
101     wasm/js/WebAssemblyCompileErrorPrototype.cpp
102     wasm/js/WebAssemblyFunctionHeapCellType.cpp
103     wasm/js/WebAssemblyInstanceConstructor.cpp
104     wasm/js/WebAssemblyInstancePrototype.cpp
105     wasm/js/WebAssemblyLinkErrorConstructor.cpp
106     wasm/js/WebAssemblyLinkErrorPrototype.cpp
107     wasm/js/WebAssemblyMemoryConstructor.cpp
108     wasm/js/WebAssemblyMemoryPrototype.cpp
109     wasm/js/WebAssemblyModuleConstructor.cpp
110     wasm/js/WebAssemblyModulePrototype.cpp
111     wasm/js/WebAssemblyRuntimeErrorConstructor.cpp
112     wasm/js/WebAssemblyRuntimeErrorPrototype.cpp
113     wasm/js/WebAssemblyTableConstructor.cpp
114     wasm/js/WebAssemblyTablePrototype.cpp
115 )
116
117 set(JavaScriptCore_LIBRARIES
118     WebKit::WTF
119 )
120
121 if (USE_CAPSTONE)
122     list(APPEND JavaScriptCore_LIBRARIES capstone)
123 endif ()
124
125 if (ATOMIC_INT64_REQUIRES_LIBATOMIC)
126     list(APPEND JavaScriptCore_LIBRARIES atomic)
127 endif ()
128
129 set(JavaScriptCore_SCRIPTS_SOURCES_DIR "${JAVASCRIPTCORE_DIR}/Scripts")
130
131 # Globbing relies on the fact that generator-specific file names are prefixed with their directory.
132 # Top-level scripts should have a file extension, since they are invoked during the build.
133
134 set(JavaScriptCore_SCRIPTS_SOURCES_PATHS
135     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.pl
136     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.py
137     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/wkbuiltins/builtins*.py
138     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/wkbuiltins/wkbuiltins.py
139 )
140
141 # The directory flattening performed below mirrors what the Mac port does with private headers.
142
143 file(GLOB JavaScriptCore_SCRIPTS_SOURCES ${JavaScriptCore_SCRIPTS_SOURCES_PATHS})
144
145 foreach (_file ${JavaScriptCore_SCRIPTS_SOURCES})
146     get_filename_component(_script "${_file}" NAME)
147     add_custom_command(
148         OUTPUT ${JavaScriptCore_SCRIPTS_DIR}/${_script}
149         MAIN_DEPENDENCY ${_file}
150         WORKING_DIRECTORY ${JavaScriptCore_DERIVED_SOURCES_DIR}
151         COMMAND ${CMAKE_COMMAND} -E copy_if_different ${_file} ${JavaScriptCore_SCRIPTS_DIR}/${_script}
152         VERBATIM)
153     list(APPEND JavaScriptCore_SCRIPTS ${JavaScriptCore_SCRIPTS_DIR}/${_script})
154 endforeach ()
155
156 set(UDIS_GEN_DEP
157     disassembler/udis86/optable.xml
158     disassembler/udis86/ud_itab.py
159     disassembler/udis86/ud_opcode.py
160 )
161
162 add_custom_command(
163     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/udis86_itab.c ${JavaScriptCore_DERIVED_SOURCES_DIR}/udis86_itab.h
164     DEPENDS ${UDIS_GEN_DEP}
165     WORKING_DIRECTORY ${JavaScriptCore_DERIVED_SOURCES_DIR}
166     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/disassembler/udis86/ud_itab.py ${JAVASCRIPTCORE_DIR}/disassembler/udis86/optable.xml ${JavaScriptCore_DERIVED_SOURCES_DIR}
167     VERBATIM)
168
169 list(APPEND JavaScriptCore_HEADERS
170     ${JavaScriptCore_DERIVED_SOURCES_DIR}/udis86_itab.h
171 )
172
173 set(LLINT_ASM
174     llint/LowLevelInterpreter.asm
175     llint/LowLevelInterpreter32_64.asm
176     llint/LowLevelInterpreter64.asm
177 )
178
179 set(OFFLINE_ASM
180     offlineasm/arm.rb
181     offlineasm/arm64.rb
182     offlineasm/ast.rb
183     offlineasm/backends.rb
184     offlineasm/cloop.rb
185     offlineasm/config.rb
186     offlineasm/instructions.rb
187     offlineasm/mips.rb
188     offlineasm/offsets.rb
189     offlineasm/opt.rb
190     offlineasm/parser.rb
191     offlineasm/registers.rb
192     offlineasm/risc.rb
193     offlineasm/self_hash.rb
194     offlineasm/settings.rb
195     offlineasm/transform.rb
196     offlineasm/x86.rb
197 )
198
199 set(GENERATOR
200     generator/Argument.rb
201     generator/Assertion.rb
202     generator/DSL.rb
203     generator/Fits.rb
204     generator/GeneratedFile.rb
205     generator/Metadata.rb
206     generator/Opcode.rb
207     generator/OpcodeGroup.rb
208     generator/Options.rb
209     generator/Section.rb
210     generator/Template.rb
211     generator/Type.rb
212     generator/main.rb
213 )
214
215 add_custom_command(
216     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/Bytecodes.h ${JavaScriptCore_DERIVED_SOURCES_DIR}/InitBytecodes.asm ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeStructs.h ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeIndices.h
217     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/generator/main.rb
218     DEPENDS ${GENERATOR} bytecode/BytecodeList.rb
219     COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/generator/main.rb --bytecodes_h ${JavaScriptCore_DERIVED_SOURCES_DIR}/Bytecodes.h --init_bytecodes_asm ${JavaScriptCore_DERIVED_SOURCES_DIR}/InitBytecodes.asm --bytecode_structs_h ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeStructs.h --bytecode_indices_h ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeIndices.h ${JAVASCRIPTCORE_DIR}/bytecode/BytecodeList.rb
220     VERBATIM)
221
222
223 if (WTF_OS_MAC_OS_X)
224     execute_process(COMMAND bash -c "date +'%s'" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
225 else ()
226     string(TIMESTAMP BUILD_TIME "%s")
227 endif ()
228
229 file(WRITE ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeCacheVersion.h "#define JSC_BYTECODE_CACHE_VERSION ${BUILD_TIME}\n")
230
231 list(APPEND JavaScriptCore_HEADERS
232     ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeCacheVersion.h
233     ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeStructs.h
234     ${JavaScriptCore_DERIVED_SOURCES_DIR}/Bytecodes.h
235 )
236
237 if (WIN32)
238     set(OFFLINE_ASM_BACKEND "X86_WIN, X86_64_WIN, C_LOOP_WIN")
239 else ()
240     if (WTF_CPU_X86)
241         set(OFFLINE_ASM_BACKEND "X86")
242     elseif (WTF_CPU_X86_64)
243         set(OFFLINE_ASM_BACKEND "X86_64")
244     elseif (WTF_CPU_ARM64)
245         set(OFFLINE_ASM_BACKEND "ARM64")
246     elseif (ARM_THUMB2_DETECTED)
247         set(OFFLINE_ASM_BACKEND "ARMv7")
248     elseif (WTF_CPU_MIPS)
249         set(OFFLINE_ASM_BACKEND "MIPS")
250     endif ()
251
252     if (NOT ENABLE_JIT)
253         if (ENABLE_C_LOOP)
254             set(OFFLINE_ASM_BACKEND "C_LOOP")
255         endif ()
256     endif ()
257 endif ()
258
259 add_custom_command(
260     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/LLIntDesiredSettings.h
261     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/generate_settings_extractor.rb
262     DEPENDS ${LLINT_ASM} ${OFFLINE_ASM} ${JavaScriptCore_DERIVED_SOURCES_DIR}/InitBytecodes.asm
263     COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/generate_settings_extractor.rb -I${JavaScriptCore_DERIVED_SOURCES_DIR}/ ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm ${JavaScriptCore_DERIVED_SOURCES_DIR}/LLIntDesiredSettings.h ${OFFLINE_ASM_BACKEND}
264     VERBATIM)
265
266 add_custom_command(
267     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/LLIntDesiredOffsets.h
268     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb
269     DEPENDS LLIntSettingsExtractor ${LLINT_ASM} ${OFFLINE_ASM} ${JavaScriptCore_DERIVED_SOURCES_DIR}/InitBytecodes.asm
270     COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb -I${JavaScriptCore_DERIVED_SOURCES_DIR}/ ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm $<TARGET_FILE:LLIntSettingsExtractor> ${JavaScriptCore_DERIVED_SOURCES_DIR}/LLIntDesiredOffsets.h ${OFFLINE_ASM_BACKEND}
271     VERBATIM)
272
273 # We add the header files directly to the ADD_EXECUTABLE call instead of setting the
274 # OBJECT_DEPENDS property in LLIntOffsetsExtractor.cpp because generate_offset_extractor.rb and
275 # generate-bytecode-files may not regenerate the .h files in case the hash it calculates does not change.
276 # In this case, if some of the dependencies specified in the ADD_CUSTOM_COMMANDs above have
277 # changed the command will always be called because the mtime of the .h files will
278 # always be older than that of their dependencies.
279 # Additionally, setting the OBJECT_DEPENDS property will make the .h files a Makefile
280 # dependency of both LLIntOffsetsExtractor and LLIntOffsetsExtractor.cpp, so the command will
281 # actually be run multiple times!
282 add_executable(LLIntSettingsExtractor
283     ${JAVASCRIPTCORE_DIR}/llint/LLIntSettingsExtractor.cpp
284     ${JavaScriptCore_DERIVED_SOURCES_DIR}/LLIntDesiredSettings.h ${JavaScriptCore_DERIVED_SOURCES_DIR}/Bytecodes.h ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeStructs.h
285 )
286
287 add_executable(LLIntOffsetsExtractor
288     ${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp
289     ${JavaScriptCore_DERIVED_SOURCES_DIR}/LLIntDesiredOffsets.h ${JavaScriptCore_DERIVED_SOURCES_DIR}/Bytecodes.h ${JavaScriptCore_DERIVED_SOURCES_DIR}/BytecodeStructs.h
290 )
291
292 target_link_libraries(LLIntSettingsExtractor WebKit::WTF)
293 add_dependencies(LLIntSettingsExtractor JavaScriptCore_CopyHeaders)
294 target_link_libraries(LLIntOffsetsExtractor WebKit::WTF)
295 add_dependencies(LLIntOffsetsExtractor JavaScriptCore_CopyHeaders)
296
297 # The build system will execute asm.rb every time LLIntOffsetsExtractor's mtime is newer than
298 # LLIntAssembly.h's mtime. The problem we have here is: asm.rb has some built-in optimization
299 # that generates a checksum of the LLIntOffsetsExtractor binary, if the checksum of the new
300 # LLIntOffsetsExtractor matches, no output is generated. To make this target consistent and avoid
301 # running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch)
302 # after every asm.rb run.
303 if (MSVC AND NOT ENABLE_C_LOOP)
304     set(LLIntOutput LowLevelInterpreterWin.asm)
305     set(OFFLINE_ASM_ARGS --assembler=MASM)
306 else ()
307     set(LLIntOutput LLIntAssembly.h)
308 endif ()
309
310 add_custom_command(
311     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/${LLIntOutput}
312     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb
313     DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM} ${JavaScriptCore_DERIVED_SOURCES_DIR}/InitBytecodes.asm
314     COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb -I${JavaScriptCore_DERIVED_SOURCES_DIR}/ ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm $<TARGET_FILE:LLIntOffsetsExtractor> ${JavaScriptCore_DERIVED_SOURCES_DIR}/${LLIntOutput} ${OFFLINE_ASM_ARGS}
315     COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${JavaScriptCore_DERIVED_SOURCES_DIR}/${LLIntOutput}
316     WORKING_DIRECTORY ${JavaScriptCore_DERIVED_SOURCES_DIR}
317     VERBATIM)
318
319 # The explanation for not making LLIntAssembly.h part of the OBJECT_DEPENDS property of some of
320 # the .cpp files below is similar to the one in the previous comment. However, since these .cpp
321 # files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS
322 # since it is used in the add_library() call at the end of this file.
323 if (MSVC AND NOT ENABLE_C_LOOP)
324     enable_language(ASM_MASM)
325     if (CMAKE_SIZEOF_VOID_P EQUAL 4)
326         # Win32 needs /safeseh with assembly, but Win64 does not.
327         set(MASM_EXECUTABLE ml)
328         set(LLINT_MASM_FLAGS /safeseh /c /Fo)
329     else ()
330         set(MASM_EXECUTABLE ml64)
331         set(LLINT_MASM_FLAGS /c /Fo)
332     endif ()
333     add_custom_command(
334         OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.obj
335         DEPENDS ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.asm
336         COMMAND ${MASM_EXECUTABLE} ${LLINT_MASM_FLAGS} ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.obj ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.asm
337         VERBATIM)
338     list(APPEND JavaScriptCore_SOURCES ${JavaScriptCore_DERIVED_SOURCES_DIR}/LowLevelInterpreterWin.obj)
339 else ()
340     list(APPEND JavaScriptCore_HEADERS
341         ${JavaScriptCore_DERIVED_SOURCES_DIR}/LLIntAssembly.h
342     )
343 endif ()
344
345 # WebAssembly generator
346
347 macro(GENERATE_PYTHON _generator _additional_deps _input _output)
348     add_custom_command(
349         OUTPUT ${_output}
350         MAIN_DEPENDENCY ${_generator}
351         DEPENDS ${_input} ${_additional_deps}
352         COMMAND ${PYTHON_EXECUTABLE} ${_generator} ${_input} ${_output}
353         VERBATIM)
354     list(APPEND JavaScriptCore_HEADERS ${_output})
355     WEBKIT_ADD_SOURCE_DEPENDENCIES(${_input} ${_output})
356 endmacro()
357 GENERATE_PYTHON(${CMAKE_CURRENT_SOURCE_DIR}/wasm/generateWasmOpsHeader.py ${CMAKE_CURRENT_SOURCE_DIR}/wasm/generateWasm.py ${CMAKE_CURRENT_SOURCE_DIR}/wasm/wasm.json ${JavaScriptCore_DERIVED_SOURCES_DIR}/WasmOps.h)
358 GENERATE_PYTHON(${CMAKE_CURRENT_SOURCE_DIR}/wasm/generateWasmValidateInlinesHeader.py ${CMAKE_CURRENT_SOURCE_DIR}/wasm/generateWasm.py ${CMAKE_CURRENT_SOURCE_DIR}/wasm/wasm.json ${JavaScriptCore_DERIVED_SOURCES_DIR}/WasmValidateInlines.h)
359 GENERATE_PYTHON(${CMAKE_CURRENT_SOURCE_DIR}/wasm/generateWasmB3IRGeneratorInlinesHeader.py ${CMAKE_CURRENT_SOURCE_DIR}/wasm/generateWasm.py ${CMAKE_CURRENT_SOURCE_DIR}/wasm/wasm.json ${JavaScriptCore_DERIVED_SOURCES_DIR}/WasmB3IRGeneratorInlines.h)
360
361 # LUT generator
362
363 set(HASH_LUT_GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/create_hash_table)
364 macro(GENERATE_HASH_LUT _input _output)
365     add_custom_command(
366         OUTPUT ${_output}
367         MAIN_DEPENDENCY ${HASH_LUT_GENERATOR}
368         DEPENDS ${_input}
369         COMMAND ${PERL_EXECUTABLE} ${HASH_LUT_GENERATOR} ${_input} > ${_output}
370         VERBATIM)
371     list(APPEND JavaScriptCore_HEADERS ${_output})
372     WEBKIT_ADD_SOURCE_DEPENDENCIES(${_input} ${_output})
373 endmacro()
374
375 # GENERATOR 1-A: LUT creator
376
377 foreach (_file ${JavaScriptCore_OBJECT_LUT_SOURCES})
378     get_filename_component(_name ${_file} NAME_WE)
379     GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${JavaScriptCore_DERIVED_SOURCES_DIR}/${_name}.lut.h)
380 endforeach ()
381
382 set(JavaScriptCore_PUBLIC_FRAMEWORK_HEADERS
383     API/JSBase.h
384     API/JSContextRef.h
385     API/JSObjectRef.h
386     API/JSStringRef.h
387     API/JSTypedArray.h
388     API/JSValueRef.h
389     API/JavaScript.h
390     API/WebKitAvailability.h
391 )
392
393 set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS
394     ${JavaScriptCore_DERIVED_SOURCES_DIR}/Bytecodes.h
395     ${JavaScriptCore_DERIVED_SOURCES_DIR}/JSCBuiltins.h
396
397     ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendDispatchers.h
398     ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorFrontendDispatchers.h
399     ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorProtocolObjects.h
400
401     API/APICallbackFunction.h
402     API/APICast.h
403     API/APIUtils.h
404     API/JSAPIValueWrapper.h
405     API/JSAPIWrapperObject.h
406     API/JSBasePrivate.h
407     API/JSCTestRunnerUtils.h
408     API/JSCallbackConstructor.h
409     API/JSCallbackFunction.h
410     API/JSCallbackObject.h
411     API/JSCallbackObjectFunctions.h
412     API/JSClassRef.h
413     API/JSContextInternal.h
414     API/JSContextPrivate.h
415     API/JSContextRefInspectorSupport.h
416     API/JSContextRefInternal.h
417     API/JSContextRefPrivate.h
418     API/JSHeapFinalizerPrivate.h
419     API/JSManagedValueInternal.h
420     API/JSMarkingConstraintPrivate.h
421     API/JSObjectRefPrivate.h
422     API/JSRemoteInspector.h
423     API/JSRetainPtr.h
424     API/JSScriptRefPrivate.h
425     API/JSStringRefPrivate.h
426     API/JSValueInternal.h
427     API/JSValuePrivate.h
428     API/JSVirtualMachineInternal.h
429     API/JSWeakObjectMapRefInternal.h
430     API/JSWeakObjectMapRefPrivate.h
431     API/JSWeakPrivate.h
432     API/JSWrapperMap.h
433     API/ObjCCallbackFunction.h
434     API/ObjcRuntimeExtras.h
435     API/OpaqueJSString.h
436
437     assembler/ARM64Assembler.h
438     assembler/ARM64Registers.h
439     assembler/ARMv7Assembler.h
440     assembler/ARMv7Registers.h
441     assembler/AbortReason.h
442     assembler/AbstractMacroAssembler.h
443     assembler/AssemblerBuffer.h
444     assembler/AssemblerBufferWithConstantPool.h
445     assembler/AssemblerCommon.h
446     assembler/CPU.h
447     assembler/CodeLocation.h
448     assembler/LinkBuffer.h
449     assembler/MIPSAssembler.h
450     assembler/MIPSRegisters.h
451     assembler/MacroAssembler.h
452     assembler/MacroAssemblerARM64.h
453     assembler/MacroAssemblerARMv7.h
454     assembler/MacroAssemblerCodeRef.h
455     assembler/MacroAssemblerHelpers.h
456     assembler/MacroAssemblerMIPS.h
457     assembler/MacroAssemblerX86.h
458     assembler/MacroAssemblerX86Common.h
459     assembler/MacroAssemblerX86_64.h
460     assembler/Printer.h
461     assembler/RegisterInfo.h
462     assembler/X86Assembler.h
463     assembler/X86Registers.h
464     assembler/X86_64Registers.h
465
466     bindings/ScriptFunctionCall.h
467     bindings/ScriptObject.h
468     bindings/ScriptValue.h
469
470     builtins/BuiltinNames.h
471     builtins/BuiltinUtils.h
472
473     bytecode/ArrayAllocationProfile.h
474     bytecode/ArrayProfile.h
475     bytecode/ByValInfo.h
476     bytecode/BytecodeConventions.h
477     bytecode/BytecodeIntrinsicRegistry.h
478     bytecode/CallEdge.h
479     bytecode/CallLinkInfo.h
480     bytecode/CallMode.h
481     bytecode/CallVariant.h
482     bytecode/CodeBlock.h
483     bytecode/CodeBlockHash.h
484     bytecode/CodeOrigin.h
485     bytecode/CodeType.h
486     bytecode/DFGExitProfile.h
487     bytecode/DataFormat.h
488     bytecode/DirectEvalCodeCache.h
489     bytecode/ExecutableInfo.h
490     bytecode/ExecutableToCodeBlockEdge.h
491     bytecode/ExecutionCounter.h
492     bytecode/ExitKind.h
493     bytecode/ExitingInlineKind.h
494     bytecode/ExitingJITType.h
495     bytecode/ExpressionRangeInfo.h
496     bytecode/HandlerInfo.h
497     bytecode/ICStatusMap.h
498     bytecode/InlineCallFrame.h
499     bytecode/Instruction.h
500     bytecode/InstructionStream.h
501     bytecode/InternalFunctionAllocationProfile.h
502     bytecode/JumpTable.h
503     bytecode/LLIntCallLinkInfo.h
504     bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h
505     bytecode/LazyOperandValueProfile.h
506     bytecode/MetadataTable.h
507     bytecode/ObjectAllocationProfile.h
508     bytecode/ObjectPropertyCondition.h
509     bytecode/Opcode.h
510     bytecode/OpcodeSize.h
511     bytecode/PropertyCondition.h
512     bytecode/PutByIdFlags.h
513     bytecode/SpecialPointer.h
514     bytecode/SpeculatedType.h
515     bytecode/StructureSet.h
516     bytecode/SuperSampler.h
517     bytecode/ToThisStatus.h
518     bytecode/TypeLocation.h
519     bytecode/UnlinkedCodeBlock.h
520     bytecode/UnlinkedEvalCodeBlock.h
521     bytecode/UnlinkedFunctionExecutable.h
522     bytecode/UnlinkedGlobalCodeBlock.h
523     bytecode/UnlinkedMetadataTable.h
524     bytecode/ValueProfile.h
525     bytecode/ValueRecovery.h
526     bytecode/VariableWriteFireDetail.h
527     bytecode/VirtualRegister.h
528     bytecode/Watchpoint.h
529
530     debugger/Breakpoint.h
531     debugger/Debugger.h
532     debugger/DebuggerCallFrame.h
533     debugger/DebuggerParseData.h
534     debugger/DebuggerPrimitives.h
535
536     dfg/DFGCommon.h
537     dfg/DFGCompilationMode.h
538     dfg/DFGMinifiedID.h
539
540     domjit/DOMJITAbstractHeap.h
541     domjit/DOMJITCallDOMGetterSnippet.h
542     domjit/DOMJITEffect.h
543     domjit/DOMJITGetterSetter.h
544     domjit/DOMJITHeapRange.h
545     domjit/DOMJITSignature.h
546
547     heap/AlignedMemoryAllocator.h
548     heap/AllocationFailureMode.h
549     heap/Allocator.h
550     heap/AllocatorInlines.h
551     heap/AllocatorForMode.h
552     heap/BlockDirectory.h
553     heap/BlockDirectoryInlines.h
554     heap/CellAttributes.h
555     heap/CellContainer.h
556     heap/CellContainerInlines.h
557     heap/CellState.h
558     heap/CollectionScope.h
559     heap/CollectorPhase.h
560     heap/CompleteSubspace.h
561     heap/CompleteSubspaceInlines.h
562     heap/ConstraintConcurrency.h
563     heap/ConstraintParallelism.h
564     heap/ConstraintVolatility.h
565     heap/DeferGC.h
566     heap/DeleteAllCodeEffort.h
567     heap/DestructionMode.h
568     heap/FastMallocAlignedMemoryAllocator.h
569     heap/FreeList.h
570     heap/FreeListInlines.h
571     heap/GCActivityCallback.h
572     heap/GCAssertions.h
573     heap/GCConductor.h
574     heap/GCDeferralContext.h
575     heap/GCIncomingRefCounted.h
576     heap/GCIncomingRefCountedInlines.h
577     heap/GCIncomingRefCountedSet.h
578     heap/GCLogging.h
579     heap/GCRequest.h
580     heap/GCSegmentedArray.h
581     heap/Handle.h
582     heap/HandleBlock.h
583     heap/HandleSet.h
584     heap/HandleTypes.h
585     heap/Heap.h
586     heap/HeapAnalyzer.h
587     heap/HeapCell.h
588     heap/HeapCellInlines.h
589     heap/HeapCellType.h
590     heap/HeapFinalizerCallback.h
591     heap/HeapInlines.h
592     heap/HeapObserver.h
593     heap/HeapSnapshotBuilder.h
594     heap/IncrementalSweeper.h
595     heap/IsoCellSet.h
596     heap/IsoSubspace.h
597     heap/IsoSubspaceInlines.h
598     heap/IsoSubspacePerVM.h
599     heap/LargeAllocation.h
600     heap/LocalAllocator.h
601     heap/LocalAllocatorInlines.h
602     heap/LockDuringMarking.h
603     heap/MachineStackMarker.h
604     heap/MarkStack.h
605     heap/MarkedBlock.h
606     heap/MarkedBlockInlines.h
607     heap/MarkedBlockSet.h
608     heap/MarkedSpace.h
609     heap/MarkingConstraint.h
610     heap/MutatorState.h
611     heap/PackedCellPtr.h
612     heap/RegisterState.h
613     heap/RunningScope.h
614     heap/SimpleMarkingConstraint.h
615     heap/SlotVisitor.h
616     heap/SlotVisitorInlines.h
617     heap/Strong.h
618     heap/StrongInlines.h
619     heap/Subspace.h
620     heap/SubspaceInlines.h
621     heap/Synchronousness.h
622     heap/TinyBloomFilter.h
623     heap/VisitRaceKey.h
624     heap/Weak.h
625     heap/WeakBlock.h
626     heap/WeakHandleOwner.h
627     heap/WeakImpl.h
628     heap/WeakInlines.h
629     heap/WeakSet.h
630     heap/WeakSetInlines.h
631
632     inspector/ConsoleMessage.h
633     inspector/ContentSearchUtilities.h
634     inspector/IdentifiersFactory.h
635     inspector/InjectedScript.h
636     inspector/InjectedScriptBase.h
637     inspector/InjectedScriptHost.h
638     inspector/InjectedScriptManager.h
639     inspector/InjectedScriptModule.h
640     inspector/InspectorAgentBase.h
641     inspector/InspectorAgentRegistry.h
642     inspector/InspectorBackendDispatcher.h
643     inspector/InspectorEnvironment.h
644     inspector/InspectorFrontendChannel.h
645     inspector/InspectorFrontendRouter.h
646     inspector/InspectorProtocolTypes.h
647     inspector/InspectorTarget.h
648     inspector/PerGlobalObjectWrapperWorld.h
649     inspector/ScriptArguments.h
650     inspector/ScriptBreakpoint.h
651     inspector/ScriptCallFrame.h
652     inspector/ScriptCallStack.h
653     inspector/ScriptCallStackFactory.h
654     inspector/ScriptDebugListener.h
655     inspector/ScriptDebugServer.h
656
657     inspector/agents/InspectorAgent.h
658     inspector/agents/InspectorAuditAgent.h
659     inspector/agents/InspectorConsoleAgent.h
660     inspector/agents/InspectorDebuggerAgent.h
661     inspector/agents/InspectorHeapAgent.h
662     inspector/agents/InspectorRuntimeAgent.h
663     inspector/agents/InspectorScriptProfilerAgent.h
664     inspector/agents/InspectorTargetAgent.h
665
666     inspector/augmentable/AugmentableInspectorControllerClient.h
667
668     inspector/remote/RemoteAutomationTarget.h
669     inspector/remote/RemoteControllableTarget.h
670     inspector/remote/RemoteInspectionTarget.h
671     inspector/remote/RemoteInspector.h
672
673     interpreter/AbstractPC.h
674     interpreter/CallFrame.h
675     interpreter/CallFrameInlines.h
676     interpreter/CalleeBits.h
677     interpreter/EntryFrame.h
678     interpreter/FrameTracers.h
679     interpreter/Register.h
680     interpreter/ShadowChicken.h
681     interpreter/StackVisitor.h
682     interpreter/VMEntryRecord.h
683
684     jit/AssemblyHelpers.h
685     jit/CCallHelpers.h
686     jit/ExecutableAllocator.h
687     jit/FPRInfo.h
688     jit/GCAwareJITStubRoutine.h
689     jit/GPRInfo.h
690     jit/JITAllocator.h
691     jit/JITCode.h
692     jit/JITCodeMap.h
693     jit/JITCompilationEffort.h
694     jit/JITMathICForwards.h
695     jit/JITOperations.h
696     jit/JITStubRoutine.h
697     jit/JITThunks.h
698     jit/PolymorphicCallStubRoutine.h
699     jit/Reg.h
700     jit/RegisterAtOffset.h
701     jit/RegisterAtOffsetList.h
702     jit/RegisterSet.h
703     jit/Snippet.h
704     jit/SnippetParams.h
705     jit/SnippetReg.h
706     jit/SnippetSlowPathCalls.h
707     jit/SpillRegistersMode.h
708     jit/TagRegistersMode.h
709     jit/TempRegisterSet.h
710     jit/ThunkGenerator.h
711     jit/UnusedPointer.h
712
713     llint/LLIntOpcode.h
714
715     parser/Lexer.h
716     parser/ParserArena.h
717     parser/ParserError.h
718     parser/ParserModes.h
719     parser/ParserTokens.h
720     parser/SourceCode.h
721     parser/SourceProvider.h
722     parser/SourceProviderCache.h
723     parser/SourceProviderCacheItem.h
724     parser/UnlinkedSourceCode.h
725     parser/VariableEnvironment.h
726
727     profiler/ProfilerBytecode.h
728     profiler/ProfilerBytecodeSequence.h
729     profiler/ProfilerBytecodes.h
730     profiler/ProfilerCompilation.h
731     profiler/ProfilerCompilationKind.h
732     profiler/ProfilerCompiledBytecode.h
733     profiler/ProfilerDatabase.h
734     profiler/ProfilerEvent.h
735     profiler/ProfilerExecutionCounter.h
736     profiler/ProfilerJettisonReason.h
737     profiler/ProfilerOSRExit.h
738     profiler/ProfilerOSRExitSite.h
739     profiler/ProfilerOrigin.h
740     profiler/ProfilerOriginStack.h
741     profiler/ProfilerProfiledBytecodes.h
742     profiler/ProfilerUID.h
743
744     runtime/AbstractModuleRecord.h
745     runtime/ArgList.h
746     runtime/ArityCheckMode.h
747     runtime/ArrayBuffer.h
748     runtime/ArrayBufferSharingMode.h
749     runtime/ArrayBufferView.h
750     runtime/ArrayConventions.h
751     runtime/ArrayPrototype.h
752     runtime/ArrayStorage.h
753     runtime/AuxiliaryBarrier.h
754     runtime/AuxiliaryBarrierInlines.h
755     runtime/BasicBlockLocation.h
756     runtime/BatchedTransitionOptimizer.h
757     runtime/BigIntPrototype.h
758     runtime/BooleanObject.h
759     runtime/BooleanPrototype.h
760     runtime/Butterfly.h
761     runtime/ButterflyInlines.h
762     runtime/BytecodeCacheError.h
763     runtime/CachePayload.h
764     runtime/CacheUpdate.h
765     runtime/CachedBytecode.h
766     runtime/CachedTypes.h
767     runtime/CagedBarrierPtr.h
768     runtime/CallData.h
769     runtime/CatchScope.h
770     runtime/CellSize.h
771     runtime/ClassInfo.h
772     runtime/CodeSpecializationKind.h
773     runtime/CommonIdentifiers.h
774     runtime/CompilationResult.h
775     runtime/Completion.h
776     runtime/ConcurrentJSLock.h
777     runtime/ConfigFile.h
778     runtime/ConsoleClient.h
779     runtime/ConsoleTypes.h
780     runtime/ConstantMode.h
781     runtime/ConstructAbility.h
782     runtime/ConstructData.h
783     runtime/ConstructorKind.h
784     runtime/ControlFlowProfiler.h
785     runtime/CustomGetterSetter.h
786     runtime/DOMAnnotation.h
787     runtime/DOMAttributeGetterSetter.h
788     runtime/DataView.h
789     runtime/DateInstance.h
790     runtime/DateInstanceCache.h
791     runtime/DefinePropertyAttributes.h
792     runtime/DirectArgumentsOffset.h
793     runtime/DirectEvalExecutable.h
794     runtime/DisallowScope.h
795     runtime/DisallowVMReentry.h
796     runtime/DumpContext.h
797     runtime/EnumerationMode.h
798     runtime/Error.h
799     runtime/ErrorHandlingScope.h
800     runtime/ErrorInstance.h
801     runtime/ErrorPrototype.h
802     runtime/ErrorType.h
803     runtime/EvalExecutable.h
804     runtime/Exception.h
805     runtime/ExceptionEventLocation.h
806     runtime/ExceptionHelpers.h
807     runtime/ExceptionScope.h
808     runtime/ExecutableBase.h
809     runtime/ExecutableBaseInlines.h
810     runtime/Float32Array.h
811     runtime/Float64Array.h
812     runtime/FunctionConstructor.h
813     runtime/FunctionExecutable.h
814     runtime/FunctionHasExecutedCache.h
815     runtime/FunctionPrototype.h
816     runtime/FunctionRareData.h
817     runtime/FuzzerAgent.h
818     runtime/GenericOffset.h
819     runtime/GenericTypedArrayView.h
820     runtime/GenericTypedArrayViewInlines.h
821     runtime/GetPutInfo.h
822     runtime/GlobalExecutable.h
823     runtime/HashMapImpl.h
824     runtime/Identifier.h
825     runtime/IdentifierInlines.h
826     runtime/IndexingHeader.h
827     runtime/IndexingHeaderInlines.h
828     runtime/IndexingType.h
829     runtime/InferredValue.h
830     runtime/InitializeThreading.h
831     runtime/Int16Array.h
832     runtime/Int32Array.h
833     runtime/Int8Array.h
834     runtime/InternalFunction.h
835     runtime/Intrinsic.h
836     runtime/IterationKind.h
837     runtime/IterationStatus.h
838     runtime/IteratorOperations.h
839     runtime/IteratorPrototype.h
840     runtime/JSArray.h
841     runtime/JSArrayBuffer.h
842     runtime/JSArrayBufferPrototype.h
843     runtime/JSArrayBufferView.h
844     runtime/JSArrayBufferViewInlines.h
845     runtime/JSBigInt.h
846     runtime/JSCConfig.h
847     runtime/JSCInlines.h
848     runtime/JSCJSValue.h
849     runtime/JSCJSValueInlines.h
850     runtime/JSCPtrTag.h
851     runtime/JSCallee.h
852     runtime/JSCast.h
853     runtime/JSCell.h
854     runtime/JSCellInlines.h
855     runtime/JSDataView.h
856     runtime/JSDestructibleObject.h
857     runtime/JSDestructibleObjectHeapCellType.h
858     runtime/JSExportMacros.h
859     runtime/JSFunction.h
860     runtime/JSFunctionInlines.h
861     runtime/JSGenericTypedArrayView.h
862     runtime/JSGenericTypedArrayViewInlines.h
863     runtime/JSGenericTypedArrayViewPrototype.h
864     runtime/JSGenericTypedArrayViewPrototypeInlines.h
865     runtime/JSGlobalLexicalEnvironment.h
866     runtime/JSGlobalObject.h
867     runtime/JSGlobalObjectFunctions.h
868     runtime/JSGlobalObjectInlines.h
869     runtime/JSImmutableButterfly.h
870     runtime/JSInternalFieldObjectImpl.h
871     runtime/JSInternalPromise.h
872     runtime/JSInternalPromiseDeferred.h
873     runtime/JSMicrotask.h
874     runtime/JSLock.h
875     runtime/JSMap.h
876     runtime/JSMapIterator.h
877     runtime/JSModuleLoader.h
878     runtime/JSModuleRecord.h
879     runtime/JSNativeStdFunction.h
880     runtime/JSNonDestructibleProxy.h
881     runtime/JSONObject.h
882     runtime/JSObject.h
883     runtime/JSObjectInlines.h
884     runtime/JSPromise.h
885     runtime/JSPromiseConstructor.h
886     runtime/JSPromiseDeferred.h
887     runtime/JSPropertyNameEnumerator.h
888     runtime/JSProxy.h
889     runtime/JSRunLoopTimer.h
890     runtime/JSScope.h
891     runtime/JSScriptFetchParameters.h
892     runtime/JSScriptFetcher.h
893     runtime/JSSegmentedVariableObject.h
894     runtime/JSSet.h
895     runtime/JSSetIterator.h
896     runtime/JSSourceCode.h
897     runtime/JSString.h
898     runtime/JSStringInlines.h
899     runtime/JSSymbolTableObject.h
900     runtime/JSType.h
901     runtime/JSTypeInfo.h
902     runtime/JSTypedArrays.h
903     runtime/JSWithScope.h
904     runtime/JSWrapperObject.h
905     runtime/LazyClassStructure.h
906     runtime/LazyProperty.h
907     runtime/LeafExecutable.h
908     runtime/Lookup.h
909     runtime/MatchResult.h
910     runtime/MathCommon.h
911     runtime/MemoryStatistics.h
912     runtime/Microtask.h
913     runtime/ModuleProgramExecutable.h
914     runtime/NativeExecutable.h
915     runtime/NativeFunction.h
916     runtime/NumberObject.h
917     runtime/NumberPrototype.h
918     runtime/NumericStrings.h
919     runtime/ObjectConstructor.h
920     runtime/ObjectInitializationScope.h
921     runtime/ObjectPrototype.h
922     runtime/Operations.h
923     runtime/Options.h
924     runtime/OptionsList.h
925     runtime/ParseInt.h
926     runtime/PrivateName.h
927     runtime/ProgramExecutable.h
928     runtime/PromiseDeferredTimer.h
929     runtime/PropertyDescriptor.h
930     runtime/PropertyMapHashTable.h
931     runtime/PropertyName.h
932     runtime/PropertyNameArray.h
933     runtime/PropertyOffset.h
934     runtime/PropertySlot.h
935     runtime/PropertyStorage.h
936     runtime/Protect.h
937     runtime/PrototypeKey.h
938     runtime/PureNaN.h
939     runtime/PutDirectIndexMode.h
940     runtime/PutPropertySlot.h
941     runtime/RegExp.h
942     runtime/RegExpCachedResult.h
943     runtime/RegExpGlobalData.h
944     runtime/RegExpKey.h
945     runtime/RegExpObject.h
946     runtime/RegExpStringIteratorPrototype.h
947     runtime/RuntimeFlags.h
948     runtime/RuntimeType.h
949     runtime/SamplingProfiler.h
950     runtime/ScopeOffset.h
951     runtime/ScopedArgumentsTable.h
952     runtime/ScriptExecutable.h
953     runtime/ScriptFetchParameters.h
954     runtime/ScriptFetcher.h
955     runtime/SlowPathReturnType.h
956     runtime/SmallStrings.h
957     runtime/SourceOrigin.h
958     runtime/SparseArrayValueMap.h
959     runtime/StackAlignment.h
960     runtime/StackFrame.h
961     runtime/StringObject.h
962     runtime/StringPrototype.h
963     runtime/Structure.h
964     runtime/StructureCache.h
965     runtime/StructureChain.h
966     runtime/StructureIDBlob.h
967     runtime/StructureIDTable.h
968     runtime/StructureInlines.h
969     runtime/StructureRareData.h
970     runtime/StructureRareDataInlines.h
971     runtime/StructureTransitionTable.h
972     runtime/SubspaceAccess.h
973     runtime/Symbol.h
974     runtime/SymbolPrototype.h
975     runtime/SymbolTable.h
976     runtime/SymbolTableOrScopeDepth.h
977     runtime/TemplateObjectDescriptor.h
978     runtime/TestRunnerUtils.h
979     runtime/ThrowScope.h
980     runtime/ToNativeFromValue.h
981     runtime/TypeError.h
982     runtime/TypeSet.h
983     runtime/TypedArrayAdaptors.h
984     runtime/TypedArrayController.h
985     runtime/TypedArrayInlines.h
986     runtime/TypedArrayType.h
987     runtime/TypedArrays.h
988     runtime/TypeofType.h
989     runtime/Uint16Array.h
990     runtime/Uint32Array.h
991     runtime/Uint8Array.h
992     runtime/Uint8ClampedArray.h
993     runtime/VM.h
994     runtime/VMEntryScope.h
995     runtime/VMInlines.h
996     runtime/VMTraps.h
997     runtime/VarOffset.h
998     runtime/Watchdog.h
999     runtime/WeakGCMap.h
1000     runtime/WeakGCMapInlines.h
1001     runtime/WriteBarrier.h
1002     runtime/WriteBarrierInlines.h
1003
1004     tools/Integrity.h
1005     tools/IntegrityInlines.h
1006     tools/VMInspector.h
1007     tools/VMInspectorInlines.h
1008
1009     wasm/WasmCapabilities.h
1010     wasm/WasmCodeBlock.h
1011     wasm/WasmCompilationMode.h
1012     wasm/WasmContext.h
1013     wasm/WasmEmbedder.h
1014     wasm/WasmExceptionType.h
1015     wasm/WasmFaultSignalHandler.h
1016     wasm/WasmIndexOrName.h
1017     wasm/WasmMemory.h
1018     wasm/WasmMemoryMode.h
1019     wasm/WasmModule.h
1020     wasm/WasmName.h
1021     wasm/WasmNameSection.h
1022     wasm/WasmPageCount.h
1023     wasm/WasmTierUpCount.h
1024
1025     wasm/js/JSWebAssembly.h
1026     wasm/js/JSWebAssemblyModule.h
1027
1028
1029     yarr/RegularExpression.h
1030     yarr/Yarr.h
1031     yarr/YarrErrorCode.h
1032     yarr/YarrFlags.h
1033     yarr/YarrInterpreter.h
1034     yarr/YarrJIT.h
1035     yarr/YarrParser.h
1036     yarr/YarrPattern.h
1037     yarr/YarrUnicodeProperties.h
1038 )
1039
1040 # GENERATOR 1-B: particular LUT creator (for 1 file only)
1041 GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table ${JavaScriptCore_DERIVED_SOURCES_DIR}/Lexer.lut.h)
1042
1043 file(MAKE_DIRECTORY ${JavaScriptCore_DERIVED_SOURCES_DIR}/yarr)
1044
1045 #GENERATOR: "RegExpJitTables.h": tables used by Yarr
1046 add_custom_command(
1047     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/yarr/RegExpJitTables.h
1048     MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/yarr/create_regex_tables
1049     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/yarr/create_regex_tables ${JavaScriptCore_DERIVED_SOURCES_DIR}/yarr/RegExpJitTables.h
1050     VERBATIM)
1051 list(APPEND JavaScriptCore_HEADERS ${JavaScriptCore_DERIVED_SOURCES_DIR}/yarr/RegExpJitTables.h)
1052 WEBKIT_ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/yarr/YarrPattern.cpp ${JavaScriptCore_DERIVED_SOURCES_DIR}/yarr/RegExpJitTables.h)
1053
1054 add_custom_command(
1055     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/yarr/UnicodePatternTables.h
1056     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/yarr/generateYarrUnicodePropertyTables.py
1057     DEPENDS ${JAVASCRIPTCORE_DIR}/yarr/hasher.py ${JAVASCRIPTCORE_DIR}/ucd/DerivedBinaryProperties.txt ${JAVASCRIPTCORE_DIR}/ucd/DerivedCoreProperties.txt ${JAVASCRIPTCORE_DIR}/ucd/DerivedNormalizationProps.txt ${JAVASCRIPTCORE_DIR}/ucd/PropList.txt ${JAVASCRIPTCORE_DIR}/ucd/PropertyAliases.txt ${JAVASCRIPTCORE_DIR}/ucd/PropertyValueAliases.txt ${JAVASCRIPTCORE_DIR}/ucd/ScriptExtensions.txt ${JAVASCRIPTCORE_DIR}/ucd/Scripts.txt ${JAVASCRIPTCORE_DIR}/ucd/UnicodeData.txt ${JAVASCRIPTCORE_DIR}/ucd/emoji-data.txt
1058     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/yarr/generateYarrUnicodePropertyTables.py ${JAVASCRIPTCORE_DIR}/ucd ${JavaScriptCore_DERIVED_SOURCES_DIR}/yarr/UnicodePatternTables.h
1059     VERBATIM)
1060 list(APPEND JavaScriptCore_HEADERS ${JavaScriptCore_DERIVED_SOURCES_DIR}/yarr/UnicodePatternTables.h)
1061 WEBKIT_ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/yarr/UnicodePatternTables.cpp ${JavaScriptCore_DERIVED_SOURCES_DIR}/yarr/UnicodePatternTables.h)
1062
1063 add_custom_command(
1064     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/yarr/YarrCanonicalizeUnicode.cpp
1065     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/yarr/generateYarrCanonicalizeUnicode
1066     DEPENDS ${JAVASCRIPTCORE_DIR}/ucd/CaseFolding.txt
1067     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/yarr/generateYarrCanonicalizeUnicode ${JAVASCRIPTCORE_DIR}/ucd/CaseFolding.txt ${JavaScriptCore_DERIVED_SOURCES_DIR}/yarr/YarrCanonicalizeUnicode.cpp
1068     VERBATIM)
1069
1070 #GENERATOR: "IntlCanonicalizeLanguage.h": tables used by Intl
1071 add_custom_command(
1072     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/IntlCanonicalizeLanguage.h
1073     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/Scripts/generateIntlCanonicalizeLanguage.py
1074     DEPENDS ${JAVASCRIPTCORE_DIR}/ucd/language-subtag-registry.txt
1075     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/Scripts/generateIntlCanonicalizeLanguage.py ${JAVASCRIPTCORE_DIR}/ucd/language-subtag-registry.txt ${JavaScriptCore_DERIVED_SOURCES_DIR}/IntlCanonicalizeLanguage.h
1076     VERBATIM)
1077 list(APPEND JavaScriptCore_HEADERS ${JavaScriptCore_DERIVED_SOURCES_DIR}/IntlCanonicalizeLanguage.h)
1078 WEBKIT_ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/runtime/IntlObject.cpp ${JavaScriptCore_DERIVED_SOURCES_DIR}/IntlCanonicalizeLanguage.h)
1079
1080 #GENERATOR: "KeywordLookup.h": keyword decision tree used by the lexer
1081 add_custom_command(
1082     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/KeywordLookup.h
1083     MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py
1084     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table
1085     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py ${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table > ${JavaScriptCore_DERIVED_SOURCES_DIR}/KeywordLookup.h
1086     VERBATIM)
1087 list(APPEND JavaScriptCore_HEADERS ${JavaScriptCore_DERIVED_SOURCES_DIR}/KeywordLookup.h)
1088 WEBKIT_ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/parser/Lexer.cpp ${JavaScriptCore_DERIVED_SOURCES_DIR}/KeywordLookup.h)
1089
1090
1091 # Inspector Interfaces
1092
1093 set(JavaScriptCore_INSPECTOR_SCRIPTS_DIR "${JAVASCRIPTCORE_DIR}/inspector/scripts")
1094
1095 set(JavaScriptCore_INSPECTOR_PROTOCOL_SCRIPTS
1096     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py
1097     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/cpp_generator.py
1098     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/cpp_generator_templates.py
1099     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_js_backend_commands.py
1100     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_header.py
1101     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_implementation.py
1102     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_frontend_dispatcher_header.py
1103     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_frontend_dispatcher_implementation.py
1104     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_header.py
1105     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_implementation.py
1106     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generator.py
1107     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generator_templates.py
1108     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/__init__.py
1109     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/models.py
1110 )
1111
1112 set(JavaScriptCore_INSPECTOR_DOMAINS
1113     ${JAVASCRIPTCORE_DIR}/inspector/protocol/ApplicationCache.json
1114     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Audit.json
1115     ${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json
1116     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json
1117     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json
1118     ${JAVASCRIPTCORE_DIR}/inspector/protocol/DOM.json
1119     ${JAVASCRIPTCORE_DIR}/inspector/protocol/DOMDebugger.json
1120     ${JAVASCRIPTCORE_DIR}/inspector/protocol/DOMStorage.json
1121     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Database.json
1122     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Debugger.json
1123     ${JAVASCRIPTCORE_DIR}/inspector/protocol/GenericTypes.json
1124     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Heap.json
1125     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Inspector.json
1126     ${JAVASCRIPTCORE_DIR}/inspector/protocol/LayerTree.json
1127     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Network.json
1128     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Page.json
1129     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Recording.json
1130     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Runtime.json
1131     ${JAVASCRIPTCORE_DIR}/inspector/protocol/ScriptProfiler.json
1132     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Security.json
1133     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Target.json
1134     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Timeline.json
1135     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Worker.json
1136 )
1137
1138 if (ENABLE_INDEXED_DATABASE)
1139     list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
1140         ${JAVASCRIPTCORE_DIR}/inspector/protocol/IndexedDB.json
1141     )
1142 endif ()
1143
1144 if (ENABLE_RESOURCE_USAGE)
1145     list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
1146         ${JAVASCRIPTCORE_DIR}/inspector/protocol/CPUProfiler.json
1147         ${JAVASCRIPTCORE_DIR}/inspector/protocol/Memory.json
1148     )
1149 endif ()
1150
1151 if (ENABLE_SERVICE_WORKER)
1152     list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
1153         ${JAVASCRIPTCORE_DIR}/inspector/protocol/ServiceWorker.json
1154     )
1155 endif ()
1156
1157 add_custom_command(
1158     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/CombinedDomains.json
1159     MAIN_DEPENDENCY ${JavaScriptCore_SCRIPTS_DIR}/generate-combined-inspector-json.py
1160     DEPENDS ${JavaScriptCore_INSPECTOR_DOMAINS}
1161     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/generate-combined-inspector-json.py ${JavaScriptCore_INSPECTOR_DOMAINS} > ${JavaScriptCore_DERIVED_SOURCES_DIR}/CombinedDomains.json
1162     VERBATIM)
1163
1164 # Inspector Backend Dispatchers, Frontend Dispatchers, Type Builders
1165 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol)
1166 file(MAKE_DIRECTORY ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector)
1167 add_custom_command(
1168     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendDispatchers.cpp
1169            ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendDispatchers.h
1170            ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorFrontendDispatchers.cpp
1171            ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorFrontendDispatchers.h
1172            ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorProtocolObjects.cpp
1173            ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorProtocolObjects.h
1174            ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendCommands.js
1175     MAIN_DEPENDENCY ${JavaScriptCore_DERIVED_SOURCES_DIR}/CombinedDomains.json
1176     DEPENDS ${JavaScriptCore_INSPECTOR_PROTOCOL_SCRIPTS}
1177     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py --outputDir "${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector" --framework JavaScriptCore ${JavaScriptCore_DERIVED_SOURCES_DIR}/CombinedDomains.json
1178     VERBATIM)
1179
1180 # JSCBuiltins
1181
1182 set(BUILTINS_GENERATOR_SCRIPTS
1183     ${JavaScriptCore_SCRIPTS_DIR}/wkbuiltins.py
1184     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generator.py
1185     ${JavaScriptCore_SCRIPTS_DIR}/builtins_model.py
1186     ${JavaScriptCore_SCRIPTS_DIR}/builtins_templates.py
1187     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_header.py
1188     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_implementation.py
1189     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_header.py
1190     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_implementation.py
1191     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_wrapper_header.py
1192     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_wrapper_implementation.py
1193     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_internals_wrapper_header.py
1194     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_internals_wrapper_implementation.py
1195     ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
1196     ${JavaScriptCore_SCRIPTS_DIR}/lazywriter.py
1197 )
1198
1199 set(JavaScriptCore_BUILTINS_SOURCES
1200     ${JAVASCRIPTCORE_DIR}/builtins/AsyncFromSyncIteratorPrototype.js
1201     ${JAVASCRIPTCORE_DIR}/builtins/ArrayConstructor.js
1202     ${JAVASCRIPTCORE_DIR}/builtins/ArrayIteratorPrototype.js
1203     ${JAVASCRIPTCORE_DIR}/builtins/ArrayPrototype.js
1204     ${JAVASCRIPTCORE_DIR}/builtins/AsyncFunctionPrototype.js
1205     ${JAVASCRIPTCORE_DIR}/builtins/AsyncIteratorPrototype.js
1206     ${JAVASCRIPTCORE_DIR}/builtins/AsyncGeneratorPrototype.js
1207     ${JAVASCRIPTCORE_DIR}/builtins/DatePrototype.js
1208     ${JAVASCRIPTCORE_DIR}/builtins/FunctionPrototype.js
1209     ${JAVASCRIPTCORE_DIR}/builtins/GeneratorPrototype.js
1210     ${JAVASCRIPTCORE_DIR}/builtins/GlobalObject.js
1211     ${JAVASCRIPTCORE_DIR}/builtins/GlobalOperations.js
1212     ${JAVASCRIPTCORE_DIR}/builtins/InspectorInstrumentationObject.js
1213     ${JAVASCRIPTCORE_DIR}/builtins/InternalPromiseConstructor.js
1214     ${JAVASCRIPTCORE_DIR}/builtins/IteratorHelpers.js
1215     ${JAVASCRIPTCORE_DIR}/builtins/IteratorPrototype.js
1216     ${JAVASCRIPTCORE_DIR}/builtins/MapIteratorPrototype.js
1217     ${JAVASCRIPTCORE_DIR}/builtins/MapPrototype.js
1218     ${JAVASCRIPTCORE_DIR}/builtins/ModuleLoader.js
1219     ${JAVASCRIPTCORE_DIR}/builtins/NumberConstructor.js
1220     ${JAVASCRIPTCORE_DIR}/builtins/ObjectConstructor.js
1221     ${JAVASCRIPTCORE_DIR}/builtins/PromiseConstructor.js
1222     ${JAVASCRIPTCORE_DIR}/builtins/PromiseOperations.js
1223     ${JAVASCRIPTCORE_DIR}/builtins/PromisePrototype.js
1224     ${JAVASCRIPTCORE_DIR}/builtins/ReflectObject.js
1225     ${JAVASCRIPTCORE_DIR}/builtins/RegExpPrototype.js
1226     ${JAVASCRIPTCORE_DIR}/builtins/RegExpStringIteratorPrototype.js
1227     ${JAVASCRIPTCORE_DIR}/builtins/SetIteratorPrototype.js
1228     ${JAVASCRIPTCORE_DIR}/builtins/SetPrototype.js
1229     ${JAVASCRIPTCORE_DIR}/builtins/StringConstructor.js
1230     ${JAVASCRIPTCORE_DIR}/builtins/StringIteratorPrototype.js
1231     ${JAVASCRIPTCORE_DIR}/builtins/StringPrototype.js
1232     ${JAVASCRIPTCORE_DIR}/builtins/TypedArrayConstructor.js
1233     ${JAVASCRIPTCORE_DIR}/builtins/TypedArrayPrototype.js
1234     ${JAVASCRIPTCORE_DIR}/builtins/WebAssembly.js
1235 )
1236
1237 add_custom_command(
1238     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/JSCBuiltins.cpp ${JavaScriptCore_DERIVED_SOURCES_DIR}/JSCBuiltins.h
1239     MAIN_DEPENDENCY ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
1240     DEPENDS ${JavaScriptCore_BUILTINS_SOURCES} ${BUILTINS_GENERATOR_SCRIPTS}
1241     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py --framework JavaScriptCore --output-directory ${JavaScriptCore_DERIVED_SOURCES_DIR} --combined ${JavaScriptCore_BUILTINS_SOURCES}
1242     VERBATIM)
1243
1244 list(APPEND JavaScriptCore_HEADERS
1245     ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorBackendDispatchers.h
1246     ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorFrontendDispatchers.h
1247     ${JavaScriptCore_DERIVED_SOURCES_DIR}/inspector/InspectorProtocolObjects.h
1248     ${JavaScriptCore_DERIVED_SOURCES_DIR}/JSCBuiltins.h
1249 )
1250
1251 add_custom_command(
1252     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/AirOpcode.h ${JavaScriptCore_DERIVED_SOURCES_DIR}/AirOpcodeGenerated.h
1253     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/b3/air/AirOpcode.opcodes
1254     DEPENDS ${JAVASCRIPTCORE_DIR}/b3/air/opcode_generator.rb
1255     COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/b3/air/opcode_generator.rb ${JAVASCRIPTCORE_DIR}/b3/air/AirOpcode.opcodes VERBATIM
1256     WORKING_DIRECTORY ${JavaScriptCore_DERIVED_SOURCES_DIR}
1257 )
1258
1259 list(APPEND JavaScriptCore_HEADERS
1260     ${JavaScriptCore_DERIVED_SOURCES_DIR}/AirOpcode.h
1261     ${JavaScriptCore_DERIVED_SOURCES_DIR}/AirOpcodeGenerated.h
1262 )
1263
1264 add_custom_command(
1265     OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/InjectedScriptSource.h ${JavaScriptCore_DERIVED_SOURCES_DIR}/InjectedScriptSource.min.js
1266     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/inspector/InjectedScriptSource.js
1267     DEPENDS ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py
1268     COMMAND ${CMAKE_COMMAND} -E echo "//# sourceURL=__InjectedScript_InjectedScriptSource.js" > ${JavaScriptCore_DERIVED_SOURCES_DIR}/InjectedScriptSource.min.js
1269     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py < ${JAVASCRIPTCORE_DIR}/inspector/InjectedScriptSource.js >> ${JavaScriptCore_DERIVED_SOURCES_DIR}/InjectedScriptSource.min.js
1270     COMMAND ${PERL_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl InjectedScriptSource_js ${JavaScriptCore_DERIVED_SOURCES_DIR}/InjectedScriptSource.min.js ${JavaScriptCore_DERIVED_SOURCES_DIR}/InjectedScriptSource.h
1271     VERBATIM)
1272
1273 list(APPEND JavaScriptCore_HEADERS ${JavaScriptCore_DERIVED_SOURCES_DIR}/InjectedScriptSource.h)
1274
1275 if (WTF_CPU_X86_64)
1276     if (MSVC AND NOT ENABLE_C_LOOP)
1277         add_custom_command(
1278             OUTPUT ${JavaScriptCore_DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj
1279             MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/jit/JITStubsMSVC64.asm
1280             COMMAND ml64 -nologo -c -Fo ${JavaScriptCore_DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj ${JAVASCRIPTCORE_DIR}/jit/JITStubsMSVC64.asm
1281             VERBATIM)
1282
1283         list(APPEND JavaScriptCore_SOURCES ${JavaScriptCore_DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj)
1284     endif ()
1285 endif ()
1286
1287 set(JavaScriptCore_INTERFACE_LIBRARIES JavaScriptCore)
1288 set(JavaScriptCore_INTERFACE_INCLUDE_DIRECTORIES
1289     ${JavaScriptCore_FRAMEWORK_HEADERS_DIR}
1290     ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
1291 )
1292 set(JavaScriptCore_INTERFACE_DEPENDENCIES
1293     JavaScriptCore_CopyHeaders
1294     JavaScriptCore_CopyPrivateHeaders
1295 )
1296
1297 WEBKIT_FRAMEWORK_DECLARE(JavaScriptCore)
1298 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
1299
1300 if (COMPILER_IS_GCC_OR_CLANG)
1301     # Avoid using fused multiply-add instructions since this could give different results
1302     # for e.g. parseInt depending on the platform and compilation flags.
1303     WEBKIT_ADD_TARGET_CXX_FLAGS(JavaScriptCore -ffp-contract=off)
1304 endif ()
1305
1306 WEBKIT_COPY_FILES(JavaScriptCore_CopyHeaders
1307     DESTINATION ${JavaScriptCore_FRAMEWORK_HEADERS_DIR}/JavaScriptCore
1308     FILES ${JavaScriptCore_PUBLIC_FRAMEWORK_HEADERS}
1309     FLATTENED
1310 )
1311
1312 WEBKIT_COPY_FILES(JavaScriptCore_CopyPrivateHeaders
1313     DESTINATION ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR}/JavaScriptCore
1314     FILES ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS}
1315     FLATTENED
1316 )
1317 # JavaScriptCore_CopyPrivateHeaders needs to have a direct or indirect
1318 # dependency of JavaScriptCore for CMake Visual Studio generator to
1319 # eliminate duplicated custom commands. Otherwise,
1320 # CombinedDomains.json will be generated in both projects.
1321 if (NOT INTERNAL_BUILD)
1322     add_dependencies(JavaScriptCore_CopyPrivateHeaders JavaScriptCore)
1323 endif ()
1324
1325 target_include_directories(LLIntSettingsExtractor PRIVATE
1326     ${JavaScriptCore_INCLUDE_DIRECTORIES}
1327     ${JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES}
1328 )
1329 target_include_directories(LLIntSettingsExtractor SYSTEM PRIVATE ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
1330
1331 target_include_directories(LLIntOffsetsExtractor PRIVATE
1332     ${JavaScriptCore_INCLUDE_DIRECTORIES}
1333     ${JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES}
1334 )
1335 target_include_directories(LLIntOffsetsExtractor SYSTEM PRIVATE ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
1336
1337 add_subdirectory(shell)
1338
1339 WEBKIT_COMPUTE_SOURCES(JavaScriptCore)
1340 WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
1341 WEBKIT_FRAMEWORK(JavaScriptCore)
1342 WEBKIT_FRAMEWORK_TARGET(JavaScriptCore)
1343
1344 if (NOT "${PORT}" STREQUAL "Mac")
1345     if (${JavaScriptCore_LIBRARY_TYPE} STREQUAL "SHARED")
1346         WEBKIT_POPULATE_LIBRARY_VERSION(JAVASCRIPTCORE)
1347         set_target_properties(JavaScriptCore PROPERTIES VERSION ${JAVASCRIPTCORE_VERSION} SOVERSION ${JAVASCRIPTCORE_VERSION_MAJOR})
1348         install(TARGETS JavaScriptCore DESTINATION "${LIB_INSTALL_DIR}")
1349     endif ()
1350 endif ()
1351
1352 # Force staging of shared scripts, even if they aren't directly used to build JavaScriptCore.
1353
1354 add_custom_target(stageSharedScripts DEPENDS ${JavaScriptCore_SCRIPTS})
1355 add_dependencies(JavaScriptCore stageSharedScripts ${JavaScriptCore_EXTRA_DEPENDENCIES})
1356
1357 if (USE_VERSION_STAMPER)
1358     add_custom_command(
1359         TARGET JavaScriptCore
1360         PRE_BUILD
1361         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${JavaScriptCore_DERIVED_SOURCES_DIR}
1362         VERBATIM)
1363
1364     add_custom_command(
1365         TARGET JavaScriptCore
1366         POST_BUILD
1367         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${JavaScriptCore_DERIVED_SOURCES_DIR} $<TARGET_FILE:JavaScriptCore>
1368         VERBATIM)
1369 endif ()