blob: c1946ff81778f96317bd6435ab9ef99a447bc7f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
|
SET(JavaScriptCore_INCLUDE_DIRECTORIES
"${CMAKE_BINARY_DIR}"
"${JAVASCRIPTCORE_DIR}"
"${JAVASCRIPTCORE_DIR}/API"
"${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
"${JAVASCRIPTCORE_DIR}/assembler"
"${JAVASCRIPTCORE_DIR}/bytecode"
"${JAVASCRIPTCORE_DIR}/bytecompiler"
"${JAVASCRIPTCORE_DIR}/debugger"
"${JAVASCRIPTCORE_DIR}/interpreter"
"${JAVASCRIPTCORE_DIR}/jit"
"${JAVASCRIPTCORE_DIR}/parser"
"${JAVASCRIPTCORE_DIR}/pcre"
"${JAVASCRIPTCORE_DIR}/profiler"
"${JAVASCRIPTCORE_DIR}/runtime"
"${JAVASCRIPTCORE_DIR}/yarr"
"${WTF_INCLUDE_DIRECTORIES}"
"${CMAKE_SOURCE_DIR}"
)
SET(JavaScriptCore_SOURCES
API/JSBase.cpp
API/JSCallbackConstructor.cpp
API/JSCallbackFunction.cpp
API/JSCallbackObject.cpp
API/JSClassRef.cpp
API/JSContextRef.cpp
API/JSObjectRef.cpp
API/JSProfilerPrivate.cpp
API/JSStringRef.cpp
API/JSValueRef.cpp
API/JSWeakObjectMapRefPrivate.cpp
API/OpaqueJSString.cpp
bytecode/CodeBlock.cpp
bytecode/JumpTable.cpp
bytecode/Opcode.cpp
bytecode/SamplingTool.cpp
bytecode/StructureStubInfo.cpp
bytecompiler/BytecodeGenerator.cpp
bytecompiler/NodesCodegen.cpp
debugger/Debugger.cpp
debugger/DebuggerActivation.cpp
debugger/DebuggerCallFrame.cpp
interpreter/CallFrame.cpp
interpreter/Interpreter.cpp
interpreter/RegisterFile.cpp
jit/ExecutableAllocator.cpp
jit/ExecutableAllocatorFixedVMPool.cpp
jit/ExecutableAllocatorPosix.cpp
jit/ExecutableAllocatorSymbian.cpp
jit/ExecutableAllocatorWin.cpp
jit/JITArithmetic32_64.cpp
jit/JITArithmetic.cpp
jit/JITCall32_64.cpp
jit/JITCall.cpp
jit/JIT.cpp
jit/JITOpcodes32_64.cpp
jit/JITOpcodes.cpp
jit/JITPropertyAccess32_64.cpp
jit/JITPropertyAccess.cpp
jit/JITStubs.cpp
jit/ThunkGenerators.cpp
parser/JSParser.cpp
parser/Lexer.cpp
parser/Nodes.cpp
parser/Parser.cpp
parser/ParserArena.cpp
pcre/pcre_compile.cpp
pcre/pcre_exec.cpp
pcre/pcre_tables.cpp
pcre/pcre_ucp_searchfuncs.cpp
pcre/pcre_xclass.cpp
profiler/Profile.cpp
profiler/ProfileGenerator.cpp
profiler/ProfileNode.cpp
profiler/Profiler.cpp
runtime/ArgList.cpp
runtime/Arguments.cpp
runtime/ArrayConstructor.cpp
runtime/ArrayPrototype.cpp
runtime/BooleanConstructor.cpp
runtime/BooleanObject.cpp
runtime/BooleanPrototype.cpp
runtime/CallData.cpp
runtime/Collector.cpp
runtime/CommonIdentifiers.cpp
runtime/Completion.cpp
runtime/ConstructData.cpp
runtime/DateConstructor.cpp
runtime/DateConversion.cpp
runtime/DateInstance.cpp
runtime/DatePrototype.cpp
runtime/Error.cpp
runtime/ErrorConstructor.cpp
runtime/ErrorInstance.cpp
runtime/ErrorPrototype.cpp
runtime/ExceptionHelpers.cpp
runtime/Executable.cpp
runtime/FunctionConstructor.cpp
runtime/FunctionPrototype.cpp
runtime/GetterSetter.cpp
runtime/GlobalEvalFunction.cpp
runtime/Identifier.cpp
runtime/InitializeThreading.cpp
runtime/InternalFunction.cpp
runtime/JSActivation.cpp
runtime/JSAPIValueWrapper.cpp
runtime/JSArray.cpp
runtime/JSByteArray.cpp
runtime/JSCell.cpp
runtime/JSFunction.cpp
runtime/JSGlobalData.cpp
runtime/JSGlobalObject.cpp
runtime/JSGlobalObjectFunctions.cpp
runtime/JSImmediate.cpp
runtime/JSLock.cpp
runtime/JSNotAnObject.cpp
runtime/JSNumberCell.cpp
runtime/JSObject.cpp
runtime/JSObjectWithGlobalObject.cpp
runtime/JSONObject.cpp
runtime/JSPropertyNameIterator.cpp
runtime/JSStaticScopeObject.cpp
runtime/JSString.cpp
runtime/JSValue.cpp
runtime/JSVariableObject.cpp
runtime/JSWrapperObject.cpp
runtime/JSZombie.cpp
runtime/LiteralParser.cpp
runtime/Lookup.cpp
runtime/MarkStack.cpp
runtime/MathObject.cpp
runtime/NativeErrorConstructor.cpp
runtime/NativeErrorPrototype.cpp
runtime/NumberConstructor.cpp
runtime/NumberObject.cpp
runtime/NumberPrototype.cpp
runtime/ObjectConstructor.cpp
runtime/ObjectPrototype.cpp
runtime/Operations.cpp
runtime/PropertyDescriptor.cpp
runtime/PropertyNameArray.cpp
runtime/PropertySlot.cpp
runtime/PrototypeFunction.cpp
runtime/RegExp.cpp
runtime/RegExpCache.cpp
runtime/RegExpConstructor.cpp
runtime/RegExpObject.cpp
runtime/RegExpPrototype.cpp
runtime/RopeImpl.cpp
runtime/ScopeChain.cpp
runtime/SmallStrings.cpp
runtime/StringConstructor.cpp
runtime/StringObject.cpp
runtime/StringPrototype.cpp
runtime/Structure.cpp
runtime/StructureChain.cpp
runtime/TimeoutChecker.cpp
runtime/UString.cpp
yarr/RegexCompiler.cpp
yarr/RegexInterpreter.cpp
yarr/RegexJIT.cpp
wtf/DateMath.cpp
)
SET(JavaScriptCore_HEADERS )
SET(JavaScriptCore_LUT_FILES
runtime/ArrayPrototype.cpp
runtime/DatePrototype.cpp
runtime/JSONObject.cpp
runtime/MathObject.cpp
runtime/NumberConstructor.cpp
runtime/RegExpConstructor.cpp
runtime/RegExpObject.cpp
runtime/StringPrototype.cpp
)
SET(JavaScriptCore_LIBRARIES
${WTF_LIBRARY_NAME}
)
# GENERATOR 1-A: LUT creator
FOREACH (_file ${JavaScriptCore_LUT_FILES})
GET_FILENAME_COMPONENT(_name ${_file} NAME_WE)
GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/${_file} ${DERIVED_SOURCES_DIR}/${_name}.lut.h)
LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_DIR}/${_name}.lut.h)
ENDFOREACH ()
# GENERATOR 1-B: particular LUT creator (for 1 file only)
GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_DIR}/Lexer.lut.h MAIN_DEPENDENCY)
LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_DIR}/Lexer.lut.h)
# GENERATOR 2: bison grammar
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_DIR}/Grammar.cpp ${DERIVED_SOURCES_DIR}/Grammar.h
MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/parser/Grammar.y
COMMAND ${BISON_EXECUTABLE} -d -p jscyy ${JAVASCRIPTCORE_DIR}/parser/Grammar.y -o ${DERIVED_SOURCES_DIR}/Grammar.cpp --defines=${DERIVED_SOURCES_DIR}/Grammar.h
COMMENT "[BISON][JSCYY] Building parser with bison"
VERBATIM)
LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_DIR}/Grammar.h)
LIST(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/Grammar.cpp)
# GENERATOR: "chartables.c": compile and execute the chartables generator (and add it to sources)
IF (MSVC)
SET(JSC_DFTABLES_PREPROCESSOR --preprocessor=cl.exe)
ENDIF ()
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_DIR}/chartables.c
MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/pcre/dftables
COMMAND ${PERL_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/pcre/dftables ${JSC_DFTABLES_PREPROCESSOR} ${DERIVED_SOURCES_DIR}/chartables.c
VERBATIM)
ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/pcre/pcre_tables.cpp ${DERIVED_SOURCES_DIR}/chartables.c)
#GENERATOR: "RegExpJitTables.h": tables used by Yarr
ADD_CUSTOM_COMMAND(
OUTPUT ${DERIVED_SOURCES_DIR}/RegExpJitTables.h
MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_regex_tables
COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_regex_tables > ${DERIVED_SOURCES_DIR}/RegExpJitTables.h
VERBATIM)
ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/yarr/RegexCompiler.cpp ${DERIVED_SOURCES_DIR}/RegExpJitTables.h)
IF (WTF_CPU_ARM)
LIST(APPEND JavaScriptCore_SOURCES
assembler/ARMAssembler.cpp
assembler/MacroAssemblerARM.cpp
)
ELSEIF (WTF_CPU_MIPS)
ELSEIF (WTF_CPU_X86)
ELSEIF (WTF_CPU_X86_64)
ELSE ()
MESSAGE(FATAL_ERROR "Unknown CPU")
ENDIF ()
INCLUDE_IF_EXISTS(${JAVASCRIPTCORE_DIR}/CMakeLists${PORT}.txt)
# Declare source groups for Visual Studio folders
SOURCE_GROUP(API "API/")
SOURCE_GROUP(assembler "assembler/")
SOURCE_GROUP(bytecode "bytecode/")
SOURCE_GROUP(bytecompiler "bytecompiler/")
SOURCE_GROUP(debugger "debugger/")
SOURCE_GROUP(bytecode "bytecode/")
SOURCE_GROUP(interpreter "interpreter/")
SOURCE_GROUP(jit "jit/")
SOURCE_GROUP(parser "parser/")
SOURCE_GROUP(pcre "pcre/")
SOURCE_GROUP(profiler "profiler/")
SOURCE_GROUP(runtime "runtime/")
SOURCE_GROUP(yarr "yarr/")
SOURCE_GROUP(wtf "wtf/")
ADD_SUBDIRECTORY(wtf)
ADD_SUBDIRECTORY(jsc)
WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
INCLUDE_DIRECTORIES(${JavaScriptCore_INCLUDE_DIRECTORIES})
ADD_DEFINITIONS(-DBUILDING_JavaScriptCore)
ADD_LIBRARY(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
TARGET_LINK_LIBRARIES(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES})
ADD_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} LINK_FLAGS ${JavaScriptCore_LINK_FLAGS})
IF (SHARED_CORE)
INSTALL(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION lib)
ENDIF ()
|