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