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