source: webkit/trunk/JavaScriptCore/JavaScriptCore.pri@ 39625

Last change on this file since 39625 was 39625, checked in by [email protected], 16 years ago

CanvasPixelArray performance is too slow
<https://bugs.webkit.org/show_bug.cgi?id=23123>

Reviewed by Gavin Barraclough

JavaScriptCore:
The fix to this is to devirtualise get and put in a manner similar to
JSString and JSArray. To do this I've added a ByteArray implementation
and JSByteArray wrapper to JSC. We can then do vptr comparisons to
devirtualise the calls.

This devirtualisation improves performance by 1.5-2x in my somewhat ad
hoc tests.

WebCore:
Remove the WebCore CanvasPixelArray implementation and replace
CPA usage with JSC::ByteArray. Replace the JSCanvasPixelArray
wrapper with an explicitly instantiated JSByteArray put on the
JSImageData object as an ordinary ReadOnly, DontDelete property.

File size: 6.6 KB
Line 
1# JavaScriptCore - Qt4 build info
2VPATH += $$PWD
3
4INCLUDEPATH += tmp
5INCLUDEPATH += $$PWD $$PWD/parser $$PWD/bytecompiler $$PWD/debugger $$PWD/runtime $$PWD/wtf $$PWD/wtf/unicode $$PWD/interpreter $$PWD/jit $$PWD/profiler $$PWD/wrec $$PWD/API $$PWD/.. \
6 $$PWD/ForwardingHeaders $$PWD/bytecode $$PWD/assembler
7DEFINES += BUILDING_QT__
8
9isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = tmp
10GENERATED_SOURCES_DIR_SLASH = $$GENERATED_SOURCES_DIR/
11win32-* {
12 GENERATED_SOURCES_DIR_SLASH ~= s|/|\|
13 LIBS += -lwinmm
14}
15
16# Disable the JIT due to numerous observed miscompilations :(
17#CONFIG(release):isEqual(QT_ARCH,i386) {
18# JIT_DEFINES = ENABLE_JIT ENABLE_WREC ENABLE_JIT_OPTIMIZE_CALL ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS ENABLE_JIT_OPTIMIZE_ARITHMETIC
19# # gcc <= 4.1 is known to miscompile, so require >= 4.2, written as major > 3 and minor > 1
20# linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,1) {
21# DEFINES += $$JIT_DEFINES
22# SOURCES += wtf/TCSystemAlloc.cpp
23# DEFINES -= USE_SYSTEM_MALLOC
24# }
25# win32-msvc* {
26# DEFINES += $$JIT_DEFINES
27# }
28#}
29
30include(pcre/pcre.pri)
31
32LUT_FILES += \
33 runtime/DatePrototype.cpp \
34 runtime/NumberConstructor.cpp \
35 runtime/StringPrototype.cpp \
36 runtime/ArrayPrototype.cpp \
37 runtime/MathObject.cpp \
38 runtime/RegExpConstructor.cpp \
39 runtime/RegExpObject.cpp
40
41KEYWORDLUT_FILES += \
42 parser/Keywords.table
43
44JSCBISON += \
45 parser/Grammar.y
46
47SOURCES += \
48 wtf/Assertions.cpp \
49 wtf/HashTable.cpp \
50 wtf/MainThread.cpp \
51 wtf/RandomNumber.cpp \
52 wtf/RefCountedLeakCounter.cpp \
53 wtf/unicode/CollatorDefault.cpp \
54 wtf/unicode/icu/CollatorICU.cpp \
55 wtf/unicode/UTF8.cpp \
56 API/JSBase.cpp \
57 API/JSCallbackConstructor.cpp \
58 API/JSCallbackFunction.cpp \
59 API/JSCallbackObject.cpp \
60 API/JSClassRef.cpp \
61 API/JSContextRef.cpp \
62 API/JSObjectRef.cpp \
63 API/JSStringRef.cpp \
64 API/JSValueRef.cpp \
65 API/OpaqueJSString.cpp \
66 runtime/InitializeThreading.cpp \
67 runtime/JSGlobalData.cpp \
68 runtime/JSGlobalObject.cpp \
69 runtime/JSStaticScopeObject.cpp \
70 runtime/JSVariableObject.cpp \
71 runtime/JSActivation.cpp \
72 runtime/JSNotAnObject.cpp \
73 bytecode/CodeBlock.cpp \
74 bytecode/StructureStubInfo.cpp \
75 bytecode/JumpTable.cpp \
76 jit/JIT.cpp \
77 jit/JITCall.cpp \
78 jit/JITArithmetic.cpp \
79 jit/JITPropertyAccess.cpp \
80 jit/ExecutableAllocator.cpp \
81 bytecompiler/BytecodeGenerator.cpp \
82 runtime/ExceptionHelpers.cpp \
83 runtime/JSPropertyNameIterator.cpp \
84 interpreter/Interpreter.cpp \
85 bytecode/Opcode.cpp \
86 bytecode/SamplingTool.cpp \
87 wrec/CharacterClass.cpp \
88 wrec/CharacterClassConstructor.cpp \
89 wrec/WREC.cpp \
90 wrec/WRECFunctors.cpp \
91 wrec/WRECGenerator.cpp \
92 wrec/WRECParser.cpp \
93 interpreter/RegisterFile.cpp
94
95win32-*: SOURCES += jit/ExecutableAllocatorWin.cpp
96else: SOURCES += jit/ExecutableAllocatorPosix.cpp
97
98# AllInOneFile.cpp helps gcc analize and optimize code
99# Other compilers may be able to do this at link time
100SOURCES += \
101 runtime/ArgList.cpp \
102 runtime/Arguments.cpp \
103 runtime/ArrayConstructor.cpp \
104 runtime/ArrayPrototype.cpp \
105 runtime/BooleanConstructor.cpp \
106 runtime/BooleanObject.cpp \
107 runtime/BooleanPrototype.cpp \
108 runtime/ByteArray.cpp \
109 runtime/CallData.cpp \
110 runtime/Collector.cpp \
111 runtime/CommonIdentifiers.cpp \
112 runtime/ConstructData.cpp \
113 runtime/DateConstructor.cpp \
114 runtime/DateInstance.cpp \
115 runtime/DateMath.cpp \
116 runtime/DatePrototype.cpp \
117 debugger/Debugger.cpp \
118 debugger/DebuggerCallFrame.cpp \
119 wtf/dtoa.cpp \
120 runtime/Error.cpp \
121 runtime/ErrorConstructor.cpp \
122 runtime/ErrorInstance.cpp \
123 runtime/ErrorPrototype.cpp \
124 interpreter/CallFrame.cpp \
125 runtime/FunctionConstructor.cpp \
126 runtime/FunctionPrototype.cpp \
127 runtime/GetterSetter.cpp \
128 runtime/GlobalEvalFunction.cpp \
129 runtime/Identifier.cpp \
130 runtime/InternalFunction.cpp \
131 runtime/Completion.cpp \
132 runtime/JSArray.cpp \
133 runtime/JSByteArray.cpp \
134 runtime/JSCell.cpp \
135 runtime/JSFunction.cpp \
136 runtime/JSGlobalObjectFunctions.cpp \
137 runtime/JSImmediate.cpp \
138 runtime/JSLock.cpp \
139 runtime/JSNumberCell.cpp \
140 runtime/JSObject.cpp \
141 runtime/JSString.cpp \
142 runtime/JSValue.cpp \
143 runtime/JSWrapperObject.cpp \
144 parser/Lexer.cpp \
145 runtime/Lookup.cpp \
146 runtime/MathObject.cpp \
147 runtime/NativeErrorConstructor.cpp \
148 runtime/NativeErrorPrototype.cpp \
149 parser/Nodes.cpp \
150 runtime/NumberConstructor.cpp \
151 runtime/NumberObject.cpp \
152 runtime/NumberPrototype.cpp \
153 runtime/ObjectConstructor.cpp \
154 runtime/ObjectPrototype.cpp \
155 runtime/Operations.cpp \
156 parser/Parser.cpp \
157 runtime/PropertyNameArray.cpp \
158 runtime/PropertySlot.cpp \
159 runtime/PrototypeFunction.cpp \
160 runtime/RegExp.cpp \
161 runtime/RegExpConstructor.cpp \
162 runtime/RegExpObject.cpp \
163 runtime/RegExpPrototype.cpp \
164 runtime/ScopeChain.cpp \
165 runtime/SmallStrings.cpp \
166 runtime/StringConstructor.cpp \
167 runtime/StringObject.cpp \
168 runtime/StringPrototype.cpp \
169 runtime/Structure.cpp \
170 runtime/StructureChain.cpp \
171 runtime/UString.cpp \
172 profiler/HeavyProfile.cpp \
173 profiler/Profile.cpp \
174 profiler/ProfileGenerator.cpp \
175 profiler/ProfileNode.cpp \
176 profiler/Profiler.cpp \
177 profiler/TreeProfile.cpp \
178 wtf/FastMalloc.cpp \
179 wtf/Threading.cpp \
180 wtf/ThreadingQt.cpp \
181 wtf/qt/MainThreadQt.cpp
182
183# GENERATOR 1-A: LUT creator
184lut.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.lut.h
185lut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
186lut.depend = ${QMAKE_FILE_NAME}
187lut.input = LUT_FILES
188lut.CONFIG += no_link
189addExtraCompiler(lut)
190
191# GENERATOR 1-B: particular LUT creator (for 1 file only)
192keywordlut.output = $$GENERATED_SOURCES_DIR/Lexer.lut.h
193keywordlut.commands = perl $$PWD/create_hash_table ${QMAKE_FILE_NAME} -i > ${QMAKE_FILE_OUT}
194keywordlut.depend = ${QMAKE_FILE_NAME}
195keywordlut.input = KEYWORDLUT_FILES
196keywordlut.CONFIG += no_link
197addExtraCompiler(keywordlut)
198
199# GENERATOR 2: bison grammar
200jscbison.output = $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.cpp
201jscbison.commands = bison -d -p jscyy ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_BASE}.tab.c && $(MOVE) ${QMAKE_FILE_BASE}.tab.c ${QMAKE_FILE_OUT} && $(MOVE) ${QMAKE_FILE_BASE}.tab.h $$GENERATED_SOURCES_DIR/${QMAKE_FILE_BASE}.h
202jscbison.depend = ${QMAKE_FILE_NAME}
203jscbison.input = JSCBISON
204jscbison.variable_out = GENERATED_SOURCES
205jscbison.dependency_type = TYPE_C
206jscbison.CONFIG = target_predeps
207addExtraCompilerWithHeader(jscbison)
208
Note: See TracBrowser for help on using the repository browser.