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