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