Merge WeakMapData into JSWeakMap and JSWeakSet
[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/DFGPredictionInjectionPhase.cpp
395     dfg/DFGPredictionPropagationPhase.cpp
396     dfg/DFGPromotedHeapLocation.cpp
397     dfg/DFGPureValue.cpp
398     dfg/DFGPutStackSinkingPhase.cpp
399     dfg/DFGRegisteredStructureSet.cpp
400     dfg/DFGSSACalculator.cpp
401     dfg/DFGSSAConversionPhase.cpp
402     dfg/DFGSSALoweringPhase.cpp
403     dfg/DFGSafepoint.cpp
404     dfg/DFGSnippetParams.cpp
405     dfg/DFGSpeculativeJIT.cpp
406     dfg/DFGSpeculativeJIT32_64.cpp
407     dfg/DFGSpeculativeJIT64.cpp
408     dfg/DFGStackLayoutPhase.cpp
409     dfg/DFGStaticExecutionCountEstimationPhase.cpp
410     dfg/DFGStoreBarrierClusteringPhase.cpp
411     dfg/DFGStoreBarrierInsertionPhase.cpp
412     dfg/DFGStrengthReductionPhase.cpp
413     dfg/DFGStructureAbstractValue.cpp
414     dfg/DFGThreadData.cpp
415     dfg/DFGThunks.cpp
416     dfg/DFGTierUpCheckInjectionPhase.cpp
417     dfg/DFGToFTLDeferredCompilationCallback.cpp
418     dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp
419     dfg/DFGTransition.cpp
420     dfg/DFGTypeCheckHoistingPhase.cpp
421     dfg/DFGUnificationPhase.cpp
422     dfg/DFGUseKind.cpp
423     dfg/DFGValidate.cpp
424     dfg/DFGValueSource.cpp
425     dfg/DFGValueStrength.cpp
426     dfg/DFGVarargsForwardingPhase.cpp
427     dfg/DFGVariableAccessData.cpp
428     dfg/DFGVariableAccessDataDump.cpp
429     dfg/DFGVariableEvent.cpp
430     dfg/DFGVariableEventStream.cpp
431     dfg/DFGVirtualRegisterAllocationPhase.cpp
432     dfg/DFGWatchpointCollectionPhase.cpp
433     dfg/DFGWorklist.cpp
434
435     disassembler/ARM64Disassembler.cpp
436     disassembler/ARMLLVMDisassembler.cpp
437     disassembler/ARMv7Disassembler.cpp
438     disassembler/Disassembler.cpp
439     disassembler/UDis86Disassembler.cpp
440     disassembler/X86Disassembler.cpp
441
442     disassembler/ARM64/A64DOpcode.cpp
443
444     disassembler/ARMv7/ARMv7DOpcode.cpp
445
446     disassembler/udis86/udis86.c
447     disassembler/udis86/udis86_decode.c
448     disassembler/udis86/udis86_itab_holder.c
449     disassembler/udis86/udis86_syn-att.c
450     disassembler/udis86/udis86_syn-intel.c
451     disassembler/udis86/udis86_syn.c
452
453     domjit/DOMJITAbstractHeap.cpp
454     domjit/DOMJITHeapRange.cpp
455
456     ftl/FTLAbstractHeap.cpp
457     ftl/FTLAbstractHeapRepository.cpp
458     ftl/FTLAvailableRecovery.cpp
459     ftl/FTLCapabilities.cpp
460     ftl/FTLCommonValues.cpp
461     ftl/FTLCompile.cpp
462     ftl/FTLExceptionTarget.cpp
463     ftl/FTLExitArgument.cpp
464     ftl/FTLExitArgumentForOperand.cpp
465     ftl/FTLExitPropertyValue.cpp
466     ftl/FTLExitTimeObjectMaterialization.cpp
467     ftl/FTLExitValue.cpp
468     ftl/FTLFail.cpp
469     ftl/FTLForOSREntryJITCode.cpp
470     ftl/FTLJITCode.cpp
471     ftl/FTLJITFinalizer.cpp
472     ftl/FTLLazySlowPath.cpp
473     ftl/FTLLink.cpp
474     ftl/FTLLocation.cpp
475     ftl/FTLLowerDFGToB3.cpp
476     ftl/FTLOSREntry.cpp
477     ftl/FTLOSRExit.cpp
478     ftl/FTLOSRExitCompiler.cpp
479     ftl/FTLOSRExitHandle.cpp
480     ftl/FTLOperations.cpp
481     ftl/FTLOutput.cpp
482     ftl/FTLPatchpointExceptionHandle.cpp
483     ftl/FTLRecoveryOpcode.cpp
484     ftl/FTLSaveRestore.cpp
485     ftl/FTLSlowPathCall.cpp
486     ftl/FTLSlowPathCallKey.cpp
487     ftl/FTLSnippetParams.cpp
488     ftl/FTLState.cpp
489     ftl/FTLThunks.cpp
490     ftl/FTLValueRange.cpp
491
492     heap/AlignedMemoryAllocator.cpp
493     heap/AllocatorAttributes.cpp
494     heap/CellContainer.cpp
495     heap/CodeBlockSet.cpp
496     heap/CollectionScope.cpp
497     heap/CollectorPhase.cpp
498     heap/ConservativeRoots.cpp
499     heap/DeferGC.cpp
500     heap/DestructionMode.cpp
501     heap/EdenGCActivityCallback.cpp
502     heap/FastMallocAlignedMemoryAllocator.cpp
503     heap/FullGCActivityCallback.cpp
504     heap/FreeList.cpp
505     heap/GCActivityCallback.cpp
506     heap/GCConductor.cpp
507     heap/GCLogging.cpp
508     heap/GCRequest.cpp
509     heap/GigacageAlignedMemoryAllocator.cpp
510     heap/HandleSet.cpp
511     heap/HandleStack.cpp
512     heap/Heap.cpp
513     heap/HeapCell.cpp
514     heap/HeapFinalizerCallback.cpp
515     heap/HeapHelperPool.cpp
516     heap/HeapProfiler.cpp
517     heap/HeapSnapshot.cpp
518     heap/HeapSnapshotBuilder.cpp
519     heap/IncrementalSweeper.cpp
520     heap/JITStubRoutineSet.cpp
521     heap/LargeAllocation.cpp
522     heap/MachineStackMarker.cpp
523     heap/MarkStack.cpp
524     heap/MarkedAllocator.cpp
525     heap/MarkedBlock.cpp
526     heap/MarkedSpace.cpp
527     heap/MarkingConstraint.cpp
528     heap/MarkingConstraintSet.cpp
529     heap/MutatorScheduler.cpp
530     heap/MutatorState.cpp
531     heap/SlotVisitor.cpp
532     heap/SpaceTimeMutatorScheduler.cpp
533     heap/StochasticSpaceTimeMutatorScheduler.cpp
534     heap/StopIfNecessaryTimer.cpp
535     heap/Subspace.cpp
536     heap/SynchronousStopTheWorldMutatorScheduler.cpp
537     heap/Synchronousness.cpp
538     heap/VisitRaceKey.cpp
539     heap/Weak.cpp
540     heap/WeakBlock.cpp
541     heap/WeakHandleOwner.cpp
542     heap/WeakSet.cpp
543     heap/WriteBarrierSupport.cpp
544
545     inspector/AsyncStackTrace.cpp
546     inspector/ConsoleMessage.cpp
547     inspector/ContentSearchUtilities.cpp
548     inspector/EventLoop.cpp
549     inspector/IdentifiersFactory.cpp
550     inspector/InjectedScript.cpp
551     inspector/InjectedScriptBase.cpp
552     inspector/InjectedScriptHost.cpp
553     inspector/InjectedScriptManager.cpp
554     inspector/InjectedScriptModule.cpp
555     inspector/InspectorAgentRegistry.cpp
556     inspector/InspectorFrontendRouter.cpp
557     inspector/InspectorBackendDispatcher.cpp
558     inspector/InspectorValues.cpp
559     inspector/JSGlobalObjectConsoleClient.cpp
560     inspector/JSGlobalObjectInspectorController.cpp
561     inspector/JSGlobalObjectScriptDebugServer.cpp
562     inspector/JSInjectedScriptHost.cpp
563     inspector/JSInjectedScriptHostPrototype.cpp
564     inspector/JSJavaScriptCallFrame.cpp
565     inspector/JSJavaScriptCallFramePrototype.cpp
566     inspector/JavaScriptCallFrame.cpp
567     inspector/PerGlobalObjectWrapperWorld.cpp
568     inspector/ScriptArguments.cpp
569     inspector/ScriptCallFrame.cpp
570     inspector/ScriptCallStack.cpp
571     inspector/ScriptCallStackFactory.cpp
572     inspector/ScriptDebugServer.cpp
573
574     inspector/agents/InspectorAgent.cpp
575     inspector/agents/InspectorConsoleAgent.cpp
576     inspector/agents/InspectorDebuggerAgent.cpp
577     inspector/agents/InspectorHeapAgent.cpp
578     inspector/agents/InspectorRuntimeAgent.cpp
579     inspector/agents/InspectorScriptProfilerAgent.cpp
580     inspector/agents/JSGlobalObjectConsoleAgent.cpp
581     inspector/agents/JSGlobalObjectDebuggerAgent.cpp
582     inspector/agents/JSGlobalObjectRuntimeAgent.cpp
583
584     interpreter/AbstractPC.cpp
585     interpreter/CLoopStack.cpp
586     interpreter/CallFrame.cpp
587     interpreter/Interpreter.cpp
588     interpreter/ProtoCallFrame.cpp
589     interpreter/ShadowChicken.cpp
590     interpreter/StackVisitor.cpp
591
592     jit/AssemblyHelpers.cpp
593     jit/BinarySwitch.cpp
594     jit/CCallHelpers.cpp
595     jit/CachedRecovery.cpp
596     jit/CallFrameShuffleData.cpp
597     jit/CallFrameShuffler.cpp
598     jit/CallFrameShuffler32_64.cpp
599     jit/CallFrameShuffler64.cpp
600     jit/ExecutableAllocationFuzz.cpp
601     jit/ExecutableAllocator.cpp
602     jit/GCAwareJITStubRoutine.cpp
603     jit/GPRInfo.cpp
604     jit/HostCallReturnValue.cpp
605     jit/ICStats.cpp
606     jit/IntrinsicEmitter.cpp
607     jit/JIT.cpp
608     jit/JITAddGenerator.cpp
609     jit/JITArithmetic.cpp
610     jit/JITArithmetic32_64.cpp
611     jit/JITBitAndGenerator.cpp
612     jit/JITBitOrGenerator.cpp
613     jit/JITBitXorGenerator.cpp
614     jit/JITCall.cpp
615     jit/JITCall32_64.cpp
616     jit/JITCode.cpp
617     jit/JITDisassembler.cpp
618     jit/JITDivGenerator.cpp
619     jit/JITExceptions.cpp
620     jit/JITInlineCacheGenerator.cpp
621     jit/JITLeftShiftGenerator.cpp
622     jit/JITMulGenerator.cpp
623     jit/JITNegGenerator.cpp
624     jit/JITOpcodes.cpp
625     jit/JITOpcodes32_64.cpp
626     jit/JITOperations.cpp
627     jit/JITPropertyAccess.cpp
628     jit/JITPropertyAccess32_64.cpp
629     jit/JITRightShiftGenerator.cpp
630     jit/JITStubRoutine.cpp
631     jit/JITSubGenerator.cpp
632     jit/JITThunks.cpp
633     jit/JITToDFGDeferredCompilationCallback.cpp
634     jit/JITWorklist.cpp
635     jit/PCToCodeOriginMap.cpp
636     jit/PolymorphicCallStubRoutine.cpp
637     jit/Reg.cpp
638     jit/RegisterAtOffset.cpp
639     jit/RegisterAtOffsetList.cpp
640     jit/RegisterSet.cpp
641     jit/Repatch.cpp
642     jit/ScratchRegisterAllocator.cpp
643     jit/SetupVarargsFrame.cpp
644     jit/TagRegistersMode.cpp
645     jit/TempRegisterSet.cpp
646     jit/ThunkGenerators.cpp
647
648     llint/LLIntCLoop.cpp
649     llint/LLIntData.cpp
650     llint/LLIntEntrypoint.cpp
651     llint/LLIntExceptions.cpp
652     llint/LLIntSlowPaths.cpp
653     llint/LLIntThunks.cpp
654     llint/LowLevelInterpreter.cpp
655
656     parser/Lexer.cpp
657     parser/ModuleAnalyzer.cpp
658     parser/Nodes.cpp
659     parser/NodesAnalyzeModule.cpp
660     parser/Parser.cpp
661     parser/ParserArena.cpp
662     parser/SourceProvider.cpp
663     parser/SourceProviderCache.cpp
664     parser/UnlinkedSourceCode.cpp
665     parser/VariableEnvironment.cpp
666
667     profiler/ProfilerBytecode.cpp
668     profiler/ProfilerBytecodeSequence.cpp
669     profiler/ProfilerBytecodes.cpp
670     profiler/ProfilerCompilation.cpp
671     profiler/ProfilerCompilationKind.cpp
672     profiler/ProfilerCompiledBytecode.cpp
673     profiler/ProfilerDatabase.cpp
674     profiler/ProfilerEvent.cpp
675     profiler/ProfilerJettisonReason.cpp
676     profiler/ProfilerOSRExit.cpp
677     profiler/ProfilerOSRExitSite.cpp
678     profiler/ProfilerOrigin.cpp
679     profiler/ProfilerOriginStack.cpp
680     profiler/ProfilerProfiledBytecodes.cpp
681     profiler/ProfilerUID.cpp
682
683     runtime/AbstractModuleRecord.cpp
684     runtime/ArgList.cpp
685     runtime/ArrayBuffer.cpp
686     runtime/ArrayBufferNeuteringWatchpoint.cpp
687     runtime/ArrayBufferView.cpp
688     runtime/ArrayConstructor.cpp
689     runtime/ArrayConventions.cpp
690     runtime/ArrayIteratorPrototype.cpp
691     runtime/ArrayPrototype.cpp
692     runtime/AsyncFromSyncIteratorPrototype.cpp
693     runtime/AsyncGeneratorFunctionConstructor.cpp
694     runtime/AsyncGeneratorFunctionPrototype.cpp
695     runtime/AsyncGeneratorPrototype.cpp
696     runtime/AsyncIteratorPrototype.cpp
697     runtime/AtomicsObject.cpp
698     runtime/AsyncFunctionConstructor.cpp
699     runtime/AsyncFunctionPrototype.cpp
700     runtime/BasicBlockLocation.cpp
701     runtime/BooleanConstructor.cpp
702     runtime/BooleanObject.cpp
703     runtime/BooleanPrototype.cpp
704     runtime/CallData.cpp
705     runtime/CatchScope.cpp
706     runtime/ClassInfo.cpp
707     runtime/ClonedArguments.cpp
708     runtime/CodeCache.cpp
709     runtime/CodeSpecializationKind.cpp
710     runtime/CommonIdentifiers.cpp
711     runtime/CommonSlowPaths.cpp
712     runtime/CommonSlowPathsExceptions.cpp
713     runtime/CompilationResult.cpp
714     runtime/Completion.cpp
715     runtime/ConfigFile.cpp
716     runtime/ConsoleClient.cpp
717     runtime/ConsoleObject.cpp
718     runtime/ConstantMode.cpp
719     runtime/ConstructData.cpp
720     runtime/ControlFlowProfiler.cpp
721     runtime/CustomGetterSetter.cpp
722     runtime/DOMAttributeGetterSetter.cpp
723     runtime/DataView.cpp
724     runtime/DateConstructor.cpp
725     runtime/DateConversion.cpp
726     runtime/DateInstance.cpp
727     runtime/DatePrototype.cpp
728     runtime/DirectArguments.cpp
729     runtime/DirectArgumentsOffset.cpp
730     runtime/DirectEvalExecutable.cpp
731     runtime/DisallowVMReentry.cpp
732     runtime/DumpContext.cpp
733     runtime/ECMAScriptSpecInternalFunctions.cpp
734     runtime/Error.cpp
735     runtime/ErrorConstructor.cpp
736     runtime/ErrorHandlingScope.cpp
737     runtime/ErrorInstance.cpp
738     runtime/ErrorPrototype.cpp
739     runtime/EvalExecutable.cpp
740     runtime/Exception.cpp
741     runtime/ExceptionEventLocation.cpp
742     runtime/ExceptionFuzz.cpp
743     runtime/ExceptionHelpers.cpp
744     runtime/ExceptionScope.cpp
745     runtime/ExecutableBase.cpp
746     runtime/FunctionConstructor.cpp
747     runtime/FunctionExecutable.cpp
748     runtime/FunctionExecutableDump.cpp
749     runtime/FunctionHasExecutedCache.cpp
750     runtime/FunctionPrototype.cpp
751     runtime/FunctionRareData.cpp
752     runtime/GeneratorFunctionConstructor.cpp
753     runtime/GeneratorFunctionPrototype.cpp
754     runtime/GeneratorPrototype.cpp
755     runtime/GetterSetter.cpp
756     runtime/HashMapImpl.cpp
757     runtime/Identifier.cpp
758     runtime/IndexingType.cpp
759     runtime/IndirectEvalExecutable.cpp
760     runtime/InferredType.cpp
761     runtime/InferredTypeTable.cpp
762     runtime/InferredValue.cpp
763     runtime/InitializeThreading.cpp
764     runtime/InspectorInstrumentationObject.cpp
765     runtime/InternalFunction.cpp
766     runtime/Intrinsic.cpp
767     runtime/IntlCollator.cpp
768     runtime/IntlCollatorConstructor.cpp
769     runtime/IntlCollatorPrototype.cpp
770     runtime/IntlDateTimeFormat.cpp
771     runtime/IntlDateTimeFormatConstructor.cpp
772     runtime/IntlDateTimeFormatPrototype.cpp
773     runtime/IntlNumberFormat.cpp
774     runtime/IntlNumberFormatConstructor.cpp
775     runtime/IntlNumberFormatPrototype.cpp
776     runtime/IntlObject.cpp
777     runtime/IteratorOperations.cpp
778     runtime/IteratorPrototype.cpp
779     runtime/JSAPIValueWrapper.cpp
780     runtime/JSArray.cpp
781     runtime/JSArrayBuffer.cpp
782     runtime/JSArrayBufferConstructor.cpp
783     runtime/JSArrayBufferPrototype.cpp
784     runtime/JSArrayBufferView.cpp
785     runtime/JSAsyncFunction.cpp
786     runtime/JSAsyncGeneratorFunction.cpp
787     runtime/JSBoundFunction.cpp
788     runtime/JSCJSValue.cpp
789     runtime/JSCallee.cpp
790     runtime/JSCell.cpp
791     runtime/JSCustomGetterSetterFunction.cpp
792     runtime/JSDataView.cpp
793     runtime/JSDataViewPrototype.cpp
794     runtime/JSDateMath.cpp
795     runtime/JSDestructibleObjectSubspace.cpp
796     runtime/JSEnvironmentRecord.cpp
797     runtime/JSFixedArray.cpp
798     runtime/JSFunction.cpp
799     runtime/JSGeneratorFunction.cpp
800     runtime/JSGlobalLexicalEnvironment.cpp
801     runtime/JSGlobalObject.cpp
802     runtime/JSGlobalObjectDebuggable.cpp
803     runtime/JSGlobalObjectFunctions.cpp
804     runtime/JSInternalPromise.cpp
805     runtime/JSInternalPromiseConstructor.cpp
806     runtime/JSInternalPromiseDeferred.cpp
807     runtime/JSInternalPromisePrototype.cpp
808     runtime/JSJob.cpp
809     runtime/JSLexicalEnvironment.cpp
810     runtime/JSLock.cpp
811     runtime/JSMap.cpp
812     runtime/JSMapIterator.cpp
813     runtime/JSModuleEnvironment.cpp
814     runtime/JSModuleLoader.cpp
815     runtime/JSModuleNamespaceObject.cpp
816     runtime/JSModuleRecord.cpp
817     runtime/JSNativeStdFunction.cpp
818     runtime/JSONObject.cpp
819     runtime/JSObject.cpp
820     runtime/JSPromise.cpp
821     runtime/JSPromiseConstructor.cpp
822     runtime/JSPromiseDeferred.cpp
823     runtime/JSPromisePrototype.cpp
824     runtime/JSPropertyNameEnumerator.cpp
825     runtime/JSProxy.cpp
826     runtime/JSRunLoopTimer.cpp
827     runtime/JSScope.cpp
828     runtime/JSScriptFetcher.cpp
829     runtime/JSSegmentedVariableObject.cpp
830     runtime/JSSegmentedVariableObjectSubspace.cpp
831     runtime/JSSet.cpp
832     runtime/JSSetIterator.cpp
833     runtime/JSSourceCode.cpp
834     runtime/JSString.cpp
835     runtime/JSStringIterator.cpp
836     runtime/JSStringJoiner.cpp
837     runtime/JSStringSubspace.cpp
838     runtime/JSSymbolTableObject.cpp
839     runtime/JSTemplateRegistryKey.cpp
840     runtime/JSTypedArrayConstructors.cpp
841     runtime/JSTypedArrayPrototypes.cpp
842     runtime/JSTypedArrayViewConstructor.cpp
843     runtime/JSTypedArrayViewPrototype.cpp
844     runtime/JSTypedArrays.cpp
845     runtime/JSWeakMap.cpp
846     runtime/JSWeakSet.cpp
847     runtime/JSWithScope.cpp
848     runtime/JSWrapperObject.cpp
849     runtime/LazyClassStructure.cpp
850     runtime/LiteralParser.cpp
851     runtime/Lookup.cpp
852     runtime/MapConstructor.cpp
853     runtime/MapIteratorPrototype.cpp
854     runtime/MapPrototype.cpp
855     runtime/MatchResult.cpp
856     runtime/MathCommon.cpp
857     runtime/MathObject.cpp
858     runtime/MemoryStatistics.cpp
859     runtime/ModuleLoaderPrototype.cpp
860     runtime/ModuleProgramExecutable.cpp
861     runtime/NativeErrorConstructor.cpp
862     runtime/NativeErrorPrototype.cpp
863     runtime/NativeExecutable.cpp
864     runtime/NativeStdFunctionCell.cpp
865     runtime/NullGetterFunction.cpp
866     runtime/NullSetterFunction.cpp
867     runtime/NumberConstructor.cpp
868     runtime/NumberObject.cpp
869     runtime/NumberPrototype.cpp
870     runtime/ObjectConstructor.cpp
871     runtime/ObjectInitializationScope.cpp
872     runtime/ObjectPrototype.cpp
873     runtime/Operations.cpp
874     runtime/Options.cpp
875     runtime/ProgramExecutable.cpp
876     runtime/PromiseDeferredTimer.cpp
877     runtime/PropertyDescriptor.cpp
878     runtime/PropertySlot.cpp
879     runtime/PropertyTable.cpp
880     runtime/PrototypeMap.cpp
881     runtime/ProxyConstructor.cpp
882     runtime/ProxyObject.cpp
883     runtime/ProxyRevoke.cpp
884     runtime/ReflectObject.cpp
885     runtime/RegExp.cpp
886     runtime/RegExpCache.cpp
887     runtime/RegExpCachedResult.cpp
888     runtime/RegExpConstructor.cpp
889     runtime/RegExpMatchesArray.cpp
890     runtime/RegExpObject.cpp
891     runtime/RegExpPrototype.cpp
892     runtime/RuntimeType.cpp
893     runtime/SamplingCounter.cpp
894     runtime/SamplingProfiler.cpp
895     runtime/ScopeOffset.cpp
896     runtime/ScopedArguments.cpp
897     runtime/ScopedArgumentsTable.cpp
898     runtime/ScriptExecutable.cpp
899     runtime/SetConstructor.cpp
900     runtime/SetIteratorPrototype.cpp
901     runtime/SetPrototype.cpp
902     runtime/SimpleTypedArrayController.cpp
903     runtime/SmallStrings.cpp
904     runtime/SparseArrayValueMap.cpp
905     runtime/StackFrame.cpp
906     runtime/StrictEvalActivation.cpp
907     runtime/StringConstructor.cpp
908     runtime/StringIteratorPrototype.cpp
909     runtime/StringObject.cpp
910     runtime/StringPrototype.cpp
911     runtime/StringRecursionChecker.cpp
912     runtime/Structure.cpp
913     runtime/StructureChain.cpp
914     runtime/StructureIDTable.cpp
915     runtime/StructureRareData.cpp
916     runtime/Symbol.cpp
917     runtime/SymbolConstructor.cpp
918     runtime/SymbolObject.cpp
919     runtime/SymbolPrototype.cpp
920     runtime/SymbolTable.cpp
921     runtime/TemplateRegistry.cpp
922     runtime/TemplateRegistryKey.cpp
923     runtime/TemplateRegistryKeyTable.cpp
924     runtime/TestRunnerUtils.cpp
925     runtime/ThrowScope.cpp
926     runtime/TypeLocationCache.cpp
927     runtime/TypeProfiler.cpp
928     runtime/TypeProfilerLog.cpp
929     runtime/TypeSet.cpp
930     runtime/TypedArrayController.cpp
931     runtime/TypedArrayType.cpp
932     runtime/TypeofType.cpp
933     runtime/VM.cpp
934     runtime/VMEntryScope.cpp
935     runtime/VMTraps.cpp
936     runtime/VarOffset.cpp
937     runtime/Watchdog.cpp
938     runtime/WeakMapBase.cpp
939     runtime/WeakMapConstructor.cpp
940     runtime/WeakMapPrototype.cpp
941     runtime/WeakSetConstructor.cpp
942     runtime/WeakSetPrototype.cpp
943
944     tools/CellList.cpp
945     tools/CodeProfile.cpp
946     tools/CodeProfiling.cpp
947     tools/FunctionOverrides.cpp
948     tools/FunctionWhitelist.cpp
949     tools/HeapVerifier.cpp
950     tools/JSDollarVM.cpp
951     tools/JSDollarVMPrototype.cpp
952     tools/SigillCrashAnalyzer.cpp
953     tools/VMInspector.cpp
954
955     wasm/JSWebAssembly.cpp
956     wasm/WasmB3IRGenerator.cpp
957     wasm/WasmBBQPlan.cpp
958     wasm/WasmBinding.cpp
959     wasm/WasmCallee.cpp
960     wasm/WasmCallingConvention.cpp
961     wasm/WasmCodeBlock.cpp
962     wasm/WasmContext.cpp
963     wasm/WasmFaultSignalHandler.cpp
964     wasm/WasmFormat.cpp
965     wasm/WasmIndexOrName.cpp
966     wasm/WasmMachineThreads.cpp
967     wasm/WasmMemory.cpp
968     wasm/WasmMemoryInformation.cpp
969     wasm/WasmModule.cpp
970     wasm/WasmModuleInformation.cpp
971     wasm/WasmModuleParser.cpp
972     wasm/WasmNameSectionParser.cpp
973     wasm/WasmOMGPlan.cpp
974     wasm/WasmOpcodeOrigin.cpp
975     wasm/WasmPageCount.cpp
976     wasm/WasmPlan.cpp
977     wasm/WasmSignature.cpp
978     wasm/WasmThunks.cpp
979     wasm/WasmValidate.cpp
980     wasm/WasmWorklist.cpp
981
982     wasm/js/JSWebAssemblyCodeBlock.cpp
983     wasm/js/JSWebAssemblyCodeBlockSubspace.cpp
984     wasm/js/JSWebAssemblyCompileError.cpp
985     wasm/js/JSWebAssemblyInstance.cpp
986     wasm/js/JSWebAssemblyLinkError.cpp
987     wasm/js/JSWebAssemblyMemory.cpp
988     wasm/js/JSWebAssemblyModule.cpp
989     wasm/js/JSWebAssemblyRuntimeError.cpp
990     wasm/js/JSWebAssemblyTable.cpp
991     wasm/js/WebAssemblyCompileErrorConstructor.cpp
992     wasm/js/WebAssemblyCompileErrorPrototype.cpp
993     wasm/js/WebAssemblyFunction.cpp
994     wasm/js/WebAssemblyFunctionBase.cpp
995     wasm/js/WebAssemblyInstanceConstructor.cpp
996     wasm/js/WebAssemblyInstancePrototype.cpp
997     wasm/js/WebAssemblyLinkErrorConstructor.cpp
998     wasm/js/WebAssemblyLinkErrorPrototype.cpp
999     wasm/js/WebAssemblyMemoryConstructor.cpp
1000     wasm/js/WebAssemblyMemoryPrototype.cpp
1001     wasm/js/WebAssemblyModuleConstructor.cpp
1002     wasm/js/WebAssemblyModulePrototype.cpp
1003     wasm/js/WebAssemblyModuleRecord.cpp
1004     wasm/js/WebAssemblyPrototype.cpp
1005     wasm/js/WebAssemblyRuntimeErrorConstructor.cpp
1006     wasm/js/WebAssemblyRuntimeErrorPrototype.cpp
1007     wasm/js/WebAssemblyTableConstructor.cpp
1008     wasm/js/WebAssemblyTablePrototype.cpp
1009     wasm/js/WebAssemblyToJSCallee.cpp
1010     wasm/js/WebAssemblyWrapperFunction.cpp
1011
1012     yarr/RegularExpression.cpp
1013     yarr/YarrCanonicalizeUCS2.cpp
1014     yarr/YarrInterpreter.cpp
1015     yarr/YarrJIT.cpp
1016     yarr/YarrPattern.cpp
1017     yarr/YarrSyntaxChecker.cpp
1018 )
1019
1020 # Extra flags for compile sources can go here.
1021 if (NOT MSVC)
1022     set_source_files_properties(runtime/ProxyObject.cpp PROPERTIES COMPILE_FLAGS -fno-optimize-sibling-calls)
1023 else ()
1024     # FIXME: Investigate if we need to set a similar flag on Windows.
1025 endif ()
1026
1027 set(JavaScriptCore_OBJECT_LUT_SOURCES
1028     runtime/ArrayConstructor.cpp
1029     runtime/ArrayIteratorPrototype.cpp
1030     runtime/AsyncGeneratorPrototype.cpp
1031     runtime/BooleanPrototype.cpp
1032     runtime/DateConstructor.cpp
1033     runtime/DatePrototype.cpp
1034     runtime/ErrorPrototype.cpp
1035     runtime/GeneratorPrototype.cpp
1036     runtime/InspectorInstrumentationObject.cpp
1037     runtime/IntlCollatorConstructor.cpp
1038     runtime/IntlCollatorPrototype.cpp
1039     runtime/IntlDateTimeFormatConstructor.cpp
1040     runtime/IntlDateTimeFormatPrototype.cpp
1041     runtime/IntlNumberFormatConstructor.cpp
1042     runtime/IntlNumberFormatPrototype.cpp
1043     runtime/JSDataViewPrototype.cpp
1044     runtime/JSGlobalObject.cpp
1045     runtime/JSInternalPromiseConstructor.cpp
1046     runtime/JSONObject.cpp
1047     runtime/JSPromiseConstructor.cpp
1048     runtime/JSPromisePrototype.cpp
1049     runtime/MapPrototype.cpp
1050     runtime/ModuleLoaderPrototype.cpp
1051     runtime/NumberConstructor.cpp
1052     runtime/NumberPrototype.cpp
1053     runtime/ObjectConstructor.cpp
1054     runtime/ReflectObject.cpp
1055     runtime/RegExpConstructor.cpp
1056     runtime/RegExpPrototype.cpp
1057     runtime/SetPrototype.cpp
1058     runtime/StringConstructor.cpp
1059     runtime/StringIteratorPrototype.cpp
1060     runtime/StringPrototype.cpp
1061     runtime/SymbolConstructor.cpp
1062     runtime/SymbolPrototype.cpp
1063
1064     wasm/js/WebAssemblyCompileErrorConstructor.cpp
1065     wasm/js/WebAssemblyCompileErrorPrototype.cpp
1066     wasm/js/WebAssemblyInstanceConstructor.cpp
1067     wasm/js/WebAssemblyInstancePrototype.cpp
1068     wasm/js/WebAssemblyLinkErrorConstructor.cpp
1069     wasm/js/WebAssemblyLinkErrorPrototype.cpp
1070     wasm/js/WebAssemblyMemoryConstructor.cpp
1071     wasm/js/WebAssemblyMemoryPrototype.cpp
1072     wasm/js/WebAssemblyModuleConstructor.cpp
1073     wasm/js/WebAssemblyModulePrototype.cpp
1074     wasm/js/WebAssemblyPrototype.cpp
1075     wasm/js/WebAssemblyRuntimeErrorConstructor.cpp
1076     wasm/js/WebAssemblyRuntimeErrorPrototype.cpp
1077     wasm/js/WebAssemblyTableConstructor.cpp
1078     wasm/js/WebAssemblyTablePrototype.cpp
1079 )
1080
1081 set(JavaScriptCore_LIBRARIES
1082     WTF${DEBUG_SUFFIX}
1083     ${ICU_I18N_LIBRARIES}
1084     ${LLVM_LIBRARIES}
1085 )
1086
1087 set(JavaScriptCore_SCRIPTS_SOURCES_DIR "${JAVASCRIPTCORE_DIR}/Scripts")
1088
1089 # Globbing relies on the fact that generator-specific file names are prefixed with their directory.
1090 # Top-level scripts should have a file extension, since they are invoked during the build.
1091
1092 set(JavaScriptCore_SCRIPTS_SOURCES_PATHS
1093     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.pl
1094     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.py
1095     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/builtins/builtins*.py
1096 )
1097
1098 # Force JavaScriptCore to run scripts from the same staging path as WebCore.
1099 set(JavaScriptCore_SCRIPTS_DIR "${FORWARDING_HEADERS_DIR}/JavaScriptCore/Scripts")
1100
1101 file(MAKE_DIRECTORY ${JavaScriptCore_SCRIPTS_DIR})
1102
1103 # The directory flattening performed below mirrors what the Mac port does with private headers.
1104
1105 file(GLOB JavaScriptCore_SCRIPTS_SOURCES ${JavaScriptCore_SCRIPTS_SOURCES_PATHS})
1106
1107 foreach (_file ${JavaScriptCore_SCRIPTS_SOURCES})
1108     get_filename_component(_script "${_file}" NAME)
1109     add_custom_command(
1110         OUTPUT ${JavaScriptCore_SCRIPTS_DIR}/${_script}
1111         MAIN_DEPENDENCY ${_file}
1112         WORKING_DIRECTORY ${DERIVED_SOURCES_DIR}
1113         COMMAND ${CMAKE_COMMAND} -E copy_if_different ${_file} ${JavaScriptCore_SCRIPTS_DIR}/${_script}
1114         VERBATIM)
1115     list(APPEND JavaScriptCore_SCRIPTS ${JavaScriptCore_SCRIPTS_DIR}/${_script})
1116 endforeach ()
1117
1118 set(UDIS_GEN_DEP
1119     disassembler/udis86/ud_opcode.py
1120 )
1121
1122 add_custom_command(
1123     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/udis86_itab.c ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/udis86_itab.h
1124     DEPENDS ${UDIS_GEN_DEP}
1125     WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
1126     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/disassembler/udis86/ud_itab.py ${JAVASCRIPTCORE_DIR}/disassembler/udis86/optable.xml ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
1127     VERBATIM)
1128
1129 list(APPEND JavaScriptCore_HEADERS
1130     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/udis86_itab.h
1131 )
1132
1133 set(LLINT_ASM
1134     llint/LowLevelInterpreter.asm
1135     llint/LowLevelInterpreter32_64.asm
1136     llint/LowLevelInterpreter64.asm
1137 )
1138
1139 set(OFFLINE_ASM
1140     offlineasm/arm.rb
1141     offlineasm/arm64.rb
1142     offlineasm/ast.rb
1143     offlineasm/backends.rb
1144     offlineasm/cloop.rb
1145     offlineasm/config.rb
1146     offlineasm/instructions.rb
1147     offlineasm/mips.rb
1148     offlineasm/offsets.rb
1149     offlineasm/opt.rb
1150     offlineasm/parser.rb
1151     offlineasm/registers.rb
1152     offlineasm/risc.rb
1153     offlineasm/self_hash.rb
1154     offlineasm/settings.rb
1155     offlineasm/transform.rb
1156     offlineasm/x86.rb
1157 )
1158
1159 add_custom_command(
1160     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/BytecodeStructs.h
1161     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/generate-bytecode-files
1162     DEPENDS ${JAVASCRIPTCORE_DIR}/generate-bytecode-files bytecode/BytecodeList.json
1163     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
1164     VERBATIM)
1165
1166 list(APPEND JavaScriptCore_HEADERS
1167     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h
1168     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/BytecodeStructs.h
1169 )
1170
1171 if (WIN32)
1172   set(OFFLINE_ASM_BACKEND "X86_WIN, X86_64_WIN, C_LOOP")
1173 else ()
1174     if (WTF_CPU_X86)
1175         set(OFFLINE_ASM_BACKEND "X86")
1176     elseif (WTF_CPU_X86_64)
1177         set(OFFLINE_ASM_BACKEND "X86_64")
1178     elseif (WTF_CPU_ARM64)
1179         set(OFFLINE_ASM_BACKEND "ARM64")
1180     elseif (ARM_THUMB2_DETECTED)
1181         set(OFFLINE_ASM_BACKEND "ARMv7")
1182     elseif (ARM_TRADITIONAL_DETECTED)
1183         set(OFFLINE_ASM_BACKEND "ARMv7_TRADITIONAL")
1184     elseif (WTF_CPU_MIPS)
1185         set(OFFLINE_ASM_BACKEND "MIPS")
1186     endif ()
1187
1188     if (NOT ENABLE_JIT)
1189         set(OFFLINE_ASM_BACKEND "C_LOOP")
1190     endif ()
1191 endif ()
1192
1193 add_custom_command(
1194     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
1195     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb
1196     DEPENDS ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
1197     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}
1198     VERBATIM)
1199
1200 # We add the header files directly to the ADD_EXECUTABLE call instead of setting the
1201 # OBJECT_DEPENDS property in LLIntOffsetsExtractor.cpp because generate_offset_extractor.rb and
1202 # generate-bytecode-files may not regenerate the .h files in case the hash it calculates does not change.
1203 # In this case, if some of the dependencies specified in the ADD_CUSTOM_COMMANDs above have
1204 # changed the command will always be called because the mtime of the .h files will
1205 # always be older than that of their dependencies.
1206 # Additionally, setting the OBJECT_DEPENDS property will make the .h files a Makefile
1207 # dependency of both LLIntOffsetsExtractor and LLIntOffsetsExtractor.cpp, so the command will
1208 # actually be run multiple times!
1209 add_executable(LLIntOffsetsExtractor
1210     ${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp
1211     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/BytecodeStructs.h
1212 )
1213 target_link_libraries(LLIntOffsetsExtractor WTF)
1214
1215 # The build system will execute asm.rb every time LLIntOffsetsExtractor's mtime is newer than
1216 # LLIntAssembly.h's mtime. The problem we have here is: asm.rb has some built-in optimization
1217 # that generates a checksum of the LLIntOffsetsExtractor binary, if the checksum of the new
1218 # LLIntOffsetsExtractor matches, no output is generated. To make this target consistent and avoid
1219 # running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch)
1220 # after every asm.rb run.
1221 if (MSVC)
1222     set(LLIntOutput LowLevelInterpreterWin.asm)
1223     set(OFFLINE_ASM_ARGS --assembler=MASM)
1224 else ()
1225     set(LLIntOutput LLIntAssembly.h)
1226 endif ()
1227
1228 add_custom_command(
1229     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${LLIntOutput}
1230     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb
1231     DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
1232     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}
1233     COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${LLIntOutput}
1234     WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
1235     VERBATIM)
1236
1237 # The explanation for not making LLIntAssembly.h part of the OBJECT_DEPENDS property of some of
1238 # the .cpp files below is similar to the one in the previous comment. However, since these .cpp
1239 # files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS
1240 # since it is used in the add_library() call at the end of this file.
1241 if (MSVC)
1242     enable_language(ASM_MASM)
1243     if (CMAKE_SIZEOF_VOID_P EQUAL 4)
1244         # Win32 needs /safeseh with assembly, but Win64 does not.
1245         set(MASM_EXECUTABLE ml)
1246         set(LLINT_MASM_FLAGS /safeseh /c /Fo)
1247     else ()
1248         set(MASM_EXECUTABLE ml64)
1249         set(LLINT_MASM_FLAGS /c /Fo)
1250     endif ()
1251     add_custom_command(
1252         OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.obj
1253         DEPENDS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.asm
1254         COMMAND ${MASM_EXECUTABLE} ${LLINT_MASM_FLAGS} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.obj ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.asm
1255         VERBATIM)
1256     list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.obj)
1257 else ()
1258     list(APPEND JavaScriptCore_HEADERS
1259         ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
1260     )
1261 endif ()
1262
1263 # WebAssembly generator
1264
1265 macro(GENERATE_PYTHON _generator _additional_deps _input _output)
1266     add_custom_command(
1267         OUTPUT ${_output}
1268         MAIN_DEPENDENCY ${_generator}
1269         DEPENDS ${_input} ${_additional_deps}
1270         COMMAND ${PYTHON_EXECUTABLE} ${_generator} ${_input} ${_output}
1271         VERBATIM)
1272     list(APPEND JavaScriptCore_HEADERS ${_output})
1273     WEBKIT_ADD_SOURCE_DEPENDENCIES(${_input} ${_output})
1274 endmacro()
1275 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)
1276 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)
1277 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)
1278
1279 # LUT generator
1280
1281 set(HASH_LUT_GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/create_hash_table)
1282 macro(GENERATE_HASH_LUT _input _output)
1283     add_custom_command(
1284         OUTPUT ${_output}
1285         MAIN_DEPENDENCY ${HASH_LUT_GENERATOR}
1286         DEPENDS ${_input}
1287         COMMAND ${PERL_EXECUTABLE} ${HASH_LUT_GENERATOR} ${_input} > ${_output}
1288         VERBATIM)
1289     list(APPEND JavaScriptCore_HEADERS ${_output})
1290     WEBKIT_ADD_SOURCE_DEPENDENCIES(${_input} ${_output})
1291 endmacro()
1292
1293 # GENERATOR 1-A: LUT creator
1294
1295 foreach (_file ${JavaScriptCore_OBJECT_LUT_SOURCES})
1296     get_filename_component(_name ${_file} NAME_WE)
1297     GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
1298 endforeach ()
1299
1300 set(JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
1301     API
1302     assembler
1303     bindings
1304     builtins
1305     bytecode
1306     debugger
1307     dfg
1308     disassembler
1309     domjit
1310     heap
1311     inspector
1312     interpreter
1313     jit
1314     llint
1315     parser
1316     profiler
1317     runtime
1318     wasm
1319     yarr
1320
1321     collector/handles
1322
1323     inspector/agents
1324     inspector/augmentable
1325     inspector/remote
1326
1327     wasm/js
1328 )
1329
1330 # GENERATOR 1-B: particular LUT creator (for 1 file only)
1331 GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
1332
1333 #GENERATOR: "RegExpJitTables.h": tables used by Yarr
1334 add_custom_command(
1335     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
1336     MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/create_regex_tables
1337     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/create_regex_tables > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
1338     VERBATIM)
1339 WEBKIT_ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h)
1340
1341 add_custom_command(
1342     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/YarrCanonicalizeUnicode.cpp
1343     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/generateYarrCanonicalizeUnicode
1344     DEPENDS ${JAVASCRIPTCORE_DIR}/ucd/CaseFolding.txt
1345     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/generateYarrCanonicalizeUnicode ${JAVASCRIPTCORE_DIR}/ucd/CaseFolding.txt ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/YarrCanonicalizeUnicode.cpp
1346     VERBATIM)
1347
1348 list(APPEND JavaScriptCore_SOURCES
1349     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/YarrCanonicalizeUnicode.cpp
1350 )
1351
1352 #GENERATOR: "KeywordLookup.h": keyword decision tree used by the lexer
1353 add_custom_command(
1354     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
1355     MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py
1356     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table
1357     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py ${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
1358     VERBATIM)
1359 WEBKIT_ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h)
1360
1361
1362 # Inspector Interfaces
1363
1364 set(JavaScriptCore_INSPECTOR_SCRIPTS_DIR "${JAVASCRIPTCORE_DIR}/inspector/scripts")
1365
1366 set(JavaScriptCore_INSPECTOR_PROTOCOL_SCRIPTS
1367     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py
1368     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/cpp_generator.py
1369     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/cpp_generator_templates.py
1370     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_js_backend_commands.py
1371     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_header.py
1372     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_implementation.py
1373     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_frontend_dispatcher_header.py
1374     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_frontend_dispatcher_implementation.py
1375     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_header.py
1376     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_implementation.py
1377     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generator.py
1378     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generator_templates.py
1379     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/__init__.py
1380     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/models.py
1381 )
1382
1383 set(JavaScriptCore_INSPECTOR_DOMAINS
1384     ${JAVASCRIPTCORE_DIR}/inspector/protocol/ApplicationCache.json
1385     ${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json
1386     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json
1387     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json
1388     ${JAVASCRIPTCORE_DIR}/inspector/protocol/DOM.json
1389     ${JAVASCRIPTCORE_DIR}/inspector/protocol/DOMDebugger.json
1390     ${JAVASCRIPTCORE_DIR}/inspector/protocol/DOMStorage.json
1391     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Database.json
1392     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Debugger.json
1393     ${JAVASCRIPTCORE_DIR}/inspector/protocol/GenericTypes.json
1394     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Heap.json
1395     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Inspector.json
1396     ${JAVASCRIPTCORE_DIR}/inspector/protocol/LayerTree.json
1397     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Network.json
1398     ${JAVASCRIPTCORE_DIR}/inspector/protocol/OverlayTypes.json
1399     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Page.json
1400     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Recording.json
1401     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Runtime.json
1402     ${JAVASCRIPTCORE_DIR}/inspector/protocol/ScriptProfiler.json
1403     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Timeline.json
1404     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Worker.json
1405 )
1406
1407 if (ENABLE_INDEXED_DATABASE)
1408     list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
1409         ${JAVASCRIPTCORE_DIR}/inspector/protocol/IndexedDB.json
1410     )
1411 endif ()
1412
1413 if (ENABLE_RESOURCE_USAGE)
1414     list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
1415         ${JAVASCRIPTCORE_DIR}/inspector/protocol/Memory.json
1416     )
1417 endif ()
1418
1419 add_custom_command(
1420     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/CombinedDomains.json
1421     MAIN_DEPENDENCY ${JavaScriptCore_SCRIPTS_DIR}/generate-combined-inspector-json.py
1422     DEPENDS ${JavaScriptCore_INSPECTOR_DOMAINS}
1423     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/generate-combined-inspector-json.py ${JavaScriptCore_INSPECTOR_DOMAINS} > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/CombinedDomains.json
1424     VERBATIM)
1425
1426 # Inspector Backend Dispatchers, Frontend Dispatchers, Type Builders
1427 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol)
1428 file(MAKE_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector)
1429 add_custom_command(
1430     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.cpp
1431            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.h
1432            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorFrontendDispatchers.cpp
1433            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorFrontendDispatchers.h
1434            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorProtocolObjects.cpp
1435            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorProtocolObjects.h
1436            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js
1437     MAIN_DEPENDENCY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/CombinedDomains.json
1438     DEPENDS ${JavaScriptCore_INSPECTOR_PROTOCOL_SCRIPTS}
1439     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
1440     VERBATIM)
1441
1442 # JSCBuiltins
1443
1444 set(BUILTINS_GENERATOR_SCRIPTS
1445     ${JavaScriptCore_SCRIPTS_DIR}/builtins.py
1446     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generator.py
1447     ${JavaScriptCore_SCRIPTS_DIR}/builtins_model.py
1448     ${JavaScriptCore_SCRIPTS_DIR}/builtins_templates.py
1449     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_header.py
1450     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_implementation.py
1451     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_header.py
1452     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_implementation.py
1453     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_wrapper_header.py
1454     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_wrapper_implementation.py
1455     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_internals_wrapper_header.py
1456     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_internals_wrapper_implementation.py
1457     ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
1458     ${JavaScriptCore_SCRIPTS_DIR}/lazywriter.py
1459 )
1460
1461 set(JavaScriptCore_BUILTINS_SOURCES
1462     ${JAVASCRIPTCORE_DIR}/builtins/AsyncFromSyncIteratorPrototype.js
1463     ${JAVASCRIPTCORE_DIR}/builtins/ArrayConstructor.js
1464     ${JAVASCRIPTCORE_DIR}/builtins/ArrayIteratorPrototype.js
1465     ${JAVASCRIPTCORE_DIR}/builtins/ArrayPrototype.js
1466     ${JAVASCRIPTCORE_DIR}/builtins/AsyncFunctionPrototype.js
1467     ${JAVASCRIPTCORE_DIR}/builtins/AsyncIteratorPrototype.js
1468     ${JAVASCRIPTCORE_DIR}/builtins/AsyncGeneratorPrototype.js
1469     ${JAVASCRIPTCORE_DIR}/builtins/DatePrototype.js
1470     ${JAVASCRIPTCORE_DIR}/builtins/FunctionPrototype.js
1471     ${JAVASCRIPTCORE_DIR}/builtins/GeneratorPrototype.js
1472     ${JAVASCRIPTCORE_DIR}/builtins/GlobalObject.js
1473     ${JAVASCRIPTCORE_DIR}/builtins/GlobalOperations.js
1474     ${JAVASCRIPTCORE_DIR}/builtins/InspectorInstrumentationObject.js
1475     ${JAVASCRIPTCORE_DIR}/builtins/InternalPromiseConstructor.js
1476     ${JAVASCRIPTCORE_DIR}/builtins/IteratorHelpers.js
1477     ${JAVASCRIPTCORE_DIR}/builtins/IteratorPrototype.js
1478     ${JAVASCRIPTCORE_DIR}/builtins/MapIteratorPrototype.js
1479     ${JAVASCRIPTCORE_DIR}/builtins/MapPrototype.js
1480     ${JAVASCRIPTCORE_DIR}/builtins/ModuleLoaderPrototype.js
1481     ${JAVASCRIPTCORE_DIR}/builtins/NumberConstructor.js
1482     ${JAVASCRIPTCORE_DIR}/builtins/NumberPrototype.js
1483     ${JAVASCRIPTCORE_DIR}/builtins/ObjectConstructor.js
1484     ${JAVASCRIPTCORE_DIR}/builtins/PromiseConstructor.js
1485     ${JAVASCRIPTCORE_DIR}/builtins/PromiseOperations.js
1486     ${JAVASCRIPTCORE_DIR}/builtins/PromisePrototype.js
1487     ${JAVASCRIPTCORE_DIR}/builtins/ReflectObject.js
1488     ${JAVASCRIPTCORE_DIR}/builtins/RegExpPrototype.js
1489     ${JAVASCRIPTCORE_DIR}/builtins/SetIteratorPrototype.js
1490     ${JAVASCRIPTCORE_DIR}/builtins/SetPrototype.js
1491     ${JAVASCRIPTCORE_DIR}/builtins/StringConstructor.js
1492     ${JAVASCRIPTCORE_DIR}/builtins/StringIteratorPrototype.js
1493     ${JAVASCRIPTCORE_DIR}/builtins/StringPrototype.js
1494     ${JAVASCRIPTCORE_DIR}/builtins/TypedArrayConstructor.js
1495     ${JAVASCRIPTCORE_DIR}/builtins/TypedArrayPrototype.js
1496 )
1497
1498 add_custom_command(
1499     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcode.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcodeGenerated.h
1500     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/b3/air/AirOpcode.opcodes
1501     DEPENDS ${JAVASCRIPTCORE_DIR}/b3/air/opcode_generator.rb
1502     COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/b3/air/opcode_generator.rb ${JAVASCRIPTCORE_DIR}/b3/air/AirOpcode.opcodes VERBATIM
1503     WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
1504 )
1505
1506 list(APPEND JavaScriptCore_SOURCES
1507     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcode.h
1508     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcodeGenerated.h
1509 )
1510
1511 add_custom_command(
1512     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
1513     MAIN_DEPENDENCY ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
1514     DEPENDS ${JavaScriptCore_BUILTINS_SOURCES} ${BUILTINS_GENERATOR_SCRIPTS}
1515     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py --framework JavaScriptCore --output-directory ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} --combined ${JavaScriptCore_BUILTINS_SOURCES}
1516     VERBATIM)
1517
1518 list(APPEND JavaScriptCore_SOURCES
1519     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.cpp
1520     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorFrontendDispatchers.cpp
1521     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorProtocolObjects.cpp
1522     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp
1523 )
1524
1525 list(APPEND JavaScriptCore_HEADERS
1526     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.h
1527     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorFrontendDispatchers.h
1528     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorProtocolObjects.h
1529     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
1530 )
1531
1532 add_custom_command(
1533     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
1534     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/inspector/InjectedScriptSource.js
1535     DEPENDS ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py
1536     COMMAND ${CMAKE_COMMAND} -E echo "//# sourceURL=__InjectedScript_InjectedScriptSource.js" > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
1537     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py < ${JAVASCRIPTCORE_DIR}/inspector/InjectedScriptSource.js >> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
1538     COMMAND ${PERL_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl InjectedScriptSource_js ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h
1539     VERBATIM)
1540
1541 list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h)
1542
1543 if (WTF_CPU_ARM)
1544 elseif (WTF_CPU_ARM64)
1545 elseif (WTF_CPU_HPPA)
1546 elseif (WTF_CPU_PPC)
1547 elseif (WTF_CPU_PPC64)
1548 elseif (WTF_CPU_PPC64LE)
1549 elseif (WTF_CPU_S390)
1550 elseif (WTF_CPU_S390X)
1551 elseif (WTF_CPU_MIPS)
1552 elseif (WTF_CPU_SH4)
1553 elseif (WTF_CPU_X86)
1554 elseif (WTF_CPU_X86_64)
1555     if (MSVC AND ENABLE_JIT)
1556         add_custom_command(
1557             OUTPUT ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj
1558             MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/jit/JITStubsMSVC64.asm
1559             COMMAND ml64 -nologo -c -Fo ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj ${JAVASCRIPTCORE_DIR}/jit/JITStubsMSVC64.asm
1560             VERBATIM)
1561
1562         list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj)
1563     endif ()
1564 else ()
1565     message(FATAL_ERROR "Unknown CPU")
1566 endif ()
1567
1568 WEBKIT_FRAMEWORK_DECLARE(JavaScriptCore)
1569 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
1570
1571 WEBKIT_CREATE_FORWARDING_HEADERS(JavaScriptCore DIRECTORIES ${JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES} FILES ${JavaScriptCore_FORWARDING_HEADERS_FILES})
1572
1573 target_include_directories(LLIntOffsetsExtractor PRIVATE ${JavaScriptCore_INCLUDE_DIRECTORIES})
1574
1575 add_subdirectory(shell)
1576
1577 WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
1578 WEBKIT_FRAMEWORK(JavaScriptCore)
1579
1580 if (NOT "${PORT}" STREQUAL "Mac")
1581     if (${JavaScriptCore_LIBRARY_TYPE} STREQUAL "SHARED")
1582         WEBKIT_POPULATE_LIBRARY_VERSION(JAVASCRIPTCORE)
1583         set_target_properties(JavaScriptCore PROPERTIES VERSION ${JAVASCRIPTCORE_VERSION} SOVERSION ${JAVASCRIPTCORE_VERSION_MAJOR})
1584         install(TARGETS JavaScriptCore DESTINATION "${LIB_INSTALL_DIR}")
1585     endif ()
1586 endif ()
1587
1588 # Force staging of shared scripts, even if they aren't directly used to build JavaScriptCore.
1589
1590 add_custom_target(stageSharedScripts DEPENDS ${JavaScriptCore_SCRIPTS})
1591 add_dependencies(JavaScriptCore stageSharedScripts)
1592
1593 if (MSVC)
1594     add_custom_command(
1595         TARGET JavaScriptCore
1596         PRE_BUILD
1597         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_DIR}
1598         VERBATIM)
1599
1600     add_custom_command(
1601         TARGET JavaScriptCore
1602         POST_BUILD
1603         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${DERIVED_SOURCES_DIR} $<TARGET_FILE:JavaScriptCore>
1604         VERBATIM)
1605 endif ()