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