Enable the DFG JIT on X86-64 Linux platforms
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-11-09  Andy Wingo  <wingo@igalia.com>
2
3         Enable the DFG JIT on X86-64 Linux platforms
4         https://bugs.webkit.org/show_bug.cgi?id=71373
5
6         Reviewed by Csaba Osztrogonác.
7
8         * wtf/Platform.h (ENABLE_DFG_JIT): Enable the DFG JIT on the
9         x86-64 GNU/Linux platform.
10         * CMakeListsEfl.txt: Add JSValue64 implementations to EFL build.
11
12 2011-11-09  Csaba Osztrogonác  <ossy@webkit.org>
13
14         Enable the DFG JIT on x86-64 Linux platforms
15         https://bugs.webkit.org/show_bug.cgi?id=71373
16
17         Enable DFG JIT by default on X86 Linux and Mac platforms
18         https://bugs.webkit.org/show_bug.cgi?id=71686
19
20         Buildfix for stricter compilers: -Werror=unused-but-set-variable
21
22         Reviewed by Zoltan Herczeg.
23
24         * dfg/DFGSpeculativeJIT.cpp:
25         (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
26         * dfg/DFGSpeculativeJIT32_64.cpp:
27         (JSC::DFG::SpeculativeJIT::compile):
28         * dfg/DFGSpeculativeJIT64.cpp:
29         (JSC::DFG::SpeculativeJIT::compile):
30
31 2011-11-09  Sheriff Bot  <webkit.review.bot@gmail.com>
32
33         Unreviewed, rolling out r99678.
34         http://trac.webkit.org/changeset/99678
35         https://bugs.webkit.org/show_bug.cgi?id=71882
36
37         broke the build with -Werror=unused-but-set-variable
38         (Requested by tronical_ on #webkit).
39
40         * CMakeListsEfl.txt:
41         * wtf/Platform.h:
42
43 2011-11-09  Andy Wingo  <wingo@igalia.com>
44
45         Enable the DFG JIT on X86-64 Linux platforms
46         https://bugs.webkit.org/show_bug.cgi?id=71373
47
48         Reviewed by Filip Pizlo.
49
50         * wtf/Platform.h (ENABLE_DFG_JIT): Enable the DFG JIT on the
51         x86-64 GNU/Linux platform.
52         * CMakeListsEfl.txt: Add JSValue64 implementations to EFL build.
53
54 2011-11-09  Mark Hahnenberg  <mhahnenberg@apple.com>
55
56         De-virtualize JSObject::defineOwnProperty
57         https://bugs.webkit.org/show_bug.cgi?id=71429
58
59         Reviewed by Geoffrey Garen.
60
61         Added defineOwnProperty to the MethodTable, changed all the virtual 
62         implementations of defineOwnProperty to static ones, and replaced 
63         all call sites with corresponding lookups in the MethodTable.
64
65         * JavaScriptCore.exp:
66         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
67         * runtime/Arguments.cpp:
68         (JSC::Arguments::createStrictModeCallerIfNecessary):
69         (JSC::Arguments::createStrictModeCalleeIfNecessary):
70         * runtime/ClassInfo.h:
71         * runtime/JSCell.cpp:
72         (JSC::JSCell::defineOwnProperty):
73         * runtime/JSCell.h:
74         * runtime/JSObject.cpp:
75         (JSC::JSObject::defineOwnProperty):
76         * runtime/JSObject.h:
77         * runtime/ObjectConstructor.cpp:
78         (JSC::objectConstructorDefineProperty):
79         (JSC::defineProperties):
80
81 2011-11-09  Simon Hausmann  <simon.hausmann@nokia.com>
82
83         [Qt] Build system cleanup
84         https://bugs.webkit.org/show_bug.cgi?id=71815
85
86         Reviewed by Kenneth Rohde Christiansen.
87
88         * wtf/wtf.pri: Moved the glib dependency to javascriptcore.prf.
89
90 2011-11-08  Simon Hausmann  <simon.hausmann@nokia.com>
91
92         [Qt] Replace use of QApplication with QGuiApplication
93         https://bugs.webkit.org/show_bug.cgi?id=71794
94
95         Reviewed by Andreas Kling.
96
97         Add compat headers for use when building with Qt 4: QGuiApplication
98         is typedef'ed to QApplication.
99
100         * wtf/qt/compat/QGuiApplication: Added.
101         * wtf/qt/compat/qguiapplication.h: Added.
102
103 2011-11-08  Sheriff Bot  <webkit.review.bot@gmail.com>
104
105         Unreviewed, rolling out r99647.
106         http://trac.webkit.org/changeset/99647
107         https://bugs.webkit.org/show_bug.cgi?id=71876
108
109         It broke jsc and layout tests on all bot (Requested by
110         Ossy_night on #webkit).
111
112         * assembler/MacroAssemblerARM.h:
113         (JSC::MacroAssemblerARM::supportsFloatingPoint):
114         (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
115         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
116         (JSC::MacroAssemblerARM::supportsDoubleBitops):
117         (JSC::MacroAssemblerARM::andnotDouble):
118         * assembler/MacroAssemblerARMv7.h:
119         (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
120         (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
121         (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
122         (JSC::MacroAssemblerARMv7::supportsDoubleBitops):
123         * assembler/MacroAssemblerMIPS.h:
124         (JSC::MacroAssemblerMIPS::andnotDouble):
125         (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
126         (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
127         (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
128         (JSC::MacroAssemblerMIPS::supportsDoubleBitops):
129         * assembler/MacroAssemblerSH4.h:
130         (JSC::MacroAssemblerSH4::supportsFloatingPoint):
131         (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
132         (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
133         (JSC::MacroAssemblerSH4::supportsDoubleBitops):
134         (JSC::MacroAssemblerSH4::andnotDouble):
135         * assembler/MacroAssemblerX86.h:
136         (JSC::MacroAssemblerX86::MacroAssemblerX86):
137         (JSC::MacroAssemblerX86::supportsFloatingPoint):
138         (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
139         (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
140         (JSC::MacroAssemblerX86::supportsDoubleBitops):
141         * assembler/MacroAssemblerX86Common.h:
142         (JSC::MacroAssemblerX86Common::andnotDouble):
143         * assembler/MacroAssemblerX86_64.h:
144         (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
145         (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
146         (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
147         (JSC::MacroAssemblerX86_64::supportsDoubleBitops):
148         * assembler/X86Assembler.h:
149         * dfg/DFGByteCodeParser.cpp:
150         (JSC::DFG::ByteCodeParser::handleIntrinsic):
151         * dfg/DFGSpeculativeJIT32_64.cpp:
152         (JSC::DFG::SpeculativeJIT::compile):
153         * dfg/DFGSpeculativeJIT64.cpp:
154         (JSC::DFG::SpeculativeJIT::compile):
155         * jit/ThunkGenerators.cpp:
156         (JSC::absThunkGenerator):
157         * runtime/JSGlobalData.cpp:
158
159 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
160
161         Better abstract 'abs' operation through the MacroAssembler.
162         https://bugs.webkit.org/show_bug.cgi?id=71873
163
164         Reviewed by Geoff Garen.
165
166         Currently the x86 specific instruction sequence to perform a double abs
167         is duplicated throughout the JITs / thunk generators.
168
169         * assembler/MacroAssemblerARM.h:
170         (JSC::MacroAssemblerARM::supportsFloatingPoint):
171         (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
172         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
173         (JSC::MacroAssemblerARM::supportsFloatingPointAbs):
174         (JSC::MacroAssemblerARM::absDouble):
175             - Renamed supportsFloatingPointAbs, make these methods static so that
176               we can check the JIT's capabilites before we begin compilation.
177         * assembler/MacroAssemblerARMv7.h:
178         (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
179         (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
180         (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
181         (JSC::MacroAssemblerARMv7::supportsFloatingPointAbs):
182             - Renamed supportsFloatingPointAbs, make these methods static so that
183               we can check the JIT's capabilites before we begin compilation.
184         * assembler/MacroAssemblerMIPS.h:
185         (JSC::MacroAssemblerMIPS::absDouble):
186         (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
187         (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
188         (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
189         (JSC::MacroAssemblerMIPS::supportsFloatingPointAbs):
190             - Renamed supportsFloatingPointAbs, make these methods static so that
191               we can check the JIT's capabilites before we begin compilation.
192         * assembler/MacroAssemblerSH4.h:
193         (JSC::MacroAssemblerSH4::supportsFloatingPoint):
194         (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
195         (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
196         (JSC::MacroAssemblerSH4::supportsFloatingPointAbs):
197         (JSC::MacroAssemblerSH4::absDouble):
198             - Renamed supportsFloatingPointAbs, make these methods static so that
199               we can check the JIT's capabilites before we begin compilation.
200         * assembler/MacroAssemblerX86.h:
201         (JSC::MacroAssemblerX86::absDouble):
202         (JSC::MacroAssemblerX86::supportsFloatingPoint):
203         (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
204         (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
205         (JSC::MacroAssemblerX86::supportsFloatingPointAbs):
206             - Made supports* methods static so that we can check the JIT's
207               capabilites before we begin compilation. Added absDouble.
208         * assembler/MacroAssemblerX86Common.h:
209             - Removed andnotDouble, added s_maskSignBit.
210         * assembler/MacroAssemblerX86_64.h:
211         (JSC::MacroAssemblerX86_64::absDouble):
212         (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
213         (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
214         (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
215         (JSC::MacroAssemblerX86_64::supportsFloatingPointAbs):
216             - Made supports* methods static so that we can check the JIT's
217               capabilites before we begin compilation. Added absDouble.
218         * assembler/X86Assembler.h:
219         (JSC::X86Assembler::andpd_rr):
220         (JSC::X86Assembler::andpd_mr):
221             - Added support for andpd instruction.
222         * dfg/DFGByteCodeParser.cpp:
223         (JSC::DFG::ByteCodeParser::handleIntrinsic):
224             - Added checks for supportsFloatingPointAbs, supportsFloatingPointSqrt.
225         * dfg/DFGSpeculativeJIT32_64.cpp:
226         (JSC::DFG::SpeculativeJIT::compile):
227             - Switched to use doubleAbs, we can now also reuse the operand register for the result.
228         * dfg/DFGSpeculativeJIT64.cpp:
229         (JSC::DFG::SpeculativeJIT::compile):
230             - Switched to use doubleAbs, we can now also reuse the operand register for the result.
231         * jit/ThunkGenerators.cpp:
232             - Switched to use doubleAbs.
233         (JSC::absThunkGenerator):
234         * runtime/JSGlobalData.cpp:
235             - Declared MacroAssemblerX86Common::s_maskSignBit here.
236               This is a little ugly, but it doesn't seem worth adding a whole extra .cpp
237               to the compile for just one constant.
238
239 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
240
241         Move duplicates of SYMBOL_STRING* macros to the single location
242         https://bugs.webkit.org/show_bug.cgi?id=71456
243
244         Reviewed by Sam Weinig.
245
246         * JavaScriptCore.xcodeproj/project.pbxproj:
247         * dfg/DFGOperations.cpp:
248         * jit/JITStubs.cpp:
249         * wtf/InlineASM.h: Added.
250             - Moved asm related macros.
251
252 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
253
254         Move code to handle 8bit regs from X86Assembler to MacroAssembler
255         https://bugs.webkit.org/show_bug.cgi?id=71867
256
257         Reviewed by Oliver Hunt.
258
259         This code is fine, but is in the wrong place really. X86 assembler should
260         basically just format up exactly the instruction you request - not expand
261         out to a set of instructions (that is what the macro assembler layer is
262         for!). For other 8-bit ops, on X86 we don't guard against clients accessing
263         the XH registers.
264
265         * assembler/MacroAssemblerX86Common.h:
266         (JSC::MacroAssemblerX86Common::store8):
267         * assembler/X86Assembler.h:
268         (JSC::X86Assembler::movb_rm):
269             - moved some code.
270
271 2011-11-08  Filip Pizlo  <fpizlo@apple.com>
272
273         Unreviewed build fix for GTK.
274
275         * GNUmakefile.list.am:
276
277 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
278
279         Build fix.
280
281         * assembler/X86Assembler.h:
282
283 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
284
285         Errrk, failed to commit this in last change.
286
287         * assembler/X86Assembler.h:
288
289 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
290
291         Remove an unused method.
292
293         Rubber stamped by Geoff Garen.
294
295         * assembler/AbstractMacroAssembler.h:
296         * assembler/AssemblerBuffer.h:
297             - removed rewindToLabel.
298
299 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
300
301         Fix OSR entry points to calculate offsets correctly WRT to branch compaction.
302         https://bugs.webkit.org/show_bug.cgi?id=71864
303
304         Reviewed by Filip Pizlo.
305
306         * assembler/LinkBuffer.h:
307         (JSC::LinkBuffer::offsetOf):
308             - We use this to return the offsets into the code of the entry points.
309         * dfg/DFGJITCompiler.cpp:
310         (JSC::DFG::JITCompiler::compileEntry):
311         (JSC::DFG::JITCompiler::compileBody):
312         (JSC::DFG::JITCompiler::compile):
313         (JSC::DFG::JITCompiler::compileFunction):
314             - Move the construction of the speculative JIT outside of
315               compileBody, such that it is still available to link the
316               OSR entry points at the point we are linking.
317         * dfg/DFGJITCompiler.h:
318         (JSC::DFG::JITCompiler::noticeOSREntry):
319             - Pass the label of the block & linkbuffer into noticeOSREntry.
320         * dfg/DFGSpeculativeJIT.cpp:
321         (JSC::DFG::SpeculativeJIT::compile):
322         (JSC::DFG::SpeculativeJIT::linkOSREntries):
323             - Moved call to noticeOSREntry until we we linking.
324         * dfg/DFGSpeculativeJIT.h:
325         * jit/JIT.cpp:
326         (JSC::JIT::privateCompileMainPass):
327         (JSC::JIT::privateCompileSlowCases):
328         (JSC::JIT::privateCompile):
329             - Moved calculation of entries until we we linking.
330         * jit/JIT.h:
331             - Removed some members.
332
333 2011-11-08  Filip Pizlo  <fpizlo@apple.com>
334
335         DFG OSR exit code should be generated by a separate compiler, not
336         related to DFG::JITCompiler
337         https://bugs.webkit.org/show_bug.cgi?id=71787
338
339         Reviewed by Gavin Barraclough.
340         
341         Moves the exitSpeculativeWithOSR() method from JITCompiler to
342         OSRExitCompiler::compileExit().
343
344         * CMakeListsEfl.txt:
345         * JavaScriptCore.xcodeproj/project.pbxproj:
346         * Target.pri:
347         * dfg/DFGJITCompiler.cpp:
348         (JSC::DFG::JITCompiler::linkOSRExits):
349         * dfg/DFGJITCompiler32_64.cpp: Removed.
350         * dfg/DFGOSRExitCompiler.h: Added.
351         (JSC::DFG::OSRExitCompiler::OSRExitCompiler):
352         * dfg/DFGOSRExitCompiler32_64.cpp: Added.
353         (JSC::DFG::OSRExitCompiler::compileExit):
354         * dfg/DFGOSRExitCompiler64.cpp: Added.
355         (JSC::DFG::OSRExitCompiler::compileExit):
356         * runtime/JSValue.h:
357
358 2011-11-08  Filip Pizlo  <fpizlo@apple.com>
359
360         Basic DFG definitions should be moved out of DFGNode.h
361         https://bugs.webkit.org/show_bug.cgi?id=71861
362
363         Rubber-stamped by Gavin Barraclough.
364
365         * JavaScriptCore.xcodeproj/project.pbxproj:
366         * dfg/DFGCommon.h: Added.
367         (JSC::DFG::NodeIndexTraits::defaultValue):
368         * dfg/DFGNode.h:
369         * dfg/DFGOSRExit.h:
370         * dfg/DFGRegisterBank.h:
371
372 2011-11-08  Michael Saboff  <msaboff@apple.com>
373
374         Towards 8 Bit Strings: Templatize JSC::Parser class by Lexer type
375         https://bugs.webkit.org/show_bug.cgi?id=71761
376
377         Templatized Parser based on Lexer<T>. Moved two enums,
378         SourceElementsMode and FunctionRequirements out of Parser definition
379         to work around a clang compiler defect.
380
381         Cleaned up SourceCode data() to return StringImpl* and eliminated
382         the recently added stringData() virtual method.
383
384         To keep code in Parser.cpp and keep Parser.h small, the two flavors
385         of Parser are explicitly instantiated at the end of Parser.cpp.
386
387         Reviewed by Gavin Barraclough.
388
389         * interpreter/Interpreter.cpp:
390         (JSC::appendSourceToError):
391         * parser/Lexer.cpp:
392         (JSC::::setCode):
393         (JSC::::sourceCode):
394         * parser/Parser.cpp:
395         (JSC::::Parser):
396         (JSC::::~Parser):
397         (JSC::::parseInner):
398         (JSC::::didFinishParsing):
399         (JSC::::allowAutomaticSemicolon):
400         (JSC::::parseSourceElements):
401         (JSC::::parseVarDeclaration):
402         (JSC::::parseConstDeclaration):
403         (JSC::::parseDoWhileStatement):
404         (JSC::::parseWhileStatement):
405         (JSC::::parseVarDeclarationList):
406         (JSC::::parseConstDeclarationList):
407         (JSC::::parseForStatement):
408         (JSC::::parseBreakStatement):
409         (JSC::::parseContinueStatement):
410         (JSC::::parseReturnStatement):
411         (JSC::::parseThrowStatement):
412         (JSC::::parseWithStatement):
413         (JSC::::parseSwitchStatement):
414         (JSC::::parseSwitchClauses):
415         (JSC::::parseSwitchDefaultClause):
416         (JSC::::parseTryStatement):
417         (JSC::::parseDebuggerStatement):
418         (JSC::::parseBlockStatement):
419         (JSC::::parseStatement):
420         (JSC::::parseFormalParameters):
421         (JSC::::parseFunctionBody):
422         (JSC::::parseFunctionInfo):
423         (JSC::::parseFunctionDeclaration):
424         (JSC::::parseExpressionOrLabelStatement):
425         (JSC::::parseExpressionStatement):
426         (JSC::::parseIfStatement):
427         (JSC::::parseExpression):
428         (JSC::::parseAssignmentExpression):
429         (JSC::::parseConditionalExpression):
430         (JSC::::isBinaryOperator):
431         (JSC::::parseBinaryExpression):
432         (JSC::::parseProperty):
433         (JSC::::parseObjectLiteral):
434         (JSC::::parseStrictObjectLiteral):
435         (JSC::::parseArrayLiteral):
436         (JSC::::parsePrimaryExpression):
437         (JSC::::parseArguments):
438         (JSC::::parseMemberExpression):
439         (JSC::::parseUnaryExpression):
440         * parser/Parser.h:
441         (JSC::::parse):
442         (JSC::parse):
443         * parser/SourceCode.h:
444         (JSC::SourceCode::data):
445         (JSC::SourceCode::subExpression):
446         * parser/SourceProvider.h:
447         (JSC::UStringSourceProvider::data):
448
449 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
450
451         Fix PropertyAccessRecords in DFG JIT to take account of branch compaction.
452         https://bugs.webkit.org/show_bug.cgi?id=71855
453
454         Reviewed by Filip Pizlo.
455
456         The DFG JIT presently calculates a set of offsets early, before branches have been compacted.
457         This won't work on ARMv7.
458
459         * assembler/AbstractMacroAssembler.h:
460         (JSC::AbstractMacroAssembler::differenceBetweenCodePtr):
461         * assembler/LinkBuffer.h:
462         (JSC::LinkBuffer::locationOf):
463         * dfg/DFGJITCodeGenerator32_64.cpp:
464         (JSC::DFG::JITCodeGenerator::cachedGetById):
465         (JSC::DFG::JITCodeGenerator::cachedPutById):
466         * dfg/DFGJITCodeGenerator64.cpp:
467         (JSC::DFG::JITCodeGenerator::cachedGetById):
468         (JSC::DFG::JITCodeGenerator::cachedPutById):
469         * dfg/DFGJITCompiler.cpp:
470         (JSC::DFG::JITCompiler::link):
471         * dfg/DFGJITCompiler.h:
472         (JSC::DFG::PropertyAccessRecord::PropertyAccessRecord):
473         (JSC::DFG::JITCompiler::addPropertyAccess):
474
475 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
476
477         DFG JIT calculation of OSR entry points is not THUMB2 safe
478         https://bugs.webkit.org/show_bug.cgi?id=71852
479
480         Reviewed by Oliver Hunt.
481
482         Executable addresses are tagged with a low bit set to distinguish
483         between THUMB2 and traditional ARM.
484
485         * dfg/DFGJITCompiler.cpp:
486         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
487         * dfg/DFGJITCompiler32_64.cpp:
488         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
489         * dfg/DFGOSREntry.cpp:
490         (JSC::DFG::prepareOSREntry):
491         * jit/JITCode.h:
492         (JSC::JITCode::executableAddressAtOffset):
493         (JSC::JITCode::start):
494         (JSC::JITCode::size):
495
496 2011-11-08  Michael Saboff  <msaboff@apple.com>
497
498         JSC::Parser::Parser leaks Lexer member
499         https://bugs.webkit.org/show_bug.cgi?id=71847
500
501         Changed m_lexer member of Parser to be OwnPtr to fix a memory leak.
502
503         Reviewed by Oliver Hunt.
504
505         * parser/Parser.cpp:
506         (JSC::Parser::Parser):
507         (JSC::Parser::parseFunctionBody):
508         * parser/Parser.h:
509
510 2011-11-08  Yuqiang Xian  <yuqiang.xian@intel.com>
511
512         Enable DFG JIT by default on X86 Linux and Mac platforms
513         https://bugs.webkit.org/show_bug.cgi?id=71686
514
515         Reviewed by Filip Pizlo.
516
517         We can get 9% on SunSpider, 89% on Kraken and 37% on V8, on Linux X86.
518
519         * wtf/Platform.h:
520
521 2011-11-08  Yuqiang Xian  <yuqiang.xian@intel.com>
522
523         DFG 32_64 - update make lists for efl, gtk, and Qt ports with DFG change r99519
524         https://bugs.webkit.org/show_bug.cgi?id=71768
525
526         Reviewed by Geoffrey Garen.
527
528         Also includes a fix to make the newly introduced AssemblyHelpers
529         friend of JSValue as we need the Tag definitions.
530
531         * CMakeListsEfl.txt:
532         * GNUmakefile.list.am:
533         * Target.pri:
534         * runtime/JSValue.h:
535
536 2011-11-07  Yuqiang Xian  <yuqiang.xian@intel.com>
537
538         Fix gcc 4.4 compilation warnings in DFG 32_64
539         https://bugs.webkit.org/show_bug.cgi?id=71762
540
541         Reviewed by Filip Pizlo.
542
543         * dfg/DFGJITCodeGenerator.h:
544         (JSC::DFG::JITCodeGenerator::registersMatched):
545
546 2011-11-07  Filip Pizlo  <fpizlo@apple.com>
547
548         DFG code base should allow for classes not related to DFG::JITCompiler
549         to use DFG idioms
550         https://bugs.webkit.org/show_bug.cgi?id=71746
551
552         Reviewed by Gavin Barraclough.
553
554         * JavaScriptCore.xcodeproj/project.pbxproj:
555         * dfg/DFGAssemblyHelpers.cpp: Added.
556         (JSC::DFG::AssemblyHelpers::decodedCodeMapFor):
557         (JSC::DFG::AssemblyHelpers::emitCount):
558         (JSC::DFG::AssemblyHelpers::setSamplingFlag):
559         (JSC::DFG::AssemblyHelpers::clearSamplingFlag):
560         (JSC::DFG::AssemblyHelpers::jitAssertIsInt32):
561         (JSC::DFG::AssemblyHelpers::jitAssertIsJSInt32):
562         (JSC::DFG::AssemblyHelpers::jitAssertIsJSNumber):
563         (JSC::DFG::AssemblyHelpers::jitAssertIsJSDouble):
564         (JSC::DFG::AssemblyHelpers::jitAssertIsCell):
565         * dfg/DFGAssemblyHelpers.h: Added.
566         * dfg/DFGJITCompiler.cpp:
567         * dfg/DFGJITCompiler.h:
568         (JSC::DFG::JITCompiler::JITCompiler):
569         (JSC::DFG::JITCompiler::graph):
570         * dfg/DFGJITCompiler32_64.cpp:
571         * dfg/DFGOSRExit.h: Added.
572         (JSC::DFG::SpeculationRecovery::SpeculationRecovery):
573         (JSC::DFG::SpeculationRecovery::type):
574         (JSC::DFG::SpeculationRecovery::dest):
575         (JSC::DFG::SpeculationRecovery::src):
576         (JSC::DFG::OSRExit::numberOfRecoveries):
577         (JSC::DFG::OSRExit::valueRecovery):
578         (JSC::DFG::OSRExit::isArgument):
579         (JSC::DFG::OSRExit::isVariable):
580         (JSC::DFG::OSRExit::argumentForIndex):
581         (JSC::DFG::OSRExit::variableForIndex):
582         (JSC::DFG::OSRExit::operandForArgument):
583         (JSC::DFG::OSRExit::operandForIndex):
584         * dfg/DFGSpeculativeJIT.h:
585
586 2011-11-07  Filip Pizlo  <fpizlo@apple.com>
587
588         Switch back to 1+1 value profiling buckets, since it didn't help on arewefastyet,
589         but it appears to help on other benchmarks.
590
591         Rubber stamped by Oliver Hunt.
592
593         * bytecode/ValueProfile.h:
594
595 2011-11-07  Ariya Hidayat  <ariya@sencha.com>
596
597         "use strict" can not contain escape sequences or line continuation
598         https://bugs.webkit.org/show_bug.cgi?id=71532
599
600         Reviewed by Darin Adler.
601
602         Store the actual literal length (before the escapes and line
603         continuation are encoded) while parsing the directive and use it
604         for the directive comparison.
605
606         * parser/Parser.cpp:
607         (JSC::Parser::parseSourceElements):
608         (JSC::Parser::parseStatement):
609         * parser/Parser.h:
610
611 2011-11-06  Filip Pizlo  <fpizlo@apple.com>
612
613         DFG operationCreateThis slow path may get the wrong callee in case of inlining
614         https://bugs.webkit.org/show_bug.cgi?id=71647
615
616         Reviewed by Oliver Hunt.
617         
618         No new tests because I only saw this manifest itself when I had other bugs
619         leading to spurious slow path executions.
620
621         * dfg/DFGJITCodeGenerator.h:
622         (JSC::DFG::callOperation):
623         * dfg/DFGOperations.cpp:
624         * dfg/DFGOperations.h:
625         * dfg/DFGSpeculativeJIT32_64.cpp:
626         (JSC::DFG::SpeculativeJIT::compile):
627         * dfg/DFGSpeculativeJIT64.cpp:
628         (JSC::DFG::SpeculativeJIT::compile):
629
630 2011-11-07  Mark Hahnenberg  <mhahnenberg@apple.com>
631
632         De-virtualize JSObject::putWithAttributes
633         https://bugs.webkit.org/show_bug.cgi?id=71716
634
635         Reviewed by Darin Adler.
636
637         Added putWithAttributes to the MethodTable, changed all the virtual 
638         implementations of putWithAttributes to static ones, and replaced 
639         all call sites with corresponding lookups in the MethodTable.
640
641         * API/JSObjectRef.cpp:
642         (JSObjectSetProperty):
643         * JavaScriptCore.exp:
644         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
645         * debugger/DebuggerActivation.cpp:
646         (JSC::DebuggerActivation::putWithAttributes):
647         * debugger/DebuggerActivation.h:
648         * interpreter/Interpreter.cpp:
649         (JSC::Interpreter::execute):
650         * runtime/ClassInfo.h:
651         * runtime/JSActivation.cpp:
652         (JSC::JSActivation::putWithAttributes):
653         * runtime/JSActivation.h:
654         * runtime/JSCell.cpp:
655         (JSC::JSCell::putWithAttributes):
656         * runtime/JSCell.h:
657         * runtime/JSGlobalObject.cpp:
658         (JSC::JSGlobalObject::putWithAttributes):
659         * runtime/JSGlobalObject.h:
660         * runtime/JSObject.cpp:
661         (JSC::JSObject::putWithAttributes):
662         (JSC::putDescriptor):
663         * runtime/JSObject.h:
664         * runtime/JSStaticScopeObject.cpp:
665         (JSC::JSStaticScopeObject::putWithAttributes):
666         * runtime/JSStaticScopeObject.h:
667         * runtime/JSVariableObject.cpp:
668         (JSC::JSVariableObject::putWithAttributes):
669         * runtime/JSVariableObject.h:
670
671 2011-11-07  Dmitry Lomov  <dslomov@google.com>
672
673         Unreviewed. Release build fix.
674
675         * parser/Lexer.cpp:
676         (JSC::assertCharIsIn8BitRange):
677
678 2011-11-07  Filip Pizlo  <fpizlo@apple.com>
679
680         Switch the value profiler back to 8 buckets, because we suspect that while this
681         is more expensive it's also more stable.
682
683         Rubber stamped by Geoff Garen.
684
685         * bytecode/ValueProfile.h:
686
687 2011-11-07  Andrew Wason  <rectalogic@rectalogic.com>
688
689         Uninitialized Heap member var
690         https://bugs.webkit.org/show_bug.cgi?id=71722
691
692         Reviewed by Filip Pizlo.
693
694         * heap/Heap.cpp:
695         (JSC::Heap::Heap): Initialize m_blockFreeingThreadShouldQuit
696
697 2011-11-07  Yuqiang Xian  <yuqiang.xian@intel.com>
698
699         DFG 32_64 - registers cannot be reused arbitrarily if speculation failures are possible
700         https://bugs.webkit.org/show_bug.cgi?id=71684
701
702         Reviewed by Filip Pizlo.
703
704         Currently in DFG JIT, we try to reuse the physical register of an
705         operand for temporary usage if the current use of the operand is the
706         last use. But sometimes this can be wrong, for example if there are
707         possible speculation failures and we need to fallback to baseline JIT,
708         the value of the operand which is supposed to be hold in the physical
709         register can be modified by register reusing. The fixes the last
710         inspector failures in layout test on Mac 32-bit if switching on DFG.
711
712         * dfg/DFGSpeculativeJIT32_64.cpp:
713         (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
714         (JSC::DFG::SpeculativeJIT::compile):
715
716 2011-11-07  Ryosuke Niwa  <rniwa@webkit.org>
717
718         REGRESSION(r99436): Broke Snow Leopard debug build
719         https://bugs.webkit.org/show_bug.cgi?id=71713
720
721         Reviewed by Darin Adler.
722
723         Put the assertion in a template and use template specialization
724         to avoid warning when instantiated with UChar or LChar.
725
726         In the long term, we should have traits for unsigned integral types
727         and use that to specialize template instead of specializing it for UChar and LChar.
728
729         * parser/Lexer.cpp:
730         (JSC::assertCharIsIn8BitRange):
731         (JSC::::append8):
732
733 2011-11-07  ChangSeok Oh  <shivamidow@gmail.com>
734
735         [EFL] Support requestAnimationFrame API
736         https://bugs.webkit.org/show_bug.cgi?id=67112
737
738         Reviewed by Andreas Kling.
739
740         Let EFL port use REQUEST_ANIMATION_FRAME_TIMER.
741
742         * wtf/Platform.h:
743
744 2011-11-07  Michael Saboff  <msaboff@apple.com>
745
746         Towards 8 Bit Strings: Templatize JSC::Lexer class by character type
747         https://bugs.webkit.org/show_bug.cgi?id=71331
748
749         Change the Lexer class to be a template class based on the character
750         type of the source.  In the process updated the parseIdentifier()
751         and parseString() methods to create 8 bit strings where possible.
752         Also added some helper methods for accumulating temporary string
753         data in the 8 and 16 bit vectors.
754
755         Changed the SourceProvider::data() virtual method to return a
756         StringImpl* instead of a UChar*.
757
758         Updated the KeywordLookup generator to create code to match keywords
759         for both 8 and 16 bit source strings.
760
761         Due to a compiler bug (<rdar://problem/10194295>) moved enum
762         definition outside of Lexer class declaration.  Remove second enum
763         no longer needed.
764
765         Reviewed by Darin Adler.
766
767         * KeywordLookupGenerator.py:
768         * interpreter/Interpreter.cpp:
769         (JSC::Interpreter::callEval):
770         * parser/Lexer.cpp:
771         (JSC::::Lexer):
772         (JSC::::~Lexer):
773         (JSC::::getInvalidCharMessage):
774         (JSC::::currentCharacter):
775         (JSC::::setCode):
776         (JSC::::internalShift):
777         (JSC::::shift):
778         (JSC::::peek):
779         (JSC::::getUnicodeCharacter):
780         (JSC::::shiftLineTerminator):
781         (JSC::::lastTokenWasRestrKeyword):
782         (JSC::::record8):
783         (JSC::::append8):
784         (JSC::::append16):
785         (JSC::::record16):
786         (JSC::::parseIdentifier):
787         (JSC::::parseIdentifierSlowCase):
788         (JSC::::parseString):
789         (JSC::::parseStringSlowCase):
790         (JSC::::parseHex):
791         (JSC::::parseOctal):
792         (JSC::::parseDecimal):
793         (JSC::::parseNumberAfterDecimalPoint):
794         (JSC::::parseNumberAfterExponentIndicator):
795         (JSC::::parseMultilineComment):
796         (JSC::::nextTokenIsColon):
797         (JSC::::lex):
798         (JSC::::scanRegExp):
799         (JSC::::skipRegExp):
800         (JSC::::clear):
801         (JSC::::sourceCode):
802         * parser/Lexer.h:
803         (JSC::Lexer::append16):
804         (JSC::Lexer::currentOffset):
805         (JSC::Lexer::setOffsetFromCharOffset):
806         (JSC::::isWhiteSpace):
807         (JSC::::isLineTerminator):
808         (JSC::::convertHex):
809         (JSC::::convertUnicode):
810         (JSC::::makeIdentifier):
811         (JSC::::setCodeStart):
812         (JSC::::makeIdentifierLCharFromUChar):
813         (JSC::::lexExpectIdentifier):
814         * parser/Parser.cpp:
815         (JSC::Parser::Parser):
816         (JSC::Parser::parseProperty):
817         (JSC::Parser::parseMemberExpression):
818         * parser/Parser.h:
819         (JSC::Parser::next):
820         (JSC::Parser::nextExpectIdentifier):
821         * parser/ParserArena.h:
822         (JSC::IdentifierArena::makeIdentifier):
823         (JSC::IdentifierArena::makeIdentifierLCharFromUChar):
824         * parser/SourceCode.h:
825         (JSC::SourceCode::subExpression):
826         * parser/SourceProvider.h:
827         (JSC::UStringSourceProvider::stringData):
828         * parser/SourceProviderCache.h:
829         * parser/SyntaxChecker.h:
830         * runtime/FunctionPrototype.cpp:
831         (JSC::insertSemicolonIfNeeded):
832         * runtime/Identifier.cpp:
833         (JSC::IdentifierTable::add):
834         (JSC::IdentifierLCharFromUCharTranslator::hash):
835         (JSC::IdentifierLCharFromUCharTranslator::equal):
836         (JSC::IdentifierLCharFromUCharTranslator::translate):
837         (JSC::Identifier::add8):
838         * runtime/Identifier.h:
839         (JSC::Identifier::Identifier):
840         (JSC::Identifier::createLCharFromUChar):
841         (JSC::Identifier::canUseSingleCharacterString):
842         (JSC::IdentifierCharBufferTranslator::hash):
843         (JSC::IdentifierCharBufferTranslator::equal):
844         (JSC::IdentifierCharBufferTranslator::translate):
845         (JSC::Identifier::add):
846         (JSC::Identifier::equal):
847         (JSC::IdentifierTable::add):
848         * runtime/JSGlobalObjectFunctions.cpp:
849         (JSC::decode):
850         (JSC::parseIntOverflow):
851         (JSC::globalFuncUnescape):
852         * runtime/JSGlobalObjectFunctions.h:
853         (JSC::parseIntOverflow):
854         * runtime/LiteralParser.cpp:
855         (JSC::LiteralParser::tryJSONPParse):
856         (JSC::LiteralParser::Lexer::lexString):
857         * wtf/text/StringImpl.h:
858
859 2011-11-07  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
860
861         [Qt] Put the jsc binary in 'bin' instead of leaving it deep in the build tree
862
863         Allows us to not package up the whole Source/JavaScriptCore directory for the
864         buildbots.
865
866         Reviewed-by Simon Hausmann.
867
868         * jsc.pro:
869
870 2011-11-06  Filip Pizlo  <fpizlo@apple.com>
871
872         REGRESSION(r99374): GTK+ build of the jsc binary doesn't like the call
873         to initializeMainThread, and crashes
874         https://bugs.webkit.org/show_bug.cgi?id=71643
875
876         Reviewed by Sam Weinig.
877
878         * jsc.cpp:
879         (main):
880
881 2011-11-06  Sam Weinig  <sam@webkit.org>
882
883         Add space missing from some class declarations
884         https://bugs.webkit.org/show_bug.cgi?id=71632
885
886         Reviewed by Anders Carlsson.
887
888         * assembler/AssemblerBufferWithConstantPool.h:
889         * bytecode/CodeBlock.h:
890         * dfg/DFGVariableAccessData.h:
891         * heap/VTableSpectrum.h:
892         * jit/ExecutableAllocator.cpp:
893         * jit/ExecutableAllocatorFixedVMPool.cpp:
894         * wtf/MetaAllocatorHandle.h:
895         * wtf/UnionFind.h:
896
897 2011-11-06  Sam Weinig  <sam@webkit.org>
898
899         Allow use of FINAL in JavaScriptCore
900         https://bugs.webkit.org/show_bug.cgi?id=71630
901
902         Reviewed by Anders Carlsson.
903
904         * Configurations/Base.xcconfig:
905         Don't warn about C++11 extensions used in C++98 mode.
906
907 2011-11-05  Filip Pizlo  <fpizlo@apple.com>
908
909         Value profiling should just use two buckets
910         https://bugs.webkit.org/show_bug.cgi?id=71619
911
912         Reviewed by Gavin Barraclough.
913         
914         Added one more configuration options (like Heuristics::minimumOptimizationDelay),
915         improved debugging in JIT optimization support, changed the number of buckets
916         in the value profile from 9 to 2, and wrote a more optimal value profiling path
917         in the old JIT to take advantage of this. It's still possible to play around with
918         larger numbers of buckets, and we should probably keep this for a little while
919         until we convince ourselves that using just two buckets is the right call.
920
921         * bytecode/CodeBlock.cpp:
922         (JSC::CodeBlock::shouldOptimizeNow):
923         * bytecode/ValueProfile.h:
924         * jit/JITInlineMethods.h:
925         (JSC::JIT::emitValueProfilingSite):
926         * jit/JITStubs.cpp:
927         (JSC::DEFINE_STUB_FUNCTION):
928         * runtime/Heuristics.cpp:
929         (JSC::Heuristics::initializeHeuristics):
930         * runtime/Heuristics.h:
931
932 2011-11-03  Filip Pizlo  <fpizlo@apple.com>
933
934         JSC should be able to sample itself in a more flexible way than just sampling flags
935         https://bugs.webkit.org/show_bug.cgi?id=71522
936
937         Reviewed by Gavin Barraclough.
938         
939         Added a construct that looks like SamplingRegion samplingRegion("name").
940
941         * JavaScriptCore.exp:
942         * JavaScriptCore.xcodeproj/project.pbxproj:
943         * bytecode/SamplingTool.cpp:
944         (JSC::SamplingRegion::Locker::Locker):
945         (JSC::SamplingRegion::Locker::~Locker):
946         (JSC::SamplingRegion::sample):
947         (JSC::SamplingRegion::dump):
948         (JSC::SamplingRegion::dumpInternal):
949         (JSC::SamplingThread::threadStartFunc):
950         * bytecode/SamplingTool.h:
951         (JSC::SamplingRegion::SamplingRegion):
952         (JSC::SamplingRegion::~SamplingRegion):
953         (JSC::SamplingRegion::exchangeCurrent):
954         * bytecompiler/BytecodeGenerator.cpp:
955         (JSC::BytecodeGenerator::generate):
956         * dfg/DFGDriver.cpp:
957         (JSC::DFG::compile):
958         * heap/Heap.cpp:
959         (JSC::Heap::markRoots):
960         (JSC::Heap::collect):
961         * heap/VTableSpectrum.cpp:
962         (JSC::VTableSpectrum::countVPtr):
963         (JSC::VTableSpectrum::dump):
964         * heap/VTableSpectrum.h:
965         * jsc.cpp:
966         (main):
967         (runWithScripts):
968         * parser/Parser.h:
969         (JSC::parse):
970         * runtime/Executable.cpp:
971         (JSC::EvalExecutable::compileInternal):
972         (JSC::ProgramExecutable::compileInternal):
973         (JSC::FunctionExecutable::compileForCallInternal):
974         (JSC::FunctionExecutable::compileForConstructInternal):
975         * wtf/Atomics.h:
976         (WTF::weakCompareAndSwap):
977         * wtf/Platform.h:
978         * wtf/Spectrum.h: Added.
979         (WTF::Spectrum::Spectrum):
980         (WTF::Spectrum::add):
981         (WTF::Spectrum::get):
982         (WTF::Spectrum::begin):
983         (WTF::Spectrum::end):
984         (WTF::Spectrum::KeyAndCount::KeyAndCount):
985         (WTF::Spectrum::KeyAndCount::operator<):
986         (WTF::Spectrum::buildList):
987         * wtf/wtf.pri:
988
989 2011-11-05  Sam Weinig  <sam@webkit.org>
990
991         Fix windows build.
992
993         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
994
995 2011-11-04  Sam Weinig  <sam@webkit.org>
996
997         Reduce the number of putWithAttributes
998         https://bugs.webkit.org/show_bug.cgi?id=71597
999
1000         Reviewed by Adam Roben.
1001
1002         * JavaScriptCore.exp:
1003         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1004         Remove exports of removed functions.
1005
1006         * runtime/JSActivation.cpp:
1007         (JSC::JSActivation::putWithAttributes):
1008         Calling the overload without the extra parameters does the same thing.
1009
1010         * runtime/JSObject.cpp:
1011         (JSC::JSObject::putWithAttributes):
1012         * runtime/JSObject.h:
1013         Remove four unused JSObject::putWithAttributes overloads and make one of the remaining
1014         two overloads not virtual, since no one overrides it.
1015
1016 2011-11-04  Pratik Solanki  <psolanki@apple.com>
1017
1018         sqrtDouble and andnotDouble should be declared noreturn
1019         https://bugs.webkit.org/show_bug.cgi?id=71592
1020
1021         Reviewed by Sam Weinig.
1022
1023         * assembler/MacroAssemblerARMv7.h:
1024
1025 2011-11-04  Mark Hahnenberg  <mhahnenberg@apple.com>
1026
1027         De-virtualize JSObject::hasInstance
1028         https://bugs.webkit.org/show_bug.cgi?id=71430
1029
1030         Reviewed by Darin Adler.
1031
1032         Added hasInstance to the MethodTable, changed all the virtual 
1033         implementations of hasInstance to static ones, and replaced 
1034         all call sites with corresponding lookups in the MethodTable.
1035
1036         * API/JSCallbackObject.h:
1037         * API/JSCallbackObjectFunctions.h:
1038         (JSC::::hasInstance):
1039         * API/JSValueRef.cpp:
1040         (JSValueIsInstanceOfConstructor):
1041         * JavaScriptCore.exp:
1042         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1043         * interpreter/Interpreter.cpp:
1044         (JSC::Interpreter::privateExecute):
1045         * jit/JITStubs.cpp:
1046         (JSC::DEFINE_STUB_FUNCTION):
1047         * runtime/ClassInfo.h:
1048         * runtime/JSBoundFunction.cpp:
1049         (JSC::JSBoundFunction::hasInstance):
1050         * runtime/JSBoundFunction.h:
1051         * runtime/JSCell.cpp:
1052         (JSC::JSCell::hasInstance):
1053         * runtime/JSCell.h:
1054         * runtime/JSObject.cpp:
1055         (JSC::JSObject::hasInstance):
1056         * runtime/JSObject.h:
1057
1058 2011-11-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1059
1060         [Qt] Refactor and clean up the qmake build system
1061
1062         The qmake build system has accumulated a bit of cruft and redundancy
1063         over time. There's also a fairly tight coupling between how to build
1064         the various targets, and _what_ to build, making it harder to add new
1065         rules or sources. This patch aims to elevate these issues somewhat.
1066
1067         This is a short-list of the changes:
1068
1069           * The rules for how to build targets are now mostly contained as
1070             prf-files in Tools/qmake/mkspecs/features. Using mkspecs also
1071             allows us to do pre- and post-processing of each project file,
1072             which helps to clean up the actual project files.
1073
1074           * Derived sources are no longer generated as a separate make-step
1075             but is part of each target's project file as a subdir. Makefile
1076             rules are used to ensure that we run make on the derived sources
1077             before running qmake on the actual target makefile. This makes
1078             it easier to keep a proper dependency between derived sources
1079             and the target.
1080
1081           * We use GNU make and the compiler to generate dependencies on
1082             UNIX-based systems running Qt 5. This allows us to lessen the
1083             need to run qmake, which should reduce compile time.
1084
1085           * WebKit2 is now build by default if building with Qt 5. It can
1086             be disabled by passing --no-webkit2 to build-webkit.
1087
1088         The result of these changes are hopefully a cleaner and easier
1089         build system to modify, and faster build times due to no longer
1090         running qmake on every single build. It's also a first step
1091         towards possibly generating the list of sources using another
1092         build system.
1093
1094         https://bugs.webkit.org/show_bug.cgi?id=71222
1095
1096         Reviewed by Simon Hausmann.
1097
1098         * DerivedSources.pri: Added.
1099         * DerivedSources.pro: Removed.
1100         * JavaScriptCore.pro:
1101         * Target.pri: Copied from Source/JavaScriptCore/JavaScriptCore.pro.
1102         * headers.pri: Removed.
1103         * jsc.pro:
1104         * wtf/wtf.pri:
1105         * yarr/yarr.pri:
1106
1107 2011-11-04  Yuqiang Xian  <yuqiang.xian@intel.com>
1108
1109         More code clean-up in DFG 32_64
1110         https://bugs.webkit.org/show_bug.cgi?id=71540
1111
1112         Remove unnecessary code duplications, and fix compilation warnings.
1113
1114         Reviewed by Gavin Barraclough.
1115
1116         * dfg/DFGJITCompiler.cpp:
1117         (JSC::DFG::JITCompiler::emitCount):
1118         (JSC::DFG::JITCompiler::setSamplingFlag):
1119         (JSC::DFG::JITCompiler::clearSamplingFlag):
1120         (JSC::DFG::JITCompiler::jitAssertIsCell):
1121         * dfg/DFGJITCompiler32_64.cpp:
1122         * dfg/DFGSpeculativeJIT32_64.cpp:
1123         (JSC::DFG::SpeculativeJIT::compile):
1124
1125 2011-11-04  Csaba Osztrogonác  <ossy@webkit.org>
1126
1127         De-virtualize JSObject::hasInstance
1128         https://bugs.webkit.org/show_bug.cgi?id=71430
1129
1130         Unreviewed rolling out r99238, because it made a test crash on all platform.
1131
1132         * API/JSCallbackObject.h:
1133         * API/JSCallbackObjectFunctions.h:
1134         (JSC::::hasInstance):
1135         * API/JSValueRef.cpp:
1136         (JSValueIsInstanceOfConstructor):
1137         * JavaScriptCore.exp:
1138         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1139         * interpreter/Interpreter.cpp:
1140         (JSC::Interpreter::privateExecute):
1141         * jit/JITStubs.cpp:
1142         (JSC::DEFINE_STUB_FUNCTION):
1143         * runtime/ClassInfo.h:
1144         * runtime/JSBoundFunction.cpp:
1145         (JSC::JSBoundFunction::hasInstance):
1146         * runtime/JSBoundFunction.h:
1147         * runtime/JSCell.cpp:
1148         * runtime/JSCell.h:
1149         * runtime/JSObject.cpp:
1150         (JSC::JSObject::hasInstance):
1151         * runtime/JSObject.h:
1152
1153 2011-11-03  Mark Hahnenberg  <mhahnenberg@apple.com>
1154
1155         De-virtualize JSObject::getPropertyNames
1156         https://bugs.webkit.org/show_bug.cgi?id=71306
1157
1158         Reviewed by Darin Adler.
1159
1160         Added getPropertyNames to the MethodTable, changed all the virtual 
1161         implementations of getPropertyNames to static ones, and replaced 
1162         all call sites with corresponding lookups in the MethodTable.
1163
1164         * API/JSObjectRef.cpp:
1165         (JSObjectCopyPropertyNames):
1166         * JavaScriptCore.exp:
1167         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1168         * debugger/DebuggerActivation.cpp:
1169         (JSC::DebuggerActivation::getOwnPropertyNames):
1170         * runtime/ClassInfo.h:
1171         * runtime/JSCell.cpp:
1172         (JSC::JSCell::getPropertyNames):
1173         * runtime/JSCell.h:
1174         * runtime/JSObject.cpp:
1175         (JSC::JSObject::getPropertyNames):
1176         (JSC::JSObject::getOwnPropertyNames):
1177         * runtime/JSObject.h:
1178         * runtime/JSPropertyNameIterator.cpp:
1179         (JSC::JSPropertyNameIterator::create):
1180         * runtime/ScopeChain.cpp:
1181         (JSC::ScopeChainNode::print):
1182         * runtime/Structure.cpp:
1183         (JSC::Structure::getPropertyNamesFromStructure):
1184         * runtime/Structure.h:
1185
1186 2011-11-03  Darin Adler  <darin@apple.com>
1187
1188         Change remaining callers of releaseRef to call leakRef
1189         https://bugs.webkit.org/show_bug.cgi?id=71422
1190
1191         * wtf/text/AtomicString.cpp:
1192         (WTF::HashAndUTF8CharactersTranslator::translate): Use leakRef.
1193
1194 2011-11-02  Darin Adler  <darin@apple.com>
1195
1196         Change remaining callers of releaseRef to call leakRef
1197         https://bugs.webkit.org/show_bug.cgi?id=71422
1198
1199         * wtf/text/AtomicString.cpp:
1200         (WTF::HashAndUTF8CharactersTranslator::translate): Use leakRef.
1201
1202 2011-11-03  Mark Hahnenberg  <mhahnenberg@apple.com>
1203
1204         De-virtualize JSObject::hasInstance
1205         https://bugs.webkit.org/show_bug.cgi?id=71430
1206
1207         Reviewed by Darin Adler.
1208
1209         Added hasInstance to the MethodTable, changed all the virtual 
1210         implementations of hasInstance to static ones, and replaced 
1211         all call sites with corresponding lookups in the MethodTable.
1212
1213         * API/JSCallbackObject.h:
1214         * API/JSCallbackObjectFunctions.h:
1215         (JSC::::hasInstance):
1216         * API/JSValueRef.cpp:
1217         (JSValueIsInstanceOfConstructor):
1218         * JavaScriptCore.exp:
1219         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1220         * interpreter/Interpreter.cpp:
1221         (JSC::Interpreter::privateExecute):
1222         * jit/JITStubs.cpp:
1223         (JSC::DEFINE_STUB_FUNCTION):
1224         * runtime/ClassInfo.h:
1225         * runtime/JSBoundFunction.cpp:
1226         (JSC::JSBoundFunction::hasInstance):
1227         * runtime/JSBoundFunction.h:
1228         * runtime/JSCell.cpp:
1229         (JSC::JSCell::hasInstance):
1230         * runtime/JSCell.h:
1231         * runtime/JSObject.cpp:
1232         (JSC::JSObject::hasInstance):
1233         * runtime/JSObject.h:
1234
1235 2011-11-03  Filip Pizlo  <fpizlo@apple.com>
1236
1237         JIT-specific code should be able to refer to register types even on JIT-disabled builds
1238         https://bugs.webkit.org/show_bug.cgi?id=71498
1239
1240         Reviewed by Gavin Barraclough.
1241
1242         * assembler/MacroAssembler.h:
1243         (MacroAssembler::MacroAssembler):
1244
1245 2011-11-03  Mark Hahnenberg  <mhahnenberg@apple.com>
1246
1247         De-virtualize JSObject::className
1248         https://bugs.webkit.org/show_bug.cgi?id=71428
1249
1250         Reviewed by Sam Weinig.
1251
1252         Added className to the MethodTable, changed all the virtual 
1253         implementations of className to static ones, and replaced 
1254         all call sites with corresponding lookups in the MethodTable.
1255
1256         * API/JSCallbackObject.h:
1257         * API/JSCallbackObjectFunctions.h:
1258         (JSC::::className):
1259         * JavaScriptCore.exp:
1260         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1261         * debugger/DebuggerActivation.cpp:
1262         (JSC::DebuggerActivation::className):
1263         * debugger/DebuggerActivation.h:
1264         * jsc.cpp:
1265         (GlobalObject::createStructure):
1266         * profiler/Profiler.cpp:
1267         (JSC::Profiler::createCallIdentifier):
1268         * runtime/ClassInfo.h:
1269         * runtime/JSCell.cpp:
1270         (JSC::JSCell::className):
1271         * runtime/JSCell.h:
1272         * runtime/JSObject.cpp:
1273         (JSC::JSObject::className):
1274         * runtime/JSObject.h:
1275         * runtime/ObjectPrototype.cpp:
1276         (JSC::objectProtoFuncToString):
1277         * testRegExp.cpp:
1278         (GlobalObject::createStructure):
1279
1280 2011-11-02  Jer Noble  <jer.noble@apple.com>
1281
1282         Add Clock class and platform-specific implementations.
1283         https://bugs.webkit.org/show_bug.cgi?id=71341
1284
1285         Reviewed by Sam Weinig.
1286
1287         Add WTF_USE_COREAUDIO macro for use by PlatformClockCA.
1288
1289         * wtf/Platform.h:
1290
1291 2011-11-03  Pavel Feldman  <pfeldman@chromium.org>
1292
1293         Not reviewed: fixing win build. step2.
1294
1295         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1296
1297 2011-11-03  Pavel Feldman  <pfeldman@chromium.org>
1298
1299         Not reviewed: fix windows build, step1
1300
1301         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1302
1303 2011-11-03  Pavel Feldman  <pfeldman@google.com>
1304
1305         Web Inspector: preserve script location for inline handlers.
1306         https://bugs.webkit.org/show_bug.cgi?id=71367
1307
1308         Makes SourceCode factories receive TextPosition instead of the line number;
1309         Stores consistent position values in SourceCode and SourceProvider;
1310
1311         Reviewed by Yury Semikhatsky.
1312
1313         * API/JSBase.cpp:
1314         (JSEvaluateScript):
1315         (JSCheckScriptSyntax):
1316         * API/JSObjectRef.cpp:
1317         (JSObjectMakeFunction):
1318         * parser/SourceCode.h:
1319         (JSC::makeSource):
1320         * parser/SourceProvider.h:
1321         (JSC::SourceProvider::SourceProvider):
1322         (JSC::SourceProvider::startPosition):
1323         (JSC::UStringSourceProvider::create):
1324         (JSC::UStringSourceProvider::UStringSourceProvider):
1325         * runtime/FunctionConstructor.cpp:
1326         (JSC::constructFunction):
1327         (JSC::constructFunctionSkippingEvalEnabledCheck):
1328         * runtime/FunctionConstructor.h:
1329
1330 2011-11-03  Kentaro Hara  <haraken@chromium.org>
1331
1332         Fixed wrong implementation of doubleValue % 2^{64}.
1333         https://bugs.webkit.org/show_bug.cgi?id=67980
1334
1335         Reviewed by Hajime Morita.
1336
1337         fast/events/constructors/progress-event-constructor.html was failing
1338         because of the wrong implementation of conversion from an ECMAScript value
1339         to an IDL unsigned long long value (Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long).
1340         In particular, the calculation of doubleValue % 2^{64} was wrong.
1341         This patch implemented it correctly in doubleToInteger() in wtf/MathExtras.h.
1342
1343         * wtf/MathExtras.h:
1344         (doubleToInteger): Implemented the spec correctly.
1345
1346 2011-11-03  Sheriff Bot  <webkit.review.bot@gmail.com>
1347
1348         Unreviewed, rolling out r99089.
1349         http://trac.webkit.org/changeset/99089
1350         https://bugs.webkit.org/show_bug.cgi?id=71448
1351
1352         @plt postfix for math functions cause crash on Linux 32 (the
1353         symbol is defined but it points to NULL) (Requested by
1354         zherczeg on #webkit).
1355
1356         * dfg/DFGOperations.cpp:
1357         * jit/JITStubs.cpp:
1358         * jit/ThunkGenerators.cpp:
1359
1360 2011-11-02  Filip Pizlo  <fpizlo@apple.com>
1361
1362         DFG inlining breaks function.arguments[something] if the argument being
1363         retrieved was subjected to DFG's unboxing optimizations
1364         https://bugs.webkit.org/show_bug.cgi?id=71436
1365
1366         Reviewed by Oliver Hunt.
1367         
1368         This makes inlined arguments retrieval use some of the same machinery as
1369         OSR to determine where from, and how, to retrieve a value that the DFG
1370         might have somehow squirreled away while the old JIT would put it in its
1371         obvious location, using an obvious format.
1372         
1373         To that end, previously DFG-internal notions such as DataFormat,
1374         VirtualRegister, and ValueRecovery are now in bytecode/ since they are
1375         stored as part of InlineCallFrames.
1376
1377         * bytecode/CodeOrigin.h:
1378         * dfg/DFGAbstractState.cpp:
1379         (JSC::DFG::AbstractState::execute):
1380         * dfg/DFGByteCodeParser.cpp:
1381         (JSC::DFG::ByteCodeParser::handleInlining):
1382         (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
1383         * dfg/DFGJITCompiler.cpp:
1384         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
1385         * dfg/DFGJITCompiler32_64.cpp:
1386         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
1387         * dfg/DFGNode.h:
1388         * dfg/DFGPropagator.cpp:
1389         (JSC::DFG::Propagator::propagateNodePredictions):
1390         * dfg/DFGSpeculativeJIT.cpp:
1391         (JSC::DFG::SpeculativeJIT::compile):
1392         * dfg/DFGSpeculativeJIT64.cpp:
1393         (JSC::DFG::SpeculativeJIT::compile):
1394         * interpreter/CallFrame.cpp:
1395         (JSC::CallFrame::trueCallerFrame):
1396         * interpreter/CallFrame.h:
1397         (JSC::ExecState::inlineCallFrame):
1398         * interpreter/Register.h:
1399         (JSC::Register::asInlineCallFrame):
1400         (JSC::Register::unboxedInt32):
1401         (JSC::Register::unboxedBoolean):
1402         (JSC::Register::unboxedCell):
1403         * runtime/Arguments.h:
1404         (JSC::Arguments::finishCreationAndCopyRegisters):
1405
1406 2011-11-02  Filip Pizlo  <fpizlo@apple.com>
1407
1408         ValueRecovery should be moved out of the DFG JIT
1409         https://bugs.webkit.org/show_bug.cgi?id=71439
1410
1411         Reviewed by Oliver Hunt.
1412
1413         * JavaScriptCore.xcodeproj/project.pbxproj:
1414         * bytecode/DataFormat.h: Added.
1415         (JSC::dataFormatToString):
1416         (JSC::needDataFormatConversion):
1417         (JSC::isJSFormat):
1418         (JSC::isJSInteger):
1419         (JSC::isJSDouble):
1420         (JSC::isJSCell):
1421         (JSC::isJSBoolean):
1422         * bytecode/ValueRecovery.h: Added.
1423         (JSC::ValueRecovery::ValueRecovery):
1424         (JSC::ValueRecovery::alreadyInRegisterFile):
1425         (JSC::ValueRecovery::alreadyInRegisterFileAsUnboxedInt32):
1426         (JSC::ValueRecovery::alreadyInRegisterFileAsUnboxedCell):
1427         (JSC::ValueRecovery::alreadyInRegisterFileAsUnboxedBoolean):
1428         (JSC::ValueRecovery::inGPR):
1429         (JSC::ValueRecovery::inPair):
1430         (JSC::ValueRecovery::inFPR):
1431         (JSC::ValueRecovery::displacedInRegisterFile):
1432         (JSC::ValueRecovery::constant):
1433         (JSC::ValueRecovery::technique):
1434         (JSC::ValueRecovery::isInRegisters):
1435         (JSC::ValueRecovery::gpr):
1436         (JSC::ValueRecovery::tagGPR):
1437         (JSC::ValueRecovery::payloadGPR):
1438         (JSC::ValueRecovery::fpr):
1439         (JSC::ValueRecovery::virtualRegister):
1440         (JSC::ValueRecovery::dump):
1441         * bytecode/VirtualRegister.h: Added.
1442         * dfg/DFGGenerationInfo.h:
1443         (JSC::DFG::GenerationInfo::isJSFormat):
1444         * dfg/DFGSpeculativeJIT.cpp:
1445         (JSC::DFG::ValueSource::dump):
1446         * dfg/DFGSpeculativeJIT.h:
1447         * dfg/DFGVariableAccessData.h:
1448
1449 2011-11-02  Sam Weinig  <sam@webkit.org>
1450
1451         Object.getOwnPropertyDescriptor() does not retrieve the getter/setter from a property on the window that has been overridden with a getter/setter
1452         https://bugs.webkit.org/show_bug.cgi?id=71333
1453
1454         Reviewed by Gavin Barraclough.
1455
1456         Tested by fast/dom/getter-on-window-object2.html
1457
1458         * runtime/PropertyDescriptor.cpp:
1459         (JSC::PropertyDescriptor::setDescriptor):
1460         The attributes returned from Structure::get do not include Getter or Setter, so
1461         instead check if the value is a GetterSetter like we do elsewhere. If it is, update
1462         the descriptor's attributes accordingly.
1463
1464 2011-11-02  Yuqiang Xian  <yuqiang.xian@intel.com>
1465
1466         FunctionPtr should accept FASTCALL functions on X86
1467         https://bugs.webkit.org/show_bug.cgi?id=71434
1468
1469         Reviewed by Filip Pizlo.
1470
1471         On X86 we sometimes use FASTCALL convention functions, for example the
1472         cti functions, and we may need the pointers to such functions, e.g.,
1473         in current DFG register file check and arity check, though long term
1474         we may avoid such usage of cti calls in DFG.
1475
1476         * assembler/MacroAssemblerCodeRef.h:
1477         (JSC::FunctionPtr::FunctionPtr):
1478
1479 2011-11-02  Filip Pizlo  <fpizlo@apple.com>
1480
1481         Inlined uses of the global object should use the right global object
1482         https://bugs.webkit.org/show_bug.cgi?id=71427
1483
1484         Reviewed by Oliver Hunt.
1485
1486         * dfg/DFGJITCompiler.h:
1487         (JSC::DFG::JITCompiler::globalObjectFor):
1488         * dfg/DFGSpeculativeJIT64.cpp:
1489         (JSC::DFG::SpeculativeJIT::compile):
1490
1491 2011-11-02  Yuqiang Xian  <yuqiang.xian@intel.com>
1492
1493         Remove some unnecessary loads/stores in DFG JIT 32_64
1494         https://bugs.webkit.org/show_bug.cgi?id=71090
1495
1496         Reviewed by Filip Pizlo.
1497
1498         In fillSpeculateCell and OSR exit, some unnecessary loads/stores can
1499         be eliminated.
1500
1501         * dfg/DFGJITCompiler32_64.cpp:
1502         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
1503         * dfg/DFGSpeculativeJIT32_64.cpp:
1504         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
1505
1506 2011-11-02  Adam Klein  <adamk@chromium.org>
1507
1508         Replace usage of StringImpl with String where possible in CharacterData and Text
1509         https://bugs.webkit.org/show_bug.cgi?id=71383
1510
1511         Reviewed by Darin Adler.
1512
1513         * wtf/text/WTFString.h:
1514         (WTF::String::containsOnlyWhitespace): Added new method.
1515
1516 2011-11-02  Mark Hahnenberg  <mhahnenberg@apple.com>
1517
1518         De-virtualize JSObject::getOwnPropertyNames
1519         https://bugs.webkit.org/show_bug.cgi?id=71307
1520
1521         Reviewed by Darin Adler.
1522
1523         Added getOwnPropertyNames to the MethodTable, changed all the virtual 
1524         implementations of getOwnPropertyNames to static ones, and replaced 
1525         all call sites with corresponding lookups in the MethodTable.
1526
1527         * API/JSCallbackObject.h:
1528         * API/JSCallbackObjectFunctions.h:
1529         (JSC::::getOwnPropertyNames):
1530         * JavaScriptCore.exp:
1531         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1532         * debugger/DebuggerActivation.cpp:
1533         (JSC::DebuggerActivation::getOwnPropertyNames):
1534         * debugger/DebuggerActivation.h:
1535         * runtime/Arguments.cpp:
1536         (JSC::Arguments::getOwnPropertyNames):
1537         * runtime/Arguments.h:
1538         * runtime/ClassInfo.h:
1539         * runtime/JSActivation.cpp:
1540         (JSC::JSActivation::getOwnPropertyNames):
1541         * runtime/JSActivation.h:
1542         * runtime/JSArray.cpp:
1543         (JSC::JSArray::getOwnPropertyNames):
1544         * runtime/JSArray.h:
1545         * runtime/JSByteArray.cpp:
1546         (JSC::JSByteArray::getOwnPropertyNames):
1547         * runtime/JSByteArray.h:
1548         * runtime/JSCell.cpp:
1549         (JSC::JSCell::getOwnPropertyNames):
1550         * runtime/JSCell.h:
1551         * runtime/JSFunction.cpp:
1552         (JSC::JSFunction::getOwnPropertyNames):
1553         * runtime/JSFunction.h:
1554         * runtime/JSNotAnObject.cpp:
1555         (JSC::JSNotAnObject::getOwnPropertyNames):
1556         * runtime/JSNotAnObject.h:
1557         * runtime/JSONObject.cpp:
1558         (JSC::Stringifier::Holder::appendNextProperty):
1559         (JSC::Walker::walk):
1560         * runtime/JSObject.cpp:
1561         (JSC::JSObject::getPropertyNames):
1562         (JSC::JSObject::getOwnPropertyNames):
1563         * runtime/JSObject.h:
1564         * runtime/JSVariableObject.cpp:
1565         (JSC::JSVariableObject::~JSVariableObject):
1566         (JSC::JSVariableObject::getOwnPropertyNames):
1567         * runtime/JSVariableObject.h:
1568         * runtime/ObjectConstructor.cpp:
1569         (JSC::objectConstructorGetOwnPropertyNames):
1570         (JSC::objectConstructorKeys):
1571         (JSC::defineProperties):
1572         * runtime/RegExpMatchesArray.h:
1573         (JSC::RegExpMatchesArray::getOwnPropertyNames):
1574         * runtime/StringObject.cpp:
1575         (JSC::StringObject::getOwnPropertyNames):
1576         * runtime/StringObject.h:
1577         * runtime/Structure.h:
1578
1579 2011-11-02  Dean Jackson  <dino@apple.com>
1580
1581         Add ENABLE_CSS_SHADERS flag
1582         https://bugs.webkit.org/show_bug.cgi?id=71394
1583
1584         Reviewed by Sam Weinig.
1585
1586         * Configurations/FeatureDefines.xcconfig:
1587
1588 2011-11-02  Alexey Shabalin  <a.shabalin@gmail.com>
1589
1590         TEXTREL in libjavascriptcoregtk-1.0.so.0.11.0 on x86 (or i586)
1591         https://bugs.webkit.org/show_bug.cgi?id=70610
1592
1593         Reviewed by Martin Robinson.
1594
1595         Properly annotate ASM on BSD and Linux x86 systems.
1596
1597         * dfg/DFGOperations.cpp: Add annotation for X86.
1598         * jit/JITStubs.cpp: Ditto.
1599         * jit/ThunkGenerators.cpp: Ditto.
1600
1601 2011-11-02  Xianzhu Wang  <wangxianzhu@chromium.org>
1602
1603         Missing Force8BitConstructor in 8-bit version of StringImpl::reallocate()
1604         https://bugs.webkit.org/show_bug.cgi?id=71347
1605
1606         Reviewed by Geoffrey Garen.
1607
1608         * wtf/text/StringImpl.cpp:
1609         (WTF::StringImpl::reallocate):
1610
1611 2011-11-01  Darin Adler  <darin@apple.com>
1612
1613         Cut down on malloc/free a bit in the parser arena
1614         https://bugs.webkit.org/show_bug.cgi?id=71343
1615
1616         Reviewed by Oliver Hunt.
1617
1618         * parser/ParserArena.cpp:
1619         (JSC::ParserArena::deallocateObjects): Call the destructors of
1620         the deletable objects before freeing the pools. Don't call
1621         fastFree on the deletable objects any more.
1622
1623         * parser/ParserArena.h:
1624         (JSC::ParserArena::allocateDeletable): Use allocateFreeable
1625         instead of fastMalloc here.
1626
1627 2011-11-01  Sam Weinig  <sam@webkit.org>
1628
1629         Implement __lookupGetter__/__lookupSetter__ in terms of getPropertyDescriptor
1630         https://bugs.webkit.org/show_bug.cgi?id=71336
1631
1632         Reviewed by Darin Adler.
1633
1634         * debugger/DebuggerActivation.cpp:
1635         * debugger/DebuggerActivation.h:
1636         Remove overrides of lookupGetter/lookupSetter, which are no longer needed
1637         due to implementing getPropertyDescriptor.
1638
1639         * runtime/JSObject.cpp:
1640         (JSC::JSObject::lookupGetter):
1641         (JSC::JSObject::lookupSetter):
1642         * runtime/JSObject.h:
1643         De-virtualize lookupGetter/lookupSetter, and implement them in terms of
1644         getPropertyDescriptor.
1645
1646 2011-11-01  Mark Hahnenberg  <mhahnenberg@apple.com>
1647
1648         De-virtualize JSObject::defineSetter
1649         https://bugs.webkit.org/show_bug.cgi?id=71303
1650
1651         Reviewed by Darin Adler.
1652
1653         Added defineSetter to the MethodTable, changed all the virtual 
1654         implementations of defineSetter to static ones, and replaced 
1655         all call sites with corresponding lookups in the MethodTable.
1656
1657         * JavaScriptCore.exp:
1658         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1659         * debugger/DebuggerActivation.cpp:
1660         (JSC::DebuggerActivation::defineSetter):
1661         * debugger/DebuggerActivation.h:
1662         * interpreter/Interpreter.cpp:
1663         (JSC::Interpreter::privateExecute):
1664         * jit/JITStubs.cpp:
1665         (JSC::DEFINE_STUB_FUNCTION):
1666         * runtime/ClassInfo.h:
1667         * runtime/JSCell.cpp:
1668         (JSC::JSCell::defineSetter):
1669         * runtime/JSCell.h:
1670         * runtime/JSGlobalObject.cpp:
1671         (JSC::JSGlobalObject::defineSetter):
1672         * runtime/JSGlobalObject.h:
1673         * runtime/JSObject.cpp:
1674         (JSC::JSObject::defineSetter):
1675         (JSC::putDescriptor):
1676         * runtime/JSObject.h:
1677         * runtime/ObjectPrototype.cpp:
1678         (JSC::objectProtoFuncDefineSetter):
1679
1680 2011-11-01  Filip Pizlo  <fpizlo@apple.com>
1681
1682         DFG inlining breaks function.arguments
1683         https://bugs.webkit.org/show_bug.cgi?id=71329
1684
1685         Reviewed by Oliver Hunt.
1686         
1687         The DFG was forgetting to store code origin mappings for inlined
1688         call sites. Some of the fast-path optimizations for
1689         CallFrame::trueCallerFrame() were wrong. An assertion in Arguments
1690         was wrong.
1691         
1692         I also took the opportunity to decrease code duplication between
1693         DFG64 and DFG32_64, because I didn't feel like writing the same
1694         code twice.
1695
1696         * bytecode/CodeBlock.h:
1697         (JSC::ExecState::isInlineCallFrame):
1698         * dfg/DFGJITCompiler.cpp:
1699         (JSC::DFG::JITCompiler::compileEntry):
1700         (JSC::DFG::JITCompiler::compileBody):
1701         (JSC::DFG::JITCompiler::link):
1702         (JSC::DFG::JITCompiler::compile):
1703         (JSC::DFG::JITCompiler::compileFunction):
1704         * dfg/DFGJITCompiler32_64.cpp:
1705         * dfg/DFGNode.h:
1706         * interpreter/CallFrame.cpp:
1707         (JSC::CallFrame::trueCallerFrame):
1708         * interpreter/CallFrame.h:
1709         * runtime/Arguments.h:
1710         (JSC::Arguments::getArgumentsData):
1711
1712 2011-11-01  Xianzhu Wang  <wangxianzhu@chromium.org>
1713
1714         StringImpl::reallocate() should have a 8-bit version
1715         https://bugs.webkit.org/show_bug.cgi?id=71210
1716
1717         Reviewed by Geoffrey Garen.
1718
1719         * wtf/text/StringImpl.cpp:
1720         (WTF::StringImpl::reallocate):
1721         * wtf/text/StringImpl.h:
1722
1723 2011-10-31  Filip Pizlo  <fpizlo@apple.com>
1724
1725         The GC should be parallel
1726         https://bugs.webkit.org/show_bug.cgi?id=70995
1727
1728         Reviewed by Geoff Garen.
1729         
1730         Added parallel tracing to the GC. This works by having local mark
1731         stacks per thread, and a global shared one. Threads sometimes
1732         donate cells from the mark stack to the global one if the heuristics
1733         tell them that it's affordable to do so. Threads that have depleted
1734         their local mark stacks try to steal some from the shared one.
1735
1736         Marking is now done using an atomic weak relaxed CAS (compare-and-swap).
1737         
1738         This is a 23% speed-up on V8-splay when I use 4 marking threads,
1739         leading to a 3.5% speed-up on V8.
1740         
1741         It also appears that this reduces GC pause times on real websites by
1742         more than half.
1743
1744         * JavaScriptCore.exp:
1745         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1746         * heap/Heap.cpp:
1747         (JSC::Heap::Heap):
1748         (JSC::Heap::~Heap):
1749         (JSC::Heap::markRoots):
1750         * heap/Heap.h:
1751         * heap/MarkStack.cpp:
1752         (JSC::MarkStackSegmentAllocator::MarkStackSegmentAllocator):
1753         (JSC::MarkStackSegmentAllocator::~MarkStackSegmentAllocator):
1754         (JSC::MarkStackSegmentAllocator::allocate):
1755         (JSC::MarkStackSegmentAllocator::release):
1756         (JSC::MarkStackSegmentAllocator::shrinkReserve):
1757         (JSC::MarkStackArray::MarkStackArray):
1758         (JSC::MarkStackArray::~MarkStackArray):
1759         (JSC::MarkStackArray::expand):
1760         (JSC::MarkStackArray::refill):
1761         (JSC::MarkStackArray::donateSomeCellsTo):
1762         (JSC::MarkStackArray::stealSomeCellsFrom):
1763         (JSC::MarkStackThreadSharedData::markingThreadMain):
1764         (JSC::MarkStackThreadSharedData::markingThreadStartFunc):
1765         (JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
1766         (JSC::MarkStackThreadSharedData::~MarkStackThreadSharedData):
1767         (JSC::MarkStackThreadSharedData::reset):
1768         (JSC::MarkStack::reset):
1769         (JSC::SlotVisitor::donateSlow):
1770         (JSC::SlotVisitor::drain):
1771         (JSC::SlotVisitor::drainFromShared):
1772         (JSC::MarkStack::mergeOpaqueRoots):
1773         (JSC::SlotVisitor::harvestWeakReferences):
1774         * heap/MarkStack.h:
1775         (JSC::MarkStackSegment::data):
1776         (JSC::MarkStackSegment::capacityFromSize):
1777         (JSC::MarkStackSegment::sizeFromCapacity):
1778         (JSC::MarkStackArray::postIncTop):
1779         (JSC::MarkStackArray::preDecTop):
1780         (JSC::MarkStackArray::setTopForFullSegment):
1781         (JSC::MarkStackArray::setTopForEmptySegment):
1782         (JSC::MarkStackArray::top):
1783         (JSC::MarkStackArray::validatePrevious):
1784         (JSC::MarkStack::addWeakReferenceHarvester):
1785         (JSC::MarkStack::mergeOpaqueRootsIfNecessary):
1786         (JSC::MarkStack::mergeOpaqueRootsIfProfitable):
1787         (JSC::MarkStack::MarkStack):
1788         (JSC::MarkStack::addOpaqueRoot):
1789         (JSC::MarkStack::containsOpaqueRoot):
1790         (JSC::MarkStack::opaqueRootCount):
1791         (JSC::MarkStackArray::append):
1792         (JSC::MarkStackArray::canRemoveLast):
1793         (JSC::MarkStackArray::removeLast):
1794         (JSC::MarkStackArray::isEmpty):
1795         (JSC::MarkStackArray::canDonateSomeCells):
1796         (JSC::MarkStackArray::size):
1797         (JSC::ParallelModeEnabler::ParallelModeEnabler):
1798         (JSC::ParallelModeEnabler::~ParallelModeEnabler):
1799         * heap/MarkedBlock.h:
1800         (JSC::MarkedBlock::testAndSetMarked):
1801         * heap/SlotVisitor.h:
1802         (JSC::SlotVisitor::donate):
1803         (JSC::SlotVisitor::donateAndDrain):
1804         (JSC::SlotVisitor::donateKnownParallel):
1805         (JSC::SlotVisitor::SlotVisitor):
1806         * heap/WeakReferenceHarvester.h:
1807         * runtime/Heuristics.cpp:
1808         (JSC::Heuristics::initializeHeuristics):
1809         * runtime/Heuristics.h:
1810         * wtf/Atomics.h:
1811         (WTF::weakCompareAndSwap):
1812         * wtf/Bitmap.h:
1813         (WTF::::Bitmap):
1814         (WTF::::get):
1815         (WTF::::set):
1816         (WTF::::testAndSet):
1817         (WTF::::testAndClear):
1818         (WTF::::concurrentTestAndSet):
1819         (WTF::::concurrentTestAndClear):
1820         (WTF::::clear):
1821         (WTF::::clearAll):
1822         (WTF::::nextPossiblyUnset):
1823         (WTF::::findRunOfZeros):
1824         (WTF::::count):
1825         (WTF::::isEmpty):
1826         (WTF::::isFull):
1827         * wtf/MainThread.h:
1828         (WTF::isMainThreadOrGCThread):
1829         * wtf/Platform.h:
1830         * wtf/ThreadSpecific.h:
1831         (WTF::::isSet):
1832         * wtf/mac/MainThreadMac.mm:
1833         (WTF::initializeGCThreads):
1834         (WTF::initializeMainThreadPlatform):
1835         (WTF::initializeMainThreadToProcessMainThreadPlatform):
1836         (WTF::registerGCThread):
1837         (WTF::isMainThreadOrGCThread):
1838
1839 2011-10-31  Mark Hahnenberg  <mhahnenberg@apple.com>
1840
1841         De-virtualize JSObject::defaultValue
1842         https://bugs.webkit.org/show_bug.cgi?id=71146
1843
1844         Reviewed by Sam Weinig.
1845
1846         Added defaultValue to the MethodTable.  Replaced all virtual versions of 
1847         defaultValue with static versions.  Replaced all call sites with lookups in the 
1848         MethodTable.
1849
1850         * JavaScriptCore.exp:
1851         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1852         * runtime/ClassInfo.h:
1853         * runtime/ExceptionHelpers.cpp:
1854         (JSC::InterruptedExecutionError::defaultValue):
1855         (JSC::TerminatedExecutionError::defaultValue):
1856         * runtime/ExceptionHelpers.h:
1857         * runtime/JSCell.cpp:
1858         (JSC::JSCell::defaultValue):
1859         * runtime/JSCell.h:
1860         * runtime/JSNotAnObject.cpp:
1861         (JSC::JSNotAnObject::defaultValue):
1862         * runtime/JSNotAnObject.h:
1863         * runtime/JSObject.cpp:
1864         (JSC::JSObject::getPrimitiveNumber):
1865         (JSC::JSObject::defaultValue):
1866         * runtime/JSObject.h:
1867         (JSC::JSObject::toPrimitive):
1868
1869 2011-10-31  Mark Hahnenberg  <mhahnenberg@apple.com>
1870
1871         Interpreter build fix
1872
1873         Unreviewed build fix
1874
1875         * interpreter/Interpreter.cpp:
1876         (JSC::Interpreter::privateExecute):
1877         * runtime/Executable.cpp:
1878         (JSC::FunctionExecutable::compileForCallInternal):
1879         (JSC::FunctionExecutable::compileForConstructInternal):
1880
1881 2011-10-31  Filip Pizlo  <fpizlo@apple.com>
1882
1883         DFG OSR exits should add to value profiles
1884         https://bugs.webkit.org/show_bug.cgi?id=71202
1885
1886         Reviewed by Oliver Hunt.
1887         
1888         Value profiles now have an extra special slot not used by the old JIT's
1889         profiling, which is reserved for OSR exits.
1890         
1891         The DFG's OSR exit code now knows which register, node index, and value
1892         profiling site was responsible for the (possibly flawed) information that
1893         led to the OSR failure. This is somewhat opportunistic and imperfect;
1894         if there's a lot of control flow between the value profiling site and the
1895         OSR failure point, then this mechanism simply gives up. It also gives up
1896         if the OSR failure is caused by either known deficiencies in the DFG
1897         (like that we always assume that the index in a strict charCodeAt access
1898         is within bounds) or where the OSR failure would be catalogues and
1899         profiled through other means (like slow case counters).
1900         
1901         This patch also adds the notion of a JSValueRegs, which is either a
1902         single register in JSVALUE64 or a pair in JSVALUE32_64. We should
1903         probably move the 32_64 DFG towards using this, since it often makes it
1904         easier to share code between 64 and 32_64.
1905         
1906         Also fixed a number of pathologies that this uncovered. op_method_check 
1907         didn't have a value profiling site on the slow path. GetById should not
1908         always force OSR exit if it never executed in the old JIT; we may be
1909         able to infer its type if it's a array or string length get. Finally,
1910         these changes benefit from a slight tweak to optimization delay
1911         heuristics (profile fullness is now 0.35 instead of 0.25).
1912         
1913         3.8% speed-up on Kraken, mostly due to ~35% on both stanford-crypto-aes
1914         and imaging-darkroom.
1915
1916         * bytecode/ValueProfile.cpp:
1917         (JSC::ValueProfile::computeStatistics):
1918         (JSC::ValueProfile::computeUpdatedPrediction):
1919         * bytecode/ValueProfile.h:
1920         (JSC::ValueProfile::ValueProfile):
1921         (JSC::ValueProfile::specFailBucket):
1922         (JSC::ValueProfile::numberOfSamples):
1923         (JSC::ValueProfile::isLive):
1924         (JSC::ValueProfile::numberOfInt32s):
1925         (JSC::ValueProfile::numberOfDoubles):
1926         (JSC::ValueProfile::numberOfCells):
1927         (JSC::ValueProfile::numberOfObjects):
1928         (JSC::ValueProfile::numberOfFinalObjects):
1929         (JSC::ValueProfile::numberOfStrings):
1930         (JSC::ValueProfile::numberOfArrays):
1931         (JSC::ValueProfile::numberOfBooleans):
1932         (JSC::ValueProfile::dump):
1933         * dfg/DFGAbstractState.cpp:
1934         (JSC::DFG::AbstractState::execute):
1935         * dfg/DFGByteCodeParser.cpp:
1936         (JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
1937         (JSC::DFG::ByteCodeParser::getPrediction):
1938         (JSC::DFG::ByteCodeParser::parseBlock):
1939         * dfg/DFGGPRInfo.h:
1940         (JSC::DFG::JSValueRegs::JSValueRegs):
1941         (JSC::DFG::JSValueRegs::operator!):
1942         (JSC::DFG::JSValueRegs::gpr):
1943         (JSC::DFG::JSValueSource::JSValueSource):
1944         (JSC::DFG::JSValueSource::unboxedCell):
1945         (JSC::DFG::JSValueSource::operator!):
1946         (JSC::DFG::JSValueSource::isAddress):
1947         (JSC::DFG::JSValueSource::offset):
1948         (JSC::DFG::JSValueSource::base):
1949         (JSC::DFG::JSValueSource::gpr):
1950         (JSC::DFG::JSValueSource::asAddress):
1951         (JSC::DFG::JSValueSource::notAddress):
1952         (JSC::DFG::JSValueRegs::tagGPR):
1953         (JSC::DFG::JSValueRegs::payloadGPR):
1954         (JSC::DFG::JSValueSource::tagGPR):
1955         (JSC::DFG::JSValueSource::payloadGPR):
1956         (JSC::DFG::JSValueSource::hasKnownTag):
1957         (JSC::DFG::JSValueSource::tag):
1958         * dfg/DFGGenerationInfo.h:
1959         (JSC::DFG::GenerationInfo::jsValueRegs):
1960         * dfg/DFGGraph.h:
1961         (JSC::DFG::Graph::valueProfileFor):
1962         * dfg/DFGJITCodeGenerator.h:
1963         (JSC::JSValueOperand::jsValueRegs):
1964         * dfg/DFGJITCompiler.cpp:
1965         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
1966         * dfg/DFGJITCompiler.h:
1967         (JSC::DFG::JITCompiler::valueProfileFor):
1968         * dfg/DFGJITCompiler32_64.cpp:
1969         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
1970         * dfg/DFGPropagator.cpp:
1971         (JSC::DFG::Propagator::propagateNodePredictions):
1972         * dfg/DFGSpeculativeJIT.cpp:
1973         (JSC::DFG::OSRExit::OSRExit):
1974         (JSC::DFG::SpeculativeJIT::compilePeepHoleObjectEquality):
1975         (JSC::DFG::SpeculativeJIT::checkArgumentTypes):
1976         (JSC::DFG::SpeculativeJIT::compileGetCharCodeAt):
1977         (JSC::DFG::SpeculativeJIT::compileGetByValOnString):
1978         (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
1979         (JSC::DFG::SpeculativeJIT::compileGetByValOnByteArray):
1980         * dfg/DFGSpeculativeJIT.h:
1981         (JSC::DFG::SpeculativeJIT::speculationCheck):
1982         (JSC::DFG::SpeculativeJIT::terminateSpeculativeExecution):
1983         * dfg/DFGSpeculativeJIT32_64.cpp:
1984         (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
1985         (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
1986         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
1987         (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
1988         (JSC::DFG::SpeculativeJIT::compileObjectEquality):
1989         (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
1990         (JSC::DFG::SpeculativeJIT::compileLogicalNot):
1991         (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
1992         (JSC::DFG::SpeculativeJIT::compile):
1993         * dfg/DFGSpeculativeJIT64.cpp:
1994         (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
1995         (JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
1996         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
1997         (JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
1998         (JSC::DFG::SpeculativeJIT::compileObjectEquality):
1999         (JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
2000         (JSC::DFG::SpeculativeJIT::compileLogicalNot):
2001         (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
2002         (JSC::DFG::SpeculativeJIT::emitBranch):
2003         (JSC::DFG::SpeculativeJIT::compile):
2004         * jit/JITPropertyAccess.cpp:
2005         (JSC::JIT::emitSlow_op_method_check):
2006         * jit/JITPropertyAccess32_64.cpp:
2007         (JSC::JIT::emitSlow_op_method_check):
2008         * runtime/Heuristics.cpp:
2009         (JSC::Heuristics::initializeHeuristics):
2010         * runtime/JSValue.h:
2011
2012 2011-10-31  Sam Weinig  <sam@webkit.org>
2013
2014         Remove need for virtual JSObject::unwrappedObject
2015         https://bugs.webkit.org/show_bug.cgi?id=71034
2016
2017         Reviewed by Geoffrey Garen.
2018
2019         * JavaScriptCore.exp:
2020         Update exports.
2021
2022         * CMakeLists.txt:
2023         * GNUmakefile.list.am:
2024         * JavaScriptCore.exp:
2025         * JavaScriptCore.gypi:
2026         * JavaScriptCore.pro:
2027         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2028         * JavaScriptCore.xcodeproj/project.pbxproj:
2029         Add JSGlobalThis.cpp.
2030
2031         * runtime/JSGlobalThis.cpp: Added.
2032         (JSC::JSGlobalThis::visitChildren):
2033         (JSC::JSGlobalThis::unwrappedObject):
2034         * runtime/JSGlobalThis.h:
2035         (JSC::JSGlobalThis::createStructure):
2036         Move underlying object from JSDOMWindowShell down to JSGlobalThis
2037         and corresponding visitChildren method.
2038
2039         * runtime/JSObject.cpp:
2040         (JSC::JSObject::unwrappedObject):
2041         Change unwrappedObject from virtual, to just needing an if check.
2042
2043         * runtime/JSObject.h:
2044         (JSC::JSObject::isGlobalThis):
2045         * runtime/JSType.h:
2046         Add isGlobalThis predicate and type.
2047
2048 2011-10-31  Xianzhu Wang  <wangxianzhu@chromium.org>
2049
2050         WTF::StringImpl::create(const char*, unsigned) calls itself
2051         https://bugs.webkit.org/show_bug.cgi?id=71206
2052
2053         The original implementation just calls itself, causing infinite recursion.
2054         Cast the first parameter to const LChar* to fix that.
2055
2056         Reviewed by Ryosuke Niwa.
2057
2058         * wtf/text/StringImpl.h:
2059         (WTF::StringImpl::create):
2060
2061 2011-10-31  Andy Wingo  <wingo@igalia.com>
2062
2063         Fix DFG JIT compilation on Linux targets.
2064         https://bugs.webkit.org/show_bug.cgi?id=70904
2065
2066         Reviewed by Darin Adler.
2067
2068         * jit/JITStubs.cpp (SYMBOL_STRING_RELOCATION): Simplify this
2069         macro.
2070
2071         * dfg/DFGOperations.cpp (SYMBOL_STRING_RELOCATION): Copy the
2072         simplified definition from jit/JITStubs.cpp.
2073         (FUNCTION_WRAPPER_WITH_RETURN_ADDRESS, getHostCallReturnValue):
2074         Use the macro to access trampoline targets through the PLT on PIC
2075         systems, instead of introducing a text relocation.  Otherwise, the
2076         library fails to link.
2077
2078 2011-10-31  Mark Hahnenberg  <mhahnenberg@apple.com>
2079
2080         De-virtualize JSObject::defineGetter
2081         https://bugs.webkit.org/show_bug.cgi?id=71134
2082
2083         Reviewed by Darin Adler.
2084
2085         Added defineGetter to the MethodTable.  Replaced all virtual versions of defineGetter
2086         with static versions.  Replaced all call sites with lookups in the MethodTable.
2087
2088         * JavaScriptCore.exp:
2089         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2090         * debugger/DebuggerActivation.cpp:
2091         (JSC::DebuggerActivation::defineGetter):
2092         * debugger/DebuggerActivation.h:
2093         * interpreter/Interpreter.cpp:
2094         (JSC::Interpreter::privateExecute):
2095         * jit/JITStubs.cpp:
2096         (JSC::DEFINE_STUB_FUNCTION):
2097         * runtime/ClassInfo.h:
2098         * runtime/JSCell.cpp:
2099         (JSC::JSCell::defineGetter):
2100         * runtime/JSCell.h:
2101         * runtime/JSGlobalObject.cpp:
2102         (JSC::JSGlobalObject::defineGetter):
2103         * runtime/JSGlobalObject.h:
2104         * runtime/JSObject.cpp:
2105         (JSC::JSObject::defineGetter):
2106         (JSC::putDescriptor):
2107         * runtime/JSObject.h:
2108         * runtime/ObjectPrototype.cpp:
2109         (JSC::objectProtoFuncDefineGetter):
2110
2111 2011-10-31  Michael Saboff  <msaboff@apple.com>
2112
2113         Towards 8-bit Strings: Move Lexer and Parser Objects out of JSGlobalData
2114         https://bugs.webkit.org/show_bug.cgi?id=71138
2115
2116         Restructure and movement of Lexer and Parser code.
2117         Moved Lexer and Parser objects out of JSGlobalData.
2118         Added a new ParserTokens class and instance to JSGlobalData that
2119         have JavaScript token related definitions.
2120         Replaced JSGlobalData arguments to Node classes with lineNumber,
2121         as that was the only use of the JSGlobalData.
2122         Combined JSParser and Parser classes into one class,
2123         eliminating JSParser.h and .cpp.
2124         Various supporting #include changes.
2125
2126         These mostly mechanical changes are done in preparation to
2127         making the Lexer and Parser template classes.
2128
2129         Reviewed by Darin Adler.
2130
2131         * CMakeLists.txt:
2132         * GNUmakefile.list.am:
2133         * JavaScriptCore.gypi:
2134         * JavaScriptCore.pro:
2135         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2136         * JavaScriptCore.xcodeproj/project.pbxproj:
2137         * bytecompiler/NodesCodegen.cpp:
2138         (JSC::ArrayNode::toArgumentList):
2139         (JSC::ApplyFunctionCallDotNode::emitBytecode):
2140         * parser/ASTBuilder.h:
2141         (JSC::ASTBuilder::ASTBuilder):
2142         (JSC::ASTBuilder::createSourceElements):
2143         (JSC::ASTBuilder::createCommaExpr):
2144         (JSC::ASTBuilder::createLogicalNot):
2145         (JSC::ASTBuilder::createUnaryPlus):
2146         (JSC::ASTBuilder::createVoid):
2147         (JSC::ASTBuilder::thisExpr):
2148         (JSC::ASTBuilder::createResolve):
2149         (JSC::ASTBuilder::createObjectLiteral):
2150         (JSC::ASTBuilder::createArray):
2151         (JSC::ASTBuilder::createNumberExpr):
2152         (JSC::ASTBuilder::createString):
2153         (JSC::ASTBuilder::createBoolean):
2154         (JSC::ASTBuilder::createNull):
2155         (JSC::ASTBuilder::createBracketAccess):
2156         (JSC::ASTBuilder::createDotAccess):
2157         (JSC::ASTBuilder::createRegExp):
2158         (JSC::ASTBuilder::createNewExpr):
2159         (JSC::ASTBuilder::createConditionalExpr):
2160         (JSC::ASTBuilder::createAssignResolve):
2161         (JSC::ASTBuilder::createFunctionExpr):
2162         (JSC::ASTBuilder::createFunctionBody):
2163         (JSC::ASTBuilder::createGetterOrSetterProperty):
2164         (JSC::ASTBuilder::createArguments):
2165         (JSC::ASTBuilder::createArgumentsList):
2166         (JSC::ASTBuilder::createPropertyList):
2167         (JSC::ASTBuilder::createElementList):
2168         (JSC::ASTBuilder::createFormalParameterList):
2169         (JSC::ASTBuilder::createClause):
2170         (JSC::ASTBuilder::createClauseList):
2171         (JSC::ASTBuilder::createFuncDeclStatement):
2172         (JSC::ASTBuilder::createBlockStatement):
2173         (JSC::ASTBuilder::createExprStatement):
2174         (JSC::ASTBuilder::createIfStatement):
2175         (JSC::ASTBuilder::createForLoop):
2176         (JSC::ASTBuilder::createForInLoop):
2177         (JSC::ASTBuilder::createEmptyStatement):
2178         (JSC::ASTBuilder::createVarStatement):
2179         (JSC::ASTBuilder::createReturnStatement):
2180         (JSC::ASTBuilder::createBreakStatement):
2181         (JSC::ASTBuilder::createContinueStatement):
2182         (JSC::ASTBuilder::createTryStatement):
2183         (JSC::ASTBuilder::createSwitchStatement):
2184         (JSC::ASTBuilder::createWhileStatement):
2185         (JSC::ASTBuilder::createDoWhileStatement):
2186         (JSC::ASTBuilder::createLabelStatement):
2187         (JSC::ASTBuilder::createWithStatement):
2188         (JSC::ASTBuilder::createThrowStatement):
2189         (JSC::ASTBuilder::createDebugger):
2190         (JSC::ASTBuilder::createConstStatement):
2191         (JSC::ASTBuilder::appendConstDecl):
2192         (JSC::ASTBuilder::combineCommaNodes):
2193         (JSC::ASTBuilder::appendBinaryOperation):
2194         (JSC::ASTBuilder::createAssignment):
2195         (JSC::ASTBuilder::createNumber):
2196         (JSC::ASTBuilder::makeTypeOfNode):
2197         (JSC::ASTBuilder::makeDeleteNode):
2198         (JSC::ASTBuilder::makeNegateNode):
2199         (JSC::ASTBuilder::makeBitwiseNotNode):
2200         (JSC::ASTBuilder::makeMultNode):
2201         (JSC::ASTBuilder::makeDivNode):
2202         (JSC::ASTBuilder::makeModNode):
2203         (JSC::ASTBuilder::makeAddNode):
2204         (JSC::ASTBuilder::makeSubNode):
2205         (JSC::ASTBuilder::makeLeftShiftNode):
2206         (JSC::ASTBuilder::makeRightShiftNode):
2207         (JSC::ASTBuilder::makeURightShiftNode):
2208         (JSC::ASTBuilder::makeBitOrNode):
2209         (JSC::ASTBuilder::makeBitAndNode):
2210         (JSC::ASTBuilder::makeBitXOrNode):
2211         (JSC::ASTBuilder::makeFunctionCallNode):
2212         (JSC::ASTBuilder::makeBinaryNode):
2213         (JSC::ASTBuilder::makeAssignNode):
2214         (JSC::ASTBuilder::makePrefixNode):
2215         (JSC::ASTBuilder::makePostfixNode):
2216         * parser/JSParser.cpp: Removed.
2217         * parser/JSParser.h: Removed.
2218         * parser/Lexer.cpp:
2219         (JSC::Keywords::Keywords):
2220         (JSC::Lexer::Lexer):
2221         (JSC::Lexer::~Lexer):
2222         (JSC::Lexer::setCode):
2223         (JSC::Lexer::parseIdentifier):
2224         * parser/Lexer.h:
2225         (JSC::Keywords::isKeyword):
2226         (JSC::Keywords::getKeyword):
2227         (JSC::Keywords::~Keywords):
2228         (JSC::Lexer::setIsReparsing):
2229         (JSC::Lexer::isReparsing):
2230         (JSC::Lexer::lineNumber):
2231         (JSC::Lexer::setLastLineNumber):
2232         (JSC::Lexer::lastLineNumber):
2233         (JSC::Lexer::prevTerminator):
2234         (JSC::Lexer::sawError):
2235         (JSC::Lexer::getErrorMessage):
2236         (JSC::Lexer::currentOffset):
2237         (JSC::Lexer::setOffset):
2238         (JSC::Lexer::setLineNumber):
2239         (JSC::Lexer::sourceProvider):
2240         (JSC::Lexer::isWhiteSpace):
2241         (JSC::Lexer::isLineTerminator):
2242         (JSC::Lexer::convertHex):
2243         (JSC::Lexer::convertUnicode):
2244         (JSC::Lexer::makeIdentifier):
2245         (JSC::Lexer::lexExpectIdentifier):
2246         * parser/NodeConstructors.h:
2247         (JSC::ParserArenaFreeable::operator new):
2248         (JSC::ParserArenaDeletable::operator new):
2249         (JSC::ParserArenaRefCounted::ParserArenaRefCounted):
2250         (JSC::Node::Node):
2251         (JSC::ExpressionNode::ExpressionNode):
2252         (JSC::StatementNode::StatementNode):
2253         (JSC::NullNode::NullNode):
2254         (JSC::BooleanNode::BooleanNode):
2255         (JSC::NumberNode::NumberNode):
2256         (JSC::StringNode::StringNode):
2257         (JSC::RegExpNode::RegExpNode):
2258         (JSC::ThisNode::ThisNode):
2259         (JSC::ResolveNode::ResolveNode):
2260         (JSC::ElementNode::ElementNode):
2261         (JSC::ArrayNode::ArrayNode):
2262         (JSC::PropertyNode::PropertyNode):
2263         (JSC::PropertyListNode::PropertyListNode):
2264         (JSC::ObjectLiteralNode::ObjectLiteralNode):
2265         (JSC::BracketAccessorNode::BracketAccessorNode):
2266         (JSC::DotAccessorNode::DotAccessorNode):
2267         (JSC::ArgumentListNode::ArgumentListNode):
2268         (JSC::ArgumentsNode::ArgumentsNode):
2269         (JSC::NewExprNode::NewExprNode):
2270         (JSC::EvalFunctionCallNode::EvalFunctionCallNode):
2271         (JSC::FunctionCallValueNode::FunctionCallValueNode):
2272         (JSC::FunctionCallResolveNode::FunctionCallResolveNode):
2273         (JSC::FunctionCallBracketNode::FunctionCallBracketNode):
2274         (JSC::FunctionCallDotNode::FunctionCallDotNode):
2275         (JSC::CallFunctionCallDotNode::CallFunctionCallDotNode):
2276         (JSC::ApplyFunctionCallDotNode::ApplyFunctionCallDotNode):
2277         (JSC::PrePostResolveNode::PrePostResolveNode):
2278         (JSC::PostfixResolveNode::PostfixResolveNode):
2279         (JSC::PostfixBracketNode::PostfixBracketNode):
2280         (JSC::PostfixDotNode::PostfixDotNode):
2281         (JSC::PostfixErrorNode::PostfixErrorNode):
2282         (JSC::DeleteResolveNode::DeleteResolveNode):
2283         (JSC::DeleteBracketNode::DeleteBracketNode):
2284         (JSC::DeleteDotNode::DeleteDotNode):
2285         (JSC::DeleteValueNode::DeleteValueNode):
2286         (JSC::VoidNode::VoidNode):
2287         (JSC::TypeOfResolveNode::TypeOfResolveNode):
2288         (JSC::TypeOfValueNode::TypeOfValueNode):
2289         (JSC::PrefixResolveNode::PrefixResolveNode):
2290         (JSC::PrefixBracketNode::PrefixBracketNode):
2291         (JSC::PrefixDotNode::PrefixDotNode):
2292         (JSC::PrefixErrorNode::PrefixErrorNode):
2293         (JSC::UnaryOpNode::UnaryOpNode):
2294         (JSC::UnaryPlusNode::UnaryPlusNode):
2295         (JSC::NegateNode::NegateNode):
2296         (JSC::BitwiseNotNode::BitwiseNotNode):
2297         (JSC::LogicalNotNode::LogicalNotNode):
2298         (JSC::BinaryOpNode::BinaryOpNode):
2299         (JSC::MultNode::MultNode):
2300         (JSC::DivNode::DivNode):
2301         (JSC::ModNode::ModNode):
2302         (JSC::AddNode::AddNode):
2303         (JSC::SubNode::SubNode):
2304         (JSC::LeftShiftNode::LeftShiftNode):
2305         (JSC::RightShiftNode::RightShiftNode):
2306         (JSC::UnsignedRightShiftNode::UnsignedRightShiftNode):
2307         (JSC::LessNode::LessNode):
2308         (JSC::GreaterNode::GreaterNode):
2309         (JSC::LessEqNode::LessEqNode):
2310         (JSC::GreaterEqNode::GreaterEqNode):
2311         (JSC::ThrowableBinaryOpNode::ThrowableBinaryOpNode):
2312         (JSC::InstanceOfNode::InstanceOfNode):
2313         (JSC::InNode::InNode):
2314         (JSC::EqualNode::EqualNode):
2315         (JSC::NotEqualNode::NotEqualNode):
2316         (JSC::StrictEqualNode::StrictEqualNode):
2317         (JSC::NotStrictEqualNode::NotStrictEqualNode):
2318         (JSC::BitAndNode::BitAndNode):
2319         (JSC::BitOrNode::BitOrNode):
2320         (JSC::BitXOrNode::BitXOrNode):
2321         (JSC::LogicalOpNode::LogicalOpNode):
2322         (JSC::ConditionalNode::ConditionalNode):
2323         (JSC::ReadModifyResolveNode::ReadModifyResolveNode):
2324         (JSC::AssignResolveNode::AssignResolveNode):
2325         (JSC::ReadModifyBracketNode::ReadModifyBracketNode):
2326         (JSC::AssignBracketNode::AssignBracketNode):
2327         (JSC::AssignDotNode::AssignDotNode):
2328         (JSC::ReadModifyDotNode::ReadModifyDotNode):
2329         (JSC::AssignErrorNode::AssignErrorNode):
2330         (JSC::CommaNode::CommaNode):
2331         (JSC::ConstStatementNode::ConstStatementNode):
2332         (JSC::SourceElements::SourceElements):
2333         (JSC::EmptyStatementNode::EmptyStatementNode):
2334         (JSC::DebuggerStatementNode::DebuggerStatementNode):
2335         (JSC::ExprStatementNode::ExprStatementNode):
2336         (JSC::VarStatementNode::VarStatementNode):
2337         (JSC::IfNode::IfNode):
2338         (JSC::IfElseNode::IfElseNode):
2339         (JSC::DoWhileNode::DoWhileNode):
2340         (JSC::WhileNode::WhileNode):
2341         (JSC::ForNode::ForNode):
2342         (JSC::ContinueNode::ContinueNode):
2343         (JSC::BreakNode::BreakNode):
2344         (JSC::ReturnNode::ReturnNode):
2345         (JSC::WithNode::WithNode):
2346         (JSC::LabelNode::LabelNode):
2347         (JSC::ThrowNode::ThrowNode):
2348         (JSC::TryNode::TryNode):
2349         (JSC::ParameterNode::ParameterNode):
2350         (JSC::FuncExprNode::FuncExprNode):
2351         (JSC::FuncDeclNode::FuncDeclNode):
2352         (JSC::CaseClauseNode::CaseClauseNode):
2353         (JSC::ClauseListNode::ClauseListNode):
2354         (JSC::CaseBlockNode::CaseBlockNode):
2355         (JSC::SwitchNode::SwitchNode):
2356         (JSC::ConstDeclNode::ConstDeclNode):
2357         (JSC::BlockNode::BlockNode):
2358         (JSC::ForInNode::ForInNode):
2359         * parser/NodeInfo.h:
2360         * parser/Nodes.cpp:
2361         (JSC::StatementNode::setLoc):
2362         (JSC::ScopeNode::ScopeNode):
2363         (JSC::ProgramNode::ProgramNode):
2364         (JSC::ProgramNode::create):
2365         (JSC::EvalNode::EvalNode):
2366         (JSC::EvalNode::create):
2367         (JSC::FunctionBodyNode::FunctionBodyNode):
2368         (JSC::FunctionBodyNode::create):
2369         * parser/Nodes.h:
2370         (JSC::Node::lineNo):
2371         * parser/Parser.cpp:
2372         (JSC::Parser::Parser):
2373         (JSC::Parser::~Parser):
2374         (JSC::Parser::parseInner):
2375         (JSC::Parser::allowAutomaticSemicolon):
2376         (JSC::Parser::parseSourceElements):
2377         (JSC::Parser::parseVarDeclaration):
2378         (JSC::Parser::parseConstDeclaration):
2379         (JSC::Parser::parseDoWhileStatement):
2380         (JSC::Parser::parseWhileStatement):
2381         (JSC::Parser::parseVarDeclarationList):
2382         (JSC::Parser::parseConstDeclarationList):
2383         (JSC::Parser::parseForStatement):
2384         (JSC::Parser::parseBreakStatement):
2385         (JSC::Parser::parseContinueStatement):
2386         (JSC::Parser::parseReturnStatement):
2387         (JSC::Parser::parseThrowStatement):
2388         (JSC::Parser::parseWithStatement):
2389         (JSC::Parser::parseSwitchStatement):
2390         (JSC::Parser::parseSwitchClauses):
2391         (JSC::Parser::parseSwitchDefaultClause):
2392         (JSC::Parser::parseTryStatement):
2393         (JSC::Parser::parseDebuggerStatement):
2394         (JSC::Parser::parseBlockStatement):
2395         (JSC::Parser::parseStatement):
2396         (JSC::Parser::parseFormalParameters):
2397         (JSC::Parser::parseFunctionBody):
2398         (JSC::Parser::parseFunctionInfo):
2399         (JSC::Parser::parseFunctionDeclaration):
2400         (JSC::LabelInfo::LabelInfo):
2401         (JSC::Parser::parseExpressionOrLabelStatement):
2402         (JSC::Parser::parseExpressionStatement):
2403         (JSC::Parser::parseIfStatement):
2404         (JSC::Parser::parseExpression):
2405         (JSC::Parser::parseAssignmentExpression):
2406         (JSC::Parser::parseConditionalExpression):
2407         (JSC::isUnaryOp):
2408         (JSC::Parser::isBinaryOperator):
2409         (JSC::Parser::parseBinaryExpression):
2410         (JSC::Parser::parseProperty):
2411         (JSC::Parser::parseObjectLiteral):
2412         (JSC::Parser::parseStrictObjectLiteral):
2413         (JSC::Parser::parseArrayLiteral):
2414         (JSC::Parser::parsePrimaryExpression):
2415         (JSC::Parser::parseArguments):
2416         (JSC::Parser::parseMemberExpression):
2417         (JSC::Parser::parseUnaryExpression):
2418         * parser/Parser.h:
2419         (JSC::isEvalNode):
2420         (JSC::EvalNode):
2421         (JSC::DepthManager::DepthManager):
2422         (JSC::DepthManager::~DepthManager):
2423         (JSC::ScopeLabelInfo::ScopeLabelInfo):
2424         (JSC::Scope::Scope):
2425         (JSC::Scope::startSwitch):
2426         (JSC::Scope::endSwitch):
2427         (JSC::Scope::startLoop):
2428         (JSC::Scope::endLoop):
2429         (JSC::Scope::inLoop):
2430         (JSC::Scope::breakIsValid):
2431         (JSC::Scope::continueIsValid):
2432         (JSC::Scope::pushLabel):
2433         (JSC::Scope::popLabel):
2434         (JSC::Scope::getLabel):
2435         (JSC::Scope::setIsFunction):
2436         (JSC::Scope::isFunction):
2437         (JSC::Scope::isFunctionBoundary):
2438         (JSC::Scope::declareVariable):
2439         (JSC::Scope::declareWrite):
2440         (JSC::Scope::preventNewDecls):
2441         (JSC::Scope::allowsNewDecls):
2442         (JSC::Scope::declareParameter):
2443         (JSC::Scope::useVariable):
2444         (JSC::Scope::setNeedsFullActivation):
2445         (JSC::Scope::collectFreeVariables):
2446         (JSC::Scope::getUncapturedWrittenVariables):
2447         (JSC::Scope::getCapturedVariables):
2448         (JSC::Scope::setStrictMode):
2449         (JSC::Scope::strictMode):
2450         (JSC::Scope::isValidStrictMode):
2451         (JSC::Scope::shadowsArguments):
2452         (JSC::Scope::copyCapturedVariablesToVector):
2453         (JSC::Scope::saveFunctionInfo):
2454         (JSC::Scope::restoreFunctionInfo):
2455         (JSC::ScopeRef::ScopeRef):
2456         (JSC::ScopeRef::operator->):
2457         (JSC::ScopeRef::index):
2458         (JSC::ScopeRef::hasContainingScope):
2459         (JSC::ScopeRef::containingScope):
2460         (JSC::Parser::AllowInOverride::AllowInOverride):
2461         (JSC::Parser::AllowInOverride::~AllowInOverride):
2462         (JSC::Parser::AutoPopScopeRef::AutoPopScopeRef):
2463         (JSC::Parser::AutoPopScopeRef::~AutoPopScopeRef):
2464         (JSC::Parser::AutoPopScopeRef::setPopped):
2465         (JSC::Parser::currentScope):
2466         (JSC::Parser::pushScope):
2467         (JSC::Parser::popScopeInternal):
2468         (JSC::Parser::popScope):
2469         (JSC::Parser::declareVariable):
2470         (JSC::Parser::declareWrite):
2471         (JSC::Parser::findCachedFunctionInfo):
2472         (JSC::Parser::isFunctionBodyNode):
2473         (JSC::Parser::next):
2474         (JSC::Parser::nextExpectIdentifier):
2475         (JSC::Parser::nextTokenIsColon):
2476         (JSC::Parser::consume):
2477         (JSC::Parser::getToken):
2478         (JSC::Parser::match):
2479         (JSC::Parser::tokenStart):
2480         (JSC::Parser::tokenLine):
2481         (JSC::Parser::tokenEnd):
2482         (JSC::Parser::getTokenName):
2483         (JSC::Parser::updateErrorMessageSpecialCase):
2484         (JSC::Parser::updateErrorMessage):
2485         (JSC::Parser::updateErrorWithNameAndMessage):
2486         (JSC::Parser::startLoop):
2487         (JSC::Parser::endLoop):
2488         (JSC::Parser::startSwitch):
2489         (JSC::Parser::endSwitch):
2490         (JSC::Parser::setStrictMode):
2491         (JSC::Parser::strictMode):
2492         (JSC::Parser::isValidStrictMode):
2493         (JSC::Parser::declareParameter):
2494         (JSC::Parser::breakIsValid):
2495         (JSC::Parser::continueIsValid):
2496         (JSC::Parser::pushLabel):
2497         (JSC::Parser::popLabel):
2498         (JSC::Parser::getLabel):
2499         (JSC::Parser::autoSemiColon):
2500         (JSC::Parser::canRecurse):
2501         (JSC::Parser::lastTokenEnd):
2502         (JSC::Parser::DepthManager::DepthManager):
2503         (JSC::Parser::DepthManager::~DepthManager):
2504         (JSC::Parser::parse):
2505         (JSC::parse):
2506         * parser/ParserTokens.h: Added.
2507         (JSC::JSTokenInfo::JSTokenInfo):
2508         * parser/SourceCode.h:
2509         (JSC::SourceCode::subExpression):
2510         * parser/SourceProviderCacheItem.h:
2511         * parser/SyntaxChecker.h:
2512         (JSC::SyntaxChecker::SyntaxChecker):
2513         (JSC::SyntaxChecker::makeFunctionCallNode):
2514         (JSC::SyntaxChecker::createCommaExpr):
2515         (JSC::SyntaxChecker::makeAssignNode):
2516         (JSC::SyntaxChecker::makePrefixNode):
2517         (JSC::SyntaxChecker::makePostfixNode):
2518         (JSC::SyntaxChecker::makeTypeOfNode):
2519         (JSC::SyntaxChecker::makeDeleteNode):
2520         (JSC::SyntaxChecker::makeNegateNode):
2521         (JSC::SyntaxChecker::makeBitwiseNotNode):
2522         (JSC::SyntaxChecker::createLogicalNot):
2523         (JSC::SyntaxChecker::createUnaryPlus):
2524         (JSC::SyntaxChecker::createVoid):
2525         (JSC::SyntaxChecker::thisExpr):
2526         (JSC::SyntaxChecker::createResolve):
2527         (JSC::SyntaxChecker::createObjectLiteral):
2528         (JSC::SyntaxChecker::createArray):
2529         (JSC::SyntaxChecker::createNumberExpr):
2530         (JSC::SyntaxChecker::createString):
2531         (JSC::SyntaxChecker::createBoolean):
2532         (JSC::SyntaxChecker::createNull):
2533         (JSC::SyntaxChecker::createBracketAccess):
2534         (JSC::SyntaxChecker::createDotAccess):
2535         (JSC::SyntaxChecker::createRegExp):
2536         (JSC::SyntaxChecker::createNewExpr):
2537         (JSC::SyntaxChecker::createConditionalExpr):
2538         (JSC::SyntaxChecker::createAssignResolve):
2539         (JSC::SyntaxChecker::createFunctionExpr):
2540         (JSC::SyntaxChecker::createFunctionBody):
2541         (JSC::SyntaxChecker::createArguments):
2542         (JSC::SyntaxChecker::createArgumentsList):
2543         (JSC::SyntaxChecker::createProperty):
2544         (JSC::SyntaxChecker::createPropertyList):
2545         (JSC::SyntaxChecker::createFuncDeclStatement):
2546         (JSC::SyntaxChecker::createBlockStatement):
2547         (JSC::SyntaxChecker::createExprStatement):
2548         (JSC::SyntaxChecker::createIfStatement):
2549         (JSC::SyntaxChecker::createForLoop):
2550         (JSC::SyntaxChecker::createForInLoop):
2551         (JSC::SyntaxChecker::createEmptyStatement):
2552         (JSC::SyntaxChecker::createVarStatement):
2553         (JSC::SyntaxChecker::createReturnStatement):
2554         (JSC::SyntaxChecker::createBreakStatement):
2555         (JSC::SyntaxChecker::createContinueStatement):
2556         (JSC::SyntaxChecker::createTryStatement):
2557         (JSC::SyntaxChecker::createSwitchStatement):
2558         (JSC::SyntaxChecker::createWhileStatement):
2559         (JSC::SyntaxChecker::createWithStatement):
2560         (JSC::SyntaxChecker::createDoWhileStatement):
2561         (JSC::SyntaxChecker::createLabelStatement):
2562         (JSC::SyntaxChecker::createThrowStatement):
2563         (JSC::SyntaxChecker::createDebugger):
2564         (JSC::SyntaxChecker::createConstStatement):
2565         (JSC::SyntaxChecker::appendConstDecl):
2566         (JSC::SyntaxChecker::createGetterOrSetterProperty):
2567         (JSC::SyntaxChecker::combineCommaNodes):
2568         (JSC::SyntaxChecker::operatorStackPop):
2569         * runtime/Executable.cpp:
2570         (JSC::EvalExecutable::compileInternal):
2571         (JSC::ProgramExecutable::checkSyntax):
2572         (JSC::ProgramExecutable::compileInternal):
2573         (JSC::FunctionExecutable::produceCodeBlockFor):
2574         (JSC::FunctionExecutable::fromGlobalCode):
2575         * runtime/JSGlobalData.cpp:
2576         (JSC::JSGlobalData::JSGlobalData):
2577         (JSC::JSGlobalData::~JSGlobalData):
2578         * runtime/JSGlobalData.h:
2579         * runtime/LiteralParser.cpp:
2580         (JSC::LiteralParser::tryJSONPParse):
2581
2582 2011-10-31  Filip Pizlo  <fpizlo@apple.com>
2583
2584         REGRESSION (r97118): Reproducible crash in JSCell::toPrimitive when adding
2585         https://bugs.webkit.org/show_bug.cgi?id=71227
2586
2587         Reviewed by Oliver Hunt.
2588         
2589         No new tests, since while I can see exactly where the DFG went wrong on the
2590         site in question from looking at the generated machine code, and while I can
2591         certainly believe that such a scenario would happen, I cannot visualize how
2592         to make it happen reproducibly. It requires an odd combination of double
2593         values getting spilled and then refilled, but then reboxed at just the right
2594         time so that the spilled value is an unboxed double while the in-register
2595         value is a boxed double.
2596
2597         * dfg/DFGJITCodeGenerator.h:
2598         (JSC::DFG::JITCodeGenerator::silentFillGPR):
2599
2600 2011-10-30  Filip Pizlo  <fpizlo@apple.com>
2601
2602         JSParser::parsePrimaryExpression should have an overflow check
2603         https://bugs.webkit.org/show_bug.cgi?id=71197
2604
2605         Reviewed by Geoff Garen.
2606
2607         * parser/JSParser.cpp:
2608         (JSC::JSParser::parsePrimaryExpression):
2609
2610 2011-10-30  Filip Pizlo  <fpizlo@apple.com>
2611
2612         DFG ValueAdd(string, int) should not fail speculation
2613         https://bugs.webkit.org/show_bug.cgi?id=71195
2614
2615         Reviewed by Geoff Garen.
2616         
2617         1% speed-up on V8.
2618
2619         * dfg/DFGNode.h:
2620         (JSC::DFG::Node::shouldNotSpeculateInteger):
2621         (JSC::DFG::Node::shouldSpeculateInteger):
2622
2623 2011-10-30  Filip Pizlo  <fpizlo@apple.com>
2624
2625         The DFG inliner should not flush the callee
2626         https://bugs.webkit.org/show_bug.cgi?id=71191
2627
2628         Reviewed by Oliver Hunt.
2629         
2630         0.6% speed-up on V8.
2631
2632         * bytecode/CodeBlock.cpp:
2633         (JSC::CodeBlock::visitAggregate):
2634         * bytecode/CodeOrigin.h:
2635         * dfg/DFGByteCodeParser.cpp:
2636         (JSC::DFG::ByteCodeParser::flush):
2637         (JSC::DFG::ByteCodeParser::handleInlining):
2638         (JSC::DFG::ByteCodeParser::parseBlock):
2639         (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
2640         (JSC::DFG::ByteCodeParser::parse):
2641         * dfg/DFGJITCompiler.cpp:
2642         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
2643         * dfg/DFGJITCompiler32_64.cpp:
2644         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
2645         * interpreter/CallFrame.cpp:
2646         (JSC::CallFrame::trueCallerFrameSlow):
2647
2648 2011-10-28  Mark Hahnenberg  <mhahnenberg@apple.com>
2649
2650         De-virtualize isGlobalObject, isVariableObject, isActivationObject, and isErrorInstance in JSObject
2651         https://bugs.webkit.org/show_bug.cgi?id=70968
2652
2653         Reviewed by Geoffrey Garen.
2654
2655         * API/JSCallbackObject.cpp: Added two specializations for createStructure that use different JSTypes in their
2656         TypeInfo.  Had to also create a specialization for JSNonFinalObject, even JSGlobalObject was the only that 
2657         needed it because Windows wouldn't build without it.
2658         (JSC::::createStructure):
2659         * API/JSCallbackObject.h:
2660         * JavaScriptCore.exp:
2661         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2662         * runtime/ErrorInstance.h: Removed virtual function and changed JSType provided to TypeInfo in createStructure. 
2663         (JSC::ErrorInstance::createStructure):
2664         * runtime/ErrorPrototype.h: Ditto
2665         (JSC::ErrorPrototype::createStructure):
2666         * runtime/JSActivation.h: Ditto
2667         (JSC::JSActivation::createStructure):
2668         * runtime/JSGlobalObject.h: Ditto
2669         (JSC::JSGlobalObject::createStructure):
2670         * runtime/JSObject.h: De-virtualized functions.  They now check the JSType of the object for the corresponding type.
2671         (JSC::JSObject::isGlobalObject):
2672         (JSC::JSObject::isVariableObject):
2673         (JSC::JSObject::isActivationObject):
2674         (JSC::JSObject::isErrorInstance):
2675         * runtime/JSType.h: Added new types for GlobalObject, VariableObject, ActivationObject, and ErrorInstance.
2676         * runtime/JSVariableObject.cpp: Removed virtual function.
2677         * runtime/JSVariableObject.h: Changed JSType provided to TypeInfo in createStructure.
2678         (JSC::JSVariableObject::createStructure):
2679
2680 2011-10-28  Pavel Feldman  <pfeldman@google.com>
2681
2682         Reset line numbers for scripts generated with document.write.
2683         https://bugs.webkit.org/show_bug.cgi?id=71099
2684
2685         Reviewed by Yury Semikhatsky.
2686
2687         * wtf/text/TextPosition.h:
2688         (WTF::OrdinalNumber::OrdinalNumber):
2689
2690 2011-10-27  Daniel Bates  <dbates@rim.com>
2691
2692         CMake: Add support to optionally install the built JavaScript shell
2693         https://bugs.webkit.org/show_bug.cgi?id=71062
2694
2695         Reviewed by Antonio Gomes.
2696
2697         Generate an installation rule for installing the JavaScript shell in
2698         /bin (with respect to the prefix path) when SHOULD_INSTALL_JS_SHELL
2699         is defined.
2700
2701         * shell/CMakeLists.txt:
2702
2703 2011-10-27  Kentaro Hara  <haraken@chromium.org>
2704
2705         Generate WebKitCSSMatrix constructor for JSC by [Constructor] IDL
2706         https://bugs.webkit.org/show_bug.cgi?id=70215
2707
2708         Reviewed by Adam Barth.
2709
2710         Added a method that judges if a given JSValue is empty.
2711
2712         Tests: transforms/svg-vs-css.xhtml
2713                transforms/cssmatrix-2d-interface.xhtml
2714                transforms/cssmatrix-3d-interface.xhtml
2715
2716         * runtime/JSValue.h:
2717         * runtime/JSValueInlineMethods.h:
2718         (JSC::JSValue::isEmpty):
2719
2720 2011-10-27  Michael Saboff  <msaboff@apple.com>
2721
2722         ENH: Add 8 bit string support to JSC JIT
2723         https://bugs.webkit.org/show_bug.cgi?id=71073
2724
2725         Changed the JIT String character access generation to create code
2726         to check the character size and load8() or load16() as approriate.
2727
2728         Reviewed by Gavin Barraclough.
2729
2730         * assembler/MacroAssemblerX86Common.h:
2731         (JSC::MacroAssemblerX86Common::load8):
2732         * assembler/X86Assembler.h:
2733         (JSC::X86Assembler::movzbl_mr):
2734         * dfg/DFGSpeculativeJIT.cpp:
2735         (JSC::DFG::SpeculativeJIT::compileGetCharCodeAt):
2736         (JSC::DFG::SpeculativeJIT::compileGetByValOnString):
2737         * jit/JITInlineMethods.h:
2738         (JSC::JIT::emitLoadCharacterString):
2739         * jit/JITPropertyAccess.cpp:
2740         (JSC::JIT::stringGetByValStubGenerator):
2741         * jit/JITPropertyAccess32_64.cpp:
2742         (JSC::JIT::stringGetByValStubGenerator):
2743         * jit/JSInterfaceJIT.h:
2744         (JSC::ThunkHelpers::stringImplFlagsOffset):
2745         (JSC::ThunkHelpers::stringImpl8BitFlag):
2746         * jit/ThunkGenerators.cpp:
2747         (JSC::stringCharLoad):
2748
2749 2011-10-27  Filip Pizlo  <fpizlo@apple.com>
2750
2751         If the bytecode generator emits code after the return in the first basic block,
2752         DFG's inliner crashes
2753         https://bugs.webkit.org/show_bug.cgi?id=71071
2754
2755         Reviewed by Gavin Barraclough.
2756         
2757         Removed some cruft dealing with parsing failures due to unsupported functionality
2758         (that's never reached anymore due to it being caught in DFGCapabilities). This
2759         allowed me to repurpose the bool return from parseBlock() to mean: true if we
2760         should continue to parse, or false if we've already parsed all live code.
2761
2762         * dfg/DFGByteCodeParser.cpp:
2763         (JSC::DFG::ByteCodeParser::ByteCodeParser):
2764         (JSC::DFG::ByteCodeParser::parseBlock):
2765         (JSC::DFG::ByteCodeParser::parseCodeBlock):
2766
2767 2011-10-27  Joseph Pecoraro  <pecoraro@apple.com>
2768
2769         Reviewed by David Kilzer.
2770
2771         Make FeatureDefines Identical Across OS X Projects
2772         https://bugs.webkit.org/show_bug.cgi?id=71051
2773
2774         * Configurations/FeatureDefines.xcconfig:
2775
2776 2011-10-27  Filip Pizlo  <fpizlo@apple.com>
2777
2778         Crash in JSC::Structure::materializePropertyMap when viewing Garden-O-Matic
2779         https://bugs.webkit.org/show_bug.cgi?id=71045
2780
2781         Reviewed by Geoff Garen.
2782         
2783         Make sure that if a structure is pinned, it also has a property map.
2784
2785         * runtime/Structure.cpp:
2786         (JSC::Structure::changePrototypeTransition):
2787         (JSC::Structure::despecifyFunctionTransition):
2788         (JSC::Structure::getterSetterTransition):
2789         (JSC::Structure::toDictionaryTransition):
2790         (JSC::Structure::preventExtensionsTransition):
2791         (JSC::Structure::addPropertyWithoutTransition):
2792         (JSC::Structure::removePropertyWithoutTransition):
2793         (JSC::Structure::pin):
2794         (JSC::Structure::copyPropertyTableForPinning):
2795         * runtime/Structure.h:
2796         (JSC::Structure::materializePropertyMapIfNecessaryForPinning):
2797
2798 2011-10-27  Michael Saboff  <msaboff@apple.com>
2799
2800         32bit build failure after r98624
2801         https://bugs.webkit.org/show_bug.cgi?id=71064
2802
2803         Disambiguated operator overload with unsigned index (0u).
2804
2805         Reviewed by Sam Weinig.
2806
2807         * runtime/UString.h:
2808         (JSC::operator==):
2809
2810 2011-10-27  Gustavo Noronha Silva  <gns@gnome.org>
2811
2812         Fix building on GNU/kFreeBSD
2813         https://bugs.webkit.org/show_bug.cgi?id=71005
2814
2815         Reviewed by Darin Adler.
2816
2817         * config.h:
2818         * wtf/Platform.h:
2819
2820 2011-10-27  Michael Saboff  <msaboff@apple.com>
2821
2822         Investigate storing strings in 8-bit buffers when possible
2823         https://bugs.webkit.org/show_bug.cgi?id=66161
2824
2825         Investigate storing strings in 8-bit buffers when possible
2826         https://bugs.webkit.org/show_bug.cgi?id=66161
2827
2828         Added support for 8 bit string data in StringImpl.  Changed
2829         (UChar*) m_data to m_data16.  Added char* m_data8 as a union
2830         with m_data16.  Added UChar* m_copyData16 to the other union
2831         to store a 16 bit copy of an 8 bit string when needed.
2832         Added characters8() and characters16() accessor methods
2833         that assume the caller has checked the underlying string type
2834         via the new is8Bit() method. The characters() method will
2835         return a UChar* of the string, materializing a 16 bit copy if the
2836         string is an 8 bit string.  Added two flags, one for 8 bit buffer
2837         and a second for a 16 bit copy for an 8 bit string.
2838
2839         Fixed method name typo (StringHasher::defaultCoverter()).
2840
2841         Over time the goal is to eliminate calls to characters() and
2842         us the character8() and characters16() accessors.
2843
2844         This patch does not include changes that actually create 8 bit
2845         strings. This is the first of at least 8 patches.  Subsequent
2846         patches will be submitted for JIT changes, making the JSC lexer,
2847         parser and literal parser, JavaScript string changes and
2848         then changes in webcore to take advantage of the 8 bit strings.
2849
2850         This change is performance neutral for SunSpider and V8 when
2851         run from the command line with "jsc".
2852
2853         Reviewed by Geoffrey Garen.
2854
2855         * JavaScriptCore.exp:
2856         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
2857         * interpreter/Interpreter.cpp:
2858         (JSC::Interpreter::callEval):
2859         * parser/SourceProvider.h:
2860         (JSC::UStringSourceProvider::data):
2861         (JSC::UStringSourceProvider::UStringSourceProvider):
2862         * runtime/Identifier.cpp:
2863         (JSC::IdentifierCStringTranslator::hash):
2864         (JSC::IdentifierCStringTranslator::equal):
2865         (JSC::IdentifierCStringTranslator::translate):
2866         (JSC::Identifier::add):
2867         (JSC::Identifier::toUInt32):
2868         * runtime/Identifier.h:
2869         (JSC::Identifier::equal):
2870         (JSC::operator==):
2871         (JSC::operator!=):
2872         * runtime/JSString.cpp:
2873         (JSC::JSString::resolveRope):
2874         (JSC::JSString::resolveRopeSlowCase):
2875         * runtime/RegExp.cpp:
2876         (JSC::RegExp::match):
2877         * runtime/StringPrototype.cpp:
2878         (JSC::jsSpliceSubstringsWithSeparators):
2879         * runtime/UString.cpp:
2880         (JSC::UString::UString):
2881         (JSC::equalSlowCase):
2882         (JSC::UString::utf8):
2883         * runtime/UString.h:
2884         (JSC::UString::characters):
2885         (JSC::UString::characters8):
2886         (JSC::UString::characters16):
2887         (JSC::UString::is8Bit):
2888         (JSC::UString::operator[]):
2889         (JSC::UString::find):
2890         (JSC::operator==):
2891         * wtf/StringHasher.h:
2892         (WTF::StringHasher::computeHash):
2893         (WTF::StringHasher::defaultConverter):
2894         * wtf/text/AtomicString.cpp:
2895         (WTF::CStringTranslator::hash):
2896         (WTF::CStringTranslator::equal):
2897         (WTF::CStringTranslator::translate):
2898         (WTF::AtomicString::add):
2899         * wtf/text/AtomicString.h:
2900         (WTF::AtomicString::AtomicString):
2901         (WTF::AtomicString::contains):
2902         (WTF::AtomicString::find):
2903         (WTF::AtomicString::add):
2904         (WTF::operator==):
2905         (WTF::operator!=):
2906         (WTF::equalIgnoringCase):
2907         * wtf/text/StringConcatenate.h:
2908         * wtf/text/StringHash.h:
2909         (WTF::StringHash::equal):
2910         (WTF::CaseFoldingHash::hash):
2911         * wtf/text/StringImpl.cpp:
2912         (WTF::StringImpl::~StringImpl):
2913         (WTF::StringImpl::createUninitialized):
2914         (WTF::StringImpl::create):
2915         (WTF::StringImpl::getData16SlowCase):
2916         (WTF::StringImpl::containsOnlyWhitespace):
2917         (WTF::StringImpl::substring):
2918         (WTF::StringImpl::characterStartingAt):
2919         (WTF::StringImpl::lower):
2920         (WTF::StringImpl::upper):
2921         (WTF::StringImpl::fill):
2922         (WTF::StringImpl::foldCase):
2923         (WTF::StringImpl::stripMatchedCharacters):
2924         (WTF::StringImpl::removeCharacters):
2925         (WTF::StringImpl::simplifyMatchedCharactersToSpace):
2926         (WTF::StringImpl::toIntStrict):
2927         (WTF::StringImpl::toUIntStrict):
2928         (WTF::StringImpl::toInt64Strict):
2929         (WTF::StringImpl::toUInt64Strict):
2930         (WTF::StringImpl::toIntPtrStrict):
2931         (WTF::StringImpl::toInt):
2932         (WTF::StringImpl::toUInt):
2933         (WTF::StringImpl::toInt64):
2934         (WTF::StringImpl::toUInt64):
2935         (WTF::StringImpl::toIntPtr):
2936         (WTF::StringImpl::toDouble):
2937         (WTF::StringImpl::toFloat):
2938         (WTF::equal):
2939         (WTF::equalIgnoringCase):
2940         (WTF::StringImpl::find):
2941         (WTF::StringImpl::findIgnoringCase):
2942         (WTF::StringImpl::reverseFind):
2943         (WTF::StringImpl::replace):
2944         (WTF::StringImpl::defaultWritingDirection):
2945         (WTF::StringImpl::adopt):
2946         (WTF::StringImpl::createWithTerminatingNullCharacter):
2947         * wtf/text/StringImpl.h:
2948         (WTF::StringImpl::StringImpl):
2949         (WTF::StringImpl::create):
2950         (WTF::StringImpl::create8):
2951         (WTF::StringImpl::tryCreateUninitialized):
2952         (WTF::StringImpl::flagsOffset):
2953         (WTF::StringImpl::flagIs8Bit):
2954         (WTF::StringImpl::dataOffset):
2955         (WTF::StringImpl::is8Bit):
2956         (WTF::StringImpl::characters8):
2957         (WTF::StringImpl::characters16):
2958         (WTF::StringImpl::characters):
2959         (WTF::StringImpl::has16BitShadow):
2960         (WTF::StringImpl::setHash):
2961         (WTF::StringImpl::hash):
2962         (WTF::StringImpl::copyChars):
2963         (WTF::StringImpl::operator[]):
2964         (WTF::StringImpl::find):
2965         (WTF::StringImpl::findIgnoringCase):
2966         (WTF::equal):
2967         (WTF::equalIgnoringCase):
2968         (WTF::StringImpl::isolatedCopy):
2969         * wtf/text/WTFString.cpp:
2970         (WTF::String::String):
2971         (WTF::String::append):
2972         (WTF::String::format):
2973         (WTF::String::fromUTF8):
2974         (WTF::String::fromUTF8WithLatin1Fallback):
2975         * wtf/text/WTFString.h:
2976         (WTF::String::find):
2977         (WTF::String::findIgnoringCase):
2978         (WTF::String::contains):
2979         (WTF::String::append):
2980         (WTF::String::fromUTF8):
2981         (WTF::String::fromUTF8WithLatin1Fallback):
2982         (WTF::operator==):
2983         (WTF::operator!=):
2984         (WTF::equalIgnoringCase):
2985         * wtf/unicode/Unicode.h:
2986         * yarr/YarrJIT.cpp:
2987         (JSC::Yarr::execute):
2988         * yarr/YarrJIT.h:
2989         (JSC::Yarr::YarrCodeBlock::execute):
2990         * yarr/YarrParser.h:
2991         (JSC::Yarr::Parser::Parser):
2992
2993 2011-10-27  Mark Hahnenberg  <mhahnenberg@apple.com>
2994
2995         Fixing windows build
2996
2997         Unreviewed build fix
2998
2999         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3000
3001 2011-10-27  Mark Hahnenberg  <mhahnenberg@apple.com>
3002
3003         Add ability to check for presence of static members at compile time
3004         https://bugs.webkit.org/show_bug.cgi?id=70986
3005
3006         Reviewed by Geoffrey Garen.
3007
3008         Added new CREATE_MEMBER_CHECKER macro to instantiate the template and the 
3009         HAS_MEMBER_NAMED macro to use that template to check if the specified class 
3010         does indeed have a method with that name.  This mechanism is not currently 
3011         used anywhere, but will be in the future when adding virtual methods from 
3012         JSObject to the MethodTable.
3013
3014         * runtime/ClassInfo.h:
3015
3016 2011-10-27  Mark Hahnenberg  <mhahnenberg@apple.com>
3017
3018         De-virtualize JSCell::toThisObject
3019         https://bugs.webkit.org/show_bug.cgi?id=70958
3020
3021         Reviewed by Geoffrey Garen.
3022
3023         Converted all instances of toThisObject to static functions, 
3024         added toThisObject to the MethodTable, and replaced all call sites
3025         with a corresponding lookup in the MethodTable.
3026
3027         * API/JSContextRef.cpp:
3028         * JavaScriptCore.exp:
3029         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3030         * runtime/ClassInfo.h:
3031         * runtime/JSActivation.cpp:
3032         (JSC::JSActivation::toThisObject):
3033         * runtime/JSActivation.h:
3034         * runtime/JSCell.cpp:
3035         (JSC::JSCell::toThisObject):
3036         * runtime/JSCell.h:
3037         * runtime/JSObject.cpp:
3038         (JSC::JSObject::put):
3039         (JSC::JSObject::toThisObject):
3040         * runtime/JSObject.h:
3041         (JSC::JSValue::toThisObject):
3042         * runtime/JSStaticScopeObject.cpp:
3043         (JSC::JSStaticScopeObject::toThisObject):
3044         * runtime/JSStaticScopeObject.h:
3045         * runtime/JSString.cpp:
3046         (JSC::JSString::toThisObject):
3047         * runtime/JSString.h:
3048         * runtime/StrictEvalActivation.cpp:
3049         (JSC::StrictEvalActivation::toThisObject):
3050         * runtime/StrictEvalActivation.h:
3051
3052 2011-10-27  Yuqiang Xian  <yuqiang.xian@intel.com>
3053
3054         Fix a small bug in callOperation after r98431
3055         https://bugs.webkit.org/show_bug.cgi?id=70984
3056
3057         Reviewed by Geoffrey Garen.
3058
3059         TrustedImmPtr is not expecting "int" type parameters.
3060
3061         * dfg/DFGJITCodeGenerator.h:
3062         (JSC::DFG::callOperation):
3063
3064 2011-10-26  Oliver Hunt  <oliver@apple.com>
3065
3066         Restore structure-clearing behaviour of allocateCell<>
3067         https://bugs.webkit.org/show_bug.cgi?id=70976
3068
3069         Reviewed by Geoffrey Garen.
3070
3071         This restores the logic that allows the markstack to filter
3072         live objects that have not yet been initialised.
3073
3074         * runtime/JSCell.h:
3075         (JSC::JSCell::clearStructure):
3076            Validation-safe method to clear a cell's structure.
3077         (JSC::allocateCell):
3078            Call the above method.
3079         * runtime/Structure.h:
3080         (JSC::MarkStack::internalAppend):
3081            Don't visit cells that haven't been initialised.
3082
3083 2011-10-26  Filip Pizlo  <fpizlo@apple.com>
3084
3085         REGRESSION (r97030): Cannot log in to progressive.com
3086         https://bugs.webkit.org/show_bug.cgi?id=70094
3087
3088         Reviewed by Oliver Hunt.
3089
3090         * dfg/DFGByteCodeParser.cpp:
3091         (JSC::DFG::ByteCodeParser::handleCall):
3092
3093 2011-10-26  Mark Hahnenberg  <mhahnenberg@apple.com>
3094
3095         Remove getOwnPropertySlotVirtual
3096         https://bugs.webkit.org/show_bug.cgi?id=70741
3097
3098         Reviewed by Geoffrey Garen.
3099
3100         Removed all declarations and definitions of getOwnPropertySlotVirtual.
3101         Also replaced all call sites to getOwnPropertyVirtualVirtual with a 
3102         corresponding lookup in the MethodTable.
3103
3104         * API/JSCallbackObject.h:
3105         * API/JSCallbackObjectFunctions.h:
3106         (JSC::::getOwnPropertyDescriptor):
3107         * JavaScriptCore.exp:
3108         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3109         * debugger/DebuggerActivation.cpp:
3110         (JSC::DebuggerActivation::getOwnPropertySlot):
3111         * debugger/DebuggerActivation.h:
3112         * runtime/Arguments.cpp:
3113         * runtime/Arguments.h:
3114         * runtime/ArrayConstructor.cpp:
3115         * runtime/ArrayConstructor.h:
3116         * runtime/ArrayPrototype.cpp:
3117         * runtime/ArrayPrototype.h:
3118         * runtime/BooleanPrototype.cpp:
3119         * runtime/BooleanPrototype.h:
3120         * runtime/DateConstructor.cpp:
3121         * runtime/DateConstructor.h:
3122         * runtime/DatePrototype.cpp:
3123         * runtime/DatePrototype.h:
3124         (JSC::DatePrototype::create):
3125         * runtime/ErrorPrototype.cpp:
3126         * runtime/ErrorPrototype.h:
3127         * runtime/JSActivation.cpp:
3128         * runtime/JSActivation.h:
3129         * runtime/JSArray.cpp:
3130         (JSC::JSArray::getOwnPropertySlotByIndex):
3131         * runtime/JSArray.h:
3132         * runtime/JSByteArray.cpp:
3133         * runtime/JSByteArray.h:
3134         * runtime/JSCell.cpp:
3135         * runtime/JSCell.h:
3136         * runtime/JSFunction.cpp:
3137         (JSC::JSFunction::getOwnPropertyDescriptor):
3138         (JSC::JSFunction::getOwnPropertyNames):
3139         (JSC::JSFunction::put):
3140         * runtime/JSFunction.h:
3141         * runtime/JSGlobalObject.cpp:
3142         * runtime/JSGlobalObject.h:
3143         * runtime/JSNotAnObject.cpp:
3144         * runtime/JSNotAnObject.h:
3145         * runtime/JSONObject.cpp:
3146         (JSC::Stringifier::Holder::appendNextProperty):
3147         (JSC::Walker::walk):
3148         * runtime/JSONObject.h:
3149         * runtime/JSObject.cpp:
3150         (JSC::JSObject::getOwnPropertySlotByIndex):
3151         (JSC::JSObject::hasOwnProperty):
3152         * runtime/JSObject.h:
3153         (JSC::JSCell::fastGetOwnPropertySlot):
3154         (JSC::JSObject::getPropertySlot):
3155         (JSC::JSValue::get):
3156         * runtime/JSStaticScopeObject.cpp:
3157         * runtime/JSStaticScopeObject.h:
3158         * runtime/JSString.cpp:
3159         (JSC::JSString::getOwnPropertySlot):
3160         * runtime/JSString.h:
3161         * runtime/MathObject.cpp:
3162         * runtime/MathObject.h:
3163         (JSC::MathObject::create):
3164         * runtime/NumberConstructor.cpp:
3165         * runtime/NumberConstructor.h:
3166         * runtime/NumberPrototype.cpp:
3167         * runtime/NumberPrototype.h:
3168         * runtime/ObjectConstructor.cpp:
3169         * runtime/ObjectConstructor.h:
3170         * runtime/ObjectPrototype.cpp:
3171         * runtime/ObjectPrototype.h:
3172         * runtime/RegExpConstructor.cpp:
3173         * runtime/RegExpConstructor.h:
3174         * runtime/RegExpMatchesArray.h:
3175         (JSC::RegExpMatchesArray::createStructure):
3176         * runtime/RegExpObject.cpp:
3177         * runtime/RegExpObject.h:
3178         * runtime/RegExpPrototype.cpp:
3179         * runtime/RegExpPrototype.h:
3180         * runtime/StringConstructor.cpp:
3181         * runtime/StringConstructor.h:
3182         * runtime/StringObject.cpp:
3183         * runtime/StringObject.h:
3184         * runtime/StringPrototype.cpp:
3185         * runtime/StringPrototype.h:
3186
3187 2011-10-26  Alejandro G. Castro  <alex@igalia.com>
3188
3189         [GTK] [WK2] Add WebKit2 distcheck support
3190         https://bugs.webkit.org/show_bug.cgi?id=70933
3191
3192         Reviewed by Martin Robinson.
3193
3194         * GNUmakefile.list.am: Add MemoryStatistics.h to the sources list.
3195
3196 2011-10-26  Michael Saboff  <msaboff@apple.com>
3197
3198         Increase StringImpl Flag Bits for 8 bit Strings
3199         https://bugs.webkit.org/show_bug.cgi?id=70937
3200
3201         Increased the number of bits used for flags in StringImpl
3202         from 6 to 8 bits. This frees up 2 flag bits that will be
3203         used for 8-bit string support. Updated hash methods accordingly.
3204         Changed hash value masking from the low bits to the high
3205         bits.
3206
3207         Reviewed by Darin Adler.
3208
3209         * create_hash_table:
3210         * wtf/StringHasher.h:
3211         (WTF::StringHasher::hash):
3212         * wtf/text/StringImpl.h:
3213
3214 2011-10-26  Dan Bernstein  <mitz@apple.com>
3215
3216         Build fix.
3217
3218         Reverted r98488, which caused the scripts’ status messages to be included in the generated
3219         files.
3220
3221         * create_hash_table:
3222         * create_jit_stubs:
3223
3224 2011-10-26  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3225
3226         Don't print regular output to STDERR when generating hashtables and JIT stubs
3227
3228         Reviewed by Simon Hausmann.
3229
3230         * create_hash_table:
3231         * create_jit_stubs:
3232
3233 2011-10-25  Gavin Barraclough  <barraclough@apple.com>
3234
3235         Split DFGJITCodeGenerator::callOperation methods
3236         https://bugs.webkit.org/show_bug.cgi?id=70870
3237
3238         Reviewed by Filip Pizlo.
3239
3240         The DFGJITCodeGenerator currently contains two sets of callOperation methods.
3241         One set works with the JSVALUE64 value representation and passes arguments in
3242         registers (suitable for use on x86-64), and one set works with the JSVALUE32_64
3243         value representation and passes arguments in memory  (suitable for use on x86).
3244         By refactoring out the representation and calling convention specific aspects
3245         of the code we can also configure the DFG JIT to operator on platforms that use
3246         the JSVALUE32_64 value representation but pass arguments in registers.
3247
3248         On platforms supported by the JIT, the payload precedes the tag of a value in
3249         argument/result ordering, as such, in order to make the setupResults method
3250         generally applicable to return the results of a function that are returned in
3251         two registers, the ordering of arguments to this function has been reversed -
3252         as is the ordering of augments passed to setupArguments methods, with respect
3253         to the ordering with which they are passed in to callOperation.
3254         This inconsistency will be resolved in a later change when we combine the pairs
3255         of arguments passed into callOperation, such that the function signatures can
3256         be made consistent across the two value representations (the callOperation
3257         methods will be passed a reference to a struct representing the JSValue
3258         temporary, this will consist of two gprs on 32_64 and one on 64).
3259
3260         * dfg/DFGJITCodeGenerator.h:
3261         (JSC::DFG::resetCallArguments):
3262         (JSC::DFG::addCallArgument):
3263             - moved, removed tag,payload version of this method.
3264         (JSC::DFG::setupArguments):
3265         (JSC::DFG::setupArgumentsExecState):
3266         (JSC::DFG::setupArgumentsWithExecState):
3267             - Calling convention specific portion of callOperation refactored out into these methods.
3268         (JSC::DFG::callOperation):
3269             - updated these methods to use setupArguments* methods.
3270         (JSC::DFG::setupResults):
3271             - setupResults is now passed payload,tag.
3272         (JSC::DFG::appendCallWithExceptionCheckSetResult):
3273             - Added fpr versions of this function.
3274         (JSC::DFG::appendCallSetResult):
3275             - Added versions of this function without exception check.
3276         * dfg/DFGJITCodeGenerator32_64.cpp:
3277         (JSC::DFG::JITCodeGenerator::emitCall):
3278             - setupResults is now passed payload,tag.
3279
3280 2011-10-25  Mark Hahnenberg  <mhahnenberg@apple.com>
3281
3282         Remove deletePropertyVirtual
3283         https://bugs.webkit.org/show_bug.cgi?id=70738
3284
3285         Reviewed by Geoffrey Garen.
3286
3287         Removed all declarations and definitions of deletePropertyVirtual.
3288         Also replaced all call sites to deletePropertyVirtual with a 
3289         corresponding lookup in the MethodTable.
3290
3291         * API/JSCallbackObject.h:
3292         * API/JSCallbackObjectFunctions.h:
3293         (JSC::::deletePropertyByIndex):
3294         * API/JSObjectRef.cpp:
3295         (JSObjectDeleteProperty):
3296         * JavaScriptCore.exp:
3297         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3298         * debugger/DebuggerActivation.cpp:
3299         (JSC::DebuggerActivation::deleteProperty):
3300         * debugger/DebuggerActivation.h:
3301         * interpreter/Interpreter.cpp:
3302         (JSC::Interpreter::privateExecute):
3303         * jit/JITStubs.cpp:
3304         (JSC::DEFINE_STUB_FUNCTION):
3305         * runtime/Arguments.cpp:
3306         * runtime/Arguments.h:
3307         * runtime/ArrayPrototype.cpp:
3308         (JSC::arrayProtoFuncPop):
3309         (JSC::arrayProtoFuncReverse):
3310         (JSC::arrayProtoFuncShift):
3311         (JSC::arrayProtoFuncSplice):
3312         (JSC::arrayProtoFuncUnShift):
3313         * runtime/JSActivation.cpp:
3314         * runtime/JSActivation.h:
3315         * runtime/JSArray.cpp:
3316         (JSC::JSArray::deleteProperty):
3317         (JSC::JSArray::deletePropertyByIndex):
3318         * runtime/JSArray.h:
3319         * runtime/JSCell.cpp:
3320         (JSC::JSCell::deleteProperty):
3321         (JSC::JSCell::deletePropertyByIndex):
3322         * runtime/JSCell.h:
3323         * runtime/JSFunction.cpp:
3324         * runtime/JSFunction.h:
3325         * runtime/JSNotAnObject.cpp:
3326         * runtime/JSNotAnObject.h:
3327         * runtime/JSONObject.cpp:
3328         (JSC::Walker::walk):
3329         * runtime/JSObject.cpp:
3330         (JSC::JSObject::deletePropertyByIndex):
3331         (JSC::JSObject::defineOwnProperty):
3332         * runtime/JSObject.h:
3333         * runtime/JSVariableObject.cpp:
3334         * runtime/JSVariableObject.h:
3335         * runtime/RegExpMatchesArray.h:
3336         * runtime/StrictEvalActivation.cpp:
3337         * runtime/StrictEvalActivation.h:
3338         * runtime/StringObject.cpp:
3339         * runtime/StringObject.h:
3340
3341 2011-10-25  Mark Hahnenberg  <mhahnenberg@apple.com>
3342
3343         Remove putVirtual
3344         https://bugs.webkit.org/show_bug.cgi?id=70740
3345
3346         Reviewed by Geoffrey Garen.
3347
3348         Removed all declarations and definitions of putVirtual.
3349         Also replaced all call sites to putVirtual with a 
3350         corresponding lookup in the MethodTable.
3351
3352         * API/JSCallbackObject.h:
3353         * API/JSCallbackObjectFunctions.h:
3354         * API/JSObjectRef.cpp:
3355         (JSObjectSetProperty):
3356         (JSObjectSetPropertyAtIndex):
3357         * JavaScriptCore.exp:
3358         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3359         * debugger/DebuggerActivation.cpp:
3360         (JSC::DebuggerActivation::put):
3361         * debugger/DebuggerActivation.h:
3362         * dfg/DFGOperations.cpp:
3363         * interpreter/Interpreter.cpp:
3364         (JSC::Interpreter::execute):
3365         (JSC::Interpreter::privateExecute):
3366         * jsc.cpp:
3367         (GlobalObject::finishCreation):
3368         * runtime/Arguments.cpp:
3369         * runtime/Arguments.h:
3370         * runtime/ArrayPrototype.cpp:
3371         (JSC::putProperty):
3372         (JSC::arrayProtoFuncConcat):
3373         (JSC::arrayProtoFuncPush):
3374         (JSC::arrayProtoFuncReverse):
3375         (JSC::arrayProtoFuncShift):
3376         (JSC::arrayProtoFuncSlice):
3377         (JSC::arrayProtoFuncSort):
3378         (JSC::arrayProtoFuncSplice):
3379         (JSC::arrayProtoFuncUnShift):
3380         (JSC::arrayProtoFuncFilter):
3381         (JSC::arrayProtoFuncMap):
3382         * runtime/JSActivation.cpp:
3383         * runtime/JSActivation.h:
3384         * runtime/JSArray.cpp:
3385         (JSC::JSArray::putSlowCase):
3386         (JSC::JSArray::push):
3387         (JSC::JSArray::shiftCount):
3388         (JSC::JSArray::unshiftCount):
3389         * runtime/JSArray.h:
3390         * runtime/JSByteArray.cpp:
3391         * runtime/JSByteArray.h:
3392         * runtime/JSCell.cpp:
3393         (JSC::JSCell::put):
3394         (JSC::JSCell::putByIndex):
3395         * runtime/JSCell.h:
3396         * runtime/JSFunction.cpp:
3397         * runtime/JSFunction.h:
3398         * runtime/JSGlobalObject.cpp:
3399         * runtime/JSGlobalObject.h:
3400         * runtime/JSNotAnObject.cpp:
3401         * runtime/JSNotAnObject.h:
3402         * runtime/JSONObject.cpp:
3403         (JSC::Walker::walk):
3404         * runtime/JSObject.cpp:
3405         (JSC::JSObject::putByIndex):
3406         (JSC::JSObject::defineOwnProperty):
3407         * runtime/JSObject.h:
3408         (JSC::JSValue::put):
3409         * runtime/JSStaticScopeObject.cpp:
3410         * runtime/JSStaticScopeObject.h:
3411         * runtime/ObjectPrototype.cpp:
3412         * runtime/ObjectPrototype.h:
3413         * runtime/RegExpConstructor.cpp:
3414         * runtime/RegExpConstructor.h:
3415         * runtime/RegExpMatchesArray.h:
3416         * runtime/RegExpObject.cpp:
3417         * runtime/RegExpObject.h:
3418         * runtime/StringObject.cpp:
3419         * runtime/StringObject.h:
3420         * runtime/StringPrototype.cpp:
3421         (JSC::stringProtoFuncSplit):
3422
3423 2011-10-25  Gavin Barraclough  <barraclough@apple.com>
3424
3425         Separate out function linking & exception check data structures.
3426         https://bugs.webkit.org/show_bug.cgi?id=70858
3427
3428         Reviewed by Oliver Hunt.
3429
3430         This will make it easier to refactor the callOperation methods to spilt the value
3431         representation specific handling from the cpu/calling-convention implementation.
3432
3433         * dfg/DFGJITCodeGenerator.h:
3434         (JSC::DFG::appendCallWithExceptionCheck):
3435         * dfg/DFGJITCodeGenerator32_64.cpp:
3436         (JSC::DFG::JITCodeGenerator::emitCall):
3437         * dfg/DFGJITCodeGenerator64.cpp:
3438         (JSC::DFG::JITCodeGenerator::emitCall):
3439         * dfg/DFGJITCompiler.cpp:
3440         (JSC::DFG::JITCompiler::compileBody):
3441         (JSC::DFG::JITCompiler::link):
3442         * dfg/DFGJITCompiler.h:
3443         (JSC::DFG::CallLinkRecord::CallLinkRecord):
3444         (JSC::DFG::CallExceptionRecord::CallExceptionRecord):
3445         (JSC::DFG::JITCompiler::JITCompiler):
3446         (JSC::DFG::JITCompiler::notifyCall):
3447         (JSC::DFG::JITCompiler::appendCall):
3448         (JSC::DFG::JITCompiler::addExceptionCheck):
3449         (JSC::DFG::JITCompiler::addFastExceptionCheck):
3450         * dfg/DFGJITCompiler32_64.cpp:
3451         (JSC::DFG::JITCompiler::compileBody):
3452         (JSC::DFG::JITCompiler::link):
3453
3454 2011-10-25  Filip Pizlo  <fpizlo@apple.com>
3455