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