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