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