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