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