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