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