Do unified source builds for JSC
[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 set(JavaScriptCore_INCLUDE_DIRECTORIES
6     "${CMAKE_BINARY_DIR}"
7     "${JAVASCRIPTCORE_DIR}"
8     "${JAVASCRIPTCORE_DIR}/.."
9     "${JAVASCRIPTCORE_DIR}/API"
10     "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
11     "${JAVASCRIPTCORE_DIR}/assembler"
12     "${JAVASCRIPTCORE_DIR}/b3"
13     "${JAVASCRIPTCORE_DIR}/b3/air"
14     "${JAVASCRIPTCORE_DIR}/bindings"
15     "${JAVASCRIPTCORE_DIR}/builtins"
16     "${JAVASCRIPTCORE_DIR}/bytecode"
17     "${JAVASCRIPTCORE_DIR}/bytecompiler"
18     "${JAVASCRIPTCORE_DIR}/dfg"
19     "${JAVASCRIPTCORE_DIR}/disassembler"
20     "${JAVASCRIPTCORE_DIR}/disassembler/udis86"
21     "${JAVASCRIPTCORE_DIR}/disassembler/ARM64"
22     "${JAVASCRIPTCORE_DIR}/domjit"
23     "${JAVASCRIPTCORE_DIR}/ftl"
24     "${JAVASCRIPTCORE_DIR}/heap"
25     "${JAVASCRIPTCORE_DIR}/debugger"
26     "${JAVASCRIPTCORE_DIR}/inspector"
27     "${JAVASCRIPTCORE_DIR}/inspector/agents"
28     "${JAVASCRIPTCORE_DIR}/inspector/augmentable"
29     "${JAVASCRIPTCORE_DIR}/inspector/remote"
30     "${JAVASCRIPTCORE_DIR}/interpreter"
31     "${JAVASCRIPTCORE_DIR}/jit"
32     "${JAVASCRIPTCORE_DIR}/llint"
33     "${JAVASCRIPTCORE_DIR}/parser"
34     "${JAVASCRIPTCORE_DIR}/profiler"
35     "${JAVASCRIPTCORE_DIR}/runtime"
36     "${JAVASCRIPTCORE_DIR}/tools"
37     "${JAVASCRIPTCORE_DIR}/wasm"
38     "${JAVASCRIPTCORE_DIR}/wasm/js"
39     "${JAVASCRIPTCORE_DIR}/yarr"
40     "${FORWARDING_HEADERS_DIR}"
41     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
42     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector"
43 )
44
45 set(JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
46     "${ICU_INCLUDE_DIRS}"
47 )
48
49 set(JavaScriptCore_OG_SOURCES
50     API/JSBase.cpp
51     API/JSCTestRunnerUtils.cpp
52     API/JSCallbackConstructor.cpp
53     API/JSCallbackFunction.cpp
54     API/JSCallbackObject.cpp
55     API/JSClassRef.cpp
56     API/JSContextRef.cpp
57     API/JSHeapFinalizerPrivate.cpp
58     API/JSMarkingConstraintPrivate.cpp
59     API/JSObjectRef.cpp
60     API/JSTypedArray.cpp
61     API/JSScriptRef.cpp
62     API/JSStringRef.cpp
63     API/JSValueRef.cpp
64     API/JSWeakObjectMapRefPrivate.cpp
65     API/JSWeakPrivate.cpp
66     API/OpaqueJSString.cpp
67
68     assembler/ARMAssembler.cpp
69     assembler/AbstractMacroAssembler.cpp
70     assembler/LinkBuffer.cpp
71     assembler/MacroAssembler.cpp
72     assembler/MacroAssemblerARM.cpp
73     assembler/MacroAssemblerARM64.cpp
74     assembler/MacroAssemblerARMv7.cpp
75     assembler/MacroAssemblerCodeRef.cpp
76     assembler/MacroAssemblerPrinter.cpp
77     assembler/MacroAssemblerX86Common.cpp
78     assembler/Printer.cpp
79     assembler/ProbeContext.cpp
80     assembler/ProbeStack.cpp
81
82     b3/air/AirAllocateRegistersAndStackByLinearScan.cpp
83     b3/air/AirAllocateRegistersByGraphColoring.cpp
84     b3/air/AirAllocateStackByGraphColoring.cpp
85     b3/air/AirArg.cpp
86     b3/air/AirBasicBlock.cpp
87     b3/air/AirBlockInsertionSet.cpp
88     b3/air/AirBreakCriticalEdges.cpp
89     b3/air/AirCCallSpecial.cpp
90     b3/air/AirCCallingConvention.cpp
91     b3/air/AirCode.cpp
92     b3/air/AirCustom.cpp
93     b3/air/AirDisassembler.cpp
94     b3/air/AirEliminateDeadCode.cpp
95     b3/air/AirEmitShuffle.cpp
96     b3/air/AirFixObviousSpills.cpp
97     b3/air/AirFixPartialRegisterStalls.cpp
98     b3/air/AirFixSpillsAfterTerminals.cpp
99     b3/air/AirGenerate.cpp
100     b3/air/AirGenerated.cpp
101     b3/air/AirHandleCalleeSaves.cpp
102     b3/air/AirInsertionSet.cpp
103     b3/air/AirInst.cpp
104     b3/air/AirKind.cpp
105     b3/air/AirLogRegisterPressure.cpp
106     b3/air/AirLowerAfterRegAlloc.cpp
107     b3/air/AirLowerEntrySwitch.cpp
108     b3/air/AirLowerMacros.cpp
109     b3/air/AirLowerStackArgs.cpp
110     b3/air/AirOptimizeBlockOrder.cpp
111     b3/air/AirPadInterference.cpp
112     b3/air/AirPhaseInsertionSet.cpp
113     b3/air/AirPhaseScope.cpp
114     b3/air/AirPrintSpecial.cpp
115     b3/air/AirRegLiveness.cpp
116     b3/air/AirReportUsedRegisters.cpp
117     b3/air/AirSimplifyCFG.cpp
118     b3/air/AirSpecial.cpp
119     b3/air/AirStackAllocation.cpp
120     b3/air/AirStackSlot.cpp
121     b3/air/AirStackSlotKind.cpp
122     b3/air/AirTmp.cpp
123     b3/air/AirTmpWidth.cpp
124     b3/air/AirValidate.cpp
125
126     b3/B3ArgumentRegValue.cpp
127     b3/B3AtomicValue.cpp
128     b3/B3Bank.cpp
129     b3/B3BasicBlock.cpp
130     b3/B3BlockInsertionSet.cpp
131     b3/B3BreakCriticalEdges.cpp
132     b3/B3CCallValue.cpp
133     b3/B3CaseCollection.cpp
134     b3/B3CheckSpecial.cpp
135     b3/B3CheckValue.cpp
136     b3/B3Common.cpp
137     b3/B3Commutativity.cpp
138     b3/B3Compile.cpp
139     b3/B3Compilation.cpp
140     b3/B3Const32Value.cpp
141     b3/B3Const64Value.cpp
142     b3/B3ConstDoubleValue.cpp
143     b3/B3ConstFloatValue.cpp
144     b3/B3ConstrainedValue.cpp
145     b3/B3DataSection.cpp
146     b3/B3DuplicateTails.cpp
147     b3/B3Effects.cpp
148     b3/B3EliminateCommonSubexpressions.cpp
149     b3/B3EnsureLoopPreHeaders.cpp
150     b3/B3FenceValue.cpp
151     b3/B3FixSSA.cpp
152     b3/B3FoldPathConstants.cpp
153     b3/B3FrequencyClass.cpp
154     b3/B3Generate.cpp
155     b3/B3HoistLoopInvariantValues.cpp
156     b3/B3InferSwitches.cpp
157     b3/B3InsertionSet.cpp
158     b3/B3Kind.cpp
159     b3/B3LegalizeMemoryOffsets.cpp
160     b3/B3LowerMacros.cpp
161     b3/B3LowerMacrosAfterOptimizations.cpp
162     b3/B3LowerToAir.cpp
163     b3/B3MathExtras.cpp
164     b3/B3MemoryValue.cpp
165     b3/B3MoveConstants.cpp
166     b3/B3OpaqueByproducts.cpp
167     b3/B3Opcode.cpp
168     b3/B3Origin.cpp
169     b3/B3OriginDump.cpp
170     b3/B3PatchpointSpecial.cpp
171     b3/B3PatchpointValue.cpp
172     b3/B3PhaseScope.cpp
173     b3/B3PhiChildren.cpp
174     b3/B3Procedure.cpp
175     b3/B3PureCSE.cpp
176     b3/B3ReduceDoubleToFloat.cpp
177     b3/B3ReduceStrength.cpp
178     b3/B3SSACalculator.cpp
179     b3/B3SlotBaseValue.cpp
180     b3/B3StackmapGenerationParams.cpp
181     b3/B3StackmapSpecial.cpp
182     b3/B3StackmapValue.cpp
183     b3/B3StackSlot.cpp
184     b3/B3SwitchCase.cpp
185     b3/B3SwitchValue.cpp
186     b3/B3TimingScope.cpp
187     b3/B3Type.cpp
188     b3/B3UpsilonValue.cpp
189     b3/B3UseCounts.cpp
190     b3/B3Validate.cpp
191     b3/B3Value.cpp
192     b3/B3ValueKey.cpp
193     b3/B3ValueRep.cpp
194     b3/B3Variable.cpp
195     b3/B3VariableLiveness.cpp
196     b3/B3VariableValue.cpp
197     b3/B3WasmAddressValue.cpp
198     b3/B3WasmBoundsCheckValue.cpp
199     b3/B3Width.cpp
200
201     bindings/ScriptFunctionCall.cpp
202     bindings/ScriptObject.cpp
203     bindings/ScriptValue.cpp
204
205     builtins/BuiltinExecutables.cpp
206     builtins/BuiltinExecutableCreator.cpp
207     builtins/BuiltinNames.cpp
208
209     bytecode/AccessCase.cpp
210     bytecode/AccessCaseSnippetParams.cpp
211     bytecode/AdaptiveInferredPropertyValueWatchpointBase.cpp
212     bytecode/ArithProfile.cpp
213     bytecode/ArrayAllocationProfile.cpp
214     bytecode/ArrayProfile.cpp
215     bytecode/BytecodeBasicBlock.cpp
216     bytecode/BytecodeDumper.cpp
217     bytecode/BytecodeGeneratorification.cpp
218     bytecode/BytecodeIntrinsicRegistry.cpp
219     bytecode/BytecodeLivenessAnalysis.cpp
220     bytecode/BytecodeRewriter.cpp
221     bytecode/CallEdge.cpp
222     bytecode/CallLinkInfo.cpp
223     bytecode/CallLinkStatus.cpp
224     bytecode/CallMode.cpp
225     bytecode/CallVariant.cpp
226     bytecode/CodeBlock.cpp
227     bytecode/CodeBlockHash.cpp
228     bytecode/CodeBlockJettisoningWatchpoint.cpp
229     bytecode/CodeOrigin.cpp
230     bytecode/CodeType.cpp
231     bytecode/ComplexGetStatus.cpp
232     bytecode/DFGExitProfile.cpp
233     bytecode/DataFormat.cpp
234     bytecode/DeferredCompilationCallback.cpp
235     bytecode/DeferredSourceDump.cpp
236     bytecode/DirectEvalCodeCache.cpp
237     bytecode/EvalCodeBlock.cpp
238     bytecode/ExecutionCounter.cpp
239     bytecode/ExitKind.cpp
240     bytecode/ExitingJITType.cpp
241     bytecode/FullCodeOrigin.cpp
242     bytecode/FunctionCodeBlock.cpp
243     bytecode/GetByIdStatus.cpp
244     bytecode/GetByIdVariant.cpp
245     bytecode/GetterSetterAccessCase.cpp
246     bytecode/InlineAccess.cpp
247     bytecode/InlineCallFrame.cpp
248     bytecode/InlineCallFrameSet.cpp
249     bytecode/IntrinsicGetterAccessCase.cpp
250     bytecode/JumpTable.cpp
251     bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp
252     bytecode/LazyOperandValueProfile.cpp
253     bytecode/MethodOfGettingAValueProfile.cpp
254     bytecode/ModuleNamespaceAccessCase.cpp
255     bytecode/ModuleProgramCodeBlock.cpp
256     bytecode/ObjectPropertyCondition.cpp
257     bytecode/ObjectPropertyConditionSet.cpp
258     bytecode/Opcode.cpp
259     bytecode/PolymorphicAccess.cpp
260     bytecode/PreciseJumpTargets.cpp
261     bytecode/ProgramCodeBlock.cpp
262     bytecode/PropertyCondition.cpp
263     bytecode/ProxyableAccessCase.cpp
264     bytecode/PutByIdFlags.cpp
265     bytecode/PutByIdStatus.cpp
266     bytecode/PutByIdVariant.cpp
267     bytecode/ReduceWhitespace.cpp
268     bytecode/SpecialPointer.cpp
269     bytecode/SpeculatedType.cpp
270     bytecode/StructureSet.cpp
271     bytecode/StructureStubClearingWatchpoint.cpp
272     bytecode/StructureStubInfo.cpp
273     bytecode/SuperSampler.cpp
274     bytecode/ToThisStatus.cpp
275     bytecode/TrackedReferences.cpp
276     bytecode/UnlinkedCodeBlock.cpp
277     bytecode/UnlinkedEvalCodeBlock.cpp
278     bytecode/UnlinkedFunctionCodeBlock.cpp
279     bytecode/UnlinkedFunctionExecutable.cpp
280     bytecode/UnlinkedInstructionStream.cpp
281     bytecode/UnlinkedModuleProgramCodeBlock.cpp
282     bytecode/UnlinkedProgramCodeBlock.cpp
283     bytecode/ValueRecovery.cpp
284     bytecode/VariableWriteFireDetail.cpp
285     bytecode/VirtualRegister.cpp
286     bytecode/Watchpoint.cpp
287
288     bytecompiler/BytecodeGenerator.cpp
289     bytecompiler/NodesCodegen.cpp
290
291     debugger/Debugger.cpp
292     debugger/DebuggerCallFrame.cpp
293     debugger/DebuggerLocation.cpp
294     debugger/DebuggerParseData.cpp
295     debugger/DebuggerScope.cpp
296
297     dfg/DFGAbstractHeap.cpp
298     dfg/DFGAbstractValue.cpp
299     dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp
300     dfg/DFGAdaptiveStructureWatchpoint.cpp
301     dfg/DFGArgumentsEliminationPhase.cpp
302     dfg/DFGArgumentsUtilities.cpp
303     dfg/DFGArithMode.cpp
304     dfg/DFGArrayMode.cpp
305     dfg/DFGAtTailAbstractState.cpp
306     dfg/DFGAvailability.cpp
307     dfg/DFGAvailabilityMap.cpp
308     dfg/DFGBackwardsPropagationPhase.cpp
309     dfg/DFGBasicBlock.cpp
310     dfg/DFGBlockInsertionSet.cpp
311     dfg/DFGBlockSet.cpp
312     dfg/DFGByteCodeParser.cpp
313     dfg/DFGCFAPhase.cpp
314     dfg/DFGCFGSimplificationPhase.cpp
315     dfg/DFGCPSRethreadingPhase.cpp
316     dfg/DFGCSEPhase.cpp
317     dfg/DFGCapabilities.cpp
318     dfg/DFGCleanUpPhase.cpp
319     dfg/DFGClobberSet.cpp
320     dfg/DFGClobberize.cpp
321     dfg/DFGClobbersExitState.cpp
322     dfg/DFGCombinedLiveness.cpp
323     dfg/DFGCommon.cpp
324     dfg/DFGCommonData.cpp
325     dfg/DFGCompilationKey.cpp
326     dfg/DFGCompilationMode.cpp
327     dfg/DFGConstantFoldingPhase.cpp
328     dfg/DFGConstantHoistingPhase.cpp
329     dfg/DFGCriticalEdgeBreakingPhase.cpp
330     dfg/DFGDCEPhase.cpp
331     dfg/DFGDesiredIdentifiers.cpp
332     dfg/DFGDesiredTransitions.cpp
333     dfg/DFGDesiredWatchpoints.cpp
334     dfg/DFGDesiredWeakReferences.cpp
335     dfg/DFGDisassembler.cpp
336     dfg/DFGDoesGC.cpp
337     dfg/DFGDriver.cpp
338     dfg/DFGEdge.cpp
339     dfg/DFGEpoch.cpp
340     dfg/DFGFailedFinalizer.cpp
341     dfg/DFGFinalizer.cpp
342     dfg/DFGFixedButterflyAccessUncagingPhase.cpp
343     dfg/DFGFixupPhase.cpp
344     dfg/DFGFlowIndexing.cpp
345     dfg/DFGFlushFormat.cpp
346     dfg/DFGFlushedAt.cpp
347     dfg/DFGLiveCatchVariablePreservationPhase.cpp
348     dfg/DFGFrozenValue.cpp
349     dfg/DFGGraph.cpp
350     dfg/DFGGraphSafepoint.cpp
351     dfg/DFGHeapLocation.cpp
352     dfg/DFGInPlaceAbstractState.cpp
353     dfg/DFGInferredTypeCheck.cpp
354     dfg/DFGInsertionSet.cpp
355     dfg/DFGIntegerCheckCombiningPhase.cpp
356     dfg/DFGIntegerRangeOptimizationPhase.cpp
357     dfg/DFGInvalidationPointInjectionPhase.cpp
358     dfg/DFGJITCode.cpp
359     dfg/DFGJITCompiler.cpp
360     dfg/DFGJITFinalizer.cpp
361     dfg/DFGJumpReplacement.cpp
362     dfg/DFGLICMPhase.cpp
363     dfg/DFGLazyJSValue.cpp
364     dfg/DFGLazyNode.cpp
365     dfg/DFGLivenessAnalysisPhase.cpp
366     dfg/DFGLoopPreHeaderCreationPhase.cpp
367     dfg/DFGMaximalFlushInsertionPhase.cpp
368     dfg/DFGMayExit.cpp
369     dfg/DFGMinifiedGraph.cpp
370     dfg/DFGMinifiedNode.cpp
371     dfg/DFGMovHintRemovalPhase.cpp
372     dfg/DFGMultiGetByOffsetData.cpp
373     dfg/DFGNode.cpp
374     dfg/DFGNodeAbstractValuePair.cpp
375     dfg/DFGNodeFlags.cpp
376     dfg/DFGNodeFlowProjection.cpp
377     dfg/DFGNodeOrigin.cpp
378     dfg/DFGOSRAvailabilityAnalysisPhase.cpp
379     dfg/DFGOSREntry.cpp
380     dfg/DFGOSREntrypointCreationPhase.cpp
381     dfg/DFGOSRExit.cpp
382     dfg/DFGOSRExitBase.cpp
383     dfg/DFGOSRExitCompilerCommon.cpp
384     dfg/DFGOSRExitFuzz.cpp
385     dfg/DFGOSRExitJumpPlaceholder.cpp
386     dfg/DFGOSRExitPreparation.cpp
387     dfg/DFGObjectAllocationSinkingPhase.cpp
388     dfg/DFGObjectMaterializationData.cpp
389     dfg/DFGOperations.cpp
390     dfg/DFGPhantomInsertionPhase.cpp
391     dfg/DFGPhase.cpp
392     dfg/DFGPhiChildren.cpp
393     dfg/DFGPlan.cpp
394     dfg/DFGPredictionInjectionPhase.cpp
395     dfg/DFGPredictionPropagationPhase.cpp
396     dfg/DFGPromotedHeapLocation.cpp
397     dfg/DFGPureValue.cpp
398     dfg/DFGPutStackSinkingPhase.cpp
399     dfg/DFGRegisteredStructureSet.cpp
400     dfg/DFGSSACalculator.cpp
401     dfg/DFGSSAConversionPhase.cpp
402     dfg/DFGSSALoweringPhase.cpp
403     dfg/DFGSafepoint.cpp
404     dfg/DFGSnippetParams.cpp
405     dfg/DFGSpeculativeJIT.cpp
406     dfg/DFGSpeculativeJIT32_64.cpp
407     dfg/DFGSpeculativeJIT64.cpp
408     dfg/DFGStackLayoutPhase.cpp
409     dfg/DFGStaticExecutionCountEstimationPhase.cpp
410     dfg/DFGStoreBarrierClusteringPhase.cpp
411     dfg/DFGStoreBarrierInsertionPhase.cpp
412     dfg/DFGStrengthReductionPhase.cpp
413     dfg/DFGStructureAbstractValue.cpp
414     dfg/DFGThreadData.cpp
415     dfg/DFGThunks.cpp
416     dfg/DFGTierUpCheckInjectionPhase.cpp
417     dfg/DFGToFTLDeferredCompilationCallback.cpp
418     dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp
419     dfg/DFGTransition.cpp
420     dfg/DFGTypeCheckHoistingPhase.cpp
421     dfg/DFGUnificationPhase.cpp
422     dfg/DFGUseKind.cpp
423     dfg/DFGValidate.cpp
424     dfg/DFGValueSource.cpp
425     dfg/DFGValueStrength.cpp
426     dfg/DFGVarargsForwardingPhase.cpp
427     dfg/DFGVariableAccessData.cpp
428     dfg/DFGVariableAccessDataDump.cpp
429     dfg/DFGVariableEvent.cpp
430     dfg/DFGVariableEventStream.cpp
431     dfg/DFGVirtualRegisterAllocationPhase.cpp
432     dfg/DFGWatchpointCollectionPhase.cpp
433     dfg/DFGWorklist.cpp
434
435     disassembler/ARM64Disassembler.cpp
436     disassembler/ARMLLVMDisassembler.cpp
437     disassembler/ARMv7Disassembler.cpp
438     disassembler/Disassembler.cpp
439     disassembler/UDis86Disassembler.cpp
440     disassembler/X86Disassembler.cpp
441
442     disassembler/ARM64/A64DOpcode.cpp
443
444     disassembler/ARMv7/ARMv7DOpcode.cpp
445
446     disassembler/udis86/udis86.c
447     disassembler/udis86/udis86_decode.c
448     disassembler/udis86/udis86_itab_holder.c
449     disassembler/udis86/udis86_syn-att.c
450     disassembler/udis86/udis86_syn-intel.c
451     disassembler/udis86/udis86_syn.c
452
453     domjit/DOMJITAbstractHeap.cpp
454     domjit/DOMJITHeapRange.cpp
455
456     ftl/FTLAbstractHeap.cpp
457     ftl/FTLAbstractHeapRepository.cpp
458     ftl/FTLAvailableRecovery.cpp
459     ftl/FTLCapabilities.cpp
460     ftl/FTLCommonValues.cpp
461     ftl/FTLCompile.cpp
462     ftl/FTLExceptionTarget.cpp
463     ftl/FTLExitArgument.cpp
464     ftl/FTLExitArgumentForOperand.cpp
465     ftl/FTLExitPropertyValue.cpp
466     ftl/FTLExitTimeObjectMaterialization.cpp
467     ftl/FTLExitValue.cpp
468     ftl/FTLFail.cpp
469     ftl/FTLForOSREntryJITCode.cpp
470     ftl/FTLJITCode.cpp
471     ftl/FTLJITFinalizer.cpp
472     ftl/FTLLazySlowPath.cpp
473     ftl/FTLLink.cpp
474     ftl/FTLLocation.cpp
475     ftl/FTLLowerDFGToB3.cpp
476     ftl/FTLOSREntry.cpp
477     ftl/FTLOSRExit.cpp
478     ftl/FTLOSRExitCompiler.cpp
479     ftl/FTLOSRExitHandle.cpp
480     ftl/FTLOperations.cpp
481     ftl/FTLOutput.cpp
482     ftl/FTLPatchpointExceptionHandle.cpp
483     ftl/FTLRecoveryOpcode.cpp
484     ftl/FTLSaveRestore.cpp
485     ftl/FTLSlowPathCall.cpp
486     ftl/FTLSlowPathCallKey.cpp
487     ftl/FTLSnippetParams.cpp
488     ftl/FTLState.cpp
489     ftl/FTLThunks.cpp
490     ftl/FTLValueRange.cpp
491
492     heap/AlignedMemoryAllocator.cpp
493     heap/AllocatorAttributes.cpp
494     heap/CellContainer.cpp
495     heap/CodeBlockSet.cpp
496     heap/CollectionScope.cpp
497     heap/CollectorPhase.cpp
498     heap/ConservativeRoots.cpp
499     heap/DeferGC.cpp
500     heap/DestructionMode.cpp
501     heap/EdenGCActivityCallback.cpp
502     heap/FastMallocAlignedMemoryAllocator.cpp
503     heap/FullGCActivityCallback.cpp
504     heap/FreeList.cpp
505     heap/GCActivityCallback.cpp
506     heap/GCConductor.cpp
507     heap/GCLogging.cpp
508     heap/GCRequest.cpp
509     heap/GigacageAlignedMemoryAllocator.cpp
510     heap/HandleSet.cpp
511     heap/HandleStack.cpp
512     heap/Heap.cpp
513     heap/HeapCell.cpp
514     heap/HeapFinalizerCallback.cpp
515     heap/HeapHelperPool.cpp
516     heap/HeapProfiler.cpp
517     heap/HeapSnapshot.cpp
518     heap/HeapSnapshotBuilder.cpp
519     heap/IncrementalSweeper.cpp
520     heap/JITStubRoutineSet.cpp
521     heap/LargeAllocation.cpp
522     heap/MachineStackMarker.cpp
523     heap/MarkStack.cpp
524     heap/MarkedAllocator.cpp
525     heap/MarkedBlock.cpp
526     heap/MarkedSpace.cpp
527     heap/MarkingConstraint.cpp
528     heap/MarkingConstraintSet.cpp
529     heap/MutatorScheduler.cpp
530     heap/MutatorState.cpp
531     heap/SlotVisitor.cpp
532     heap/SpaceTimeMutatorScheduler.cpp
533     heap/StochasticSpaceTimeMutatorScheduler.cpp
534     heap/StopIfNecessaryTimer.cpp
535     heap/Subspace.cpp
536     heap/SynchronousStopTheWorldMutatorScheduler.cpp
537     heap/Synchronousness.cpp
538     heap/VisitRaceKey.cpp
539     heap/Weak.cpp
540     heap/WeakBlock.cpp
541     heap/WeakHandleOwner.cpp
542     heap/WeakSet.cpp
543     heap/WriteBarrierSupport.cpp
544
545     inspector/AsyncStackTrace.cpp
546     inspector/ConsoleMessage.cpp
547     inspector/ContentSearchUtilities.cpp
548     inspector/EventLoop.cpp
549     inspector/IdentifiersFactory.cpp
550     inspector/InjectedScript.cpp
551     inspector/InjectedScriptBase.cpp
552     inspector/InjectedScriptHost.cpp
553     inspector/InjectedScriptManager.cpp
554     inspector/InjectedScriptModule.cpp
555     inspector/InspectorAgentRegistry.cpp
556     inspector/InspectorFrontendRouter.cpp
557     inspector/InspectorBackendDispatcher.cpp
558     inspector/InspectorValues.cpp
559     inspector/JSGlobalObjectConsoleClient.cpp
560     inspector/JSGlobalObjectInspectorController.cpp
561     inspector/JSGlobalObjectScriptDebugServer.cpp
562     inspector/JSInjectedScriptHost.cpp
563     inspector/JSInjectedScriptHostPrototype.cpp
564     inspector/JSJavaScriptCallFrame.cpp
565     inspector/JSJavaScriptCallFramePrototype.cpp
566     inspector/JavaScriptCallFrame.cpp
567     inspector/PerGlobalObjectWrapperWorld.cpp
568     inspector/ScriptArguments.cpp
569     inspector/ScriptCallFrame.cpp
570     inspector/ScriptCallStack.cpp
571     inspector/ScriptCallStackFactory.cpp
572     inspector/ScriptDebugServer.cpp
573
574     inspector/agents/InspectorAgent.cpp
575     inspector/agents/InspectorConsoleAgent.cpp
576     inspector/agents/InspectorDebuggerAgent.cpp
577     inspector/agents/InspectorHeapAgent.cpp
578     inspector/agents/InspectorRuntimeAgent.cpp
579     inspector/agents/InspectorScriptProfilerAgent.cpp
580     inspector/agents/JSGlobalObjectConsoleAgent.cpp
581     inspector/agents/JSGlobalObjectDebuggerAgent.cpp
582     inspector/agents/JSGlobalObjectRuntimeAgent.cpp
583
584     interpreter/AbstractPC.cpp
585     interpreter/CLoopStack.cpp
586     interpreter/CallFrame.cpp
587     interpreter/Interpreter.cpp
588     interpreter/ProtoCallFrame.cpp
589     interpreter/ShadowChicken.cpp
590     interpreter/StackVisitor.cpp
591
592     jit/AssemblyHelpers.cpp
593     jit/BinarySwitch.cpp
594     jit/CCallHelpers.cpp
595     jit/CachedRecovery.cpp
596     jit/CallFrameShuffleData.cpp
597     jit/CallFrameShuffler.cpp
598     jit/CallFrameShuffler32_64.cpp
599     jit/CallFrameShuffler64.cpp
600     jit/ExecutableAllocationFuzz.cpp
601     jit/ExecutableAllocator.cpp
602     jit/GCAwareJITStubRoutine.cpp
603     jit/GPRInfo.cpp
604     jit/HostCallReturnValue.cpp
605     jit/ICStats.cpp
606     jit/IntrinsicEmitter.cpp
607     jit/JIT.cpp
608     jit/JITAddGenerator.cpp
609     jit/JITArithmetic.cpp
610     jit/JITArithmetic32_64.cpp
611     jit/JITBitAndGenerator.cpp
612     jit/JITBitOrGenerator.cpp
613     jit/JITBitXorGenerator.cpp
614     jit/JITCall.cpp
615     jit/JITCall32_64.cpp
616     jit/JITCode.cpp
617     jit/JITDisassembler.cpp
618     jit/JITDivGenerator.cpp
619     jit/JITExceptions.cpp
620     jit/JITInlineCacheGenerator.cpp
621     jit/JITLeftShiftGenerator.cpp
622     jit/JITMulGenerator.cpp
623     jit/JITNegGenerator.cpp
624     jit/JITOpcodes.cpp
625     jit/JITOpcodes32_64.cpp
626     jit/JITOperations.cpp
627     jit/JITPropertyAccess.cpp
628     jit/JITPropertyAccess32_64.cpp
629     jit/JITRightShiftGenerator.cpp
630     jit/JITStubRoutine.cpp
631     jit/JITSubGenerator.cpp
632     jit/JITThunks.cpp
633     jit/JITToDFGDeferredCompilationCallback.cpp
634     jit/JITWorklist.cpp
635     jit/PCToCodeOriginMap.cpp
636     jit/PolymorphicCallStubRoutine.cpp
637     jit/Reg.cpp
638     jit/RegisterAtOffset.cpp
639     jit/RegisterAtOffsetList.cpp
640     jit/RegisterSet.cpp
641     jit/Repatch.cpp
642     jit/ScratchRegisterAllocator.cpp
643     jit/SetupVarargsFrame.cpp
644     jit/TagRegistersMode.cpp
645     jit/TempRegisterSet.cpp
646     jit/ThunkGenerators.cpp
647
648     llint/LLIntCLoop.cpp
649     llint/LLIntData.cpp
650     llint/LLIntEntrypoint.cpp
651     llint/LLIntExceptions.cpp
652     llint/LLIntSlowPaths.cpp
653     llint/LLIntThunks.cpp
654     llint/LowLevelInterpreter.cpp
655
656     parser/Lexer.cpp
657     parser/ModuleAnalyzer.cpp
658     parser/Nodes.cpp
659     parser/NodesAnalyzeModule.cpp
660     parser/Parser.cpp
661     parser/ParserArena.cpp
662     parser/SourceProvider.cpp
663     parser/SourceProviderCache.cpp
664     parser/UnlinkedSourceCode.cpp
665     parser/VariableEnvironment.cpp
666
667     profiler/ProfilerBytecode.cpp
668     profiler/ProfilerBytecodeSequence.cpp
669     profiler/ProfilerBytecodes.cpp
670     profiler/ProfilerCompilation.cpp
671     profiler/ProfilerCompilationKind.cpp
672     profiler/ProfilerCompiledBytecode.cpp
673     profiler/ProfilerDatabase.cpp
674     profiler/ProfilerEvent.cpp
675     profiler/ProfilerJettisonReason.cpp
676     profiler/ProfilerOSRExit.cpp
677     profiler/ProfilerOSRExitSite.cpp
678     profiler/ProfilerOrigin.cpp
679     profiler/ProfilerOriginStack.cpp
680     profiler/ProfilerProfiledBytecodes.cpp
681     profiler/ProfilerUID.cpp
682
683     runtime/AbstractModuleRecord.cpp
684     runtime/ArgList.cpp
685     runtime/ArrayBuffer.cpp
686     runtime/ArrayBufferNeuteringWatchpoint.cpp
687     runtime/ArrayBufferView.cpp
688     runtime/ArrayConstructor.cpp
689     runtime/ArrayConventions.cpp
690     runtime/ArrayIteratorPrototype.cpp
691     runtime/ArrayPrototype.cpp
692     runtime/AsyncFromSyncIteratorPrototype.cpp
693     runtime/AsyncGeneratorFunctionConstructor.cpp
694     runtime/AsyncGeneratorFunctionPrototype.cpp
695     runtime/AsyncGeneratorPrototype.cpp
696     runtime/AsyncIteratorPrototype.cpp
697     runtime/AtomicsObject.cpp
698     runtime/AsyncFunctionConstructor.cpp
699     runtime/AsyncFunctionPrototype.cpp
700     runtime/BasicBlockLocation.cpp
701     runtime/BooleanConstructor.cpp
702     runtime/BooleanObject.cpp
703     runtime/BooleanPrototype.cpp
704     runtime/CallData.cpp
705     runtime/CatchScope.cpp
706     runtime/ClassInfo.cpp
707     runtime/ClonedArguments.cpp
708     runtime/CodeCache.cpp
709     runtime/CodeSpecializationKind.cpp
710     runtime/CommonIdentifiers.cpp
711     runtime/CommonSlowPaths.cpp
712     runtime/CommonSlowPathsExceptions.cpp
713     runtime/CompilationResult.cpp
714     runtime/Completion.cpp
715     runtime/ConfigFile.cpp
716     runtime/ConsoleClient.cpp
717     runtime/ConsoleObject.cpp
718     runtime/ConstantMode.cpp
719     runtime/ConstructData.cpp
720     runtime/ControlFlowProfiler.cpp
721     runtime/CustomGetterSetter.cpp
722     runtime/DOMAttributeGetterSetter.cpp
723     runtime/DataView.cpp
724     runtime/DateConstructor.cpp
725     runtime/DateConversion.cpp
726     runtime/DateInstance.cpp
727     runtime/DatePrototype.cpp
728     runtime/DirectArguments.cpp
729     runtime/DirectArgumentsOffset.cpp
730     runtime/DirectEvalExecutable.cpp
731     runtime/DisallowVMReentry.cpp
732     runtime/DumpContext.cpp
733     runtime/ECMAScriptSpecInternalFunctions.cpp
734     runtime/Error.cpp
735     runtime/ErrorConstructor.cpp
736     runtime/ErrorHandlingScope.cpp
737     runtime/ErrorInstance.cpp
738     runtime/ErrorPrototype.cpp
739     runtime/EvalExecutable.cpp
740     runtime/Exception.cpp
741     runtime/ExceptionEventLocation.cpp
742     runtime/ExceptionFuzz.cpp
743     runtime/ExceptionHelpers.cpp
744     runtime/ExceptionScope.cpp
745     runtime/ExecutableBase.cpp
746     runtime/FunctionConstructor.cpp
747     runtime/FunctionExecutable.cpp
748     runtime/FunctionExecutableDump.cpp
749     runtime/FunctionHasExecutedCache.cpp
750     runtime/FunctionPrototype.cpp
751     runtime/FunctionRareData.cpp
752     runtime/GeneratorFunctionConstructor.cpp
753     runtime/GeneratorFunctionPrototype.cpp
754     runtime/GeneratorPrototype.cpp
755     runtime/GetterSetter.cpp
756     runtime/HashMapImpl.cpp
757     runtime/Identifier.cpp
758     runtime/IndexingType.cpp
759     runtime/IndirectEvalExecutable.cpp
760     runtime/InferredType.cpp
761     runtime/InferredTypeTable.cpp
762     runtime/InferredValue.cpp
763     runtime/InitializeThreading.cpp
764     runtime/InspectorInstrumentationObject.cpp
765     runtime/InternalFunction.cpp
766     runtime/Intrinsic.cpp
767     runtime/IntlCollator.cpp
768     runtime/IntlCollatorConstructor.cpp
769     runtime/IntlCollatorPrototype.cpp
770     runtime/IntlDateTimeFormat.cpp
771     runtime/IntlDateTimeFormatConstructor.cpp
772     runtime/IntlDateTimeFormatPrototype.cpp
773     runtime/IntlNumberFormat.cpp
774     runtime/IntlNumberFormatConstructor.cpp
775     runtime/IntlNumberFormatPrototype.cpp
776     runtime/IntlObject.cpp
777     runtime/IteratorOperations.cpp
778     runtime/IteratorPrototype.cpp
779     runtime/JSAPIValueWrapper.cpp
780     runtime/JSArray.cpp
781     runtime/JSArrayBuffer.cpp
782     runtime/JSArrayBufferConstructor.cpp
783     runtime/JSArrayBufferPrototype.cpp
784     runtime/JSArrayBufferView.cpp
785     runtime/JSAsyncFunction.cpp
786     runtime/JSAsyncGeneratorFunction.cpp
787     runtime/JSBoundFunction.cpp
788     runtime/JSCJSValue.cpp
789     runtime/JSCallee.cpp
790     runtime/JSCell.cpp
791     runtime/JSCustomGetterSetterFunction.cpp
792     runtime/JSDataView.cpp
793     runtime/JSDataViewPrototype.cpp
794     runtime/JSDateMath.cpp
795     runtime/JSDestructibleObjectSubspace.cpp
796     runtime/JSEnvironmentRecord.cpp
797     runtime/JSFixedArray.cpp
798     runtime/JSFunction.cpp
799     runtime/JSGeneratorFunction.cpp
800     runtime/JSGlobalLexicalEnvironment.cpp
801     runtime/JSGlobalObject.cpp
802     runtime/JSGlobalObjectDebuggable.cpp
803     runtime/JSGlobalObjectFunctions.cpp
804     runtime/JSInternalPromise.cpp
805     runtime/JSInternalPromiseConstructor.cpp
806     runtime/JSInternalPromiseDeferred.cpp
807     runtime/JSInternalPromisePrototype.cpp
808     runtime/JSJob.cpp
809     runtime/JSLexicalEnvironment.cpp
810     runtime/JSLock.cpp
811     runtime/JSMap.cpp
812     runtime/JSMapIterator.cpp
813     runtime/JSModuleEnvironment.cpp
814     runtime/JSModuleLoader.cpp
815     runtime/JSModuleNamespaceObject.cpp
816     runtime/JSModuleRecord.cpp
817     runtime/JSNativeStdFunction.cpp
818     runtime/JSONObject.cpp
819     runtime/JSObject.cpp
820     runtime/JSPromise.cpp
821     runtime/JSPromiseConstructor.cpp
822     runtime/JSPromiseDeferred.cpp
823     runtime/JSPromisePrototype.cpp
824     runtime/JSPropertyNameEnumerator.cpp
825     runtime/JSProxy.cpp
826     runtime/JSRunLoopTimer.cpp
827     runtime/JSScope.cpp
828     runtime/JSScriptFetcher.cpp
829     runtime/JSSegmentedVariableObject.cpp
830     runtime/JSSegmentedVariableObjectSubspace.cpp
831     runtime/JSSet.cpp
832     runtime/JSSetIterator.cpp
833     runtime/JSSourceCode.cpp
834     runtime/JSString.cpp
835     runtime/JSStringIterator.cpp
836     runtime/JSStringJoiner.cpp
837     runtime/JSStringSubspace.cpp
838     runtime/JSSymbolTableObject.cpp
839     runtime/JSTemplateRegistryKey.cpp
840     runtime/JSTypedArrayConstructors.cpp
841     runtime/JSTypedArrayPrototypes.cpp
842     runtime/JSTypedArrayViewConstructor.cpp
843     runtime/JSTypedArrayViewPrototype.cpp
844     runtime/JSTypedArrays.cpp
845     runtime/JSWeakMap.cpp
846     runtime/JSWeakSet.cpp
847     runtime/JSWithScope.cpp
848     runtime/JSWrapperObject.cpp
849     runtime/LazyClassStructure.cpp
850     runtime/LiteralParser.cpp
851     runtime/Lookup.cpp
852     runtime/MapConstructor.cpp
853     runtime/MapIteratorPrototype.cpp
854     runtime/MapPrototype.cpp
855     runtime/MatchResult.cpp
856     runtime/MathCommon.cpp
857     runtime/MathObject.cpp
858     runtime/MemoryStatistics.cpp
859     runtime/ModuleLoaderPrototype.cpp
860     runtime/ModuleProgramExecutable.cpp
861     runtime/NativeErrorConstructor.cpp
862     runtime/NativeErrorPrototype.cpp
863     runtime/NativeExecutable.cpp
864     runtime/NativeStdFunctionCell.cpp
865     runtime/NullGetterFunction.cpp
866     runtime/NullSetterFunction.cpp
867     runtime/NumberConstructor.cpp
868     runtime/NumberObject.cpp
869     runtime/NumberPrototype.cpp
870     runtime/ObjectConstructor.cpp
871     runtime/ObjectInitializationScope.cpp
872     runtime/ObjectPrototype.cpp
873     runtime/Operations.cpp
874     runtime/Options.cpp
875     runtime/ProgramExecutable.cpp
876     runtime/PromiseDeferredTimer.cpp
877     runtime/PropertyDescriptor.cpp
878     runtime/PropertySlot.cpp
879     runtime/PropertyTable.cpp
880     runtime/PrototypeMap.cpp
881     runtime/ProxyConstructor.cpp
882     runtime/ProxyRevoke.cpp
883     runtime/ReflectObject.cpp
884     runtime/RegExp.cpp
885     runtime/RegExpCache.cpp
886     runtime/RegExpCachedResult.cpp
887     runtime/RegExpConstructor.cpp
888     runtime/RegExpMatchesArray.cpp
889     runtime/RegExpObject.cpp
890     runtime/RegExpPrototype.cpp
891     runtime/RuntimeType.cpp
892     runtime/SamplingCounter.cpp
893     runtime/SamplingProfiler.cpp
894     runtime/ScopeOffset.cpp
895     runtime/ScopedArguments.cpp
896     runtime/ScopedArgumentsTable.cpp
897     runtime/ScriptExecutable.cpp
898     runtime/SetConstructor.cpp
899     runtime/SetIteratorPrototype.cpp
900     runtime/SetPrototype.cpp
901     runtime/SimpleTypedArrayController.cpp
902     runtime/SmallStrings.cpp
903     runtime/SparseArrayValueMap.cpp
904     runtime/StackFrame.cpp
905     runtime/StrictEvalActivation.cpp
906     runtime/StringConstructor.cpp
907     runtime/StringIteratorPrototype.cpp
908     runtime/StringObject.cpp
909     runtime/StringPrototype.cpp
910     runtime/StringRecursionChecker.cpp
911     runtime/Structure.cpp
912     runtime/StructureChain.cpp
913     runtime/StructureIDTable.cpp
914     runtime/StructureRareData.cpp
915     runtime/Symbol.cpp
916     runtime/SymbolConstructor.cpp
917     runtime/SymbolObject.cpp
918     runtime/SymbolPrototype.cpp
919     runtime/SymbolTable.cpp
920     runtime/TemplateRegistry.cpp
921     runtime/TemplateRegistryKey.cpp
922     runtime/TemplateRegistryKeyTable.cpp
923     runtime/TestRunnerUtils.cpp
924     runtime/ThrowScope.cpp
925     runtime/TypeLocationCache.cpp
926     runtime/TypeProfiler.cpp
927     runtime/TypeProfilerLog.cpp
928     runtime/TypeSet.cpp
929     runtime/TypedArrayController.cpp
930     runtime/TypedArrayType.cpp
931     runtime/TypeofType.cpp
932     runtime/VM.cpp
933     runtime/VMEntryScope.cpp
934     runtime/VMTraps.cpp
935     runtime/VarOffset.cpp
936     runtime/Watchdog.cpp
937     runtime/WeakMapBase.cpp
938     runtime/WeakMapConstructor.cpp
939     runtime/WeakMapPrototype.cpp
940     runtime/WeakSetConstructor.cpp
941     runtime/WeakSetPrototype.cpp
942
943     tools/CellList.cpp
944     tools/CodeProfile.cpp
945     tools/CodeProfiling.cpp
946     tools/FunctionOverrides.cpp
947     tools/FunctionWhitelist.cpp
948     tools/HeapVerifier.cpp
949     tools/JSDollarVM.cpp
950     tools/JSDollarVMPrototype.cpp
951     tools/SigillCrashAnalyzer.cpp
952     tools/VMInspector.cpp
953
954     wasm/JSWebAssembly.cpp
955     wasm/WasmB3IRGenerator.cpp
956     wasm/WasmBBQPlan.cpp
957     wasm/WasmBinding.cpp
958     wasm/WasmCallee.cpp
959     wasm/WasmCallingConvention.cpp
960     wasm/WasmCodeBlock.cpp
961     wasm/WasmContext.cpp
962     wasm/WasmFaultSignalHandler.cpp
963     wasm/WasmFormat.cpp
964     wasm/WasmIndexOrName.cpp
965     wasm/WasmMachineThreads.cpp
966     wasm/WasmMemory.cpp
967     wasm/WasmMemoryInformation.cpp
968     wasm/WasmModule.cpp
969     wasm/WasmModuleInformation.cpp
970     wasm/WasmModuleParser.cpp
971     wasm/WasmNameSectionParser.cpp
972     wasm/WasmOMGPlan.cpp
973     wasm/WasmOpcodeOrigin.cpp
974     wasm/WasmPageCount.cpp
975     wasm/WasmPlan.cpp
976     wasm/WasmSignature.cpp
977     wasm/WasmThunks.cpp
978     wasm/WasmValidate.cpp
979     wasm/WasmWorklist.cpp
980
981     wasm/js/JSWebAssemblyCodeBlock.cpp
982     wasm/js/JSWebAssemblyCodeBlockSubspace.cpp
983     wasm/js/JSWebAssemblyCompileError.cpp
984     wasm/js/JSWebAssemblyInstance.cpp
985     wasm/js/JSWebAssemblyLinkError.cpp
986     wasm/js/JSWebAssemblyMemory.cpp
987     wasm/js/JSWebAssemblyModule.cpp
988     wasm/js/JSWebAssemblyRuntimeError.cpp
989     wasm/js/JSWebAssemblyTable.cpp
990     wasm/js/WebAssemblyCompileErrorConstructor.cpp
991     wasm/js/WebAssemblyCompileErrorPrototype.cpp
992     wasm/js/WebAssemblyFunction.cpp
993     wasm/js/WebAssemblyFunctionBase.cpp
994     wasm/js/WebAssemblyInstanceConstructor.cpp
995     wasm/js/WebAssemblyInstancePrototype.cpp
996     wasm/js/WebAssemblyLinkErrorConstructor.cpp
997     wasm/js/WebAssemblyLinkErrorPrototype.cpp
998     wasm/js/WebAssemblyMemoryConstructor.cpp
999     wasm/js/WebAssemblyMemoryPrototype.cpp
1000     wasm/js/WebAssemblyModuleConstructor.cpp
1001     wasm/js/WebAssemblyModulePrototype.cpp
1002     wasm/js/WebAssemblyModuleRecord.cpp
1003     wasm/js/WebAssemblyPrototype.cpp
1004     wasm/js/WebAssemblyRuntimeErrorConstructor.cpp
1005     wasm/js/WebAssemblyRuntimeErrorPrototype.cpp
1006     wasm/js/WebAssemblyTableConstructor.cpp
1007     wasm/js/WebAssemblyTablePrototype.cpp
1008     wasm/js/WebAssemblyToJSCallee.cpp
1009     wasm/js/WebAssemblyWrapperFunction.cpp
1010
1011     yarr/RegularExpression.cpp
1012     yarr/YarrCanonicalizeUCS2.cpp
1013     yarr/YarrInterpreter.cpp
1014     yarr/YarrJIT.cpp
1015     yarr/YarrPattern.cpp
1016     yarr/YarrSyntaxChecker.cpp
1017 )
1018
1019 foreach (_sourceFile IN LISTS JavaScriptCore_OG_SOURCES)
1020     if (NOT (${_sourceFile} MATCHES "[.]c$"))
1021         set_source_files_properties(${_sourceFile} PROPERTIES HEADER_FILE_ONLY ON)
1022         list(APPEND JavaScriptCore_HEADERS ${_sourceFile})
1023     endif ()
1024 endforeach ()
1025
1026 execute_process(COMMAND ${RUBY_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../WTF/generate-unified-source-bundles.rb
1027   "--derived-sources-path" ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} ${JavaScriptCore_OG_SOURCES}
1028   RESULT_VARIABLE generateUnifiedSourcesResult
1029   OUTPUT_VARIABLE generateUnifiedSourcesOutput
1030 )
1031
1032 if (${generateUnifiedSourcesResult})
1033     message(FATAL_ERROR "unified-source-bundler.rb exited with non-zero status not appending results")
1034 else ()
1035     list(APPEND JavaScriptCore_SOURCES ${generateUnifiedSourcesOutput})
1036 endif ()
1037
1038 # These are special files that we can't or don't want to unified source compile
1039 list(APPEND JavaScriptCore_SOURCES
1040     runtime/ProxyObject.cpp
1041 )
1042
1043 # Extra flags for compile sources can go here.
1044 if (NOT MSVC)
1045     set_source_files_properties(runtime/ProxyObject.cpp PROPERTIES COMPILE_FLAGS -fno-optimize-sibling-calls)
1046 else ()
1047     # FIXME: Investigate if we need to set a similar flag on Windows.
1048 endif ()
1049
1050 set(JavaScriptCore_OBJECT_LUT_SOURCES
1051     runtime/ArrayConstructor.cpp
1052     runtime/ArrayIteratorPrototype.cpp
1053     runtime/AsyncGeneratorPrototype.cpp
1054     runtime/BooleanPrototype.cpp
1055     runtime/DateConstructor.cpp
1056     runtime/DatePrototype.cpp
1057     runtime/ErrorPrototype.cpp
1058     runtime/GeneratorPrototype.cpp
1059     runtime/InspectorInstrumentationObject.cpp
1060     runtime/IntlCollatorConstructor.cpp
1061     runtime/IntlCollatorPrototype.cpp
1062     runtime/IntlDateTimeFormatConstructor.cpp
1063     runtime/IntlDateTimeFormatPrototype.cpp
1064     runtime/IntlNumberFormatConstructor.cpp
1065     runtime/IntlNumberFormatPrototype.cpp
1066     runtime/JSDataViewPrototype.cpp
1067     runtime/JSGlobalObject.cpp
1068     runtime/JSInternalPromiseConstructor.cpp
1069     runtime/JSONObject.cpp
1070     runtime/JSPromiseConstructor.cpp
1071     runtime/JSPromisePrototype.cpp
1072     runtime/MapPrototype.cpp
1073     runtime/ModuleLoaderPrototype.cpp
1074     runtime/NumberConstructor.cpp
1075     runtime/NumberPrototype.cpp
1076     runtime/ObjectConstructor.cpp
1077     runtime/ReflectObject.cpp
1078     runtime/RegExpConstructor.cpp
1079     runtime/RegExpPrototype.cpp
1080     runtime/SetPrototype.cpp
1081     runtime/StringConstructor.cpp
1082     runtime/StringIteratorPrototype.cpp
1083     runtime/StringPrototype.cpp
1084     runtime/SymbolConstructor.cpp
1085     runtime/SymbolPrototype.cpp
1086
1087     wasm/js/WebAssemblyCompileErrorConstructor.cpp
1088     wasm/js/WebAssemblyCompileErrorPrototype.cpp
1089     wasm/js/WebAssemblyInstanceConstructor.cpp
1090     wasm/js/WebAssemblyInstancePrototype.cpp
1091     wasm/js/WebAssemblyLinkErrorConstructor.cpp
1092     wasm/js/WebAssemblyLinkErrorPrototype.cpp
1093     wasm/js/WebAssemblyMemoryConstructor.cpp
1094     wasm/js/WebAssemblyMemoryPrototype.cpp
1095     wasm/js/WebAssemblyModuleConstructor.cpp
1096     wasm/js/WebAssemblyModulePrototype.cpp
1097     wasm/js/WebAssemblyPrototype.cpp
1098     wasm/js/WebAssemblyRuntimeErrorConstructor.cpp
1099     wasm/js/WebAssemblyRuntimeErrorPrototype.cpp
1100     wasm/js/WebAssemblyTableConstructor.cpp
1101     wasm/js/WebAssemblyTablePrototype.cpp
1102 )
1103
1104 set(JavaScriptCore_LIBRARIES
1105     WTF${DEBUG_SUFFIX}
1106     ${ICU_I18N_LIBRARIES}
1107     ${LLVM_LIBRARIES}
1108 )
1109
1110 set(JavaScriptCore_SCRIPTS_SOURCES_DIR "${JAVASCRIPTCORE_DIR}/Scripts")
1111
1112 # Globbing relies on the fact that generator-specific file names are prefixed with their directory.
1113 # Top-level scripts should have a file extension, since they are invoked during the build.
1114
1115 set(JavaScriptCore_SCRIPTS_SOURCES_PATHS
1116     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.pl
1117     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.py
1118     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/builtins/builtins*.py
1119 )
1120
1121 # Force JavaScriptCore to run scripts from the same staging path as WebCore.
1122 set(JavaScriptCore_SCRIPTS_DIR "${FORWARDING_HEADERS_DIR}/JavaScriptCore/Scripts")
1123
1124 file(MAKE_DIRECTORY ${JavaScriptCore_SCRIPTS_DIR})
1125
1126 # The directory flattening performed below mirrors what the Mac port does with private headers.
1127
1128 file(GLOB JavaScriptCore_SCRIPTS_SOURCES ${JavaScriptCore_SCRIPTS_SOURCES_PATHS})
1129
1130 foreach (_file ${JavaScriptCore_SCRIPTS_SOURCES})
1131     get_filename_component(_script "${_file}" NAME)
1132     add_custom_command(
1133         OUTPUT ${JavaScriptCore_SCRIPTS_DIR}/${_script}
1134         MAIN_DEPENDENCY ${_file}
1135         WORKING_DIRECTORY ${DERIVED_SOURCES_DIR}
1136         COMMAND ${CMAKE_COMMAND} -E copy_if_different ${_file} ${JavaScriptCore_SCRIPTS_DIR}/${_script}
1137         VERBATIM)
1138     list(APPEND JavaScriptCore_SCRIPTS ${JavaScriptCore_SCRIPTS_DIR}/${_script})
1139 endforeach ()
1140
1141 set(UDIS_GEN_DEP
1142     disassembler/udis86/ud_opcode.py
1143 )
1144
1145 add_custom_command(
1146     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/udis86_itab.c ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/udis86_itab.h
1147     DEPENDS ${UDIS_GEN_DEP}
1148     WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
1149     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/disassembler/udis86/ud_itab.py ${JAVASCRIPTCORE_DIR}/disassembler/udis86/optable.xml ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
1150     VERBATIM)
1151
1152 list(APPEND JavaScriptCore_HEADERS
1153     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/udis86_itab.h
1154 )
1155
1156 set(LLINT_ASM
1157     llint/LowLevelInterpreter.asm
1158     llint/LowLevelInterpreter32_64.asm
1159     llint/LowLevelInterpreter64.asm
1160 )
1161
1162 set(OFFLINE_ASM
1163     offlineasm/arm.rb
1164     offlineasm/arm64.rb
1165     offlineasm/ast.rb
1166     offlineasm/backends.rb
1167     offlineasm/cloop.rb
1168     offlineasm/config.rb
1169     offlineasm/instructions.rb
1170     offlineasm/mips.rb
1171     offlineasm/offsets.rb
1172     offlineasm/opt.rb
1173     offlineasm/parser.rb
1174     offlineasm/registers.rb
1175     offlineasm/risc.rb
1176     offlineasm/self_hash.rb
1177     offlineasm/settings.rb
1178     offlineasm/transform.rb
1179     offlineasm/x86.rb
1180 )
1181
1182 add_custom_command(
1183     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/BytecodeStructs.h
1184     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/generate-bytecode-files
1185     DEPENDS ${JAVASCRIPTCORE_DIR}/generate-bytecode-files bytecode/BytecodeList.json
1186     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
1187     VERBATIM)
1188
1189 list(APPEND JavaScriptCore_HEADERS
1190     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h
1191     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/BytecodeStructs.h
1192 )
1193
1194 if (WIN32)
1195   set(OFFLINE_ASM_BACKEND "X86_WIN, X86_64_WIN, C_LOOP")
1196 else ()
1197     if (WTF_CPU_X86)
1198         set(OFFLINE_ASM_BACKEND "X86")
1199     elseif (WTF_CPU_X86_64)
1200         set(OFFLINE_ASM_BACKEND "X86_64")
1201     elseif (WTF_CPU_ARM64)
1202         set(OFFLINE_ASM_BACKEND "ARM64")
1203     elseif (ARM_THUMB2_DETECTED)
1204         set(OFFLINE_ASM_BACKEND "ARMv7")
1205     elseif (ARM_TRADITIONAL_DETECTED)
1206         set(OFFLINE_ASM_BACKEND "ARMv7_TRADITIONAL")
1207     elseif (WTF_CPU_MIPS)
1208         set(OFFLINE_ASM_BACKEND "MIPS")
1209     endif ()
1210
1211     if (NOT ENABLE_JIT)
1212         set(OFFLINE_ASM_BACKEND "C_LOOP")
1213     endif ()
1214 endif ()
1215
1216 add_custom_command(
1217     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
1218     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb
1219     DEPENDS ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
1220     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}
1221     VERBATIM)
1222
1223 # We add the header files directly to the ADD_EXECUTABLE call instead of setting the
1224 # OBJECT_DEPENDS property in LLIntOffsetsExtractor.cpp because generate_offset_extractor.rb and
1225 # generate-bytecode-files may not regenerate the .h files in case the hash it calculates does not change.
1226 # In this case, if some of the dependencies specified in the ADD_CUSTOM_COMMANDs above have
1227 # changed the command will always be called because the mtime of the .h files will
1228 # always be older than that of their dependencies.
1229 # Additionally, setting the OBJECT_DEPENDS property will make the .h files a Makefile
1230 # dependency of both LLIntOffsetsExtractor and LLIntOffsetsExtractor.cpp, so the command will
1231 # actually be run multiple times!
1232 add_executable(LLIntOffsetsExtractor
1233     ${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp
1234     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/BytecodeStructs.h
1235 )
1236 target_link_libraries(LLIntOffsetsExtractor WTF)
1237
1238 # The build system will execute asm.rb every time LLIntOffsetsExtractor's mtime is newer than
1239 # LLIntAssembly.h's mtime. The problem we have here is: asm.rb has some built-in optimization
1240 # that generates a checksum of the LLIntOffsetsExtractor binary, if the checksum of the new
1241 # LLIntOffsetsExtractor matches, no output is generated. To make this target consistent and avoid
1242 # running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch)
1243 # after every asm.rb run.
1244 if (MSVC)
1245     set(LLIntOutput LowLevelInterpreterWin.asm)
1246     set(OFFLINE_ASM_ARGS --assembler=MASM)
1247 else ()
1248     set(LLIntOutput LLIntAssembly.h)
1249 endif ()
1250
1251 add_custom_command(
1252     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${LLIntOutput}
1253     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb
1254     DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
1255     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}
1256     COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${LLIntOutput}
1257     WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
1258     VERBATIM)
1259
1260 # The explanation for not making LLIntAssembly.h part of the OBJECT_DEPENDS property of some of
1261 # the .cpp files below is similar to the one in the previous comment. However, since these .cpp
1262 # files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS
1263 # since it is used in the add_library() call at the end of this file.
1264 if (MSVC)
1265     enable_language(ASM_MASM)
1266     if (CMAKE_SIZEOF_VOID_P EQUAL 4)
1267         # Win32 needs /safeseh with assembly, but Win64 does not.
1268         set(MASM_EXECUTABLE ml)
1269         set(LLINT_MASM_FLAGS /safeseh /c /Fo)
1270     else ()
1271         set(MASM_EXECUTABLE ml64)
1272         set(LLINT_MASM_FLAGS /c /Fo)
1273     endif ()
1274     add_custom_command(
1275         OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.obj
1276         DEPENDS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.asm
1277         COMMAND ${MASM_EXECUTABLE} ${LLINT_MASM_FLAGS} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.obj ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.asm
1278         VERBATIM)
1279     list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.obj)
1280 else ()
1281     list(APPEND JavaScriptCore_HEADERS
1282         ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
1283     )
1284 endif ()
1285
1286 # WebAssembly generator
1287
1288 macro(GENERATE_PYTHON _generator _additional_deps _input _output)
1289     add_custom_command(
1290         OUTPUT ${_output}
1291         MAIN_DEPENDENCY ${_generator}
1292         DEPENDS ${_input} ${_additional_deps}
1293         COMMAND ${PYTHON_EXECUTABLE} ${_generator} ${_input} ${_output}
1294         VERBATIM)
1295     list(APPEND JavaScriptCore_HEADERS ${_output})
1296     WEBKIT_ADD_SOURCE_DEPENDENCIES(${_input} ${_output})
1297 endmacro()
1298 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)
1299 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)
1300 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)
1301
1302 # LUT generator
1303
1304 set(HASH_LUT_GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/create_hash_table)
1305 macro(GENERATE_HASH_LUT _input _output)
1306     add_custom_command(
1307         OUTPUT ${_output}
1308         MAIN_DEPENDENCY ${HASH_LUT_GENERATOR}
1309         DEPENDS ${_input}
1310         COMMAND ${PERL_EXECUTABLE} ${HASH_LUT_GENERATOR} ${_input} > ${_output}
1311         VERBATIM)
1312     list(APPEND JavaScriptCore_HEADERS ${_output})
1313     WEBKIT_ADD_SOURCE_DEPENDENCIES(${_input} ${_output})
1314 endmacro()
1315
1316 # GENERATOR 1-A: LUT creator
1317
1318 foreach (_file ${JavaScriptCore_OBJECT_LUT_SOURCES})
1319     get_filename_component(_name ${_file} NAME_WE)
1320     GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
1321 endforeach ()
1322
1323 set(JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
1324     API
1325     assembler
1326     bindings
1327     builtins
1328     bytecode
1329     debugger
1330     dfg
1331     disassembler
1332     domjit
1333     heap
1334     inspector
1335     interpreter
1336     jit
1337     llint
1338     parser
1339     profiler
1340     runtime
1341     wasm
1342     yarr
1343
1344     collector/handles
1345
1346     inspector/agents
1347     inspector/augmentable
1348     inspector/remote
1349
1350     wasm/js
1351 )
1352
1353 # GENERATOR 1-B: particular LUT creator (for 1 file only)
1354 GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
1355
1356 #GENERATOR: "RegExpJitTables.h": tables used by Yarr
1357 add_custom_command(
1358     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
1359     MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/create_regex_tables
1360     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/create_regex_tables > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
1361     VERBATIM)
1362 list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h)
1363 WEBKIT_ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h)
1364
1365 add_custom_command(
1366     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/YarrCanonicalizeUnicode.cpp
1367     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/generateYarrCanonicalizeUnicode
1368     DEPENDS ${JAVASCRIPTCORE_DIR}/ucd/CaseFolding.txt
1369     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/generateYarrCanonicalizeUnicode ${JAVASCRIPTCORE_DIR}/ucd/CaseFolding.txt ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/YarrCanonicalizeUnicode.cpp
1370     VERBATIM)
1371
1372 list(APPEND JavaScriptCore_SOURCES
1373     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/YarrCanonicalizeUnicode.cpp
1374 )
1375
1376 #GENERATOR: "KeywordLookup.h": keyword decision tree used by the lexer
1377 add_custom_command(
1378     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
1379     MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py
1380     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table
1381     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py ${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
1382     VERBATIM)
1383 list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h)
1384 WEBKIT_ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h)
1385
1386
1387 # Inspector Interfaces
1388
1389 set(JavaScriptCore_INSPECTOR_SCRIPTS_DIR "${JAVASCRIPTCORE_DIR}/inspector/scripts")
1390
1391 set(JavaScriptCore_INSPECTOR_PROTOCOL_SCRIPTS
1392     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py
1393     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/cpp_generator.py
1394     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/cpp_generator_templates.py
1395     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_js_backend_commands.py
1396     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_header.py
1397     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_implementation.py
1398     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_frontend_dispatcher_header.py
1399     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_frontend_dispatcher_implementation.py
1400     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_header.py
1401     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_implementation.py
1402     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generator.py
1403     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generator_templates.py
1404     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/__init__.py
1405     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/models.py
1406 )
1407
1408 set(JavaScriptCore_INSPECTOR_DOMAINS
1409     ${JAVASCRIPTCORE_DIR}/inspector/protocol/ApplicationCache.json
1410     ${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json
1411     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json
1412     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json
1413     ${JAVASCRIPTCORE_DIR}/inspector/protocol/DOM.json
1414     ${JAVASCRIPTCORE_DIR}/inspector/protocol/DOMDebugger.json
1415     ${JAVASCRIPTCORE_DIR}/inspector/protocol/DOMStorage.json
1416     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Database.json
1417     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Debugger.json
1418     ${JAVASCRIPTCORE_DIR}/inspector/protocol/GenericTypes.json
1419     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Heap.json
1420     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Inspector.json
1421     ${JAVASCRIPTCORE_DIR}/inspector/protocol/LayerTree.json
1422     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Network.json
1423     ${JAVASCRIPTCORE_DIR}/inspector/protocol/OverlayTypes.json
1424     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Page.json
1425     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Recording.json
1426     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Runtime.json
1427     ${JAVASCRIPTCORE_DIR}/inspector/protocol/ScriptProfiler.json
1428     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Timeline.json
1429     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Worker.json
1430 )
1431
1432 if (ENABLE_INDEXED_DATABASE)
1433     list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
1434         ${JAVASCRIPTCORE_DIR}/inspector/protocol/IndexedDB.json
1435     )
1436 endif ()
1437
1438 if (ENABLE_RESOURCE_USAGE)
1439     list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
1440         ${JAVASCRIPTCORE_DIR}/inspector/protocol/Memory.json
1441     )
1442 endif ()
1443
1444 add_custom_command(
1445     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/CombinedDomains.json
1446     MAIN_DEPENDENCY ${JavaScriptCore_SCRIPTS_DIR}/generate-combined-inspector-json.py
1447     DEPENDS ${JavaScriptCore_INSPECTOR_DOMAINS}
1448     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/generate-combined-inspector-json.py ${JavaScriptCore_INSPECTOR_DOMAINS} > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/CombinedDomains.json
1449     VERBATIM)
1450
1451 # Inspector Backend Dispatchers, Frontend Dispatchers, Type Builders
1452 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol)
1453 file(MAKE_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector)
1454 add_custom_command(
1455     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.cpp
1456            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.h
1457            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorFrontendDispatchers.cpp
1458            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorFrontendDispatchers.h
1459            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorProtocolObjects.cpp
1460            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorProtocolObjects.h
1461            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js
1462     MAIN_DEPENDENCY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/CombinedDomains.json
1463     DEPENDS ${JavaScriptCore_INSPECTOR_PROTOCOL_SCRIPTS}
1464     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
1465     VERBATIM)
1466
1467 # JSCBuiltins
1468
1469 set(BUILTINS_GENERATOR_SCRIPTS
1470     ${JavaScriptCore_SCRIPTS_DIR}/builtins.py
1471     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generator.py
1472     ${JavaScriptCore_SCRIPTS_DIR}/builtins_model.py
1473     ${JavaScriptCore_SCRIPTS_DIR}/builtins_templates.py
1474     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_header.py
1475     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_implementation.py
1476     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_header.py
1477     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_implementation.py
1478     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_wrapper_header.py
1479     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_wrapper_implementation.py
1480     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_internals_wrapper_header.py
1481     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_internals_wrapper_implementation.py
1482     ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
1483     ${JavaScriptCore_SCRIPTS_DIR}/lazywriter.py
1484 )
1485
1486 set(JavaScriptCore_BUILTINS_SOURCES
1487     ${JAVASCRIPTCORE_DIR}/builtins/AsyncFromSyncIteratorPrototype.js
1488     ${JAVASCRIPTCORE_DIR}/builtins/ArrayConstructor.js
1489     ${JAVASCRIPTCORE_DIR}/builtins/ArrayIteratorPrototype.js
1490     ${JAVASCRIPTCORE_DIR}/builtins/ArrayPrototype.js
1491     ${JAVASCRIPTCORE_DIR}/builtins/AsyncFunctionPrototype.js
1492     ${JAVASCRIPTCORE_DIR}/builtins/AsyncIteratorPrototype.js
1493     ${JAVASCRIPTCORE_DIR}/builtins/AsyncGeneratorPrototype.js
1494     ${JAVASCRIPTCORE_DIR}/builtins/DatePrototype.js
1495     ${JAVASCRIPTCORE_DIR}/builtins/FunctionPrototype.js
1496     ${JAVASCRIPTCORE_DIR}/builtins/GeneratorPrototype.js
1497     ${JAVASCRIPTCORE_DIR}/builtins/GlobalObject.js
1498     ${JAVASCRIPTCORE_DIR}/builtins/GlobalOperations.js
1499     ${JAVASCRIPTCORE_DIR}/builtins/InspectorInstrumentationObject.js
1500     ${JAVASCRIPTCORE_DIR}/builtins/InternalPromiseConstructor.js
1501     ${JAVASCRIPTCORE_DIR}/builtins/IteratorHelpers.js
1502     ${JAVASCRIPTCORE_DIR}/builtins/IteratorPrototype.js
1503     ${JAVASCRIPTCORE_DIR}/builtins/MapIteratorPrototype.js
1504     ${JAVASCRIPTCORE_DIR}/builtins/MapPrototype.js
1505     ${JAVASCRIPTCORE_DIR}/builtins/ModuleLoaderPrototype.js
1506     ${JAVASCRIPTCORE_DIR}/builtins/NumberConstructor.js
1507     ${JAVASCRIPTCORE_DIR}/builtins/NumberPrototype.js
1508     ${JAVASCRIPTCORE_DIR}/builtins/ObjectConstructor.js
1509     ${JAVASCRIPTCORE_DIR}/builtins/PromiseConstructor.js
1510     ${JAVASCRIPTCORE_DIR}/builtins/PromiseOperations.js
1511     ${JAVASCRIPTCORE_DIR}/builtins/PromisePrototype.js
1512     ${JAVASCRIPTCORE_DIR}/builtins/ReflectObject.js
1513     ${JAVASCRIPTCORE_DIR}/builtins/RegExpPrototype.js
1514     ${JAVASCRIPTCORE_DIR}/builtins/SetIteratorPrototype.js
1515     ${JAVASCRIPTCORE_DIR}/builtins/SetPrototype.js
1516     ${JAVASCRIPTCORE_DIR}/builtins/StringConstructor.js
1517     ${JAVASCRIPTCORE_DIR}/builtins/StringIteratorPrototype.js
1518     ${JAVASCRIPTCORE_DIR}/builtins/StringPrototype.js
1519     ${JAVASCRIPTCORE_DIR}/builtins/TypedArrayConstructor.js
1520     ${JAVASCRIPTCORE_DIR}/builtins/TypedArrayPrototype.js
1521 )
1522
1523 add_custom_command(
1524     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcode.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcodeGenerated.h
1525     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/b3/air/AirOpcode.opcodes
1526     DEPENDS ${JAVASCRIPTCORE_DIR}/b3/air/opcode_generator.rb
1527     COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/b3/air/opcode_generator.rb ${JAVASCRIPTCORE_DIR}/b3/air/AirOpcode.opcodes VERBATIM
1528     WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
1529 )
1530
1531 list(APPEND JavaScriptCore_HEADERS
1532     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcode.h
1533     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcodeGenerated.h
1534 )
1535
1536 add_custom_command(
1537     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
1538     MAIN_DEPENDENCY ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
1539     DEPENDS ${JavaScriptCore_BUILTINS_SOURCES} ${BUILTINS_GENERATOR_SCRIPTS}
1540     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py --framework JavaScriptCore --output-directory ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} --combined ${JavaScriptCore_BUILTINS_SOURCES}
1541     VERBATIM)
1542
1543 list(APPEND JavaScriptCore_SOURCES
1544     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.cpp
1545     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorFrontendDispatchers.cpp
1546     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorProtocolObjects.cpp
1547     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp
1548 )
1549
1550 list(APPEND JavaScriptCore_HEADERS
1551     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.h
1552     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorFrontendDispatchers.h
1553     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorProtocolObjects.h
1554     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
1555 )
1556
1557 add_custom_command(
1558     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
1559     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/inspector/InjectedScriptSource.js
1560     DEPENDS ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py
1561     COMMAND ${CMAKE_COMMAND} -E echo "//# sourceURL=__InjectedScript_InjectedScriptSource.js" > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
1562     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py < ${JAVASCRIPTCORE_DIR}/inspector/InjectedScriptSource.js >> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
1563     COMMAND ${PERL_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl InjectedScriptSource_js ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h
1564     VERBATIM)
1565
1566 list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h)
1567
1568 if (WTF_CPU_ARM)
1569 elseif (WTF_CPU_ARM64)
1570 elseif (WTF_CPU_HPPA)
1571 elseif (WTF_CPU_PPC)
1572 elseif (WTF_CPU_PPC64)
1573 elseif (WTF_CPU_PPC64LE)
1574 elseif (WTF_CPU_S390)
1575 elseif (WTF_CPU_S390X)
1576 elseif (WTF_CPU_MIPS)
1577 elseif (WTF_CPU_SH4)
1578 elseif (WTF_CPU_X86)
1579 elseif (WTF_CPU_X86_64)
1580     if (MSVC AND ENABLE_JIT)
1581         add_custom_command(
1582             OUTPUT ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj
1583             MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/jit/JITStubsMSVC64.asm
1584             COMMAND ml64 -nologo -c -Fo ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj ${JAVASCRIPTCORE_DIR}/jit/JITStubsMSVC64.asm
1585             VERBATIM)
1586
1587         list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj)
1588     endif ()
1589 else ()
1590     message(FATAL_ERROR "Unknown CPU")
1591 endif ()
1592
1593 WEBKIT_FRAMEWORK_DECLARE(JavaScriptCore)
1594 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
1595
1596 WEBKIT_CREATE_FORWARDING_HEADERS(JavaScriptCore DIRECTORIES ${JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES} FILES ${JavaScriptCore_FORWARDING_HEADERS_FILES})
1597
1598 target_include_directories(LLIntOffsetsExtractor PRIVATE ${JavaScriptCore_INCLUDE_DIRECTORIES})
1599
1600 add_subdirectory(shell)
1601
1602 WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
1603 WEBKIT_FRAMEWORK(JavaScriptCore)
1604
1605 if (NOT "${PORT}" STREQUAL "Mac")
1606     if (${JavaScriptCore_LIBRARY_TYPE} STREQUAL "SHARED")
1607         WEBKIT_POPULATE_LIBRARY_VERSION(JAVASCRIPTCORE)
1608         set_target_properties(JavaScriptCore PROPERTIES VERSION ${JAVASCRIPTCORE_VERSION} SOVERSION ${JAVASCRIPTCORE_VERSION_MAJOR})
1609         install(TARGETS JavaScriptCore DESTINATION "${LIB_INSTALL_DIR}")
1610     endif ()
1611 endif ()
1612
1613 # Force staging of shared scripts, even if they aren't directly used to build JavaScriptCore.
1614
1615 add_custom_target(stageSharedScripts DEPENDS ${JavaScriptCore_SCRIPTS})
1616 add_dependencies(JavaScriptCore stageSharedScripts)
1617
1618 if (MSVC)
1619     add_custom_command(
1620         TARGET JavaScriptCore
1621         PRE_BUILD
1622         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_DIR}
1623         VERBATIM)
1624
1625     add_custom_command(
1626         TARGET JavaScriptCore
1627         POST_BUILD
1628         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${DERIVED_SOURCES_DIR} $<TARGET_FILE:JavaScriptCore>
1629         VERBATIM)
1630 endif ()