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