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