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