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