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