1 SET(JavaScriptCore_INCLUDE_DIRECTORIES
3 "${JAVASCRIPTCORE_DIR}"
4 "${JAVASCRIPTCORE_DIR}/API"
5 "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
6 "${JAVASCRIPTCORE_DIR}/assembler"
7 "${JAVASCRIPTCORE_DIR}/bytecode"
8 "${JAVASCRIPTCORE_DIR}/bytecompiler"
9 "${JAVASCRIPTCORE_DIR}/dfg"
10 "${JAVASCRIPTCORE_DIR}/heap"
11 "${JAVASCRIPTCORE_DIR}/debugger"
12 "${JAVASCRIPTCORE_DIR}/interpreter"
13 "${JAVASCRIPTCORE_DIR}/jit"
14 "${JAVASCRIPTCORE_DIR}/llint"
15 "${JAVASCRIPTCORE_DIR}/parser"
16 "${JAVASCRIPTCORE_DIR}/profiler"
17 "${JAVASCRIPTCORE_DIR}/runtime"
18 "${JAVASCRIPTCORE_DIR}/tools"
19 "${JAVASCRIPTCORE_DIR}/yarr"
21 "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
22 "${CMAKE_SOURCE_DIR}/Source"
25 SET(JavaScriptCore_SOURCES
27 API/JSCallbackConstructor.cpp
28 API/JSCallbackFunction.cpp
29 API/JSCallbackObject.cpp
33 API/JSProfilerPrivate.cpp
36 API/JSWeakObjectMapRefPrivate.cpp
37 API/OpaqueJSString.cpp
39 bytecode/CallLinkInfo.cpp
40 bytecode/CallLinkStatus.cpp
41 bytecode/CodeBlock.cpp
42 bytecode/DFGExitProfile.cpp
43 bytecode/ExecutionCounter.cpp
44 bytecode/GetByIdStatus.cpp
45 bytecode/JumpTable.cpp
46 bytecode/LazyOperandValueProfile.cpp
47 bytecode/MethodCallLinkInfo.cpp
48 bytecode/MethodCallLinkStatus.cpp
49 bytecode/MethodOfGettingAValueProfile.cpp
51 bytecode/PolymorphicPutByIdList.cpp
52 bytecode/PredictedType.cpp
53 bytecode/PutByIdStatus.cpp
54 bytecode/SamplingTool.cpp
55 bytecode/StructureStubInfo.cpp
57 bytecompiler/BytecodeGenerator.cpp
58 bytecompiler/NodesCodegen.cpp
60 dfg/DFGAbstractState.cpp
61 dfg/DFGAssemblyHelpers.cpp
62 dfg/DFGByteCodeParser.cpp
63 dfg/DFGCapabilities.cpp
65 dfg/DFGCorrectableJumpPoint.cpp
70 dfg/DFGJITCompiler.cpp
74 dfg/DFGOSRExitCompiler.cpp
75 dfg/DFGOSRExitCompiler32_64.cpp
76 dfg/DFGOSRExitCompiler64.cpp
79 dfg/DFGPredictionPropagationPhase.cpp
80 dfg/DFGRedundantPhiEliminationPhase.cpp
82 dfg/DFGSpeculativeJIT.cpp
83 dfg/DFGSpeculativeJIT32_64.cpp
84 dfg/DFGSpeculativeJIT64.cpp
86 dfg/DFGVirtualRegisterAllocationPhase.cpp
88 heap/BlockAllocator.cpp
90 heap/ConservativeRoots.cpp
91 heap/DFGCodeBlocks.cpp
95 heap/MachineStackMarker.cpp
96 heap/MarkedAllocator.cpp
101 heap/WeakHandleOwner.cpp
104 debugger/Debugger.cpp
105 debugger/DebuggerActivation.cpp
106 debugger/DebuggerCallFrame.cpp
108 interpreter/AbstractPC.cpp
109 interpreter/CallFrame.cpp
110 interpreter/Interpreter.cpp
111 interpreter/RegisterFile.cpp
113 jit/ExecutableAllocator.cpp
114 jit/HostCallReturnValue.cpp
115 jit/JITArithmetic32_64.cpp
116 jit/JITArithmetic.cpp
120 jit/JITExceptions.cpp
121 jit/JITOpcodes32_64.cpp
123 jit/JITPropertyAccess32_64.cpp
124 jit/JITPropertyAccess.cpp
126 jit/ThunkGenerators.cpp
131 parser/ParserArena.cpp
132 parser/SourceProviderCache.cpp
135 profiler/ProfileGenerator.cpp
136 profiler/ProfileNode.cpp
137 profiler/Profiler.cpp
140 runtime/Arguments.cpp
141 runtime/ArrayConstructor.cpp
142 runtime/ArrayPrototype.cpp
143 runtime/BooleanConstructor.cpp
144 runtime/BooleanObject.cpp
145 runtime/BooleanPrototype.cpp
147 runtime/CommonIdentifiers.cpp
148 runtime/Completion.cpp
149 runtime/ConstructData.cpp
150 runtime/DateConstructor.cpp
151 runtime/DateConversion.cpp
152 runtime/DateInstance.cpp
153 runtime/DatePrototype.cpp
155 runtime/ErrorConstructor.cpp
156 runtime/ErrorInstance.cpp
157 runtime/ErrorPrototype.cpp
158 runtime/ExceptionHelpers.cpp
159 runtime/Executable.cpp
160 runtime/FunctionConstructor.cpp
161 runtime/FunctionPrototype.cpp
162 runtime/GCActivityCallback.cpp
163 runtime/GetterSetter.cpp
164 runtime/Identifier.cpp
165 runtime/InitializeThreading.cpp
166 runtime/InternalFunction.cpp
167 runtime/JSActivation.cpp
168 runtime/JSAPIValueWrapper.cpp
171 runtime/JSDateMath.cpp
172 runtime/JSFunction.cpp
173 runtime/JSBoundFunction.cpp
174 runtime/JSGlobalData.cpp
175 runtime/JSGlobalObject.cpp
176 runtime/JSGlobalObjectFunctions.cpp
177 runtime/JSGlobalThis.cpp
179 runtime/JSNotAnObject.cpp
181 runtime/JSONObject.cpp
182 runtime/JSPropertyNameIterator.cpp
183 runtime/JSStaticScopeObject.cpp
185 runtime/JSStringJoiner.cpp
187 runtime/JSVariableObject.cpp
188 runtime/JSWrapperObject.cpp
189 runtime/LiteralParser.cpp
191 runtime/MathObject.cpp
192 runtime/NativeErrorConstructor.cpp
193 runtime/NativeErrorPrototype.cpp
194 runtime/NumberConstructor.cpp
195 runtime/NumberObject.cpp
196 runtime/NumberPrototype.cpp
197 runtime/ObjectConstructor.cpp
198 runtime/ObjectPrototype.cpp
199 runtime/Operations.cpp
201 runtime/PropertyDescriptor.cpp
202 runtime/PropertyNameArray.cpp
203 runtime/PropertySlot.cpp
205 runtime/RegExpCache.cpp
206 runtime/RegExpConstructor.cpp
207 runtime/RegExpCachedResult.cpp
208 runtime/RegExpMatchesArray.cpp
209 runtime/RegExpObject.cpp
210 runtime/RegExpPrototype.cpp
211 runtime/ScopeChain.cpp
212 runtime/SmallStrings.cpp
213 runtime/StrictEvalActivation.cpp
214 runtime/StringConstructor.cpp
215 runtime/StringObject.cpp
216 runtime/StringPrototype.cpp
217 runtime/StringRecursionChecker.cpp
218 runtime/Structure.cpp
219 runtime/StructureChain.cpp
220 runtime/TimeoutChecker.cpp
223 tools/CodeProfile.cpp
224 tools/CodeProfiling.cpp
226 yarr/YarrCanonicalizeUCS2.cpp
228 yarr/YarrInterpreter.cpp
230 yarr/YarrSyntaxChecker.cpp
233 SET(JavaScriptCore_LUT_FILES
234 runtime/ArrayConstructor.cpp
235 runtime/ArrayPrototype.cpp
236 runtime/BooleanPrototype.cpp
237 runtime/DateConstructor.cpp
238 runtime/DatePrototype.cpp
239 runtime/ErrorPrototype.cpp
240 runtime/JSGlobalObject.cpp
241 runtime/JSONObject.cpp
242 runtime/MathObject.cpp
243 runtime/NumberConstructor.cpp
244 runtime/NumberPrototype.cpp
245 runtime/ObjectConstructor.cpp
246 runtime/ObjectPrototype.cpp
247 runtime/RegExpConstructor.cpp
248 runtime/RegExpObject.cpp
249 runtime/RegExpPrototype.cpp
250 runtime/StringConstructor.cpp
251 runtime/StringPrototype.cpp
254 SET(JavaScriptCore_LIBRARIES
259 # GENERATOR 1-A: LUT creator
260 FOREACH (_file ${JavaScriptCore_LUT_FILES})
261 GET_FILENAME_COMPONENT(_name ${_file} NAME_WE)
262 GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
263 LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
267 # GENERATOR 1-B: particular LUT creator (for 1 file only)
268 GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h MAIN_DEPENDENCY)
269 LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
271 #GENERATOR: "RegExpJitTables.h": tables used by Yarr
273 OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
274 MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_regex_tables
275 COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_regex_tables > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
277 ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h)
280 #GENERATOR: "KeywordLookup.h": keyword decision tree used by the lexer
282 OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
283 MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py
284 COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py ${JAVASCRIPTCORE_DIR}/parser/Keywords.table > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
286 ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h)
289 LIST(APPEND JavaScriptCore_SOURCES
290 assembler/ARMAssembler.cpp
291 assembler/ARMv7Assembler.cpp
292 assembler/MacroAssemblerARM.cpp
294 ELSEIF (WTF_CPU_MIPS)
296 ELSEIF (WTF_CPU_X86_64)
298 MESSAGE(FATAL_ERROR "Unknown CPU")
302 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
305 ADD_SUBDIRECTORY(shell)
307 WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
308 INCLUDE_DIRECTORIES(${JavaScriptCore_INCLUDE_DIRECTORIES})
309 ADD_DEFINITIONS(-DBUILDING_JavaScriptCore)
310 ADD_LIBRARY(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
311 TARGET_LINK_LIBRARIES(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES})
312 SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
313 SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
315 IF (JavaScriptCore_LINK_FLAGS)
316 ADD_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} LINK_FLAGS "${JavaScriptCore_LINK_FLAGS}")
320 SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
321 INSTALL(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")