7d42876be27168105f8171311fd29352607ee25d
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2009-05-12  Kevin Ollivier  <kevino@theolliviers.com>
2
3         wx build fix. Add ParserArena.cpp to the build.
4
5         * JavaScriptCoreSources.bkl:
6
7 2009-05-12  Oliver Hunt  <oliver@apple.com>
8
9         Reviewed by Geoff Garen.
10
11         Unsigned underflow on 64bit cannot be treated as a negative number
12
13         This code included some placeswhere we deliberately create negative offsets
14         from unsigned values, on 32bit this is "safe", but in 64bit builds much
15         badness occurs. Solution is to use signed types as nature intended.
16
17         * jit/JITStubs.cpp:
18         (JSC::JITStubs::cti_op_load_varargs):
19
20 2009-05-12  Jan Michael Alonzo  <jmalonzo@webkit.org>
21
22         Reviewed by Holger Freyther.
23
24         [Gtk] Various autotools build refactoring and fixes
25         https://bugs.webkit.org/show_bug.cgi?id=25286
26
27         Define WTF_USE_JSC for the Gtk port.
28
29         * wtf/Platform.h:
30
31 2009-05-12  Maciej Stachowiak  <mjs@apple.com>
32
33         Reviewed by Oliver Hunt.
34         
35         - allow all of strictEqual to be inlined into cti_op_stricteq once again
36         
37         We had this optimization once but accidentally lost it at some point.
38
39         * runtime/Operations.h:
40         (JSC::JSValue::strictEqualSlowCaseInline):
41         (JSC::JSValue::strictEqual):
42
43 2009-05-12  Gavin Barraclough  <barraclough@apple.com>
44
45         Reviewed by Oliver Hunt.
46
47         instanceof should throw if the constructor being tested does not implement
48         'HasInstance" (i.e. is a function).  Instead we were returning false.
49
50         * interpreter/Interpreter.cpp:
51         (JSC::isInvalidParamForIn):
52         (JSC::isInvalidParamForInstanceOf):
53         (JSC::Interpreter::privateExecute):
54         * jit/JITStubs.cpp:
55         (JSC::JITStubs::cti_op_instanceof):
56         * tests/mozilla/ecma_2/instanceof/instanceof-003.js:
57             Fix broken test case.
58         * tests/mozilla/ecma_2/instanceof/regress-7635.js:
59             Remove broken test case (was an exact duplicate of a test in instanceof-003.js).
60
61 2009-05-12  Oliver Hunt  <oliver@apple.com>
62
63         Reviewed by Gavin Barraclough.
64
65         Improve function call forwarding performance
66
67         Make creation of the Arguments object occur lazily, so it
68         is not necessarily created for every function that references
69         it.  Then add logic to Function.apply to allow it to avoid
70         allocating the Arguments object at all.  Helps a lot with
71         the function forwarding/binding logic in jQuery, Prototype,
72         and numerous other JS libraries.
73
74         * bytecode/CodeBlock.cpp:
75         (JSC::CodeBlock::dump):
76         * bytecode/Opcode.h:
77         * bytecompiler/BytecodeGenerator.cpp:
78         (JSC::BytecodeGenerator::BytecodeGenerator):
79         (JSC::BytecodeGenerator::registerFor):
80         (JSC::BytecodeGenerator::willResolveToArguments):
81         (JSC::BytecodeGenerator::uncheckedRegisterForArguments):
82         (JSC::BytecodeGenerator::createArgumentsIfNecessary):
83         (JSC::BytecodeGenerator::emitCallEval):
84         (JSC::BytecodeGenerator::emitPushScope):
85         * bytecompiler/BytecodeGenerator.h:
86         * interpreter/Interpreter.cpp:
87         (JSC::Interpreter::privateExecute):
88         (JSC::Interpreter::retrieveArguments):
89         * jit/JIT.cpp:
90         (JSC::JIT::privateCompileMainPass):
91         * jit/JIT.h:
92         * jit/JITOpcodes.cpp:
93         (JSC::JIT::emit_op_create_arguments):
94         (JSC::JIT::emit_op_init_arguments):
95         * jit/JITStubs.cpp:
96         (JSC::JITStubs::cti_op_tear_off_arguments):
97         (JSC::JITStubs::cti_op_load_varargs):
98         * parser/Nodes.cpp:
99         (JSC::ApplyFunctionCallDotNode::emitBytecode):
100
101 2009-05-11  Gavin Barraclough  <barraclough@apple.com>
102
103         Reviewed by Oliver Hunt.
104
105         Enable use of SamplingFlags directly from JIT code.
106
107         * bytecode/SamplingTool.h:
108         * jit/JIT.h:
109         (JSC::JIT::sampleCodeBlock):
110         (JSC::JIT::sampleInstruction):
111         * jit/JITInlineMethods.h:
112         (JSC::JIT::setSamplingFlag):
113         (JSC::JIT::clearSamplingFlag):
114
115 2009-05-11  Gavin Barraclough  <barraclough@apple.com>
116
117         Reviewed by Cameron Zwarich.
118
119         Implement JIT generation for instanceof for non-objects (always returns false).
120         Also fixes the sequencing of the prototype and value isObject checks, to no match the spec.
121
122         0.5% progression on v8 tests overall, due to 3.5% on early-boyer.
123
124         * jit/JIT.cpp:
125         (JSC::JIT::privateCompileMainPass):
126         (JSC::JIT::privateCompileSlowCases):
127         * runtime/JSObject.cpp:
128         (JSC::JSObject::hasInstance):
129         * runtime/TypeInfo.h:
130         (JSC::TypeInfo::TypeInfo):
131
132 2009-05-11  Geoffrey Garen  <ggaren@apple.com>
133
134         Reviewed by Sam Weinig.
135         
136         A little more JIT refactoring.
137         
138         Rearranged code to more clearly indicate what's conditionally compiled
139         and why. Now, all shared code is at the top of our JIT files, and all
140         #if'd code is at the bottom. #if'd code is delineated by large comments.
141         
142         Moved functions that relate to the JIT but don't explicitly do codegen
143         into JIT.cpp. Refactored SSE2 check to store its result as a data member
144         in the JIT.
145
146         * jit/JIT.cpp:
147         (JSC::isSSE2Present):
148         (JSC::JIT::JIT):
149         (JSC::JIT::unlinkCall):
150         (JSC::JIT::linkCall):
151         * jit/JIT.h:
152         (JSC::JIT::isSSE2Present):
153         * jit/JITArithmetic.cpp:
154         (JSC::JIT::emit_op_mod):
155         (JSC::JIT::emitSlow_op_mod):
156         * jit/JITCall.cpp:
157         (JSC::JIT::compileOpCallVarargs):
158         (JSC::JIT::compileOpCallVarargsSlowCase):
159
160 2009-05-11  Holger Hans Peter Freyther  <zecke@selfish.org>
161
162         Build fix.
163
164         * JavaScriptCore.pri: Build the new JITOpcodes.cpp
165
166 2009-05-11  Sam Weinig  <sam@webkit.org>
167
168         Reviewed by Geoffrey Garen.
169
170         More re-factoring of JIT code generation.  Use a macro to
171         forward the main switch-statement cases to the helper functions.
172
173         * jit/JIT.cpp:
174         (JSC::JIT::privateCompileMainPass):
175         (JSC::JIT::privateCompileSlowCases):
176
177 2009-05-11  Sam Weinig  <sam@webkit.org>
178
179         Reviewed by Geoffrey Garen.
180
181         More re-factoring of JIT code generation to move opcode generation
182         to helper functions outside the main switch-statement and gave those
183         helper functions standardized names. This patch covers the remaining
184         slow cases.
185
186         * jit/JIT.cpp:
187         * jit/JIT.h:
188         * jit/JITOpcodes.cpp:
189
190 2009-05-11  Geoffrey Garen  <ggaren@apple.com>
191
192         Build fix.
193
194         * GNUmakefile.am: Added JITOpcodes.cpp and JITStubCall.h to the project.
195
196 2009-05-11  Geoffrey Garen  <ggaren@apple.com>
197
198         Build fix.
199
200         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added
201         JITOpcodes.cpp and JITStubCall.h to the project.
202
203 2009-05-11  Geoffrey Garen  <ggaren@apple.com>
204
205         Reviewed by Sam Weinig.
206         
207         Some JIT refactoring.
208         
209         Moved JITStubCall* into its own header.
210         
211         Modified JITStubCall to ASSERT that its return value is handled correctly.
212         Also, replaced function template with explicit instantiations to resolve
213         some confusion.
214         
215         Replaced all uses of emit{Get,Put}CTIArgument with explicit peeks, pokes,
216         and calls to killLastResultRegister().
217
218         * JavaScriptCore.xcodeproj/project.pbxproj:
219         * jit/JIT.cpp:
220         (JSC::JIT::privateCompileMainPass):
221         (JSC::JIT::privateCompile):
222         * jit/JIT.h:
223         * jit/JITArithmetic.cpp:
224         * jit/JITCall.cpp:
225         * jit/JITInlineMethods.h:
226         (JSC::JIT::restoreArgumentReference):
227         * jit/JITPropertyAccess.cpp:
228         * jit/JITStubCall.h: Copied from jit/JIT.h.
229         (JSC::JITStubCall::JITStubCall):
230         (JSC::JITStubCall::addArgument):
231         (JSC::JITStubCall::call):
232         (JSC::JITStubCall::):
233
234 2009-05-11  Sam Weinig  <sam@webkit.org>
235
236         Reviewed by Geoffrey Garen.
237
238         Start re-factoring JIT code generation to move opcode generation
239         to helper functions outside the main switch-statement and gave those
240         helper functions standardized names.  This patch only covers the main
241         pass and all the arithmetic opcodes in the slow path.
242
243         * JavaScriptCore.xcodeproj/project.pbxproj:
244         * jit/JIT.cpp:
245         (JSC::JIT::privateCompileMainPass):
246         (JSC::JIT::privateCompileSlowCases):
247         * jit/JIT.h:
248         * jit/JITArithmetic.cpp:
249         * jit/JITOpcodes.cpp: Copied from jit/JIT.cpp.
250         * jit/JITPropertyAccess.cpp:
251
252 2009-05-11  Steve Falkenburg  <sfalken@apple.com>
253
254         Re-add experimental PGO configs.
255         
256         Reviewed by Adam Roben.
257
258         * JavaScriptCore.vcproj/JavaScriptCore.make:
259         * JavaScriptCore.vcproj/JavaScriptCore.sln:
260         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
261         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
262         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
263
264 2009-05-11  Sam Weinig  <sam@webkit.org>
265
266         Reviewed by Geoffrey "1" Garen.
267
268         Rip out the !USE(CTI_REPATCH_PIC) code.  It was untested and unused.
269
270         * jit/JIT.h:
271         (JSC::JIT::compileGetByIdChainList):
272         (JSC::JIT::compileGetByIdChain):
273         (JSC::JIT::compileCTIMachineTrampolines):
274         * jit/JITPropertyAccess.cpp:
275         (JSC::JIT::privateCompileGetByIdProto):
276         (JSC::JIT::privateCompileGetByIdChainList):
277         (JSC::JIT::privateCompileGetByIdChain):
278         * jit/JITStubs.cpp:
279         (JSC::JITStubs::tryCachePutByID):
280         (JSC::JITStubs::tryCacheGetByID):
281
282 2009-05-11  Dmitry Titov  <dimich@chromium.org>
283
284         GTK build fix - the deprecated waitForThreadCompletion is not needed on GTK.
285
286         * wtf/ThreadingPthreads.cpp: used #ifdef PLATFORM(DARWIN) around waitForThreadCompletion().
287
288 2009-05-11  Adam Roben  <aroben@apple.com>
289
290         Build fix for newer versions of GCC
291
292         * wtf/ThreadingPthreads.cpp: Added a declaration of
293         waitForThreadCompletion before its definition to silence a warning.
294
295 2009-05-11  Dmitry Titov  <dimich@chromium.org>
296
297         Reviewed by Alexey Proskuryakov and Adam Roben.
298
299         https://bugs.webkit.org/show_bug.cgi?id=25348
300         Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap.
301
302         * wtf/Threading.h:
303         (WTF::ThreadIdentifier::ThreadIdentifier):
304         (WTF::ThreadIdentifier::isValid):
305         (WTF::ThreadIdentifier::invalidate):
306         (WTF::ThreadIdentifier::platformId):
307         ThreadIdentifier is now a class, containing a PlatformThreadIdentifier and
308         methods that are used across the code on thread ids: construction, comparisons,
309         check for 'valid' state etc. '0' is used as invalid id, which happens to just work
310         with all platform-specific thread id implementations.
311
312         All the following files repeatedly reflect the new ThreadIdentifier for each platform.
313         We remove ThreadMap and threadMapMutex from all of them, remove the functions that
314         populated/searched/cleared the map and add platform-specific comparison operators
315         for ThreadIdentifier.
316
317         There are specific temporary workarounds for Safari 4 beta on OSX and Win32 since the
318         public build uses WTF threading functions with old type of ThreadingIdentifier.
319         The next time Safari 4 is rebuilt, it will 'automatically' pick up the new type and new
320         functions so the deprecated ones can be removed.
321
322         * wtf/gtk/ThreadingGtk.cpp:
323         (WTF::ThreadIdentifier::operator==):
324         (WTF::ThreadIdentifier::operator!=):
325         (WTF::initializeThreading):
326         (WTF::createThreadInternal):
327         (WTF::waitForThreadCompletion):
328         (WTF::currentThread):
329
330         * wtf/ThreadingNone.cpp:
331         (WTF::ThreadIdentifier::operator==):
332         (WTF::ThreadIdentifier::operator!=):
333
334         * wtf/ThreadingPthreads.cpp:
335         (WTF::ThreadIdentifier::operator==):
336         (WTF::ThreadIdentifier::operator!=):
337         (WTF::initializeThreading):
338         (WTF::createThreadInternal):
339         (WTF::waitForThreadCompletion):
340         (WTF::detachThread):
341         (WTF::currentThread):
342         (WTF::waitForThreadCompletion): This is a workaround for Safari 4 beta on Mac.
343         Safari 4 is linked against old definition of ThreadIdentifier so it treats it as uint32_t.
344         This 'old' variant of waitForThreadCompletion takes uint32_t and has the old decorated name, so Safari can
345         load it from JavaScriptCore library. The other functions (CurrentThread() etc) happen to match their previous
346         decorated names and, while they return pthread_t now, it is a pointer which round-trips through a uint32_t.
347         This function will be removed as soon as Safari 4 will release next public build.
348
349         * wtf/qt/ThreadingQt.cpp:
350         (WTF::ThreadIdentifier::operator==):
351         (WTF::ThreadIdentifier::operator!=):
352         (WTF::initializeThreading):
353         (WTF::createThreadInternal):
354         (WTF::waitForThreadCompletion):
355         (WTF::currentThread):
356
357         * wtf/ThreadingWin.cpp:
358         (WTF::ThreadIdentifier::operator==):
359         (WTF::ThreadIdentifier::operator!=):
360         (WTF::initializeThreading):
361         (WTF::createThreadInternal): All the platforms (except Windows) used a sequential
362         counter as a thread ID and mapped it into platform ID. Windows was using native thread
363         id and mapped it into thread handle. Since we can always obtain a thread handle
364         by thread id, createThread now closes the handle.
365         (WTF::waitForThreadCompletion): obtains another one using OpenThread(id) API. If can not obtain a handle,
366         it means the thread already exited.
367         (WTF::detachThread):
368         (WTF::currentThread):
369         (WTF::detachThreadDeprecated): old function, renamed (for Win Safari 4 beta which uses it for now).
370         (WTF::waitForThreadCompletionDeprecated): same.
371         (WTF::currentThreadDeprecated): same.
372         (WTF::createThreadDeprecated): same.
373
374         * bytecode/SamplingTool.h:
375         * bytecode/SamplingTool.cpp: Use DEFINE_STATIC_LOCAL for a static ThreadIdentifier variable, to avoid static constructor.
376
377         * JavaScriptCore.exp: export lists - updated decorated names of the WTF threading functions
378         since they now take a different type as a parameter.
379         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: ditto for Windows, plus added "deprecated" functions
380         that take old parameter type - turns out public beta of Safari 4 uses those, so they need to be kept along for a while.
381         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: ditto.
382
383 2009-05-11  Darin Adler  <darin@apple.com>
384
385         Reviewed by Oliver Hunt.
386
387         Bug 25560: REGRESSION (r34821): "string value".__proto__ gets the wrong object.
388         https://bugs.webkit.org/show_bug.cgi?id=25560
389         rdar://problem/6861069
390
391         I missed this case back a year ago when I sped up handling
392         of JavaScript wrappers. Easy to fix.
393
394         * runtime/JSObject.h:
395         (JSC::JSValue::get): Return the prototype itself if the property name
396         is __proto__.
397         * runtime/JSString.cpp:
398         (JSC::JSString::getOwnPropertySlot): Ditto.
399
400 2009-05-09  Oliver Hunt  <oliver@apple.com>
401
402         Reviewed by Maciej Stachowiak.
403
404         Rename emitGetFromCallFrameHeader to emitGetFromCallFrameHeaderPtr
405
406         * jit/JIT.cpp:
407         (JSC::JIT::privateCompileMainPass):
408         (JSC::JIT::privateCompileCTIMachineTrampolines):
409         * jit/JIT.h:
410         * jit/JITInlineMethods.h:
411         (JSC::JIT::emitGetFromCallFrameHeaderPtr):
412         (JSC::JIT::emitGetFromCallFrameHeader32):
413
414 2009-05-11  Holger Hans Peter Freyther  <zecke@selfish.org>
415
416         Unreviewed build fix. Build ParserAreana.cpp for Qt
417
418         * JavaScriptCore.pri:
419
420 2009-05-11  Norbert Leser  <norbert.leser@nokia.com>
421
422         Reviewed by Darin Adler.
423
424         https://bugs.webkit.org/show_bug.cgi?id=24536
425
426         Symbian compilers cannot resolve WTF::PassRefPtr<JSC::Profile>
427         unless Profile.h is included.
428
429         * profiler/ProfileGenerator.h:
430
431 2009-05-11  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
432
433         Reviewed by Holger Freyther.
434
435         https://bugs.webkit.org/show_bug.cgi?id=24284
436
437         * JavaScriptCore.pri: coding style modified
438         * jsc.pro: duplicated values removed from INCLUDEPATH, DEFINES
439
440 2009-05-11  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
441
442         Reviewed by NOBODY (build fix).
443
444         Also add ParserArena, in addition to AllInOne, for release builds,
445         since adding it to AllInOne breaks Mac.
446
447         * GNUmakefile.am:
448
449 2009-05-11  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
450
451         Unreviewed build fix. Adding ParserArena to the autotools build.
452
453         * GNUmakefile.am:
454
455 2009-05-11  Adam Roben  <aroben@apple.com>
456
457         More Windows build fixes after r43479
458
459         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
460         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
461         Export ParserArena::reset.
462
463 2009-05-11  Adam Roben  <aroben@apple.com>
464
465         Windows build fixes after r43479
466
467         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added
468         ParserArena to the project.
469
470         * parser/NodeConstructors.h: Added a missing include.
471         (JSC::ParserArenaDeletable::operator new): Marked these as inline.
472
473 2009-05-10  Maciej Stachowiak  <mjs@apple.com>
474
475         Reviewed by Geoff Garen.
476         
477         - fixed REGRESSION(r43432): Many JavaScriptCore tests crash in 64-bit
478         https://bugs.webkit.org/show_bug.cgi?id=25680
479
480         Accound for the 64-bit instruction prefix when rewriting mov to lea on 64-bit.
481         
482         * jit/JIT.h:
483         * jit/JITPropertyAccess.cpp:
484         (JSC::JIT::patchGetByIdSelf):
485         (JSC::JIT::patchPutByIdReplace):
486
487 2009-05-10  Darin Adler  <darin@apple.com>
488
489         Reviewed by Cameron Zwarich.
490
491         Bug 25674: syntax tree nodes should use arena allocation
492         https://bugs.webkit.org/show_bug.cgi?id=25674
493
494         Part two: Remove reference counting from most nodes.
495
496         * JavaScriptCore.exp: Updated.
497
498         * JavaScriptCore.xcodeproj/project.pbxproj: Added ParserArena.h and .cpp.
499
500         * parser/Grammar.y: Replaced uses of ParserRefCountedData with uses of
501         ParserArenaData. Took out now-nonfunctional code that tries to manually
502         release declaration list. Changed the new calls that create FuncDeclNode
503         and FuncExprNode so that they use the proper version of operator new for
504         the reference-counted idiom, not the deletion idiom.
505
506         * parser/NodeConstructors.h:
507         (JSC::ParserArenaDeletable::operator new): Added.
508         (JSC::ParserArenaRefCounted::ParserArenaRefCounted): Added.
509         (JSC::Node::Node): Removed ParserRefCounted initializer.
510         (JSC::ElementNode::ElementNode): Ditto.
511         (JSC::PropertyNode::PropertyNode): Ditto.
512         (JSC::ArgumentsNode::ArgumentsNode): Ditto.
513         (JSC::SourceElements::SourceElements): Ditto.
514         (JSC::ParameterNode::ParameterNode): Ditto.
515         (JSC::FuncExprNode::FuncExprNode): Added ParserArenaRefCounted initializer.
516         (JSC::FuncDeclNode::FuncDeclNode): Ditto.
517         (JSC::CaseClauseNode::CaseClauseNode): Removed ParserRefCounted initializer.
518         (JSC::ClauseListNode::ClauseListNode): Ditto.
519         (JSC::CaseBlockNode::CaseBlockNode): Ditto.
520
521         * parser/NodeInfo.h: Replaced uses of ParserRefCountedData with uses of
522         ParserArenaData.
523
524         * parser/Nodes.cpp:
525         (JSC::ScopeNode::ScopeNode): Added ParserArenaRefCounted initializer.
526         (JSC::ProgramNode::create): Use the proper version of operator new for
527         the reference-counted idiom, not the deletion idiom. Use the arena
528         contains function instead of the vecctor find function.
529         (JSC::EvalNode::create): Use the proper version of operator new for
530         the reference-counted idiom, not the deletion idiom. Use the arena
531         reset function instead of the vector shrink function.
532         (JSC::FunctionBodyNode::createNativeThunk): Use the proper version
533         of operator new for the reference-counted idiom, not the deletion idiom.
534         (JSC::FunctionBodyNode::create): More of the same.
535
536         * parser/Nodes.h: Added ParserArenaDeletable and ParserArenaRefCounted
537         to replace ParserRefCounted. Fixed inheritance so only the classes that
538         need reference counting inherit from ParserArenaRefCounted.
539
540         * parser/Parser.cpp:
541         (JSC::Parser::parse): Set m_sourceElements to 0 since it now starts
542         uninitialized. Just set it to 0 again in the failure case, since it's
543         now just a raw pointer, not an owning one.
544         (JSC::Parser::reparseInPlace): Removed now-unneeded get() function.
545         (JSC::Parser::didFinishParsing): Replaced uses of ParserRefCountedData
546         with uses of ParserArenaData.
547
548         * parser/Parser.h: Less RefPtr, more arena.
549
550         * parser/ParserArena.cpp: Added.
551         * parser/ParserArena.h: Added.
552
553         * runtime/JSGlobalData.cpp:
554         (JSC::JSGlobalData::~JSGlobalData): Removed arena-related code, since it's
555         now in the Parser.
556         (JSC::JSGlobalData::createLeaked): Removed unneeded #ifndef.
557         (JSC::JSGlobalData::createNativeThunk): Tweaked #if a bit.
558
559         * runtime/JSGlobalData.h: Removed parserArena, which is now in Parser.
560
561         * wtf/RefCounted.h: Added deletionHasBegun function, for use in
562         assertions to catch deletion not done by the deref function.
563
564 2009-05-10  David Kilzer  <ddkilzer@apple.com>
565
566         Part 2: Try to fix the Windows build by adding a symbol which is really just a re-mangling of a changed method signature
567
568         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
569         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
570
571 2009-05-10  David Kilzer  <ddkilzer@apple.com>
572
573         Try to fix the Windows build by removing an unknown symbol
574
575         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
576         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
577
578 2009-05-10  David Kilzer  <ddkilzer@apple.com>
579
580         Touch Nodes.cpp to try to fix Windows build
581
582         * parser/Nodes.cpp: Removed whitespace.
583
584 2009-05-10  Darin Adler  <darin@apple.com>
585
586         Reviewed by Maciej Stachowiak.
587
588         Quick fix for failures seen on buildbot. Maciej plans a better fix later.
589
590         * wtf/dtoa.cpp: Change the hardcoded number of 32-bit words in a BigInt
591         from 32 to 64. Parsing "1e500", for example, requires more than 32 words.
592
593 2009-05-10  Darin Adler  <darin@apple.com>
594
595         Reviewed by Sam Weinig.
596
597         Bug 25674: syntax tree nodes should use arena allocation
598         Part one: Change lifetimes so we won't have to use reference
599         counting so much, but don't eliminate the reference counts
600         entirely yet.
601
602         * JavaScriptCore.exp: Updated.
603
604         * bytecompiler/BytecodeGenerator.cpp:
605         (JSC::BytecodeGenerator::BytecodeGenerator): Update for use of raw pointers
606         instead of RefPtr.
607         (JSC::BytecodeGenerator::emitCall): Ditto.
608         (JSC::BytecodeGenerator::emitConstruct): Ditto.
609
610         * parser/Grammar.y: Update node creating code to use new (JSGlobalData*)
611         instead of the plain new. At the moment this is just a hook for future
612         arena allocation; it's inline and JSGlobalData* is not used.
613
614         * parser/NodeConstructors.h: Updated for name change of parserObjects to
615         parserArena. Also added explicit initialization for raw pointers that used
616         to be RefPtr. Also removed some uses of get() that aren't needed now that
617         the pointers are raw pointers. Also eliminated m_parameter from FuncExprNode
618         and FuncDeclNode. Also changed node-creating code to use new (JSGlobalData*)
619         as above.
620
621         * parser/Nodes.cpp: Eliminated NodeReleaser and all use of it.
622         (JSC::ParserRefCounted::ParserRefCounted): Updated for name change of
623         parserObjects to parserArena.
624         (JSC::SourceElements::append): Use raw pointers.
625         (JSC::ArrayNode::emitBytecode): Ditto.
626         (JSC::ArrayNode::isSimpleArray): Ditto.
627         (JSC::ArrayNode::toArgumentList): Ditto.
628         (JSC::ObjectLiteralNode::emitBytecode): Ditto.
629         (JSC::PropertyListNode::emitBytecode): Ditto.
630         (JSC::BracketAccessorNode::emitBytecode): Ditto.
631         (JSC::DotAccessorNode::emitBytecode): Ditto.
632         (JSC::ArgumentListNode::emitBytecode): Ditto.
633         (JSC::NewExprNode::emitBytecode): Ditto.
634         (JSC::EvalFunctionCallNode::emitBytecode): Ditto.
635         (JSC::FunctionCallValueNode::emitBytecode): Ditto.
636         (JSC::FunctionCallResolveNode::emitBytecode): Ditto.
637         (JSC::FunctionCallBracketNode::emitBytecode): Ditto.
638         (JSC::FunctionCallDotNode::emitBytecode): Ditto.
639         (JSC::CallFunctionCallDotNode::emitBytecode): Ditto.
640         (JSC::ApplyFunctionCallDotNode::emitBytecode): Ditto.
641         (JSC::PostfixBracketNode::emitBytecode): Ditto.
642         (JSC::PostfixDotNode::emitBytecode): Ditto.
643         (JSC::DeleteBracketNode::emitBytecode): Ditto.
644         (JSC::DeleteDotNode::emitBytecode): Ditto.
645         (JSC::DeleteValueNode::emitBytecode): Ditto.
646         (JSC::VoidNode::emitBytecode): Ditto.
647         (JSC::TypeOfValueNode::emitBytecode): Ditto.
648         (JSC::PrefixBracketNode::emitBytecode): Ditto.
649         (JSC::PrefixDotNode::emitBytecode): Ditto.
650         (JSC::UnaryOpNode::emitBytecode): Ditto.
651         (JSC::BinaryOpNode::emitStrcat): Ditto.
652         (JSC::BinaryOpNode::emitBytecode): Ditto.
653         (JSC::EqualNode::emitBytecode): Ditto.
654         (JSC::StrictEqualNode::emitBytecode): Ditto.
655         (JSC::ReverseBinaryOpNode::emitBytecode): Ditto.
656         (JSC::ThrowableBinaryOpNode::emitBytecode): Ditto.
657         (JSC::InstanceOfNode::emitBytecode): Ditto.
658         (JSC::LogicalOpNode::emitBytecode): Ditto.
659         (JSC::ConditionalNode::emitBytecode): Ditto.
660         (JSC::ReadModifyResolveNode::emitBytecode): Ditto.
661         (JSC::AssignResolveNode::emitBytecode): Ditto.
662         (JSC::AssignDotNode::emitBytecode): Ditto.
663         (JSC::ReadModifyDotNode::emitBytecode): Ditto.
664         (JSC::AssignBracketNode::emitBytecode): Ditto.
665         (JSC::ReadModifyBracketNode::emitBytecode): Ditto.
666         (JSC::CommaNode::emitBytecode): Ditto.
667         (JSC::ConstDeclNode::emitCodeSingle): Ditto.
668         (JSC::ConstDeclNode::emitBytecode): Ditto.
669         (JSC::ConstStatementNode::emitBytecode): Ditto.
670         (JSC::statementListEmitCode): Ditto.
671         (JSC::BlockNode::emitBytecode): Ditto.
672         (JSC::ExprStatementNode::emitBytecode): Ditto.
673         (JSC::VarStatementNode::emitBytecode): Ditto.
674         (JSC::IfNode::emitBytecode): Ditto.
675         (JSC::IfElseNode::emitBytecode): Ditto.
676         (JSC::DoWhileNode::emitBytecode): Ditto.
677         (JSC::WhileNode::emitBytecode): Ditto.
678         (JSC::ForNode::emitBytecode): Ditto.
679         (JSC::ForInNode::emitBytecode): Ditto.
680         (JSC::ReturnNode::emitBytecode): Ditto.
681         (JSC::WithNode::emitBytecode): Ditto.
682         (JSC::CaseBlockNode::tryOptimizedSwitch): Ditto.
683         (JSC::CaseBlockNode::emitBytecodeForBlock): Ditto.
684         (JSC::SwitchNode::emitBytecode): Ditto.
685         (JSC::LabelNode::emitBytecode): Ditto.
686         (JSC::ThrowNode::emitBytecode): Ditto.
687         (JSC::TryNode::emitBytecode): Ditto.
688         (JSC::ScopeNodeData::ScopeNodeData): Use swap to transfer ownership
689         of the arena, varStack and functionStack.
690         (JSC::ScopeNode::ScopeNode): Pass in the arena when creating the
691         ScopeNodeData.
692         (JSC::ProgramNode::ProgramNode): Made this inline since it's used
693         in only one place.
694         (JSC::ProgramNode::create): Changed this to return a PassRefPtr since
695         we plan to have the scope nodes be outside the arena, so they will need
696         some kind of ownership transfer (maybe auto_ptr instead of PassRefPtr
697         in the future, though). Remove the node from the newly-created arena to
698         avoid a circular reference. Later we'll keep the node out of the arena
699         by using a different operator new, but for now it's the ParserRefCounted
700         constructor that puts the node into the arena, and there's no way to
701         bypass that.
702         (JSC::EvalNode::EvalNode): Ditto.
703         (JSC::EvalNode::create): Ditto.
704         (JSC::FunctionBodyNode::FunctionBodyNode): Ditto.
705         (JSC::FunctionBodyNode::createNativeThunk): Moved the code that
706         reseets the arena here instead of the caller.
707         (JSC::FunctionBodyNode::create): Same change as the other create
708         functions above.
709         (JSC::FunctionBodyNode::emitBytecode): Use raw pointers.
710
711         * parser/Nodes.h: Removed NodeReleaser. Changed FunctionStack to
712         use raw pointers. Removed the releaseNodes function. Added an override
713         of operator new that takes a JSGlobalData* to prepare for future arena use.
714         Use raw pointers instead of RefPtr everywhere possible.
715
716         * parser/Parser.cpp:
717         (JSC::Parser::reparseInPlace): Pass the arena in.
718
719         * parser/Parser.h:
720         (JSC::Parser::parse): Updated for name change of parserObjects to parserArena.
721         (JSC::Parser::reparse): Ditto.
722         * runtime/FunctionConstructor.cpp:
723         (JSC::extractFunctionBody): Ditto.
724         * runtime/JSGlobalData.cpp:
725         (JSC::JSGlobalData::~JSGlobalData): Ditto.
726         (JSC::JSGlobalData::createNativeThunk): Moved arena manipulation into the
727         FunctionBodyNode::createNativeThunk function.
728
729         * runtime/JSGlobalData.h: Tweaked formatting and renamed parserObjects to
730         parserArena.
731
732         * wtf/NotFound.h: Added the usual "using WTF" to this header to match the
733         rest of WTF.
734
735 2009-05-10  Dimitri Glazkov  <dglazkov@chromium.org>
736
737         Reviewed by Geoffrey Garen.
738
739         https://bugs.webkit.org/show_bug.cgi?id=25670
740         Remove no longer valid chunk of code from dtoa.
741
742         * wtf/dtoa.cpp:
743         (WTF::dtoa): Removed invalid code.
744
745 2009-05-10  Alexey Proskuryakov  <ap@webkit.org>
746
747         Reviewed by Geoff Garen.
748
749         "Class const *" is the same as "const Class*", use the latter syntax consistently.
750
751         See <http://www.parashift.com/c++-faq-lite/const-correctness.html#faq-18.9>.
752
753         * pcre/pcre_compile.cpp:
754         (calculateCompiledPatternLength):
755         * runtime/JSObject.h:
756         (JSC::JSObject::offsetForLocation):
757         (JSC::JSObject::locationForOffset):
758
759 2009-05-10  Maciej Stachowiak  <mjs@apple.com>
760
761         Reviewed by Alexey Proskuryakov.
762         
763         - speedup dtoa/strtod
764         
765         Added a bunch of inlining, and replaced malloc with stack allocation.
766         
767         0.5% SunSpider speedup (7% on string-tagcloud).
768
769         * runtime/NumberPrototype.cpp:
770         (JSC::integerPartNoExp):
771         (JSC::numberProtoFuncToExponential):
772         * runtime/UString.cpp:
773         (JSC::concatenate):
774         (JSC::UString::from):
775         * wtf/dtoa.cpp:
776         (WTF::BigInt::BigInt):
777         (WTF::BigInt::operator=):
778         (WTF::Balloc):
779         (WTF::Bfree):
780         (WTF::multadd):
781         (WTF::s2b):
782         (WTF::i2b):
783         (WTF::mult):
784         (WTF::pow5mult):
785         (WTF::lshift):
786         (WTF::cmp):
787         (WTF::diff):
788         (WTF::b2d):
789         (WTF::d2b):
790         (WTF::ratio):
791         (WTF::strtod):
792         (WTF::quorem):
793         (WTF::freedtoa):
794         (WTF::dtoa):
795         * wtf/dtoa.h:
796
797 2009-05-09  Mike Hommey  <glandium@debian.org>
798
799         Reviewed by Geoffrey Garen. Landed by Jan Alonzo.
800
801         Enable JIT on x86-64 gtk+
802         https://bugs.webkit.org/show_bug.cgi?id=24724
803
804         * GNUmakefile.am:
805
806 2009-05-09  Geoffrey Garen  <ggaren@apple.com>
807
808         Reviewed by Cameron Zwarich.
809         
810         Removed the last non-call-related manually managed JIT stub call.
811
812         * jit/JITArithmetic.cpp:
813         (JSC::JIT::compileFastArithSlow_op_rshift): Fully use the JITStubCall
814         abstraction, instead of emitPutJITStubArg.
815
816 2009-05-09  Sebastian Andrzej Siewior  <sebastian@breakpoint.cc>
817
818         Reviewed by Gustavo Noronha.
819
820         https://bugs.webkit.org/show_bug.cgi?id=25653
821         PLATFORM(X86_64) inherits ia64
822
823         __ia64__ is defined by gcc in an IA64 arch and has completely
824         nothing in common with X86-64 exept both are from Intel and have
825         an 64bit address space. That's it. Since code seems to expect x86
826         here, ia64 has to go.
827
828         * wtf/Platform.h:
829
830 2009-05-09  Gustavo Noronha Silva  <gns@gnome.org>
831
832         Suggested by Geoffrey Garen.
833
834         Assume SSE2 is present on X86-64 and on MAC X86-32. This fixes a
835         build breakage on non-Mac X86-64 when JIT is enabled.
836
837         * jit/JITArithmetic.cpp:
838
839 2009-05-09  Gustavo Noronha Silva  <gns@gnome.org>
840
841         Build fix, adding missing files to make dist.
842
843         * GNUmakefile.am:
844
845 2009-05-09  Geoffrey Garen  <ggaren@apple.com>
846
847         Windows build fix.
848
849         * assembler/X86Assembler.h:
850         (JSC::X86Assembler::patchLoadToLEA):
851
852 2009-05-09  Geoffrey Garen  <ggaren@apple.com>
853
854         Windows build fix.
855
856         * assembler/X86Assembler.h:
857         (JSC::X86Assembler::patchLoadToLEA):
858
859 2009-05-09  Maciej Stachowiak  <mjs@apple.com>
860
861         Reviewed by Gavin Barraclough.
862         
863         Original patch by John McCall. Updated by Cameron Zwarich. Further refined by me.
864         
865         - Assorted speedups to property access
866         
867         ~.3%-1% speedup on SunSpider
868         
869         1) When we know from the structure ID that an object is using inline storage, plant direct
870         loads and stores against it; no need to indirect through storage pointer.
871         
872         2) Also because of the above, union the property storage pointer with the first inline property
873         slot and add an extra inline property slot.
874
875         * assembler/AbstractMacroAssembler.h:
876         (JSC::AbstractMacroAssembler::CodeLocationInstruction::CodeLocationInstruction):
877         (JSC::AbstractMacroAssembler::CodeLocationInstruction::patchLoadToLEA):
878         (JSC::::CodeLocationCommon::instructionAtOffset):
879         * assembler/MacroAssembler.h:
880         (JSC::MacroAssembler::storePtr):
881         * assembler/MacroAssemblerX86.h:
882         (JSC::MacroAssemblerX86::store32):
883         * assembler/MacroAssemblerX86_64.h:
884         (JSC::MacroAssemblerX86_64::storePtr):
885         * assembler/X86Assembler.h:
886         (JSC::X86Assembler::movq_EAXm):
887         (JSC::X86Assembler::movl_rm):
888         (JSC::X86Assembler::patchLoadToLEA):
889         * jit/JIT.cpp:
890         (JSC::JIT::privateCompileMainPass):
891         * jit/JIT.h:
892         * jit/JITPropertyAccess.cpp:
893         (JSC::JIT::compileGetByIdHotPath):
894         (JSC::JIT::compilePutByIdHotPath):
895         (JSC::JIT::compilePutDirectOffset):
896         (JSC::JIT::compileGetDirectOffset):
897         (JSC::JIT::privateCompilePutByIdTransition):
898         (JSC::JIT::patchGetByIdSelf):
899         (JSC::JIT::patchPutByIdReplace):
900         (JSC::JIT::privateCompileGetByIdSelf):
901         (JSC::JIT::privateCompileGetByIdProto):
902         (JSC::JIT::privateCompileGetByIdSelfList):
903         (JSC::JIT::privateCompileGetByIdProtoList):
904         (JSC::JIT::privateCompileGetByIdChainList):
905         (JSC::JIT::privateCompileGetByIdChain):
906         (JSC::JIT::privateCompilePutByIdReplace):
907         * runtime/JSObject.cpp:
908         (JSC::JSObject::mark):
909         (JSC::JSObject::removeDirect):
910         * runtime/JSObject.h:
911         (JSC::JSObject::propertyStorage):
912         (JSC::JSObject::getDirect):
913         (JSC::JSObject::getOffset):
914         (JSC::JSObject::offsetForLocation):
915         (JSC::JSObject::locationForOffset):
916         (JSC::JSObject::getDirectOffset):
917         (JSC::JSObject::putDirectOffset):
918         (JSC::JSObject::isUsingInlineStorage):
919         (JSC::JSObject::):
920         (JSC::JSObject::JSObject):
921         (JSC::JSObject::~JSObject):
922         (JSC::Structure::isUsingInlineStorage):
923         (JSC::JSObject::putDirect):
924         (JSC::JSObject::putDirectWithoutTransition):
925         (JSC::JSObject::allocatePropertyStorageInline):
926         * runtime/Structure.h:
927
928 2009-05-09  Geoffrey Garen  <ggaren@apple.com>
929
930         Reviewed by Gavin Barraclough.
931
932         Changed all our JIT stubs so that they return a maximum of 1 JS value or
933         two non-JS pointers, and do all other value returning through out
934         parameters, in preparation for 64bit JS values on a 32bit system.
935
936         Stubs that used to return two JSValues now return one JSValue and take
937         and out parameter specifying where in the register array the second
938         value should go.
939         
940         SunSpider reports no change.
941
942         * jit/JIT.cpp:
943         (JSC::JIT::privateCompileMainPass):
944         * jit/JITArithmetic.cpp:
945         (JSC::JIT::compileFastArithSlow_op_post_inc):
946         (JSC::JIT::compileFastArithSlow_op_post_dec):
947         * jit/JITStubs.cpp:
948         (JSC::JITStubs::cti_op_call_arityCheck):
949         (JSC::JITStubs::cti_op_resolve_func):
950         (JSC::JITStubs::cti_op_post_inc):
951         (JSC::JITStubs::cti_op_resolve_with_base):
952         (JSC::JITStubs::cti_op_post_dec):
953         * jit/JITStubs.h:
954         (JSC::):
955
956 2009-05-08  Geoffrey Garen  <ggaren@apple.com>
957
958         Reviewed by Cameron Zwarich.
959         
960         Fixed <rdar://problem/6634956> CrashTracer: [REGRESSION] >400 crashes
961         in Safari at com.apple.JavaScriptCore • JSC::BytecodeGenerator::emitComplexJumpScopes + 468
962         https://bugs.webkit.org/show_bug.cgi?id=25658
963
964         * bytecompiler/BytecodeGenerator.cpp:
965         (JSC::BytecodeGenerator::emitComplexJumpScopes): Guard the whole loop
966         with a bounds check. The old loop logic would decrement and read topScope
967         without a bounds check, which could cause crashes on page boundaries.
968
969 2009-05-08  Jan Michael Alonzo  <jmalonzo@webkit.org>
970
971         Reviewed by NOBODY (BuildFix).
972
973         Gtk fix: add LiteralParser to the build script per r43424.
974
975         Add LiteralParser to the Qt and Wx build scripts too.
976
977         * GNUmakefile.am:
978         * JavaScriptCore.pri:
979         * JavaScriptCoreSources.bkl:
980
981 2009-05-08  Oliver Hunt  <oliver@apple.com>
982
983         Reviewed by Gavin Barraclough and Darin Adler.
984
985         Add a limited literal parser for eval to handle object and array literals fired at eval
986
987         This is a simplified parser and lexer that we can throw at strings passed to eval
988         in case a site is using eval to parse JSON (eg. json2.js).  The lexer is intentionally
989         limited (in effect it's whitelisting a limited "common" subset of the JSON grammar)
990         as this decreases the likelihood of us wating time attempting to parse any significant
991         amount of non-JSON content.
992
993         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
994         * JavaScriptCore.xcodeproj/project.pbxproj:
995         * interpreter/Interpreter.cpp:
996         (JSC::Interpreter::callEval):
997         * runtime/JSGlobalObjectFunctions.cpp:
998         (JSC::globalFuncEval):
999         * runtime/LiteralParser.cpp: Added.
1000         (JSC::isStringCharacter):
1001         (JSC::LiteralParser::Lexer::lex):
1002         (JSC::LiteralParser::Lexer::lexString):
1003         (JSC::LiteralParser::Lexer::lexNumber):
1004         (JSC::LiteralParser::parseStatement):
1005         (JSC::LiteralParser::parseExpression):
1006         (JSC::LiteralParser::parseArray):
1007         (JSC::LiteralParser::parseObject):
1008         (JSC::LiteralParser::StackGuard::StackGuard):
1009         (JSC::LiteralParser::StackGuard::~StackGuard):
1010         (JSC::LiteralParser::StackGuard::isSafe):
1011         * runtime/LiteralParser.h: Added.
1012         (JSC::LiteralParser::LiteralParser):
1013         (JSC::LiteralParser::attemptJSONParse):
1014         (JSC::LiteralParser::):
1015         (JSC::LiteralParser::Lexer::Lexer):
1016         (JSC::LiteralParser::Lexer::next):
1017         (JSC::LiteralParser::Lexer::currentToken):
1018         (JSC::LiteralParser::abortParse):
1019
1020 2009-05-08  Geoffrey Garen  <ggaren@apple.com>
1021
1022         Not reviewed.
1023         
1024         Restored a Mozilla JS test I accidentally gutted.
1025
1026         * tests/mozilla/ecma/Array/15.4.4.2.js:
1027         (getTestCases):
1028         (test):
1029
1030 2009-05-08  Geoffrey Garen  <ggaren@apple.com>
1031
1032         Reviewed by Gavin Barraclough.
1033         
1034         More abstraction for JITStub calls from JITed code.
1035         
1036         Added a JITStubCall class that automatically handles things like assigning
1037         arguments to different stack slots and storing return values. Deployed
1038         the class in about a billion places. A bunch more places remain to be
1039         fixed up, but this is a good stopping point for now.
1040
1041         * jit/JIT.cpp:
1042         (JSC::JIT::emitTimeoutCheck):
1043         (JSC::JIT::privateCompileMainPass):
1044         (JSC::JIT::privateCompileSlowCases):
1045         (JSC::JIT::privateCompile):
1046         * jit/JIT.h:
1047         (JSC::JIT::JSRInfo::JSRInfo):
1048         (JSC::JITStubCall::JITStubCall):
1049         (JSC::JITStubCall::addArgument):
1050         (JSC::JITStubCall::call):
1051         (JSC::JITStubCall::):
1052         (JSC::CallEvalJITStub::CallEvalJITStub):
1053         * jit/JITArithmetic.cpp:
1054         (JSC::JIT::compileFastArithSlow_op_lshift):
1055         (JSC::JIT::compileFastArithSlow_op_rshift):
1056         (JSC::JIT::compileFastArithSlow_op_jnless):
1057         (JSC::JIT::compileFastArithSlow_op_bitand):
1058         (JSC::JIT::compileFastArithSlow_op_mod):
1059         (JSC::JIT::compileFastArith_op_mod):
1060         (JSC::JIT::compileFastArithSlow_op_post_inc):
1061         (JSC::JIT::compileFastArithSlow_op_post_dec):
1062         (JSC::JIT::compileFastArithSlow_op_pre_inc):
1063         (JSC::JIT::compileFastArithSlow_op_pre_dec):
1064         (JSC::JIT::compileFastArith_op_add):
1065         (JSC::JIT::compileFastArith_op_mul):
1066         (JSC::JIT::compileFastArith_op_sub):
1067         (JSC::JIT::compileBinaryArithOpSlowCase):
1068         (JSC::JIT::compileFastArithSlow_op_add):
1069         (JSC::JIT::compileFastArithSlow_op_mul):
1070         * jit/JITCall.cpp:
1071         (JSC::JIT::compileOpCall):
1072         (JSC::):
1073         * jit/JITPropertyAccess.cpp:
1074         (JSC::JIT::compileGetByIdHotPath):
1075         (JSC::JIT::compilePutByIdHotPath):
1076         (JSC::JIT::compileGetByIdSlowCase):
1077         (JSC::JIT::compilePutByIdSlowCase):
1078         * jit/JITStubs.cpp:
1079         (JSC::JITStubs::cti_op_resolve_func):
1080         (JSC::JITStubs::cti_op_resolve_with_base):
1081
1082 2009-05-08  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
1083
1084         Reviewed by Maciej Stachowiak.
1085
1086         Add a new opcode jnlesseq, and optimize its compilation in the JIT using
1087         techniques similar to what were used to optimize jnless in r43363.
1088
1089         This gives a 0.7% speedup on SunSpider, particularly on the tests 3d-cube,
1090         control-flow-recursive, date-format-xparb, and string-base64.
1091
1092         * bytecode/CodeBlock.cpp:
1093         (JSC::CodeBlock::dump): Add support for dumping op_jnlesseq.
1094         * bytecode/Opcode.h: Add op_jnlesseq to the list of opcodes.
1095         * bytecompiler/BytecodeGenerator.cpp:
1096         (JSC::BytecodeGenerator::emitJumpIfFalse): Add a peephole optimization
1097         for op_jnlesseq when emitting lesseq followed by a jump.
1098         * interpreter/Interpreter.cpp:
1099         (JSC::Interpreter::privateExecute): Add case for op_jnlesseq.
1100         * jit/JIT.cpp:
1101         (JSC::JIT::privateCompileMainPass): Add case for op_jnlesseq.
1102         (JSC::JIT::privateCompileSlowCases): Add case for op_jnlesseq.
1103         * jit/JIT.h:
1104         * jit/JITArithmetic.cpp:
1105         (JSC::JIT::compileFastArith_op_jnlesseq): Added.
1106         (JSC::JIT::compileFastArithSlow_op_jnlesseq): Added.
1107         * jit/JITStubs.cpp:
1108         (JSC::JITStubs::cti_op_jlesseq): Added.
1109         * jit/JITStubs.h:
1110
1111 2009-05-08  Maciej Stachowiak  <mjs@apple.com>
1112
1113         Reviewed by Cameron Zwarich.
1114         
1115         - fix test failures on 64-bit
1116
1117         * jit/JITArithmetic.cpp:
1118         (JSC::JIT::compileFastArithSlow_op_jnless): Avoid accidentaly treating an
1119         immediate int as an immediate float in the 64-bit value representation.
1120
1121 2009-05-08  Gavin Barraclough  <barraclough@apple.com>
1122
1123         Rubber stamped by Oliver Hunt.
1124
1125         Removing an empty constructor and an uncalled, empty function seems to be a
1126         pretty solid 1% regeression on my machine, so I'm going to put them back.
1127         Um.  Yeah, this this pretty pointles and makes no sense at all.  I officially
1128         lose the will to live in 3... 2...
1129
1130         * bytecode/SamplingTool.cpp:
1131         (JSC::SamplingTool::notifyOfScope):
1132         * bytecode/SamplingTool.h:
1133         (JSC::SamplingTool::~SamplingTool):
1134
1135 2009-05-08  Gavin Barraclough  <barraclough@apple.com>
1136
1137         Reviewed by Oliver "I see lots of ifdefs" Hunt.
1138
1139         Fix (kinda) for sampling tool breakage.  The codeblock sampling tool has become
1140         b0rked due to recent changes in native function calling.  The initialization of
1141         a ScopeNode appears to now occur before the sampling tool (or possibly the
1142         interpreter has been brought into existence, wihich leads to crashyness).
1143
1144         This patch doesn't fix the problem.  The crash occurs when tracking a Scope, but
1145         we shouldn't need to track scopes when we're just sampling opcodes, not
1146         codeblocks.  Not retaining Scopes when just opcode sampling will reduce sampling
1147         overhead reducing any instrumentation skew, which is a good thing.  As a side
1148         benefit this patch also gets the opcode sampling going again, albeit in a bit of
1149         a lame way.  Will come back later with a proper fix from codeblock sampling. 
1150
1151         * JavaScriptCore.exp:
1152         * bytecode/SamplingTool.cpp:
1153         (JSC::compareLineCountInfoSampling):
1154         (JSC::SamplingTool::dump):
1155         * bytecode/SamplingTool.h:
1156         (JSC::SamplingTool::SamplingTool):
1157         * parser/Nodes.cpp:
1158         (JSC::ScopeNode::ScopeNode):
1159
1160 2009-05-07  Mark Rowe  <mrowe@apple.com>
1161
1162         Rubber-stamped by Oliver Hunt.
1163
1164         Fix <https://bugs.webkit.org/show_bug.cgi?id=25640>.
1165         Bug 25640: Crash on quit in r43384 nightly build on Leopard w/ Safari 4 beta installed
1166         
1167         Roll out r43366 as it removed symbols that Safari 4 Beta uses.
1168
1169         * JavaScriptCore.exp:
1170         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1171         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1172         * bytecode/SamplingTool.cpp:
1173         (JSC::SamplingThread::start):
1174         (JSC::SamplingThread::stop):
1175         * bytecode/SamplingTool.h:
1176         * wtf/CrossThreadRefCounted.h:
1177         (WTF::CrossThreadRefCounted::CrossThreadRefCounted):
1178         (WTF::::ref):
1179         (WTF::::deref):
1180         * wtf/Threading.h:
1181         * wtf/ThreadingNone.cpp:
1182         * wtf/ThreadingPthreads.cpp:
1183         (WTF::threadMapMutex):
1184         (WTF::initializeThreading):
1185         (WTF::threadMap):
1186         (WTF::identifierByPthreadHandle):
1187         (WTF::establishIdentifierForPthreadHandle):
1188         (WTF::pthreadHandleForIdentifier):
1189         (WTF::clearPthreadHandleForIdentifier):
1190         (WTF::createThreadInternal):
1191         (WTF::waitForThreadCompletion):
1192         (WTF::detachThread):
1193         (WTF::currentThread):
1194         * wtf/ThreadingWin.cpp:
1195         (WTF::threadMapMutex):
1196         (WTF::initializeThreading):
1197         (WTF::threadMap):
1198         (WTF::storeThreadHandleByIdentifier):
1199         (WTF::threadHandleForIdentifier):
1200         (WTF::clearThreadHandleForIdentifier):
1201         (WTF::createThreadInternal):
1202         (WTF::waitForThreadCompletion):
1203         (WTF::detachThread):
1204         (WTF::currentThread):
1205         * wtf/gtk/ThreadingGtk.cpp:
1206         (WTF::threadMapMutex):
1207         (WTF::initializeThreading):
1208         (WTF::threadMap):
1209         (WTF::identifierByGthreadHandle):
1210         (WTF::establishIdentifierForThread):
1211         (WTF::threadForIdentifier):
1212         (WTF::clearThreadForIdentifier):
1213         (WTF::createThreadInternal):
1214         (WTF::waitForThreadCompletion):
1215         (WTF::currentThread):
1216         * wtf/qt/ThreadingQt.cpp:
1217         (WTF::threadMapMutex):
1218         (WTF::threadMap):
1219         (WTF::identifierByQthreadHandle):
1220         (WTF::establishIdentifierForThread):
1221         (WTF::clearThreadForIdentifier):
1222         (WTF::threadForIdentifier):
1223         (WTF::initializeThreading):
1224         (WTF::createThreadInternal):
1225         (WTF::waitForThreadCompletion):
1226         (WTF::currentThread):
1227
1228 2009-05-07  Gustavo Noronha Silva  <gns@gnome.org>
1229
1230         Suggested by Oliver Hunt.
1231
1232         Also check for Linux for the special-cased calling convention.
1233
1234         * jit/JIT.cpp:
1235         (JSC::JIT::privateCompileCTIMachineTrampolines):
1236         * wtf/Platform.h:
1237
1238 2009-05-07  Gavin Barraclough  <barraclough@apple.com>
1239
1240         Reviewed by Maciej Stachowiak.
1241
1242         Previously, when appending to an existing string and growing the underlying buffer,
1243         we would actually allocate 110% of the required size in order to give us some space
1244         to expand into.  Now we treat strings differently based on their size:
1245
1246         Small Strings (up to 4 pages):
1247         Expand the allocation size to 112.5% of the amount requested.  This is largely sicking
1248         to our previous policy, however 112.5% is cheaper to calculate.
1249
1250         Medium Strings (up to 128 pages):
1251         For pages covering multiple pages over-allocation is less of a concern - any unused
1252         space will not be paged in if it is not used, so this is purely a VM overhead.  For
1253         these strings allocate 2x the requested size.
1254
1255         Large Strings (to infinity and beyond!):
1256         Revert to our 112.5% policy - probably best to limit the amount of unused VM we allow
1257         any individual string be responsible for.
1258
1259         Additionally, round small allocations up to a multiple of 16 bytes, and medium and
1260         large allocations up to a multiple of page size.
1261
1262         ~1.5% progression on Sunspider, due to 5% improvement on tagcloud & 15% on validate.
1263
1264         * runtime/UString.cpp:
1265         (JSC::expandedSize):
1266
1267 2009-05-07  Geoffrey Garen  <ggaren@apple.com>
1268
1269         Reviewed by Cameron Zwarich.
1270         
1271         Fixed a minor sequencing error introduced by recent Parser speedups.
1272
1273         * runtime/JSGlobalData.cpp:
1274         (JSC::JSGlobalData::createNativeThunk): Missed a spot in my last patch.
1275
1276 2009-05-07  Geoffrey Garen  <ggaren@apple.com>
1277
1278         Not reviewed.
1279
1280         * wtf/Platform.h: Reverted an accidental (and performance-catastrophic)
1281         change.
1282
1283 2009-05-07  Geoffrey Garen  <ggaren@apple.com>
1284
1285         Reviewed by Cameron Zwarich.
1286         
1287         Fixed a minor sequencing error introduced by recent Parser speedups.
1288
1289         * parser/Parser.cpp:
1290         (JSC::Parser::reparseInPlace): Missed a spot in my last patch.
1291
1292 2009-05-07  Geoffrey Garen  <ggaren@apple.com>
1293
1294         Reviewed by Cameron Zwarich.
1295         
1296         Fixed a minor sequencing error introduced by recent Parser speedups.
1297
1298         * parser/Parser.cpp:
1299         (JSC::Parser::parse):
1300         * parser/Parser.h:
1301         (JSC::Parser::parse):
1302         (JSC::Parser::reparse): Shrink the parsedObjects vector after allocating
1303         the root node, to avoid leaving a stray node in the vector, since that's
1304         a slight memory leak, and it causes problems during JSGlobalData teardown.
1305
1306         * runtime/JSGlobalData.cpp:
1307         (JSC::JSGlobalData::~JSGlobalData): ASSERT that we're not being torn
1308         down while we think we're still parsing, since that would cause lots of
1309         bad memory references during our destruction.
1310
1311 2009-05-07  Geoffrey Garen  <ggaren@apple.com>
1312
1313         Reviewed by Cameron Zwarich.
1314         
1315         Replaced two more macros with references to the JITStackFrame structure.
1316
1317         * jit/JIT.cpp:
1318         (JSC::JIT::privateCompileMainPass):
1319         * jit/JITInlineMethods.h:
1320         (JSC::JIT::restoreArgumentReference):
1321         * jit/JITStubs.cpp:
1322         (JSC::):
1323         * jit/JITStubs.h:
1324
1325 2009-05-07  Oliver Hunt  <oliver@apple.com>
1326
1327         Reviewed by Gavin Barraclough.
1328
1329         Improve native call performance
1330
1331         Fix the windows build by adding calling convention declarations everywhere,
1332         chose fastcall as that seemed most sensible given we were having to declare
1333         the convention explicitly.  In addition switched to fastcall on mac in the
1334         deluded belief that documented fastcall behavior on windows would match 
1335         actual its actual behavior.
1336
1337         * API/JSCallbackFunction.h:
1338         * API/JSCallbackObject.h:
1339         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1340         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1341         * interpreter/CallFrame.h:
1342         (JSC::ExecState::argumentCount):
1343         * jit/JIT.cpp:
1344         (JSC::JIT::privateCompileCTIMachineTrampolines):
1345         * jsc.cpp:
1346         (functionPrint):
1347         (functionDebug):
1348         (functionGC):
1349         (functionVersion):
1350         (functionRun):
1351         (functionLoad):
1352         (functionSetSamplingFlags):
1353         (functionClearSamplingFlags):
1354         (functionReadline):
1355         (functionQuit):
1356         * runtime/ArrayConstructor.cpp:
1357         (JSC::callArrayConstructor):
1358         * runtime/ArrayPrototype.cpp:
1359         (JSC::arrayProtoFuncToString):
1360         (JSC::arrayProtoFuncToLocaleString):
1361         (JSC::arrayProtoFuncJoin):
1362         (JSC::arrayProtoFuncConcat):
1363         (JSC::arrayProtoFuncPop):
1364         (JSC::arrayProtoFuncPush):
1365         (JSC::arrayProtoFuncReverse):
1366         (JSC::arrayProtoFuncShift):
1367         (JSC::arrayProtoFuncSlice):
1368         (JSC::arrayProtoFuncSort):
1369         (JSC::arrayProtoFuncSplice):
1370         (JSC::arrayProtoFuncUnShift):
1371         (JSC::arrayProtoFuncFilter):
1372         (JSC::arrayProtoFuncMap):
1373         (JSC::arrayProtoFuncEvery):
1374         (JSC::arrayProtoFuncForEach):
1375         (JSC::arrayProtoFuncSome):
1376         (JSC::arrayProtoFuncReduce):
1377         (JSC::arrayProtoFuncReduceRight):
1378         (JSC::arrayProtoFuncIndexOf):
1379         (JSC::arrayProtoFuncLastIndexOf):
1380         * runtime/BooleanConstructor.cpp:
1381         (JSC::callBooleanConstructor):
1382         * runtime/BooleanPrototype.cpp:
1383         (JSC::booleanProtoFuncToString):
1384         (JSC::booleanProtoFuncValueOf):
1385         * runtime/CallData.h:
1386         * runtime/DateConstructor.cpp:
1387         (JSC::callDate):
1388         (JSC::dateParse):
1389         (JSC::dateNow):
1390         (JSC::dateUTC):
1391         * runtime/DatePrototype.cpp:
1392         (JSC::dateProtoFuncToString):
1393         (JSC::dateProtoFuncToUTCString):
1394         (JSC::dateProtoFuncToDateString):
1395         (JSC::dateProtoFuncToTimeString):
1396         (JSC::dateProtoFuncToLocaleString):
1397         (JSC::dateProtoFuncToLocaleDateString):
1398         (JSC::dateProtoFuncToLocaleTimeString):
1399         (JSC::dateProtoFuncGetTime):
1400         (JSC::dateProtoFuncGetFullYear):
1401         (JSC::dateProtoFuncGetUTCFullYear):
1402         (JSC::dateProtoFuncToGMTString):
1403         (JSC::dateProtoFuncGetMonth):
1404         (JSC::dateProtoFuncGetUTCMonth):
1405         (JSC::dateProtoFuncGetDate):
1406         (JSC::dateProtoFuncGetUTCDate):
1407         (JSC::dateProtoFuncGetDay):
1408         (JSC::dateProtoFuncGetUTCDay):
1409         (JSC::dateProtoFuncGetHours):
1410         (JSC::dateProtoFuncGetUTCHours):
1411         (JSC::dateProtoFuncGetMinutes):
1412         (JSC::dateProtoFuncGetUTCMinutes):
1413         (JSC::dateProtoFuncGetSeconds):
1414         (JSC::dateProtoFuncGetUTCSeconds):
1415         (JSC::dateProtoFuncGetMilliSeconds):
1416         (JSC::dateProtoFuncGetUTCMilliseconds):
1417         (JSC::dateProtoFuncGetTimezoneOffset):
1418         (JSC::dateProtoFuncSetTime):
1419         (JSC::dateProtoFuncSetMilliSeconds):
1420         (JSC::dateProtoFuncSetUTCMilliseconds):
1421         (JSC::dateProtoFuncSetSeconds):
1422         (JSC::dateProtoFuncSetUTCSeconds):
1423         (JSC::dateProtoFuncSetMinutes):
1424         (JSC::dateProtoFuncSetUTCMinutes):
1425         (JSC::dateProtoFuncSetHours):
1426         (JSC::dateProtoFuncSetUTCHours):
1427         (JSC::dateProtoFuncSetDate):
1428         (JSC::dateProtoFuncSetUTCDate):
1429         (JSC::dateProtoFuncSetMonth):
1430         (JSC::dateProtoFuncSetUTCMonth):
1431         (JSC::dateProtoFuncSetFullYear):
1432         (JSC::dateProtoFuncSetUTCFullYear):
1433         (JSC::dateProtoFuncSetYear):
1434         (JSC::dateProtoFuncGetYear):
1435         * runtime/ErrorConstructor.cpp:
1436         (JSC::callErrorConstructor):
1437         * runtime/ErrorPrototype.cpp:
1438         (JSC::errorProtoFuncToString):
1439         * runtime/FunctionConstructor.cpp:
1440         (JSC::callFunctionConstructor):
1441         * runtime/FunctionPrototype.cpp:
1442         (JSC::callFunctionPrototype):
1443         (JSC::functionProtoFuncToString):
1444         (JSC::functionProtoFuncApply):
1445         (JSC::functionProtoFuncCall):
1446         * runtime/JSFunction.h:
1447         (JSC::JSFunction::nativeFunction):
1448         (JSC::JSFunction::setScopeChain):
1449         * runtime/JSGlobalObjectFunctions.cpp:
1450         (JSC::globalFuncEval):
1451         (JSC::globalFuncParseInt):
1452         (JSC::globalFuncParseFloat):
1453         (JSC::globalFuncIsNaN):
1454         (JSC::globalFuncIsFinite):
1455         (JSC::globalFuncDecodeURI):
1456         (JSC::globalFuncDecodeURIComponent):
1457         (JSC::globalFuncEncodeURI):
1458         (JSC::globalFuncEncodeURIComponent):
1459         (JSC::globalFuncEscape):
1460         (JSC::globalFuncUnescape):
1461         (JSC::globalFuncJSCPrint):
1462         * runtime/JSGlobalObjectFunctions.h:
1463         * runtime/MathObject.cpp:
1464         (JSC::mathProtoFuncAbs):
1465         (JSC::mathProtoFuncACos):
1466         (JSC::mathProtoFuncASin):
1467         (JSC::mathProtoFuncATan):
1468         (JSC::mathProtoFuncATan2):
1469         (JSC::mathProtoFuncCeil):
1470         (JSC::mathProtoFuncCos):
1471         (JSC::mathProtoFuncExp):
1472         (JSC::mathProtoFuncFloor):
1473         (JSC::mathProtoFuncLog):
1474         (JSC::mathProtoFuncMax):
1475         (JSC::mathProtoFuncMin):
1476         (JSC::mathProtoFuncPow):
1477         (JSC::mathProtoFuncRandom):
1478         (JSC::mathProtoFuncRound):
1479         (JSC::mathProtoFuncSin):
1480         (JSC::mathProtoFuncSqrt):
1481         (JSC::mathProtoFuncTan):
1482         * runtime/NativeErrorConstructor.cpp:
1483         (JSC::callNativeErrorConstructor):
1484         * runtime/NativeFunctionWrapper.h:
1485         * runtime/NumberConstructor.cpp:
1486         (JSC::callNumberConstructor):
1487         * runtime/NumberPrototype.cpp:
1488         (JSC::numberProtoFuncToString):
1489         (JSC::numberProtoFuncToLocaleString):
1490         (JSC::numberProtoFuncValueOf):
1491         (JSC::numberProtoFuncToFixed):
1492         (JSC::numberProtoFuncToExponential):
1493         (JSC::numberProtoFuncToPrecision):
1494         * runtime/ObjectConstructor.cpp:
1495         (JSC::callObjectConstructor):
1496         * runtime/ObjectPrototype.cpp:
1497         (JSC::objectProtoFuncValueOf):
1498         (JSC::objectProtoFuncHasOwnProperty):
1499         (JSC::objectProtoFuncIsPrototypeOf):
1500         (JSC::objectProtoFuncDefineGetter):
1501         (JSC::objectProtoFuncDefineSetter):
1502         (JSC::objectProtoFuncLookupGetter):
1503         (JSC::objectProtoFuncLookupSetter):
1504         (JSC::objectProtoFuncPropertyIsEnumerable):
1505         (JSC::objectProtoFuncToLocaleString):
1506         (JSC::objectProtoFuncToString):
1507         * runtime/ObjectPrototype.h:
1508         * runtime/RegExpConstructor.cpp:
1509         (JSC::callRegExpConstructor):
1510         * runtime/RegExpObject.cpp:
1511         (JSC::callRegExpObject):
1512         * runtime/RegExpPrototype.cpp:
1513         (JSC::regExpProtoFuncTest):
1514         (JSC::regExpProtoFuncExec):
1515         (JSC::regExpProtoFuncCompile):
1516         (JSC::regExpProtoFuncToString):
1517         * runtime/StringConstructor.cpp:
1518         (JSC::stringFromCharCode):
1519         (JSC::callStringConstructor):
1520         * runtime/StringPrototype.cpp:
1521         (JSC::stringProtoFuncReplace):
1522         (JSC::stringProtoFuncToString):
1523         (JSC::stringProtoFuncCharAt):
1524         (JSC::stringProtoFuncCharCodeAt):
1525         (JSC::stringProtoFuncConcat):
1526         (JSC::stringProtoFuncIndexOf):
1527         (JSC::stringProtoFuncLastIndexOf):
1528         (JSC::stringProtoFuncMatch):
1529         (JSC::stringProtoFuncSearch):
1530         (JSC::stringProtoFuncSlice):
1531         (JSC::stringProtoFuncSplit):
1532         (JSC::stringProtoFuncSubstr):
1533         (JSC::stringProtoFuncSubstring):
1534         (JSC::stringProtoFuncToLowerCase):
1535         (JSC::stringProtoFuncToUpperCase):
1536         (JSC::stringProtoFuncLocaleCompare):
1537         (JSC::stringProtoFuncBig):
1538         (JSC::stringProtoFuncSmall):
1539         (JSC::stringProtoFuncBlink):
1540         (JSC::stringProtoFuncBold):
1541         (JSC::stringProtoFuncFixed):
1542         (JSC::stringProtoFuncItalics):
1543         (JSC::stringProtoFuncStrike):
1544         (JSC::stringProtoFuncSub):
1545         (JSC::stringProtoFuncSup):
1546         (JSC::stringProtoFuncFontcolor):
1547         (JSC::stringProtoFuncFontsize):
1548         (JSC::stringProtoFuncAnchor):
1549         (JSC::stringProtoFuncLink):
1550         * wtf/Platform.h:
1551
1552 2009-05-07  Geoffrey Garen  <ggaren@apple.com>
1553
1554         Not reviewed.
1555         
1556         Rolled out a portion of r43352 because it broke 64bit.
1557
1558         * jit/JITStubs.h:
1559
1560 2009-05-07  Kevin Ollivier  <kevino@theolliviers.com>
1561
1562         Build fix for functions reaturning ThreadIdentifier.
1563
1564         * wtf/ThreadingNone.cpp:
1565         (WTF::createThreadInternal):
1566         (WTF::currentThread):
1567
1568 2009-05-07  Maciej Stachowiak  <mjs@apple.com>
1569
1570         Reviewed by John Honeycutt.
1571         
1572         - enable optimization case im the last patch that I accidentally had disabled.
1573
1574         * jit/JITArithmetic.cpp:
1575         (JSC::JIT::compileFastArithSlow_op_jnless):
1576
1577 2009-05-07  Dmitry Titov  <dimich@chromium.org>
1578
1579         Attempt to fix Win build.
1580
1581         * jit/JITArithmetic.cpp:
1582         (JSC::JIT::compileFastArithSlow_op_jnless):
1583
1584 2009-05-07  Dmitry Titov  <dimich@chromium.org>
1585
1586         Reviewed by Alexey Proskuryakov and Adam Roben.
1587
1588         https://bugs.webkit.org/show_bug.cgi?id=25348
1589         Change WTF::ThreadIdentifier to be an actual (but wrapped) thread id, remove ThreadMap.
1590
1591         * wtf/Threading.h:
1592         (WTF::ThreadIdentifier::ThreadIdentifier):
1593         (WTF::ThreadIdentifier::isValid):
1594         (WTF::ThreadIdentifier::invalidate):
1595         (WTF::ThreadIdentifier::platformId):
1596         ThreadIdentifier is now a class, containing a PlatformThreadIdentifier and
1597         methods that are used across the code on thread ids: construction, comparisons,
1598         check for 'valid' state etc. '0' is used as invalid id, which happens to just work
1599         with all platform-specific thread id implementations.
1600
1601         All the following files repeatedly reflect the new ThreadIdentifier for each platform.
1602         We remove ThreadMap and threadMapMutex from all of them, remove the functions that
1603         populated/searched/cleared the map and add platform-specific comparison operators
1604         for ThreadIdentifier.
1605
1606         * wtf/gtk/ThreadingGtk.cpp:
1607         (WTF::ThreadIdentifier::operator==):
1608         (WTF::ThreadIdentifier::operator!=):
1609         (WTF::initializeThreading):
1610         (WTF::createThreadInternal):
1611         (WTF::waitForThreadCompletion):
1612         (WTF::currentThread):
1613
1614         * wtf/ThreadingNone.cpp:
1615         (WTF::ThreadIdentifier::operator==):
1616         (WTF::ThreadIdentifier::operator!=):
1617
1618         * wtf/ThreadingPthreads.cpp:
1619         (WTF::ThreadIdentifier::operator==):
1620         (WTF::ThreadIdentifier::operator!=):
1621         (WTF::initializeThreading):
1622         (WTF::createThreadInternal):
1623         (WTF::waitForThreadCompletion):
1624         (WTF::detachThread):
1625         (WTF::currentThread):
1626
1627         * wtf/qt/ThreadingQt.cpp:
1628         (WTF::ThreadIdentifier::operator==):
1629         (WTF::ThreadIdentifier::operator!=):
1630         (WTF::initializeThreading):
1631         (WTF::createThreadInternal):
1632         (WTF::waitForThreadCompletion):
1633         (WTF::currentThread):
1634
1635         * wtf/ThreadingWin.cpp:
1636         (WTF::ThreadIdentifier::operator==):
1637         (WTF::ThreadIdentifier::operator!=):
1638         (WTF::initializeThreading):
1639         (WTF::createThreadInternal): All the platforms (except Windows) used a sequential
1640         counter as a thread ID and mapped it into platform ID. Windows was using native thread
1641         id and mapped it into thread handle. Since we can always obtain a thread handle
1642         by thread id, createThread now closes the handle.
1643         (WTF::waitForThreadCompletion): obtains another one using OpenThread(id) API. If can not obtain a handle,
1644         it means the thread already exited.
1645         (WTF::detachThread):
1646         (WTF::currentThread):
1647         (WTF::detachThreadDeprecated): old function, renamed (for Win Safari 4 beta which uses it for now).
1648         (WTF::waitForThreadCompletionDeprecated): same.
1649         (WTF::currentThreadDeprecated): same.
1650         (WTF::createThreadDeprecated): same.
1651
1652         * bytecode/SamplingTool.h:
1653         * bytecode/SamplingTool.cpp: Use DEFINE_STATIC_LOCAL for a static ThreadIdentifier variable, to avoid static constructor.
1654
1655         * JavaScriptCore.exp: export lists - updated the WTF threading functions decorated names
1656         since they now take a different type as a parameter.
1657         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: ditto for Windows, plus added "deprecated" functions
1658         that take old parameter type - turns out public beta of Safari 4 uses those, so they need to be kept along for a while.
1659         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: ditto.
1660
1661 2009-05-07  Maciej Stachowiak  <mjs@apple.com>
1662
1663         Reviewed by Sam Weinig.
1664         
1665         - optimize various cases of branch-fused less
1666         
1667         1% speedup on SunSpider overall
1668         13% speedup on math-cordic
1669
1670         * jit/JIT.cpp:
1671         (JSC::JIT::privateCompileMainPass):
1672         op_loop_if_less: Optimize case of constant as first operand, just as case of constant as
1673         second operand.
1674         op_jnless: Factored out into compileFastArith_op_jnless.
1675         (JSC::JIT::privateCompileSlowCases):
1676         op_jnless: Factored out into compileFastArithSlow_op_jnless.
1677         * jit/JIT.h:
1678         * jit/JITArithmetic.cpp:
1679         (JSC::JIT::compileFastArith_op_jnless): Factored out from main compile loop.
1680         - Generate inline code for comparison of constant immediate int as first operand to another
1681         immediate int, as for loop_if_less
1682
1683         (JSC::JIT::compileFastArithSlow_op_jnless):
1684         - Generate inline code for comparing two floating point numbers.
1685         - Generate code for both cases of comparing a floating point number to a constant immediate 
1686         int.
1687         * bytecode/CodeBlock.cpp:
1688         (JSC::CodeBlock::dump): Fix dumping of op_jnless (tangentially related bugfix).
1689
1690 2009-05-07  Geoffrey Garen  <ggaren@apple.com>
1691
1692         Reviewed by Sam Weinig.
1693         
1694         Added the return address of a stub function to the JITStackFrame abstraction.
1695
1696         * jit/JIT.cpp:
1697         * jit/JIT.h:
1698         * jit/JITStubs.cpp:
1699         (JSC::):
1700         (JSC::StackHack::StackHack):
1701         (JSC::StackHack::~StackHack):
1702         (JSC::returnToThrowTrampoline):
1703         (JSC::JITStubs::cti_op_convert_this):
1704         (JSC::JITStubs::cti_op_end):
1705         (JSC::JITStubs::cti_op_add):
1706         (JSC::JITStubs::cti_op_pre_inc):
1707         (JSC::JITStubs::cti_timeout_check):
1708         (JSC::JITStubs::cti_register_file_check):
1709         (JSC::JITStubs::cti_op_loop_if_less):
1710         (JSC::JITStubs::cti_op_loop_if_lesseq):
1711         (JSC::JITStubs::cti_op_new_object):
1712         (JSC::JITStubs::cti_op_put_by_id_generic):
1713         (JSC::JITStubs::cti_op_get_by_id_generic):
1714         (JSC::JITStubs::cti_op_put_by_id):
1715         (JSC::JITStubs::cti_op_put_by_id_second):
1716         (JSC::JITStubs::cti_op_put_by_id_fail):
1717         (JSC::JITStubs::cti_op_get_by_id):
1718         (JSC::JITStubs::cti_op_get_by_id_second):
1719         (JSC::JITStubs::cti_op_get_by_id_self_fail):
1720         (JSC::JITStubs::cti_op_get_by_id_proto_list):
1721         (JSC::JITStubs::cti_op_get_by_id_proto_list_full):
1722         (JSC::JITStubs::cti_op_get_by_id_proto_fail):
1723         (JSC::JITStubs::cti_op_get_by_id_array_fail):
1724         (JSC::JITStubs::cti_op_get_by_id_string_fail):
1725         (JSC::JITStubs::cti_op_instanceof):
1726         (JSC::JITStubs::cti_op_del_by_id):
1727         (JSC::JITStubs::cti_op_mul):
1728         (JSC::JITStubs::cti_op_new_func):
1729         (JSC::JITStubs::cti_op_call_JSFunction):
1730         (JSC::JITStubs::cti_op_call_arityCheck):
1731         (JSC::JITStubs::cti_vm_dontLazyLinkCall):
1732         (JSC::JITStubs::cti_vm_lazyLinkCall):
1733         (JSC::JITStubs::cti_op_push_activation):
1734         (JSC::JITStubs::cti_op_call_NotJSFunction):
1735         (JSC::JITStubs::cti_op_create_arguments):
1736         (JSC::JITStubs::cti_op_create_arguments_no_params):
1737         (JSC::JITStubs::cti_op_tear_off_activation):
1738         (JSC::JITStubs::cti_op_tear_off_arguments):
1739         (JSC::JITStubs::cti_op_profile_will_call):
1740         (JSC::JITStubs::cti_op_profile_did_call):
1741         (JSC::JITStubs::cti_op_ret_scopeChain):
1742         (JSC::JITStubs::cti_op_new_array):
1743         (JSC::JITStubs::cti_op_resolve):
1744         (JSC::JITStubs::cti_op_construct_JSConstruct):
1745         (JSC::JITStubs::cti_op_construct_NotJSConstruct):
1746         (JSC::JITStubs::cti_op_get_by_val):
1747         (JSC::JITStubs::cti_op_get_by_val_string):
1748         (JSC::JITStubs::cti_op_get_by_val_byte_array):
1749         (JSC::JITStubs::cti_op_resolve_func):
1750         (JSC::JITStubs::cti_op_sub):
1751         (JSC::JITStubs::cti_op_put_by_val):
1752         (JSC::JITStubs::cti_op_put_by_val_array):
1753         (JSC::JITStubs::cti_op_put_by_val_byte_array):
1754         (JSC::JITStubs::cti_op_lesseq):
1755         (JSC::JITStubs::cti_op_loop_if_true):
1756         (JSC::JITStubs::cti_op_load_varargs):
1757         (JSC::JITStubs::cti_op_negate):
1758         (JSC::JITStubs::cti_op_resolve_base):
1759         (JSC::JITStubs::cti_op_resolve_skip):
1760         (JSC::JITStubs::cti_op_resolve_global):
1761         (JSC::JITStubs::cti_op_div):
1762         (JSC::JITStubs::cti_op_pre_dec):
1763         (JSC::JITStubs::cti_op_jless):
1764         (JSC::JITStubs::cti_op_not):
1765         (JSC::JITStubs::cti_op_jtrue):
1766         (JSC::JITStubs::cti_op_post_inc):
1767         (JSC::JITStubs::cti_op_eq):
1768         (JSC::JITStubs::cti_op_lshift):
1769         (JSC::JITStubs::cti_op_bitand):
1770         (JSC::JITStubs::cti_op_rshift):
1771         (JSC::JITStubs::cti_op_bitnot):
1772         (JSC::JITStubs::cti_op_resolve_with_base):
1773         (JSC::JITStubs::cti_op_new_func_exp):
1774         (JSC::JITStubs::cti_op_mod):
1775         (JSC::JITStubs::cti_op_less):
1776         (JSC::JITStubs::cti_op_neq):
1777         (JSC::JITStubs::cti_op_post_dec):
1778         (JSC::JITStubs::cti_op_urshift):
1779         (JSC::JITStubs::cti_op_bitxor):
1780         (JSC::JITStubs::cti_op_new_regexp):
1781         (JSC::JITStubs::cti_op_bitor):
1782         (JSC::JITStubs::cti_op_call_eval):
1783         (JSC::JITStubs::cti_op_throw):
1784         (JSC::JITStubs::cti_op_get_pnames):
1785         (JSC::JITStubs::cti_op_next_pname):
1786         (JSC::JITStubs::cti_op_push_scope):
1787         (JSC::JITStubs::cti_op_pop_scope):
1788         (JSC::JITStubs::cti_op_typeof):
1789         (JSC::JITStubs::cti_op_is_undefined):
1790         (JSC::JITStubs::cti_op_is_boolean):
1791         (JSC::JITStubs::cti_op_is_number):
1792         (JSC::JITStubs::cti_op_is_string):
1793         (JSC::JITStubs::cti_op_is_object):
1794         (JSC::JITStubs::cti_op_is_function):
1795         (JSC::JITStubs::cti_op_stricteq):
1796         (JSC::JITStubs::cti_op_to_primitive):
1797         (JSC::JITStubs::cti_op_strcat):
1798         (JSC::JITStubs::cti_op_nstricteq):
1799         (JSC::JITStubs::cti_op_to_jsnumber):
1800         (JSC::JITStubs::cti_op_in):
1801         (JSC::JITStubs::cti_op_push_new_scope):
1802         (JSC::JITStubs::cti_op_jmp_scopes):
1803         (JSC::JITStubs::cti_op_put_by_index):
1804         (JSC::JITStubs::cti_op_switch_imm):
1805         (JSC::JITStubs::cti_op_switch_char):
1806         (JSC::JITStubs::cti_op_switch_string):
1807         (JSC::JITStubs::cti_op_del_by_val):
1808         (JSC::JITStubs::cti_op_put_getter):
1809         (JSC::JITStubs::cti_op_put_setter):
1810         (JSC::JITStubs::cti_op_new_error):
1811         (JSC::JITStubs::cti_op_debug):
1812         (JSC::JITStubs::cti_vm_throw):
1813         * jit/JITStubs.h:
1814         (JSC::JITStackFrame::returnAddressSlot):
1815
1816 2009-05-07  Darin Adler  <darin@apple.com>
1817
1818         Reviewed by Geoff Garen.
1819
1820         * parser/Lexer.cpp:
1821         (JSC::Lexer::lex): Fix missing braces. This would make us always
1822         take the slower case for string parsing and Visual Studio correctly
1823         noticed unreachable code.
1824
1825 2009-05-07  Darin Adler  <darin@apple.com>
1826
1827         Reviewed by Sam Weinig.
1828
1829         Bug 25589: goto instead of state machine in lexer
1830         https://bugs.webkit.org/show_bug.cgi?id=25589
1831
1832         SunSpider is 0.8% faster.
1833
1834         * parser/Lexer.cpp:
1835         (JSC::Lexer::currentCharacter): Added.
1836         (JSC::Lexer::currentOffset): Changed to call currentCharacter for clarity.
1837         (JSC::Lexer::setCode): Removed code to set now-obsolete m_skipLineEnd.
1838         (JSC::Lexer::shiftLineTerminator): Added. Handles line numbers and the
1839         two-character line terminators.
1840         (JSC::Lexer::makeIdentifier): Changed to take characters and length rather
1841         than a vector, since we now make these directly out of the source buffer
1842         when possible.
1843         (JSC::Lexer::lastTokenWasRestrKeyword): Added.
1844         (JSC::isNonASCIIIdentStart): Broke out the non-inline part.
1845         (JSC::isIdentStart): Moved here.
1846         (JSC::isNonASCIIIdentPart): Broke out the non-inline part.
1847         (JSC::isIdentPart): Moved here.
1848         (JSC::singleEscape): Moved here, and removed some unneeded cases.
1849         (JSC::Lexer::record8): Moved here.
1850         (JSC::Lexer::record16): Moved here.
1851         (JSC::Lexer::lex): Rewrote this whole function to use goto and not use
1852         a state machine. Got rid of most of the local variables. Also rolled the
1853         matchPunctuator function in here.
1854         (JSC::Lexer::scanRegExp): Changed to use the new version of isLineTerminator.
1855         Clear m_buffer16 after using it instead of before.
1856
1857         * parser/Lexer.h: Removed State enum, setDone function, nextLine function,
1858         lookupKeywordFunction, one of the isLineTerminator functions, m_done data member,
1859         m_skipLineEnd data member, and m_state data member. Added shiftLineTerminator
1860         function, currentCharacter function, and changed the arguments to the makeIdentifier
1861         function. Removed one branch from the isLineTerminator function.
1862
1863         * runtime/StringPrototype.cpp:
1864         (JSC::stringProtoFuncReplace): Streamlined the case where we don't replace anything.
1865
1866 2009-05-07  Geoffrey Garen  <ggaren@apple.com>
1867
1868         Reviewed by Gavin Barraclough.
1869
1870         Removed a few more special constants, and replaced them with uses of
1871         the JITStackFrame struct.
1872
1873         Removed one of the two possible definitions of VoidPtrPair. The Mac
1874         definition was more elegant, but SunSpider doesn't think it's any
1875         faster, and it's net less elegant to have two ways of doing things.
1876
1877         * jit/JIT.cpp:
1878         (JSC::JIT::privateCompileMainPass):
1879         (JSC::JIT::privateCompile):
1880         * jit/JITStubs.h:
1881         (JSC::):
1882
1883 2009-05-07  Darin Adler  <darin@apple.com>
1884
1885         * runtime/ScopeChain.h:
1886         (JSC::ScopeChainNode::~ScopeChainNode): Tweak formatting.
1887
1888 2009-05-07  Simon Hausmann  <simon.hausmann@nokia.com>
1889
1890         Reviewed by Tor Arne Vestbø.
1891
1892         Fix the build thread stack base determination build on Symbian,
1893         by moving the code block before PLATFORM(UNIX), which is also
1894         enabled on Symbian builds.
1895
1896         * runtime/Collector.cpp:
1897         (JSC::currentThreadStackBase):
1898
1899 2009-05-07  Oliver Hunt  <oliver@apple.com>
1900
1901         Reviewed by Gavin Barraclough.
1902
1903         Fix crash due to incorrectly using an invalid scopechain 
1904
1905         stringProtoFuncReplace was checking for an exception on a CachedCall
1906         by asking for the cached callframes exception.  Unfortunately this
1907         could crash in certain circumstances as CachedCall does not guarantee
1908         a valid callframe following a call.  Even more unfortunately the check
1909         was entirely unnecessary as there is only a single exception slot per
1910         global data, so it was already checked via the initial exec->hadException()
1911         check.
1912
1913         To make bugs like this more obvious, i've added a debug only destructor
1914         to ScopeChainNode that 0's all of its fields.  This exposed a crash in
1915         the standard javascriptcore tests.
1916
1917         * runtime/ScopeChain.h:
1918         (JSC::ScopeChainNode::~ScopeChainNode):
1919         (JSC::ScopeChain::~ScopeChain):
1920         * runtime/StringPrototype.cpp:
1921         (JSC::stringProtoFuncReplace):
1922
1923 2009-05-07  Gavin Barraclough  <barraclough@apple.com>
1924
1925         Reviewed by Geoff Garen.
1926
1927         Enable op_strcat across += assignments.  This patch allows the lhs of a read/modify node
1928         to be included within the concatenation operation, and also modifies the implementation
1929         of the concatenation to attempt to reuse and cat onto the leftmost string, rather than
1930         always allocating a new empty output string to copy into (as was previously the behaviour).
1931
1932         ~0.5% progression, due to a 3%-3.5% progression on the string tests (particularly validate).
1933
1934         * parser/Nodes.cpp:
1935         (JSC::BinaryOpNode::emitStrcat):
1936         (JSC::emitReadModifyAssignment):
1937         (JSC::ReadModifyResolveNode::emitBytecode):
1938         (JSC::ReadModifyDotNode::emitBytecode):
1939         (JSC::ReadModifyBracketNode::emitBytecode):
1940         * parser/Nodes.h:
1941         * runtime/Operations.h:
1942         (JSC::concatenateStrings):
1943         * runtime/UString.cpp:
1944         (JSC::UString::reserveCapacity):
1945         * runtime/UString.h:
1946
1947 2009-05-07  Simon Hausmann  <simon.hausmann@nokia.com>
1948
1949         Reviewed by Oliver Hunt.
1950
1951         Fix the build on Windows without JIT: interpreter/RegisterFile.h needs
1952         roundUpAllocationSize, which is protected by #if ENABLED(ASSEMBLER).
1953         Moved the #ifdef down and always offer the function.
1954
1955         * jit/ExecutableAllocator.h:
1956
1957 2009-05-06  Geoffrey Garen  <ggaren@apple.com>
1958
1959         Reviewed by Gavin "++" Barraclough.
1960         
1961         Added some abstraction around the JIT stub calling convention by creating
1962         a struct to represent the persistent stack frame JIT code shares with
1963         JIT stubs.
1964         
1965         SunSpider reports no change.
1966
1967         * jit/JIT.h:
1968         * jit/JITStubs.cpp:
1969         (JSC::JITStubs::cti_op_convert_this):
1970         (JSC::JITStubs::cti_op_end):
1971         (JSC::JITStubs::cti_op_add):
1972         (JSC::JITStubs::cti_op_pre_inc):
1973         (JSC::JITStubs::cti_timeout_check):
1974         (JSC::JITStubs::cti_register_file_check):
1975         (JSC::JITStubs::cti_op_loop_if_less):
1976         (JSC::JITStubs::cti_op_loop_if_lesseq):
1977         (JSC::JITStubs::cti_op_new_object):
1978         (JSC::JITStubs::cti_op_put_by_id_generic):
1979         (JSC::JITStubs::cti_op_get_by_id_generic):
1980         (JSC::JITStubs::cti_op_put_by_id):
1981         (JSC::JITStubs::cti_op_put_by_id_second):
1982         (JSC::JITStubs::cti_op_put_by_id_fail):
1983         (JSC::JITStubs::cti_op_get_by_id):
1984         (JSC::JITStubs::cti_op_get_by_id_second):
1985         (JSC::JITStubs::cti_op_get_by_id_self_fail):
1986         (JSC::JITStubs::cti_op_get_by_id_proto_list):
1987         (JSC::JITStubs::cti_op_get_by_id_proto_list_full):
1988         (JSC::JITStubs::cti_op_get_by_id_proto_fail):
1989         (JSC::JITStubs::cti_op_get_by_id_array_fail):
1990         (JSC::JITStubs::cti_op_get_by_id_string_fail):
1991         (JSC::JITStubs::cti_op_instanceof):
1992         (JSC::JITStubs::cti_op_del_by_id):
1993         (JSC::JITStubs::cti_op_mul):
1994         (JSC::JITStubs::cti_op_new_func):
1995         (JSC::JITStubs::cti_op_call_JSFunction):
1996         (JSC::JITStubs::cti_op_call_arityCheck):
1997         (JSC::JITStubs::cti_vm_dontLazyLinkCall):
1998         (JSC::JITStubs::cti_vm_lazyLinkCall):
1999         (JSC::JITStubs::cti_op_push_activation):
2000         (JSC::JITStubs::cti_op_call_NotJSFunction):
2001         (JSC::JITStubs::cti_op_create_arguments):
2002         (JSC::JITStubs::cti_op_create_arguments_no_params):
2003         (JSC::JITStubs::cti_op_tear_off_activation):
2004         (JSC::JITStubs::cti_op_tear_off_arguments):
2005         (JSC::JITStubs::cti_op_profile_will_call):
2006         (JSC::JITStubs::cti_op_profile_did_call):
2007         (JSC::JITStubs::cti_op_ret_scopeChain):
2008         (JSC::JITStubs::cti_op_new_array):
2009         (JSC::JITStubs::cti_op_resolve):
2010         (JSC::JITStubs::cti_op_construct_JSConstruct):
2011         (JSC::JITStubs::cti_op_construct_NotJSConstruct):
2012         (JSC::JITStubs::cti_op_get_by_val):
2013         (JSC::JITStubs::cti_op_get_by_val_string):
2014         (JSC::JITStubs::cti_op_get_by_val_byte_array):
2015         (JSC::JITStubs::cti_op_resolve_func):
2016         (JSC::JITStubs::cti_op_sub):
2017         (JSC::JITStubs::cti_op_put_by_val):
2018         (JSC::JITStubs::cti_op_put_by_val_array):
2019         (JSC::JITStubs::cti_op_put_by_val_byte_array):
2020         (JSC::JITStubs::cti_op_lesseq):
2021         (JSC::JITStubs::cti_op_loop_if_true):
2022         (JSC::JITStubs::cti_op_load_varargs):
2023         (JSC::JITStubs::cti_op_negate):
2024         (JSC::JITStubs::cti_op_resolve_base):
2025         (JSC::JITStubs::cti_op_resolve_skip):
2026         (JSC::JITStubs::cti_op_resolve_global):
2027         (JSC::JITStubs::cti_op_div):
2028         (JSC::JITStubs::cti_op_pre_dec):
2029         (JSC::JITStubs::cti_op_jless):
2030         (JSC::JITStubs::cti_op_not):
2031         (JSC::JITStubs::cti_op_jtrue):
2032         (JSC::JITStubs::cti_op_post_inc):
2033         (JSC::JITStubs::cti_op_eq):
2034         (JSC::JITStubs::cti_op_lshift):
2035         (JSC::JITStubs::cti_op_bitand):
2036         (JSC::JITStubs::cti_op_rshift):
2037         (JSC::JITStubs::cti_op_bitnot):
2038         (JSC::JITStubs::cti_op_resolve_with_base):
2039         (JSC::JITStubs::cti_op_new_func_exp):
2040         (JSC::JITStubs::cti_op_mod):
2041         (JSC::JITStubs::cti_op_less):
2042         (JSC::JITStubs::cti_op_neq):
2043         (JSC::JITStubs::cti_op_post_dec):
2044         (JSC::JITStubs::cti_op_urshift):
2045         (JSC::JITStubs::cti_op_bitxor):
2046         (JSC::JITStubs::cti_op_new_regexp):
2047         (JSC::JITStubs::cti_op_bitor):
2048         (JSC::JITStubs::cti_op_call_eval):
2049         (JSC::JITStubs::cti_op_throw):
2050         (JSC::JITStubs::cti_op_get_pnames):
2051         (JSC::JITStubs::cti_op_next_pname):
2052         (JSC::JITStubs::cti_op_push_scope):
2053         (JSC::JITStubs::cti_op_pop_scope):
2054         (JSC::JITStubs::cti_op_typeof):
2055         (JSC::JITStubs::cti_op_is_undefined):
2056         (JSC::JITStubs::cti_op_is_boolean):
2057         (JSC::JITStubs::cti_op_is_number):
2058         (JSC::JITStubs::cti_op_is_string):
2059         (JSC::JITStubs::cti_op_is_object):
2060         (JSC::JITStubs::cti_op_is_function):
2061         (JSC::JITStubs::cti_op_stricteq):
2062         (JSC::JITStubs::cti_op_to_primitive):
2063         (JSC::JITStubs::cti_op_strcat):
2064         (JSC::JITStubs::cti_op_nstricteq):
2065         (JSC::JITStubs::cti_op_to_jsnumber):
2066         (JSC::JITStubs::cti_op_in):
2067         (JSC::JITStubs::cti_op_push_new_scope):
2068         (JSC::JITStubs::cti_op_jmp_scopes):
2069         (JSC::JITStubs::cti_op_put_by_index):
2070         (JSC::JITStubs::cti_op_switch_imm):
2071         (JSC::JITStubs::cti_op_switch_char):
2072         (JSC::JITStubs::cti_op_switch_string):
2073         (JSC::JITStubs::cti_op_del_by_val):
2074         (JSC::JITStubs::cti_op_put_getter):
2075         (JSC::JITStubs::cti_op_put_setter):
2076         (JSC::JITStubs::cti_op_new_error):
2077         (JSC::JITStubs::cti_op_debug):
2078         (JSC::JITStubs::cti_vm_throw):
2079         * jit/JITStubs.h:
2080         (JSC::):
2081
2082 2009-05-06  Gavin Barraclough  <barraclough@apple.com>
2083
2084         Reviewed by Maciej Stachowiak & Darin Adler.
2085
2086         Improve string concatenation (as coded in JS as a sequence of adds).
2087
2088         Detect patterns corresponding to string concatenation, and change the bytecode
2089         generation to emit a new op_strcat instruction.  By handling the full set of
2090         additions within a single function we do not need allocate JSString wrappers
2091         for intermediate results, and we can calculate the size of the output string
2092         prior to allocating storage, in order to prevent reallocation of the buffer.
2093
2094         1.5%-2% progression on Sunspider, largely due to a 30% progression on date-format-xparb.
2095
2096         * bytecode/CodeBlock.cpp:
2097         (JSC::CodeBlock::dump):
2098             Add new opcodes.
2099         * bytecode/Opcode.h:
2100             Add new opcodes.
2101         * bytecompiler/BytecodeGenerator.cpp:
2102         (JSC::BytecodeGenerator::emitStrcat):
2103         (JSC::BytecodeGenerator::emitToPrimitive):
2104             Add generation of new opcodes.
2105         * bytecompiler/BytecodeGenerator.h:
2106             Add generation of new opcodes.
2107         * interpreter/Interpreter.cpp:
2108         (JSC::Interpreter::privateExecute):
2109             Add implmentation of new opcodes.
2110         * jit/JIT.cpp:
2111         (JSC::JIT::privateCompileMainPass):
2112         (JSC::JIT::privateCompileSlowCases):
2113             Add implmentation of new opcodes.
2114         * jit/JITStubs.cpp:
2115         (JSC::JITStubs::cti_op_to_primitive):
2116         (JSC::JITStubs::cti_op_strcat):
2117             Add implmentation of new opcodes.
2118         * jit/JITStubs.h:
2119             Add implmentation of new opcodes.
2120         * parser/Nodes.cpp:
2121         (JSC::BinaryOpNode::emitStrcat):
2122         (JSC::BinaryOpNode::emitBytecode):
2123         (JSC::ReadModifyResolveNode::emitBytecode):
2124             Add generation of new opcodes.
2125         * parser/Nodes.h:
2126         (JSC::ExpressionNode::):
2127         (JSC::AddNode::):
2128             Add methods to allow identification of add nodes.
2129         * parser/ResultType.h:
2130         (JSC::ResultType::definitelyIsString):
2131         (JSC::ResultType::forAdd):
2132             Fix error in detection of adds that will produce string results.
2133         * runtime/Operations.h:
2134         (JSC::concatenateStrings):
2135             Add implmentation of new opcodes.
2136         * runtime/UString.cpp:
2137         (JSC::UString::appendNumeric):
2138             Add methods to append numbers to an existing string.
2139         * runtime/UString.h:
2140         (JSC::UString::Rep::createEmptyBuffer):
2141         (JSC::UString::BaseString::BaseString):
2142             Add support for creating an empty string with a non-zero capacity available in the BaseString.
2143
2144 2009-05-06  Darin Adler  <darin@apple.com>
2145
2146         Reviewed by Sam Weinig.
2147
2148         Made RefCounted::m_refCount private.
2149
2150         * runtime/Structure.h: Removed addressOfCount.
2151         * wtf/RefCounted.h: Made m_refCount private.
2152         Added addressOfCount.
2153
2154 2009-05-06  Darin Adler  <darin@apple.com>
2155
2156         Fixed assertion seen a lot!
2157
2158         * parser/Nodes.cpp:
2159         (JSC::FunctionBodyNode::~FunctionBodyNode): Removed now-bogus assertion.
2160
2161 2009-05-06  Darin Adler  <darin@apple.com>
2162
2163         Working with Sam Weinig.
2164
2165         Redo parse tree constructor optimization without breaking the Windows
2166         build the way I did yesterday. The previous try broke the build by adding
2167         an include of Lexer.h and all its dependencies that had to work outside
2168         the JavaScriptCore project.
2169
2170         * GNUmakefile.am: Added NodeConstructors.h.
2171         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
2172
2173         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
2174         Removed byteocde directory -- we no longer are trying to include Lexer.h
2175         outside JavaScriptCore.
2176
2177         * JavaScriptCore.xcodeproj/project.pbxproj: Change SegmentedVector.h
2178         and Lexer.h back to internal files. Added NodeConstructors.h.
2179
2180         * parser/Grammar.y: Added include of NodeConstructors.h.
2181         Changed use of ConstDeclNode to use public functions.
2182
2183         * parser/NodeConstructors.h: Copied from parser/Nodes.h.
2184         Just contains the inlined constructors now.
2185
2186         * parser/Nodes.cpp: Added include of NodeConstructors.h.
2187         Moved node constructors into the header.
2188         (JSC::FunctionBodyNode::FunctionBodyNode): Removed m_refCount
2189         initialization.
2190
2191         * parser/Nodes.h: Removed all the constructor definitions, and also
2192         removed the JSC_FAST_CALL from them since these are all inlined, so the
2193         calling convention is irrelevant. Made more things private. Used a data
2194         member for operator opcodes instead of a virtual function. Removed the
2195         special FunctionBodyNode::ref/deref functions since the default functions
2196         are now just as fast.
2197
2198         * runtime/FunctionConstructor.cpp:
2199         (JSC::extractFunctionBody): Fixed types here so we don't typecast until
2200         after we do type checking.
2201
2202 2009-05-06  Simon Hausmann  <simon.hausmann@nokia.com>
2203
2204         Reviewed by Ariya Hidayat.
2205
2206         Fix the Qt build on Windows.
2207
2208         * JavaScriptCore.pri: Define BUILDING_JavaScriptCore/WTF to get the meaning
2209         of the JS_EXPORTDATA macros correct
2210
2211 2009-05-06  Simon Hausmann  <simon.hausmann@nokia.com>
2212
2213         Reviewed by Ariya Hidayat.
2214
2215         Enable the JIT for the Qt build on Windows.
2216
2217         * JavaScriptCore.pri:
2218
2219 2009-05-06  Simon Hausmann  <simon.hausmann@nokia.com>
2220
2221         Reviewed by Tor Arne Vestbø.
2222
2223         Tweak JavaScriptCore.pri for being able to override the generated sources dir for the
2224         generated_files target.
2225
2226         * JavaScriptCore.pri:
2227
2228 2009-05-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2229
2230         Reviewed by Simon Hausmann.
2231
2232         Build QtWebKit as a framework on Mac
2233
2234         This implies both debug and release build by default, unless
2235         one of the --debug or --release config options are passed to
2236         the build-webkit script.
2237
2238         Frameworks can be disabled by passing CONFIG+=webkit_no_framework
2239         to the build-webkit script.
2240
2241         To be able to build both debug and release targets in parallel
2242         we have to use separate output directories for the generated
2243         sources, which is not optimal, but required to avoid race conditions.
2244
2245         An optimization would be to only require this spit-up on Mac.
2246
2247         * JavaScriptCore.pri:
2248         * JavaScriptCore.pro:
2249         * jsc.pro:
2250
2251 2009-05-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2252
2253         Reviewed by Simon Hausmann.
2254
2255         [Qt] Use $$GENERATED_SOURCES_DIR as output when running bison
2256
2257         A couple of the generators left the bison output file in the source
2258         tree, and then moved it into $$GENERATED_SOURCES_DIR, which did not
2259         work well when building release and debug configurations in parallel.
2260
2261         * JavaScriptCore.pri:
2262
2263 2009-05-05  Geoffrey Garen  <ggaren@apple.com>
2264
2265         Reviewed by Maciej Stachowiak.
2266         
2267         Simplified a bit of codegen.
2268
2269         * jit/JIT.cpp:
2270         (JSC::JIT::privateCompileMainPass):
2271
2272 2009-05-05  Geoffrey Garen  <ggaren@apple.com>
2273
2274         Reviewed by Cameron Zwarich.
2275         
2276         Moved all the JIT stub related code into one place.
2277
2278         * jit/JIT.cpp:
2279         * jit/JIT.h:
2280         * jit/JITCode.h:
2281         * jit/JITStubs.cpp:
2282         (JSC::):
2283         * jit/JITStubs.h:
2284
2285 2009-05-05  Sam Weinig  <sam@webkit.org>
2286
2287         Try to fix Windows build.
2288
2289         Move Node constructor to the .cpp file.
2290
2291         * parser/Nodes.cpp: 
2292         * parser/Nodes.h:
2293
2294 2009-05-05  Darin Adler  <darin@apple.com>
2295
2296         Try to fix Windows build.
2297
2298         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2299         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2300
2301         Try to fix Mac build.
2302
2303         * JavaScriptCore.xcodeproj/project.pbxproj: Made SegmentedVector.h private.
2304
2305 2009-05-05  Darin Adler  <darin@apple.com>
2306
2307         Try to fix Mac build.
2308
2309         * JavaScriptCore.xcodeproj/project.pbxproj: Made Lexer.h private.
2310
2311 2009-05-05  Darin Adler  <darin@apple.com>
2312
2313         Reviewed by Sam Weinig.
2314
2315         Bug 25569: make ParserRefCounted use conventional reference counting
2316         https://bugs.webkit.org/show_bug.cgi?id=25569
2317
2318         SunSpider speedup of about 1.6%.
2319
2320         * JavaScriptCore.exp: Updated.
2321
2322         * parser/Nodes.cpp:
2323         (JSC::NodeReleaser::releaseAllNodes): ALWAYS_INLINE.
2324         (JSC::NodeReleaser::adopt): Ditto.
2325         (JSC::ParserRefCounted::ParserRefCounted): Removed most of the code.
2326         Add the object to a Vector<RefPtr> that gets cleared after parsing.
2327         (JSC::ParserRefCounted::~ParserRefCounted): Removed most of the code.
2328
2329         * parser/Nodes.h: Made ParserRefCounted inherit from RefCounted and
2330         made inline versions of the constructor and destructor. Made the
2331         Node constructor inline.
2332
2333         * parser/Parser.cpp:
2334         (JSC::Parser::parse): Call globalData->parserObjects.shrink(0) after
2335         parsing, where it used to call ParserRefCounted::deleteNewObjects.
2336
2337         * runtime/JSGlobalData.cpp:
2338         (JSC::JSGlobalData::JSGlobalData): Eliminated code to manage the
2339         newParserObjects and parserObjectExtraRefCounts.
2340         (JSC::JSGlobalData::~JSGlobalData): Ditto.
2341
2342         * runtime/JSGlobalData.h: Replaced the HashSet and HashCountedSet
2343         with a Vector.
2344
2345         * wtf/PassRefPtr.h:
2346         (WTF::PassRefPtr::~PassRefPtr): The most common thing to do with a
2347         PassRefPtr in hot code is to pass it and then destroy it once it's
2348         set to zero. Help the optimizer by telling it that's true.
2349
2350 2009-05-05  Xan Lopez  <xlopez@igalia.com> and Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2351
2352         Reviewed by Oliver Hunt.
2353
2354         Disable the NativeFunctionWrapper for all non-Mac ports for now,
2355         as it is also crashing on Linux/x86.
2356
2357         * runtime/NativeFunctionWrapper.h:
2358
2359 2009-05-05  Steve Falkenburg  <sfalken@apple.com>
2360
2361         Fix build.
2362
2363         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2364         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2365
2366 2009-05-05  Oliver Hunt  <oliver@apple.com>
2367
2368         Reviewed by Maciej Stachowiak.
2369
2370         Expose toThisObject for the DOM Window
2371
2372         * JavaScriptCore.exp:
2373
2374 2009-05-05  Oliver Hunt  <oliver@apple.com>
2375
2376         Reviewed by NOBODY (Make windows go again until i work out the
2377         accursed calling convention).
2378
2379         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2380         * jit/JIT.cpp:
2381         * runtime/NativeFunctionWrapper.h:
2382
2383 2009-05-05  Oliver Hunt  <oliver@apple.com>
2384
2385         Reviewed by NOBODY (Fix windows debug builds).
2386
2387         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2388
2389 2009-05-05  Oliver Hunt  <oliver@apple.com>
2390
2391         Reviewed by NOBODY (Hopefully the last fix).
2392
2393         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2394
2395 2009-05-05  Oliver Hunt  <oliver@apple.com>
2396
2397         Reviewed by NOBODY (Fix the build fix caused by a different build fix).
2398
2399         * parser/Nodes.cpp:
2400         * parser/Nodes.h:
2401
2402 2009-05-05  Oliver Hunt  <oliver@apple.com>
2403
2404         Reviewed by NOBODY (No idea how my changes could have broken these).
2405
2406         * runtime/DatePrototype.cpp:
2407         * runtime/RegExpObject.cpp:
2408
2409 2009-05-05  Oliver Hunt  <oliver@apple.com>
2410
2411         Reviewed by NOBODY (Why should i expect msvc to list all the errors in a file?).
2412
2413         * parser/Nodes.cpp:
2414
2415 2009-05-05  Oliver Hunt  <oliver@apple.com>
2416
2417         Reviewed by NOBODY (Fix warning, and another missing include).
2418
2419         * jit/JIT.cpp:
2420         * parser/Nodes.h:
2421
2422 2009-05-05  Oliver Hunt  <oliver@apple.com>
2423
2424         Reviewed by NOBODY (More build fixes).
2425
2426         * runtime/ErrorPrototype.cpp:
2427         * runtime/JSGlobalObject.cpp:
2428         * runtime/NumberPrototype.cpp:
2429         * runtime/ObjectPrototype.cpp:
2430         * runtime/StringConstructor.cpp:
2431
2432 2009-05-05  Oliver Hunt  <oliver@apple.com>
2433
2434         Reviewed by NOBODY (Will the fixes never end?).
2435
2436         * runtime/FunctionPrototype.h:
2437         * runtime/Lookup.cpp:
2438
2439 2009-05-05  Oliver Hunt  <oliver@apple.com>
2440
2441         Reviewed by NOBODY (More build fixes).
2442
2443         * jit/JIT.cpp:
2444
2445 2009-05-05  Oliver Hunt  <oliver@apple.com>
2446
2447         Reviewed by NOBODY (More build fixing).
2448
2449         * runtime/CallData.h:
2450
2451 2009-05-05  Oliver Hunt  <oliver@apple.com>
2452
2453         Reviewed by NOBODY (Build fix).
2454
2455         * runtime/ArrayConstructor.cpp:
2456         * runtime/BooleanPrototype.cpp:
2457         * runtime/DateConstructor.cpp:
2458         * runtime/Error.cpp:
2459         * runtime/ObjectConstructor.cpp:
2460         * runtime/RegExpPrototype.cpp:
2461
2462 2009-05-05  Oliver Hunt  <oliver@apple.com>
2463
2464         Reviewed by NOBODY (Buildfix).
2465
2466         Add missing file
2467
2468         * runtime/NativeFunctionWrapper.h: Copied from JavaScriptCore/jit/ExecutableAllocator.cpp.
2469
2470 2009-05-05  Oliver Hunt  <oliver@apple.com>
2471
2472         Reviewed by Gavin Barraclough.
2473
2474         Bug 25559: Improve native function call performance
2475         <https://bugs.webkit.org/show_bug.cgi?id=25559>
2476
2477         In order to cache calls to native functions we now make the standard
2478         prototype functions use a small assembly thunk that converts the JS
2479         calling convention into the native calling convention.  As this is
2480         only beneficial in the JIT we use the NativeFunctionWrapper typedef
2481         to alternate between PrototypeFunction and JSFunction to keep the
2482         code sane.  This change from PrototypeFunction to NativeFunctionWrapper
2483         is the bulk of this patch.
2484
2485         * JavaScriptCore.exp:
2486         * JavaScriptCore.xcodeproj/project.pbxproj:
2487         * assembler/MacroAssemblerX86Common.h:
2488         (JSC::MacroAssemblerX86Common::call):
2489         * assembler/MacroAssemblerX86_64.h:
2490         (JSC::MacroAssemblerX86_64::addPtr):
2491         * assembler/X86Assembler.h:
2492         (JSC::X86Assembler::leaq_mr):
2493         (JSC::X86Assembler::call_m):
2494         * interpreter/Interpreter.cpp:
2495         (JSC::Interpreter::execute):
2496         (JSC::Interpreter::prepareForRepeatCall):
2497         * jit/JIT.cpp:
2498         (JSC::JIT::privateCompileCTIMachineTrampolines):
2499         * jit/JIT.h:
2500         (JSC::JIT::compileCTIMachineTrampolines):
2501         * jit/JITCall.cpp:
2502         (JSC::JIT::linkCall):
2503         (JSC::JIT::compileOpCallInitializeCallFrame):
2504         (JSC::JIT::compileOpCall):
2505         * jit/JITCode.h:
2506         (JSC::JITCode::operator bool):
2507         * jit/JITInlineMethods.h:
2508         (JSC::JIT::emitGetFromCallFrameHeader):
2509         (JSC::JIT::emitGetFromCallFrameHeader32):
2510         * jit/JITStubs.cpp:
2511         (JSC::JITStubs::JITStubs):
2512         (JSC::JITStubs::cti_op_call_JSFunction):
2513         (JSC::JITStubs::cti_vm_dontLazyLinkCall):
2514         (JSC::JITStubs::cti_vm_lazyLinkCall):
2515         (JSC::JITStubs::cti_op_construct_JSConstruct):
2516         * jit/JITStubs.h:
2517         (JSC::JITStubs::ctiNativeCallThunk):
2518         * jsc.cpp:
2519         (GlobalObject::GlobalObject):
2520         * parser/Nodes.cpp:
2521         (JSC::FunctionBodyNode::FunctionBodyNode):
2522         (JSC::FunctionBodyNode::createNativeThunk):
2523         (JSC::FunctionBodyNode::generateJITCode):
2524         * parser/Nodes.h:
2525         (JSC::FunctionBodyNode::):
2526         (JSC::FunctionBodyNode::generatedJITCode):
2527         (JSC::FunctionBodyNode::jitCode):
2528         * profiler/Profiler.cpp:
2529         (JSC::Profiler::createCallIdentifier):
2530         * runtime/ArgList.h:
2531         * runtime/ArrayPrototype.cpp:
2532         (JSC::isNumericCompareFunction):
2533         * runtime/BooleanPrototype.cpp:
2534         (JSC::BooleanPrototype::BooleanPrototype):
2535         * runtime/DateConstructor.cpp:
2536         (JSC::DateConstructor::DateConstructor):
2537         * runtime/ErrorPrototype.cpp:
2538         (JSC::ErrorPrototype::ErrorPrototype):
2539         * runtime/FunctionPrototype.cpp:
2540         (JSC::FunctionPrototype::addFunctionProperties):
2541         (JSC::functionProtoFuncToString):
2542         * runtime/FunctionPrototype.h:
2543         * runtime/JSFunction.cpp:
2544         (JSC::JSFunction::JSFunction):
2545         (JSC::JSFunction::~JSFunction):
2546         (JSC::JSFunction::mark):
2547         (JSC::JSFunction::getCallData):
2548         (JSC::JSFunction::call):
2549         (JSC::JSFunction::argumentsGetter):
2550         (JSC::JSFunction::callerGetter):
2551         (JSC::JSFunction::lengthGetter):
2552         (JSC::JSFunction::getOwnPropertySlot):
2553         (JSC::JSFunction::put):
2554         (JSC::JSFunction::deleteProperty):
2555         (JSC::JSFunction::getConstructData):
2556         (JSC::JSFunction::construct):
2557         * runtime/JSFunction.h:
2558         (JSC::JSFunction::JSFunction):
2559         (JSC::JSFunction::setScope):
2560         (JSC::JSFunction::scope):
2561         (JSC::JSFunction::isHostFunction):
2562         (JSC::JSFunction::scopeChain):
2563         (JSC::JSFunction::clearScopeChain):
2564         (JSC::JSFunction::setScopeChain):
2565         (JSC::JSFunction::nativeFunction):
2566         (JSC::JSFunction::setNativeFunction):
2567         * runtime/JSGlobalData.cpp:
2568         (JSC::JSGlobalData::~JSGlobalData):
2569         (JSC::JSGlobalData::createNativeThunk):
2570         * runtime/JSGlobalData.h:
2571         (JSC::JSGlobalData::nativeFunctionThunk):
2572         * runtime/JSGlobalObject.cpp:
2573         (JSC::JSGlobalObject::reset):
2574         * runtime/JSGlobalObject.h:
2575         * runtime/Lookup.cpp:
2576         (JSC::setUpStaticFunctionSlot):
2577         * runtime/Lookup.h:
2578         * runtime/NumberPrototype.cpp:
2579         (JSC::NumberPrototype::NumberPrototype):
2580         * runtime/ObjectPrototype.cpp:
2581         (JSC::ObjectPrototype::ObjectPrototype):
2582         * runtime/RegExpPrototype.cpp:
2583         (JSC::RegExpPrototype::RegExpPrototype):
2584         * runtime/StringConstructor.cpp:
2585         (JSC::StringConstructor::StringConstructor):
2586
2587 2009-05-05  Gavin Barraclough  <barraclough@apple.com>
2588
2589         Reviewed by Oliver Hunt.
2590
2591         For convenience, let the sampling flags tool clear multiple flags at once.
2592
2593         * jsc.cpp:
2594         (GlobalObject::GlobalObject):
2595         (functionSetSamplingFlags):
2596         (functionClearSamplingFlags):
2597
2598 2009-05-04  Maciej Stachowiak  <mjs@apple.com>
2599
2600         Rubber stamped by Gavin.
2601
2602         - inline Vector::resize for a ~1.5% speedup on string-tagcloud
2603
2604         * wtf/Vector.h:
2605         (WTF::Vector::resize): Inline
2606
2607 2009-05-03  Steve Falkenburg  <sfalken@apple.com>
2608
2609         Windows build fix.
2610
2611         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
2612
2613 2009-05-03  Mark Rowe  <mrowe@apple.com>
2614
2615         Fix the 64-bit build.
2616
2617         * API/APICast.h:
2618         (toJS):
2619         (toRef):
2620         * runtime/JSNumberCell.cpp:
2621         (JSC::jsAPIMangledNumber):
2622         * runtime/JSNumberCell.h:
2623
2624 2009-05-02  Sam Weinig  <sam@webkit.org>
2625
2626         Roll JSC API number marshaling back in one last time (I hope).
2627
2628 2009-05-03  Sam Weinig  <sam@webkit.org>
2629
2630         Roll JSC API number marshaling back out. It still breaks windows.
2631
2632 2009-05-03  Sam Weinig  <sam@webkit.org>
2633
2634         Roll JSC API number marshaling back in.
2635
2636 2009-05-02  Darin Adler  <darin@apple.com>
2637
2638         Reviewed by Maciej Stachowiak.
2639
2640         Bug 25519: streamline lexer by handling BOMs differently
2641         https://bugs.webkit.org/show_bug.cgi?id=25519
2642
2643         Roughly 1% faster SunSpider.
2644
2645         * parser/Grammar.y: Tweak formatting a bit.
2646
2647         * parser/Lexer.cpp:
2648         (JSC::Lexer::Lexer): Remove unnnecessary initialization of data members
2649         that are set up by setCode.
2650         (JSC::Lexer::currentOffset): Added. Used where the old code would look at
2651         m_currentOffset.
2652         (JSC::Lexer::shift1): Replaces the old shift function. No longer does anything
2653         to handle BOM characters.
2654         (JSC::Lexer::shift2): Ditto.
2655         (JSC::Lexer::shift3): Ditto.
2656         (JSC::Lexer::shift4): Ditto.
2657         (JSC::Lexer::setCode): Updated for name change from yylineno to m_line.
2658         Removed now-unused m_eatNextIdentifier, m_stackToken, and m_restrKeyword.
2659         Replaced m_skipLF and m_skipCR with m_skipLineEnd. Replaced the old
2660         m_length with m_codeEnd and m_currentOffset with m_codeStart. Added code
2661         to scan for a BOM character and call copyCodeWithoutBOMs() if we find any.
2662         (JSC::Lexer::copyCodeWithoutBOMs): Added.
2663         (JSC::Lexer::nextLine): Updated for name change from yylineno to m_line.
2664         (JSC::Lexer::makeIdentifier): Moved up higher in the file.
2665         (JSC::Lexer::matchPunctuator): Moved up higher in the file and changed to
2666         use a switch statement instead of just if statements.
2667         (JSC::Lexer::isLineTerminator): Moved up higher in the file and changed to
2668         have fewer branches.
2669         (JSC::Lexer::lastTokenWasRestrKeyword): Added. This replaces the old
2670         m_restrKeyword boolean.
2671         (JSC::Lexer::isIdentStart): Moved up higher in the file. Changed to use
2672         fewer branches in the ASCII but not identifier case.
2673         (JSC::Lexer::isIdentPart): Ditto.
2674         (JSC::Lexer::singleEscape): Moved up higher in the file.
2675         (JSC::Lexer::convertOctal): Moved up higher in the file.
2676         (JSC::Lexer::convertHex): Moved up higher in the file. Changed to use
2677         toASCIIHexValue instead of rolling our own here.
2678         (JSC::Lexer::convertUnicode): Ditto.
2679         (JSC::Lexer::record8): Moved up higher in the file.
2680         (JSC::Lexer::record16): Moved up higher in the file.
2681         (JSC::Lexer::lex): Changed type of stringType to int. Replaced m_skipLF
2682         and m_skipCR with m_skipLineEnd, which requires fewer branches in the
2683         main lexer loop. Use currentOffset instead of m_currentOffset. Removed
2684         unneeded m_stackToken. Use isASCIIDigit instead of isDecimalDigit.
2685         Split out the two cases for InIdentifierOrKeyword and InIdentifier.
2686         Added special case tight loops for identifiers and other simple states.
2687         Removed a branch from the code that sets m_atLineStart to false using goto.
2688         Streamlined the number-handling code so we don't check for the same types
2689         twice for non-numeric cases and don't add a null to m_buffer8 when it's
2690         not being used. Removed m_eatNextIdentifier, which wasn't working anyway,
2691         and m_restrKeyword, which is redundant with m_lastToken. Set the
2692         m_delimited flag without using a branch.
2693         (JSC::Lexer::scanRegExp): Tweaked style a bit.
2694         (JSC::Lexer::clear): Clear m_codeWithoutBOMs so we don't use memory after
2695         parsing. Clear out UString objects in the more conventional way.
2696         (JSC::Lexer::sourceCode): Made this no-longer inline since it has more
2697         work to do in the case where we stripped BOMs.
2698
2699         * parser/Lexer.h: Renamed yylineno to m_lineNumber. Removed convertHex
2700         function, which is the same as toASCIIHexValue. Removed isHexDigit
2701         function, which is the same as isASCIIHedDigit. Replaced shift with four
2702         separate shift functions. Removed isWhiteSpace function that passes
2703         m_current, instead just passing m_current explicitly. Removed isOctalDigit,
2704         which is the same as isASCIIOctalDigit. Eliminated unused arguments from
2705         matchPunctuator. Added copyCoodeWithoutBOMs and currentOffset. Moved the
2706         makeIdentifier function out of the header. Added lastTokenWasRestrKeyword
2707         function. Added new constants for m_skipLineEnd. Removed unused yycolumn,
2708         m_restrKeyword, m_skipLF, m_skipCR, m_eatNextIdentifier, m_stackToken,
2709         m_position, m_length, m_currentOffset, m_nextOffset1, m_nextOffset2,
2710         m_nextOffset3. Added m_skipLineEnd, m_codeStart, m_codeEnd, and
2711         m_codeWithoutBOMs.
2712
2713         * parser/SourceProvider.h: Added hasBOMs function. In the future this can
2714         be used to tell the lexer about strings known not to have BOMs.
2715
2716         * runtime/JSGlobalObjectFunctions.cpp:
2717         (JSC::globalFuncUnescape): Changed to use isASCIIHexDigit.
2718
2719         * wtf/ASCIICType.h: Added using statements to match the design of the
2720         other WTF headers.
2721
2722 2009-05-02  Ada Chan  <adachan@apple.com>
2723
2724         Fix windows build (when doing a clean build)
2725
2726         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2727
2728 2009-05-02  Geoffrey Garen  <ggaren@apple.com>
2729
2730         Reviewed by Sam Weinig.
2731
2732         Simplified null-ish JSValues.
2733         
2734         Replaced calls to noValue() with calls to JSValue() (which is what
2735         noValue() returned). Removed noValue().
2736         
2737         Replaced almost all uses of jsImpossibleValue() with uses of JSValue().
2738         Its one remaining use is for construction of hash table deleted values.
2739         For that specific task, I made a new, private constructor with a special
2740         tag. Removed jsImpossibleValue().
2741         
2742         Removed "JSValue()" initialiazers, since default construction happens...
2743         by default.
2744
2745         * API/JSCallbackObjectFunctions.h:
2746         (JSC::::call):
2747         * bytecompiler/BytecodeGenerator.cpp:
2748         (JSC::BytecodeGenerator::emitLoad):
2749         * bytecompiler/BytecodeGenerator.h:
2750         * debugger/DebuggerCallFrame.cpp:
2751         (JSC::DebuggerCallFrame::evaluate):
2752         * debugger/DebuggerCallFrame.h:
2753         (JSC::DebuggerCallFrame::DebuggerCallFrame):
2754         * interpreter/CallFrame.h:
2755         (JSC::ExecState::clearException):
2756         * interpreter/Interpreter.cpp:
2757         (JSC::Interpreter::privateExecute):
2758         (JSC::Interpreter::retrieveLastCaller):
2759         * interpreter/Register.h:
2760         (JSC::Register::Register):
2761         * jit/JITCall.cpp:
2762         (JSC::JIT::unlinkCall):
2763         (JSC::JIT::compileOpCallInitializeCallFrame):
2764         (JSC::JIT::compileOpCall):
2765         * jit/JITStubs.cpp:
2766         (JSC::JITStubs::cti_op_call_eval):
2767         (JSC::JITStubs::cti_vm_throw):
2768         * profiler/Profiler.cpp:
2769         (JSC::Profiler::willExecute):
2770         (JSC::Profiler::didExecute):
2771         * runtime/ArrayPrototype.cpp:
2772         (JSC::getProperty):
2773         * runtime/Completion.cpp:
2774         (JSC::evaluate):
2775         * runtime/Completion.h:
2776         (JSC::Completion::Completion):
2777         * runtime/GetterSetter.cpp:
2778         (JSC::GetterSetter::getPrimitiveNumber):
2779         * runtime/JSArray.cpp:
2780         (JSC::JSArray::putSlowCase):
2781         (JSC::JSArray::deleteProperty):
2782         (JSC::JSArray::increaseVectorLength):
2783         (JSC::JSArray::setLength):
2784         (JSC::JSArray::pop):
2785         (JSC::JSArray::sort):
2786         (JSC::JSArray::compactForSorting):
2787         * runtime/JSCell.cpp:
2788         (JSC::JSCell::getJSNumber):
2789         * runtime/JSCell.h:
2790         (JSC::JSValue::getJSNumber):
2791         * runtime/JSGlobalData.cpp:
2792         (JSC::JSGlobalData::JSGlobalData):
2793         * runtime/JSImmediate.h:
2794         (JSC::JSImmediate::fromNumberOutsideIntegerRange):
2795         (JSC::JSImmediate::from):
2796         * runtime/JSNumberCell.cpp:
2797         (JSC::jsNumberCell):
2798         * runtime/JSObject.cpp:
2799         (JSC::callDefaultValueFunction):
2800         * runtime/JSObject.h:
2801         (JSC::JSObject::getDirect):
2802         * runtime/JSPropertyNameIterator.cpp:
2803         (JSC::JSPropertyNameIterator::toPrimitive):
2804         * runtime/JSPropertyNameIterator.h:
2805         (JSC::JSPropertyNameIterator::next):
2806         * runtime/JSValue.h:
2807         (JSC::JSValue::):
2808         (JSC::JSValueHashTraits::constructDeletedValue):
2809         (JSC::JSValueHashTraits::isDeletedValue):
2810         (JSC::JSValue::JSValue):
2811         * runtime/JSWrapperObject.h:
2812         (JSC::JSWrapperObject::JSWrapperObject):
2813         * runtime/Operations.h:
2814         (JSC::resolveBase):
2815         * runtime/PropertySlot.h:
2816         (JSC::PropertySlot::clearBase):
2817         (JSC::PropertySlot::clearValue):
2818
2819 2009-05-02  Maciej Stachowiak  <mjs@apple.com>
2820
2821         Reviewed by Cameron Zwarich.
2822
2823         - speed up the lexer in various ways
2824
2825         ~2% command-line SunSpider speedup
2826
2827         * parser/Lexer.cpp:
2828         (JSC::Lexer::setCode): Moved below shift() so it can inline.
2829         (JSC::Lexer::scanRegExp):  Use resize(0) instead of clear() on Vectors, since the intent
2830         here is not to free the underlying buffer.
2831         (JSC::Lexer::lex): ditto; also, change the loop logic a bit for the main lexing loop
2832         to avoid branching on !m_done twice per iteration. Now we only check it once.
2833         (JSC::Lexer::shift): Make this ALWAYS_INLINE and tag an unusual branch as UNLIKELY
2834         * parser/Lexer.h:
2835         (JSC::Lexer::makeIdentifier): force to be ALWAYS_INLINE
2836         * wtf/Vector.h:
2837         (WTF::::append): force to be ALWAYS_INLINE (may have helped in ways other than parsing but it wasn't
2838         getting inlined in a hot code path in the lexer)
2839
2840 2009-05-01  Steve Falkenburg  <sfalken@apple.com>
2841
2842         Windows build fix.
2843
2844         * JavaScriptCore.vcproj/JavaScriptCore.make:
2845
2846 2009-05-01  Sam Weinig  <sam@webkit.org>
2847
2848         Fix 64bit build.
2849
2850         * runtime/JSNumberCell.h:
2851         (JSC::JSValue::JSValue):
2852         * runtime/JSValue.h:
2853         (JSC::jsNumber):
2854
2855 2009-05-01  Sam Weinig  <sam@webkit.org>
2856
2857         Roll out JavaScriptCore API number marshaling.
2858
2859         * API/APICast.h:
2860         (toJS):
2861         (toRef):
2862         * API/JSBase.cpp:
2863         (JSEvaluateScript):
2864         (JSCheckScriptSyntax):
2865         * API/JSCallbackConstructor.cpp:
2866         (JSC::constructJSCallback):
2867         * API/JSCallbackFunction.cpp:
2868         (JSC::JSCallbackFunction::call):
2869         * API/JSCallbackObjectFunctions.h:
2870         (JSC::::getOwnPropertySlot):
2871         (JSC::::put):
2872         (JSC::::deleteProperty):
2873         (JSC::::construct):
2874         (JSC::::hasInstance):
2875         (JSC::::call):
2876         (JSC::::toNumber):
2877         (JSC::::toString):
2878         (JSC::::staticValueGetter):
2879         (JSC::::callbackGetter):
2880         * API/JSObjectRef.cpp:
2881         (JSObjectMakeFunction):
2882         (JSObjectMakeArray):
2883         (JSObjectMakeDate):
2884         (JSObjectMakeError):
2885         (JSObjectMakeRegExp):
2886         (JSObjectGetPrototype):
2887         (JSObjectSetPrototype):
2888         (JSObjectGetProperty):
2889         (JSObjectSetProperty):
2890         (JSObjectGetPropertyAtIndex):
2891         (JSObjectSetPropertyAtIndex):
2892         (JSObjectDeleteProperty):
2893         (JSObjectCallAsFunction):
2894         (JSObjectCallAsConstructor):
2895         * API/JSValueRef.cpp:
2896         (JSValueGetType):
2897         (JSValueIsUndefined):
2898         (JSValueIsNull):
2899         (JSValueIsBoolean):
2900         (JSValueIsNumber):
2901         (JSValueIsString):
2902         (JSValueIsObject):
2903         (JSValueIsObjectOfClass):
2904         (JSValueIsEqual):
2905         (JSValueIsStrictEqual):
2906         (JSValueIsInstanceOfConstructor):
2907         (JSValueMakeUndefined):
2908         (JSValueMakeNull):
2909         (JSValueMakeBoolean):
2910         (JSValueMakeNumber):
2911         (JSValueMakeString):
2912         (JSValueToBoolean):
2913         (JSValueToNumber):
2914         (JSValueToStringCopy):
2915         (JSValueToObject):
2916         (JSValueProtect):
2917         (JSValueUnprotect):
2918         * JavaScriptCore.exp:
2919         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2920         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2921         * runtime/JSNumberCell.cpp:
2922         * runtime/JSNumberCell.h:
2923         * runtime/JSValue.h:
2924
2925 2009-05-01  Sam Weinig  <sam@webkit.org>
2926
2927         Fix windows build.
2928
2929         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2930         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2931
2932 2009-05-01  Sam Weinig  <sam@webkit.org>
2933
2934         Fix the build.
2935
2936         * JavaScriptCore.exp:
2937
2938 2009-05-01  Sam Weinig  <sam@webkit.org>
2939
2940         Reviewed by Geoffrey "Too Far!" Garen.
2941
2942         Move JS number construction into JSValue.
2943
2944         * runtime/JSImmediate.h:
2945         * runtime/JSNumberCell.h:
2946         (JSC::JSValue::JSValue):
2947         * runtime/JSValue.h:
2948         (JSC::jsNumber):
2949
2950 2009-05-01  Sam Weinig  <sam@webkit.org>
2951
2952         Reviewed by Geoff "The Minneapolis" Garen.
2953
2954         Add mechanism to vend heap allocated JS numbers to JavaScriptCore API clients with a
2955         representation that is independent of the number representation in the VM.
2956         - Numbers leaving the interpreter are converted to a tagged JSNumberCell.
2957         - The numbers coming into the interpreter (asserted to be the tagged JSNumberCell) are
2958           converted back to the VM's internal number representation.
2959
2960         * API/APICast.h:
2961         (toJS):
2962         (toRef):
2963         * API/JSBase.cpp:
2964         (JSEvaluateScript):
2965         (JSCheckScriptSyntax):
2966         * API/JSCallbackConstructor.cpp:
2967         (JSC::constructJSCallback):
2968         * API/JSCallbackFunction.cpp:
2969         (JSC::JSCallbackFunction::call):
2970         * API/JSCallbackObjectFunctions.h:
2971         (JSC::::getOwnPropertySlot):
2972         (JSC::::put):
2973         (JSC::::deleteProperty):
2974         (JSC::::construct):
2975         (JSC::::hasInstance):
2976         (JSC::::call):
2977         (JSC::::toNumber):
2978         (JSC::::toString):
2979         (JSC::::staticValueGetter):
2980         (JSC::::callbackGetter):
2981         * API/JSObjectRef.cpp:
2982         (JSObjectMakeFunction):
2983         (JSObjectMakeArray):
2984         (JSObjectMakeDate):
2985         (JSObjectMakeError):
2986         (JSObjectMakeRegExp):
2987         (JSObjectGetPrototype):
2988         (JSObjectSetPrototype):
2989         (JSObjectGetProperty):
2990         (JSObjectSetProperty):
2991         (JSObjectGetPropertyAtIndex):
2992         (JSObjectSetPropertyAtIndex):
2993         (JSObjectDeleteProperty):
2994         (JSObjectCallAsFunction):
2995         (JSObjectCallAsConstructor):
2996         * API/JSValueRef.cpp:
2997         (JSValueGetType):
2998         (JSValueIsUndefined):
2999         (JSValueIsNull):
3000         (JSValueIsBoolean):
3001         (JSValueIsNumber):
3002         (JSValueIsString):
3003         (JSValueIsObject):
3004         (JSValueIsObjectOfClass):
3005         (JSValueIsEqual):
3006         (JSValueIsStrictEqual):
3007         (JSValueIsInstanceOfConstructor):
3008         (JSValueMakeUndefined):
3009         (JSValueMakeNull):
3010         (JSValueMakeBoolean):
3011         (JSValueMakeNumber):
3012         (JSValueMakeString):
3013         (JSValueToBoolean):
3014         (JSValueToNumber):
3015         (JSValueToStringCopy):
3016         (JSValueToObject):
3017         (JSValueProtect):
3018         (JSValueUnprotect):
3019         * runtime/JSNumberCell.cpp:
3020         (JSC::jsAPIMangledNumber):
3021         * runtime/JSNumberCell.h:
3022         (JSC::JSNumberCell::isAPIMangledNumber):
3023         (JSC::JSNumberCell::):
3024         (JSC::JSNumberCell::JSNumberCell):
3025         (JSC::JSValue::isAPIMangledNumber):
3026         * runtime/JSValue.h:
3027
3028 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
3029
3030         Windows build fix take 6.
3031
3032         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3033
3034 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
3035
3036         Windows build fix take 5.
3037
3038         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3039
3040 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
3041
3042         Windows build fix take 4.
3043
3044         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3045
3046 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
3047
3048         Windows build fix take 3.
3049
3050         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3051
3052 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
3053
3054         Windows build fix take 2.
3055
3056         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3057
3058 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
3059
3060         Windows build fix take 1.
3061
3062         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3063         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3064
3065 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
3066
3067         Rubber Stamped by Sam Weinig.
3068         
3069         Renamed JSValuePtr => JSValue.
3070
3071         * API/APICast.h:
3072         (toJS):
3073         (toRef):
3074         * API/JSCallbackConstructor.h:
3075         (JSC::JSCallbackConstructor::createStructure):
3076         * API/JSCallbackFunction.cpp:
3077         (JSC::JSCallbackFunction::call):
3078         * API/JSCallbackFunction.h:
3079         (JSC::JSCallbackFunction::createStructure):
3080         * API/JSCallbackObject.h:
3081         (JSC::JSCallbackObject::createStructure):
3082         * API/JSCallbackObjectFunctions.h:
3083         (JSC::::asCallbackObject):
3084         (JSC::::put):
3085         (JSC::::hasInstance):
3086         (JSC::::call):
3087         (JSC::::staticValueGetter):
3088         (JSC::::staticFunctionGetter):
3089         (JSC::::callbackGetter):
3090         * API/JSContextRef.cpp:
3091         * API/JSObjectRef.cpp:
3092         (JSObjectMakeConstructor):
3093         (JSObjectSetPrototype):
3094         (JSObjectGetProperty):
3095         (JSObjectSetProperty):
3096         (JSObjectGetPropertyAtIndex):
3097         (JSObjectSetPropertyAtIndex):
3098         * API/JSValueRef.cpp:
3099         (JSValueGetType):
3100         (JSValueIsUndefined):
3101         (JSValueIsNull):
3102         (JSValueIsBoolean):
3103         (JSValueIsNumber):
3104         (JSValueIsString):
3105         (JSValueIsObject):
3106         (JSValueIsObjectOfClass):
3107         (JSValueIsEqual):
3108         (JSValueIsStrictEqual):
3109         (JSValueIsInstanceOfConstructor):
3110         (JSValueToBoolean):
3111         (JSValueToNumber):
3112         (JSValueToStringCopy):
3113         (JSValueToObject):
3114         (JSValueProtect):
3115         (JSValueUnprotect):
3116         * JavaScriptCore.exp:
3117         * bytecode/CodeBlock.cpp:
3118         (JSC::valueToSourceString):
3119         (JSC::constantName):
3120         (JSC::CodeBlock::dump):
3121         * bytecode/CodeBlock.h:
3122         (JSC::CodeBlock::getConstant):
3123         (JSC::CodeBlock::addUnexpectedConstant):
3124         (JSC::CodeBlock::unexpectedConstant):
3125         * bytecode/EvalCodeCache.h:
3126         (JSC::EvalCodeCache::get):
3127         * bytecompiler/BytecodeGenerator.cpp:
3128         (JSC::BytecodeGenerator::addConstant):
3129         (JSC::BytecodeGenerator::addUnexpectedConstant):
3130         (JSC::BytecodeGenerator::emitLoad):
3131         (JSC::BytecodeGenerator::emitGetScopedVar):
3132         (JSC::BytecodeGenerator::emitPutScopedVar):
3133         (JSC::BytecodeGenerator::emitNewError):
3134         (JSC::keyForImmediateSwitch):
3135         * bytecompiler/BytecodeGenerator.h:
3136         (JSC::BytecodeGenerator::JSValueHashTraits::constructDeletedValue):
3137         (JSC::BytecodeGenerator::JSValueHashTraits::isDeletedValue):
3138         * debugger/Debugger.cpp:
3139         (JSC::evaluateInGlobalCallFrame):
3140         * debugger/Debugger.h:
3141         * debugger/DebuggerActivation.cpp:
3142         (JSC::DebuggerActivation::put):
3143         (JSC::DebuggerActivation::putWithAttributes):
3144         (JSC::DebuggerActivation::lookupGetter):
3145         (JSC::DebuggerActivation::lookupSetter):
3146         * debugger/DebuggerActivation.h:
3147         (JSC::DebuggerActivation::createStructure):
3148         * debugger/DebuggerCallFrame.cpp:
3149         (JSC::DebuggerCallFrame::evaluate):
3150         * debugger/DebuggerCallFrame.h:
3151         (JSC::DebuggerCallFrame::DebuggerCallFrame):
3152         (JSC::DebuggerCallFrame::exception):
3153         * interpreter/CachedCall.h:
3154         (JSC::CachedCall::CachedCall):
3155         (JSC::CachedCall::call):
3156         (JSC::CachedCall::setThis):
3157         (JSC::CachedCall::setArgument):
3158         * interpreter/CallFrame.cpp:
3159         (JSC::CallFrame::thisValue):
3160         (JSC::CallFrame::dumpCaller):
3161         * interpreter/CallFrame.h:
3162         (JSC::ExecState::setException):
3163         (JSC::ExecState::exception):
3164         (JSC::ExecState::exceptionSlot):
3165         * interpreter/CallFrameClosure.h:
3166         (JSC::CallFrameClosure::setArgument):
3167         * interpreter/Interpreter.cpp:
3168         (JSC::Interpreter::resolve):
3169         (JSC::Interpreter::resolveSkip):
3170         (JSC::Interpreter::resolveGlobal):
3171         (JSC::Interpreter::resolveBase):
3172         (JSC::Interpreter::resolveBaseAndProperty):
3173         (JSC::Interpreter::resolveBaseAndFunc):
3174         (JSC::isNotObject):
3175         (JSC::Interpreter::callEval):
3176         (JSC::Interpreter::unwindCallFrame):
3177         (JSC::Interpreter::throwException):
3178         (JSC::Interpreter::execute):
3179         (JSC::Interpreter::prepareForRepeatCall):
3180         (JSC::Interpreter::createExceptionScope):
3181         (JSC::Interpreter::tryCachePutByID):
3182         (JSC::Interpreter::tryCacheGetByID):
3183         (JSC::Interpreter::privateExecute):
3184         (JSC::Interpreter::retrieveArguments):
3185         (JSC::Interpreter::retrieveCaller):
3186         (JSC::Interpreter::retrieveLastCaller):
3187         * interpreter/Interpreter.h:
3188         * interpreter/Register.h:
3189         (JSC::Register::):
3190         (JSC::Register::Register):
3191         (JSC::Register::jsValue):
3192         * jit/JIT.cpp:
3193         (JSC::):
3194         (JSC::JIT::privateCompileMainPass):
3195         * jit/JIT.h:
3196         * jit/JITArithmetic.cpp:
3197         (JSC::JIT::compileFastArith_op_mod):
3198         * jit/JITCall.cpp:
3199         (JSC::JIT::unlinkCall):
3200         (JSC::JIT::compileOpCallInitializeCallFrame):
3201         (JSC::JIT::compileOpCall):
3202         * jit/JITCode.h:
3203         (JSC::):
3204         (JSC::JITCode::execute):
3205         * jit/JITInlineMethods.h:
3206         (JSC::JIT::emitGetVirtualRegister):
3207         (JSC::JIT::getConstantOperand):
3208         (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
3209         (JSC::JIT::emitInitRegister):
3210         * jit/JITPropertyAccess.cpp:
3211         (JSC::JIT::privateCompilePutByIdTransition):
3212         (JSC::JIT::patchGetByIdSelf):
3213         (JSC::JIT::patchPutByIdReplace):
3214         (JSC::JIT::privateCompileGetByIdSelf):
3215         (JSC::JIT::privateCompileGetByIdProto):
3216         (JSC::JIT::privateCompileGetByIdSelfList):
3217         (JSC::JIT::privateCompileGetByIdProtoList):
3218         (JSC::JIT::privateCompileGetByIdChainList):
3219         (JSC::JIT::privateCompileGetByIdChain):
3220         (JSC::JIT::privateCompilePutByIdReplace):
3221         * jit/JITStubs.cpp:
3222         (JSC::JITStubs::tryCachePutByID):
3223         (JSC::JITStubs::tryCacheGetByID):
3224         (JSC::JITStubs::cti_op_convert_this):
3225         (JSC::JITStubs::cti_op_add):
3226         (JSC::JITStubs::cti_op_pre_inc):
3227         (JSC::JITStubs::cti_op_loop_if_less):
3228         (JSC::JITStubs::cti_op_loop_if_lesseq):
3229         (JSC::JITStubs::cti_op_get_by_id_generic):
3230         (JSC::JITStubs::cti_op_get_by_id):
3231         (JSC::JITStubs::cti_op_get_by_id_second):
3232         (JSC::JITStubs::cti_op_get_by_id_self_fail):
3233         (JSC::JITStubs::cti_op_get_by_id_proto_list):
3234         (JSC::JITStubs::cti_op_get_by_id_proto_list_full):
3235         (JSC::JITStubs::cti_op_get_by_id_proto_fail):
3236         (JSC::JITStubs::cti_op_get_by_id_array_fail):
3237         (JSC::JITStubs::cti_op_get_by_id_string_fail):
3238         (JSC::JITStubs::cti_op_instanceof):
3239         (JSC::JITStubs::cti_op_del_by_id):
3240         (JSC::JITStubs::cti_op_mul):
3241         (JSC::JITStubs::cti_op_call_NotJSFunction):
3242         (JSC::JITStubs::cti_op_resolve):
3243         (JSC::JITStubs::cti_op_construct_NotJSConstruct):
3244         (JSC::JITStubs::cti_op_get_by_val):
3245         (JSC::JITStubs::cti_op_get_by_val_string):
3246         (JSC::JITStubs::cti_op_get_by_val_byte_array):
3247         (JSC::JITStubs::cti_op_resolve_func):
3248         (JSC::JITStubs::cti_op_sub):
3249         (JSC::JITStubs::cti_op_put_by_val):
3250         (JSC::JITStubs::cti_op_put_by_val_array):
3251         (JSC::JITStubs::cti_op_put_by_val_byte_array):
3252         (JSC::JITStubs::cti_op_lesseq):
3253         (JSC::JITStubs::cti_op_loop_if_true):
3254         (JSC::JITStubs::cti_op_load_varargs):
3255         (JSC::JITStubs::cti_op_negate):
3256         (JSC::JITStubs::cti_op_resolve_base):
3257         (JSC::JITStubs::cti_op_resolve_skip):
3258         (JSC::JITStubs::cti_op_resolve_global):
3259         (JSC::JITStubs::cti_op_div):
3260         (JSC::JITStubs::cti_op_pre_dec):
3261         (JSC::JITStubs::cti_op_jless):
3262         (JSC::JITStubs::cti_op_not):
3263         (JSC::JITStubs::cti_op_jtrue):
3264         (JSC::JITStubs::cti_op_post_inc):
3265         (JSC::JITStubs::cti_op_eq):
3266         (JSC::JITStubs::cti_op_lshift):
3267         (JSC::JITStubs::cti_op_bitand):
3268         (JSC::JITStubs::cti_op_rshift):
3269         (JSC::JITStubs::cti_op_bitnot):
3270         (JSC::JITStubs::cti_op_resolve_with_base):
3271         (JSC::JITStubs::cti_op_mod):
3272         (JSC::JITStubs::cti_op_less):
3273         (JSC::JITStubs::cti_op_neq):
3274         (JSC::JITStubs::cti_op_post_dec):
3275         (JSC::JITStubs::cti_op_urshift):
3276         (JSC::JITStubs::cti_op_bitxor):
3277         (JSC::JITStubs::cti_op_bitor):
3278         (JSC::JITStubs::cti_op_call_eval):
3279         (JSC::JITStubs::cti_op_throw):
3280         (JSC::JITStubs::cti_op_next_pname):
3281         (JSC::JITStubs::cti_op_typeof):
3282         (JSC::JITStubs::cti_op_is_undefined):
3283         (JSC::JITStubs::cti_op_is_boolean):
3284         (JSC::JITStubs::cti_op_is_number):
3285         (JSC::JITStubs::cti_op_is_string):
3286         (JSC::JITStubs::cti_op_is_object):
3287         (JSC::JITStubs::cti_op_is_function):
3288         (JSC::JITStubs::cti_op_stricteq):
3289         (JSC::JITStubs::cti_op_nstricteq):
3290         (JSC::JITStubs::cti_op_to_jsnumber):
3291         (JSC::JITStubs::cti_op_in):
3292         (JSC::JITStubs::cti_op_switch_imm):
3293         (JSC::JITStubs::cti_op_switch_char):
3294         (JSC::JITStubs::cti_op_switch_string):
3295         (JSC::JITStubs::cti_op_del_by_val):
3296         (JSC::JITStubs::cti_op_new_error):
3297         (JSC::JITStubs::cti_vm_throw):
3298         * jit/JITStubs.h:
3299         * jsc.cpp:
3300         (functionPrint):
3301         (functionDebug):
3302         (functionGC):
3303         (functionVersion):
3304         (functionRun):
3305         (functionLoad):
3306         (functionSetSamplingFlag):
3307         (functionClearSamplingFlag):
3308         (functionReadline):
3309         (functionQuit):
3310         * parser/Nodes.cpp:
3311         (JSC::processClauseList):
3312         * profiler/ProfileGenerator.cpp:
3313         (JSC::ProfileGenerator::addParentForConsoleStart):
3314         * profiler/Profiler.cpp:
3315         (JSC::Profiler::willExecute):
3316         (JSC::Profiler::didExecute):
3317         (JSC::Profiler::createCallIdentifier):
3318         * profiler/Profiler.h:
3319         * runtime/ArgList.cpp:
3320         (JSC::MarkedArgumentBuffer::slowAppend):
3321         * runtime/ArgList.h:
3322         (JSC::MarkedArgumentBuffer::at):
3323         (JSC::MarkedArgumentBuffer::append):
3324         (JSC::ArgList::ArgList):
3325         (JSC::ArgList::at):
3326         * runtime/Arguments.cpp:
3327         (JSC::Arguments::put):
3328         * runtime/Arguments.h:
3329         (JSC::Arguments::createStructure):
3330         (JSC::asArguments):
3331         * runtime/ArrayConstructor.cpp:
3332         (JSC::callArrayConstructor):
3333         * runtime/ArrayPrototype.cpp:
3334         (JSC::getProperty):
3335         (JSC::putProperty):
3336         (JSC::arrayProtoFuncToString):
3337         (JSC::arrayProtoFuncToLocaleString):
3338         (JSC::arrayProtoFuncJoin):
3339         (JSC::arrayProtoFuncConcat):
3340         (JSC::arrayProtoFuncPop):
3341         (JSC::arrayProtoFuncPush):
3342         (JSC::arrayProtoFuncReverse):
3343         (JSC::arrayProtoFuncShift):
3344         (JSC::arrayProtoFuncSlice):
3345         (JSC::arrayProtoFuncSort):
3346         (JSC::arrayProtoFuncSplice):
3347         (JSC::arrayProtoFuncUnShift):
3348         (JSC::arrayProtoFuncFilter):
3349         (JSC::arrayProtoFuncMap):
3350         (JSC::arrayProtoFuncEvery):
3351         (JSC::arrayProtoFuncForEach):
3352         (JSC::arrayProtoFuncSome):
3353         (JSC::arrayProtoFuncReduce):
3354         (JSC::arrayProtoFuncReduceRight):
3355         (JSC::arrayProtoFuncIndexOf):
3356         (JSC::arrayProtoFuncLastIndexOf):
3357         * runtime/BooleanConstructor.cpp:
3358         (JSC::callBooleanConstructor):
3359         (JSC::constructBooleanFromImmediateBoolean):
3360         * runtime/BooleanConstructor.h:
3361         * runtime/BooleanObject.h:
3362         (JSC::asBooleanObject):
3363         * runtime/BooleanPrototype.cpp:
3364         (JSC::booleanProtoFuncToString):
3365         (JSC::booleanProtoFuncValueOf):
3366         * runtime/CallData.cpp:
3367         (JSC::call):
3368         * runtime/CallData.h:
3369         * runtime/Collector.cpp:
3370         (JSC::Heap::protect):
3371         (JSC::Heap::unprotect):
3372         (JSC::Heap::heap):
3373         * runtime/Collector.h:
3374         * runtime/Completion.cpp:
3375         (JSC::evaluate):
3376         * runtime/Completion.h:
3377         (JSC::Completion::Completion):
3378         (JSC::Completion::value):
3379         (JSC::Completion::setValue):
3380         * runtime/ConstructData.cpp:
3381         (JSC::construct):
3382         * runtime/ConstructData.h:
3383         * runtime/DateConstructor.cpp:
3384         (JSC::constructDate):
3385         (JSC::callDate):
3386         (JSC::dateParse):
3387         (JSC::dateNow):
3388         (JSC::dateUTC):
3389         * runtime/DateInstance.h:
3390         (JSC::asDateInstance):
3391         * runtime/DatePrototype.cpp:
3392         (JSC::dateProtoFuncToString):
3393         (JSC::dateProtoFuncToUTCString):
3394         (JSC::dateProtoFuncToDateString):
3395         (JSC::dateProtoFuncToTimeString):
3396         (JSC::dateProtoFuncToLocaleString):
3397         (JSC::dateProtoFuncToLocaleDateString):
3398         (JSC::dateProtoFuncToLocaleTimeString):
3399         (JSC::dateProtoFuncGetTime):
3400         (JSC::dateProtoFuncGetFullYear):
3401         (JSC::dateProtoFuncGetUTCFullYear):
3402         (JSC::dateProtoFuncToGMTString):
3403         (JSC::dateProtoFuncGetMonth):
3404         (JSC::dateProtoFuncGetUTCMonth):
3405         (JSC::dateProtoFuncGetDate):
3406         (JSC::dateProtoFuncGetUTCDate):
3407         (JSC::dateProtoFuncGetDay):
3408         (JSC::dateProtoFuncGetUTCDay):
3409         (JSC::dateProtoFuncGetHours):
3410         (JSC::dateProtoFuncGetUTCHours):
3411         (JSC::dateProtoFuncGetMinutes):
3412         (JSC::dateProtoFuncGetUTCMinutes):
3413         (JSC::dateProtoFuncGetSeconds):
3414         (JSC::dateProtoFuncGetUTCSeconds):
3415         (JSC::dateProtoFuncGetMilliSeconds):
3416         (JSC::dateProtoFuncGetUTCMilliseconds):
3417         (JSC::dateProtoFuncGetTimezoneOffset):
3418         (JSC::dateProtoFuncSetTime):
3419         (JSC::setNewValueFromTimeArgs):
3420         (JSC::setNewValueFromDateArgs):
3421         (JSC::dateProtoFuncSetMilliSeconds):
3422         (JSC::dateProtoFuncSetUTCMilliseconds):
3423         (JSC::dateProtoFuncSetSeconds):
3424         (JSC::dateProtoFuncSetUTCSeconds):
3425         (JSC::dateProtoFuncSetMinutes):
3426         (JSC::dateProtoFuncSetUTCMinutes):
3427         (JSC::dateProtoFuncSetHours):
3428         (JSC::dateProtoFuncSetUTCHours):
3429         (JSC::dateProtoFuncSetDate):
3430         (JSC::dateProtoFuncSetUTCDate):
3431         (JSC::dateProtoFuncSetMonth):
3432         (JSC::dateProtoFuncSetUTCMonth):
3433         (JSC::dateProtoFuncSetFullYear):
3434         (JSC::dateProtoFuncSetUTCFullYear):
3435         (JSC::dateProtoFuncSetYear):
3436         (JSC::dateProtoFuncGetYear):
3437         * runtime/DatePrototype.h:
3438         (JSC::DatePrototype::createStructure):
3439         * runtime/ErrorConstructor.cpp:
3440         (JSC::callErrorConstructor):
3441         * runtime/ErrorPrototype.cpp:
3442         (JSC::errorProtoFuncToString):
3443         * runtime/ExceptionHelpers.cpp:
3444         (JSC::createInterruptedExecutionException):
3445         (JSC::createError):
3446         (JSC::createStackOverflowError):
3447         (JSC::createUndefinedVariableError):
3448         (JSC::createErrorMessage):
3449         (JSC::createInvalidParamError):
3450         (JSC::createNotAConstructorError):
3451         (JSC::createNotAFunctionError):
3452         * runtime/ExceptionHelpers.h:
3453         * runtime/FunctionConstructor.cpp:
3454         (JSC::callFunctionConstructor):
3455         * runtime/FunctionPrototype.cpp:
3456         (JSC::callFunctionPrototype):
3457         (JSC::functionProtoFuncToString):
3458         (JSC::functionProtoFuncApply):
3459         (JSC::functionProtoFuncCall):
3460         * runtime/FunctionPrototype.h:
3461         (JSC::FunctionPrototype::createStructure):
3462         * runtime/GetterSetter.cpp:
3463         (JSC::GetterSetter::toPrimitive):
3464         (JSC::GetterSetter::getPrimitiveNumber):
3465         * runtime/GetterSetter.h:
3466         (JSC::asGetterSetter):
3467         * runtime/InternalFunction.cpp:
3468         (JSC::InternalFunction::displayName):
3469         * runtime/InternalFunction.h:
3470         (JSC::InternalFunction::createStructure):
3471         (JSC::asInternalFunction):
3472         * runtime/JSActivation.cpp:
3473         (JSC::JSActivation::getOwnPropertySlot):
3474         (JSC::JSActivation::put):
3475         (JSC::JSActivation::putWithAttributes):
3476         (JSC::JSActivation::argumentsGetter):
3477         * runtime/JSActivation.h:
3478         (JSC::JSActivation::createStructure):
3479         (JSC::asActivation):
3480         * runtime/JSArray.cpp:
3481         (JSC::storageSize):
3482         (JSC::JSArray::JSArray):
3483         (JSC::JSArray::getOwnPropertySlot):
3484         (JSC::JSArray::put):
3485         (JSC::JSArray::putSlowCase):
3486         (JSC::JSArray::deleteProperty):
3487         (JSC::JSArray::setLength):
3488         (JSC::JSArray::pop):
3489         (JSC::JSArray::push):
3490         (JSC::JSArray::mark):
3491         (JSC::compareNumbersForQSort):
3492         (JSC::JSArray::sortNumeric):
3493         (JSC::JSArray::sort):
3494         (JSC::JSArray::compactForSorting):
3495         (JSC::JSArray::checkConsistency):
3496         (JSC::constructArray):
3497         * runtime/JSArray.h:
3498         (JSC::JSArray::getIndex):
3499         (JSC::JSArray::setIndex):
3500         (JSC::JSArray::createStructure):
3501         (JSC::asArray):
3502         (JSC::isJSArray):
3503         * runtime/JSByteArray.cpp:
3504         (JSC::JSByteArray::createStructure):
3505         (JSC::JSByteArray::put):
3506         * runtime/JSByteArray.h:
3507         (JSC::JSByteArray::getIndex):
3508         (JSC::JSByteArray::setIndex):
3509         (JSC::asByteArray):
3510         (JSC::isJSByteArray):
3511         * runtime/JSCell.cpp:
3512         (JSC::JSCell::put):
3513         (JSC::JSCell::getJSNumber):
3514         * runtime/JSCell.h:
3515         (JSC::asCell):
3516         (JSC::JSValue::asCell):
3517         (JSC::JSValue::isString):
3518         (JSC::JSValue::isGetterSetter):
3519         (JSC::JSValue::isObject):
3520         (JSC::JSValue::getString):
3521         (JSC::JSValue::getObject):
3522         (JSC::JSValue::getCallData):
3523         (JSC::JSValue::getConstructData):
3524         (JSC::JSValue::getUInt32):
3525         (JSC::JSValue::getTruncatedInt32):
3526         (JSC::JSValue::getTruncatedUInt32):
3527         (JSC::JSValue::mark):
3528         (JSC::JSValue::marked):
3529         (JSC::JSValue::toPrimitive):
3530         (JSC::JSValue::getPrimitiveNumber):
3531         (JSC::JSValue::toBoolean):
3532         (JSC::JSValue::toNumber):
3533         (JSC::JSValue::toString):
3534         (JSC::JSValue::toObject):
3535         (JSC::JSValue::toThisObject):
3536         (JSC::JSValue::needsThisConversion):
3537         (JSC::JSValue::toThisString):
3538         (JSC::JSValue::getJSNumber):
3539         * runtime/JSFunction.cpp:
3540         (JSC::JSFunction::call):
3541         (JSC::JSFunction::argumentsGetter):
3542         (JSC::JSFunction::callerGetter):
3543         (JSC::JSFunction::lengthGetter):
3544         (JSC::JSFunction::getOwnPropertySlot):
3545         (JSC::JSFunction::put):
3546         (JSC::JSFunction::construct):
3547         * runtime/JSFunction.h:
3548         (JSC::JSFunction::createStructure):
3549         (JSC::asFunction):
3550         * runtime/JSGlobalData.h:
3551         * runtime/JSGlobalObject.cpp:
3552         (JSC::markIfNeeded):
3553         (JSC::JSGlobalObject::put):
3554         (JSC::JSGlobalObject::putWithAttributes):
3555         (JSC::JSGlobalObject::reset):
3556         (JSC::JSGlobalObject::resetPrototype):
3557         * runtime/JSGlobalObject.h:
3558         (JSC::JSGlobalObject::createStructure):
3559         (JSC::JSGlobalObject::GlobalPropertyInfo::GlobalPropertyInfo):
3560         (JSC::asGlobalObject):
3561         (JSC::Structure::prototypeForLookup):
3562         (JSC::Structure::prototypeChain):
3563         (JSC::Structure::isValid):
3564         * runtime/JSGlobalObjectFunctions.cpp:
3565         (JSC::encode):
3566         (JSC::decode):
3567         (JSC::globalFuncEval):
3568         (JSC::globalFuncParseInt):
3569         (JSC::globalFuncParseFloat):
3570         (JSC::globalFuncIsNaN):
3571         (JSC::globalFuncIsFinite):
3572         (JSC::globalFuncDecodeURI):
3573         (JSC::globalFuncDecodeURIComponent):
3574         (JSC::globalFuncEncodeURI):
3575         (JSC::globalFuncEncodeURIComponent):
3576         (JSC::globalFuncEscape):
3577         (JSC::globalFuncUnescape):
3578         (JSC::globalFuncJSCPrint):
3579         * runtime/JSGlobalObjectFunctions.h:
3580         * runtime/JSImmediate.cpp:
3581         (JSC::JSImmediate::toThisObject):
3582         (JSC::JSImmediate::toObject):
3583         (JSC::JSImmediate::prototype):
3584         (JSC::JSImmediate::toString):
3585         * runtime/JSImmediate.h:
3586         (JSC::JSImmediate::isImmediate):
3587         (JSC::JSImmediate::isNumber):
3588         (JSC::JSImmediate::isIntegerNumber):
3589         (JSC::JSImmediate::isDoubleNumber):
3590         (JSC::JSImmediate::isPositiveIntegerNumber):
3591         (JSC::JSImmediate::isBoolean):
3592         (JSC::JSImmediate::isUndefinedOrNull):
3593         (JSC::JSImmediate::isEitherImmediate):
3594         (JSC::JSImmediate::areBothImmediate):
3595         (JSC::JSImmediate::areBothImmediateIntegerNumbers):
3596         (JSC::JSImmediate::makeValue):
3597         (JSC::JSImmediate::makeInt):
3598         (JSC::JSImmediate::makeDouble):
3599         (JSC::JSImmediate::makeBool):
3600         (JSC::JSImmediate::makeUndefined):
3601         (JSC::JSImmediate::makeNull):
3602         (JSC::JSImmediate::doubleValue):
3603         (JSC::JSImmediate::intValue):
3604         (JSC::JSImmediate::uintValue):
3605         (JSC::JSImmediate::boolValue):
3606         (JSC::JSImmediate::rawValue):
3607         (JSC::JSImmediate::trueImmediate):
3608         (JSC::JSImmediate::falseImmediate):
3609         (JSC::JSImmediate::undefinedImmediate):
3610         (JSC::JSImmediate::nullImmediate):
3611         (JSC::JSImmediate::zeroImmediate):
3612         (JSC::JSImmediate::oneImmediate):
3613         (JSC::JSImmediate::impossibleValue):
3614         (JSC::JSImmediate::toBoolean):
3615         (JSC::JSImmediate::getTruncatedUInt32):
3616         (JSC::JSImmediate::fromNumberOutsideIntegerRange):
3617         (JSC::JSImmediate::from):
3618         (JSC::JSImmediate::getTruncatedInt32):
3619         (JSC::JSImmediate::toDouble):
3620         (JSC::JSImmediate::getUInt32):
3621         (JSC::JSValue::JSValue):
3622         (JSC::JSValue::isUndefinedOrNull):
3623         (JSC::JSValue::isBoolean):
3624         (JSC::JSValue::getBoolean):
3625         (JSC::JSValue::toInt32):
3626         (JSC::JSValue::toUInt32):
3627         (JSC::JSValue::isCell):
3628         (JSC::JSValue::isInt32Fast):
3629         (JSC::JSValue::getInt32Fast):
3630         (JSC::JSValue::isUInt32Fast):
3631         (JSC::JSValue::getUInt32Fast):
3632         (JSC::JSValue::makeInt32Fast):
3633         (JSC::JSValue::areBothInt32Fast):
3634         (JSC::JSFastMath::canDoFastBitwiseOperations):
3635         (JSC::JSFastMath::equal):
3636         (JSC::JSFastMath::notEqual):
3637         (JSC::JSFastMath::andImmediateNumbers):
3638         (JSC::JSFastMath::xorImmediateNumbers):
3639         (JSC::JSFastMath::orImmediateNumbers):
3640         (JSC::JSFastMath::canDoFastRshift):
3641         (JSC::JSFastMath::canDoFastUrshift):
3642         (JSC::JSFastMath::rightShiftImmediateNumbers):
3643         (JSC::JSFastMath::canDoFastAdditiveOperations):
3644         (JSC::JSFastMath::addImmediateNumbers):
3645         (JSC::JSFastMath::subImmediateNumbers):
3646         (JSC::JSFastMath::incImmediateNumber):
3647         (JSC::JSFastMath::decImmediateNumber):
3648         * runtime/JSNotAnObject.cpp:
3649         (JSC::JSNotAnObject::toPrimitive):
3650         (JSC::JSNotAnObject::getPrimitiveNumber):
3651         (JSC::JSNotAnObject::put):
3652         * runtime/JSNotAnObject.h:
3653         (JSC::JSNotAnObject::createStructure):
3654         * runtime/JSNumberCell.cpp:
3655         (JSC::JSNumberCell::toPrimitive):
3656         (JSC::JSNumberCell::getPrimitiveNumber):
3657         (JSC::JSNumberCell::getJSNumber):
3658         (JSC::jsNumberCell):
3659         * runtime/JSNumberCell.h:
3660         (JSC::JSNumberCell::createStructure):
3661         (JSC::isNumberCell):
3662         (JSC::asNumberCell):
3663         (JSC::jsNumber):
3664         (JSC::JSValue::isDoubleNumber):
3665         (JSC::JSValue::getDoubleNumber):
3666         (JSC::JSValue::isNumber):
3667         (JSC::JSValue::uncheckedGetNumber):
3668         (JSC::jsNaN):
3669         (JSC::JSValue::toJSNumber):
3670         (JSC::JSValue::getNumber):
3671         (JSC::JSValue::numberToInt32):
3672         (JSC::JSValue::numberToUInt32):
3673         * runtime/JSObject.cpp:
3674         (JSC::JSObject::mark):
3675         (JSC::JSObject::put):
3676         (JSC::JSObject::putWithAttributes):
3677         (JSC::callDefaultValueFunction):
3678         (JSC::JSObject::getPrimitiveNumber):
3679         (JSC::JSObject::defaultValue):
3680         (JSC::JSObject::defineGetter):
3681         (JSC::JSObject::defineSetter):
3682         (JSC::JSObject::lookupGetter):
3683         (JSC::JSObject::lookupSetter):
3684         (JSC::JSObject::hasInstance):
3685         (JSC::JSObject::toNumber):
3686         (JSC::JSObject::toString):
3687         (JSC::JSObject::fillGetterPropertySlot):
3688         * runtime/JSObject.h:
3689         (JSC::JSObject::getDirect):
3690         (JSC::JSObject::getDirectLocation):
3691         (JSC::JSObject::offsetForLocation):
3692         (JSC::JSObject::locationForOffset):
3693         (JSC::JSObject::getDirectOffset):
3694         (JSC::JSObject::putDirectOffset):
3695         (JSC::JSObject::createStructure):
3696         (JSC::asObject):
3697         (JSC::JSObject::prototype):
3698         (JSC::JSObject::setPrototype):
3699         (JSC::JSValue::isObject):
3700         (JSC::JSObject::inlineGetOwnPropertySlot):
3701         (JSC::JSObject::getOwnPropertySlotForWrite):
3702         (JSC::JSObject::getPropertySlot):
3703         (JSC::JSObject::get):
3704         (JSC::JSObject::putDirect):
3705         (JSC::JSObject::putDirectWithoutTransition):
3706         (JSC::JSObject::toPrimitive):
3707         (JSC::JSValue::get):
3708         (JSC::JSValue::put):
3709         (JSC::JSObject::allocatePropertyStorageInline):
3710         * runtime/JSPropertyNameIterator.cpp:
3711         (JSC::JSPropertyNameIterator::toPrimitive):
3712         (JSC::JSPropertyNameIterator::getPrimitiveNumber):
3713         * runtime/JSPropertyNameIterator.h:
3714         (JSC::JSPropertyNameIterator::create):
3715         (JSC::JSPropertyNameIterator::next):
3716         * runtime/JSStaticScopeObject.cpp:
3717         (JSC::JSStaticScopeObject::put):
3718         (JSC::JSStaticScopeObject::putWithAttributes):
3719         * runtime/JSStaticScopeObject.h:
3720         (JSC::JSStaticScopeObject::JSStaticScopeObject):
3721         (JSC::JSStaticScopeObject::createStructure):
3722         * runtime/JSString.cpp:
3723         (JSC::JSString::toPrimitive):
3724         (JSC::JSString::getPrimitiveNumber):
3725         (JSC::JSString::getOwnPropertySlot):
3726         * runtime/JSString.h:
3727         (JSC::JSString::createStructure):
3728         (JSC::asString):
3729         (JSC::isJSString):
3730         (JSC::JSValue::toThisJSString):
3731         * runtime/JSValue.cpp:
3732         (JSC::JSValue::toInteger):
3733         (JSC::JSValue::toIntegerPreserveNaN):
3734         * runtime/JSValue.h:
3735         (JSC::JSValue::makeImmediate):
3736         (JSC::JSValue::asValue):
3737         (JSC::noValue):
3738         (JSC::jsImpossibleValue):
3739         (JSC::jsNull):
3740         (JSC::jsUndefined):
3741         (JSC::jsBoolean):
3742         (JSC::operator==):
3743         (JSC::operator!=):
3744         (JSC::JSValue::encode):
3745         (JSC::JSValue::decode):
3746         (JSC::JSValue::JSValue):
3747         (JSC::JSValue::operator bool):
3748         (JSC::JSValue::operator==):
3749         (JSC::JSValue::operator!=):
3750         (JSC::JSValue::isUndefined):
3751         (JSC::JSValue::isNull):
3752         * runtime/JSVariableObject.h:
3753         (JSC::JSVariableObject::symbolTablePut):
3754         (JSC::JSVariableObject::symbolTablePutWithAttributes):
3755         * runtime/JSWrapperObject.h:
3756         (JSC::JSWrapperObject::internalValue):
3757         (JSC::JSWrapperObject::setInternalValue):
3758         * runtime/Lookup.cpp:
3759         (JSC::setUpStaticFunctionSlot):
3760         * runtime/Lookup.h:
3761         (JSC::lookupPut):
3762         * runtime/MathObject.cpp:
3763         (JSC::mathProtoFuncAbs):
3764         (JSC::mathProtoFuncACos):
3765         (JSC::mathProtoFuncASin):
3766         (JSC::mathProtoFuncATan):
3767         (JSC::mathProtoFuncATan2):
3768         (JSC::mathProtoFuncCeil):
3769         (JSC::mathProtoFuncCos):
3770         (JSC::mathProtoFuncExp):
3771         (JSC::mathProtoFuncFloor):
3772         (JSC::mathProtoFuncLog):
3773         (JSC::mathProtoFuncMax):
3774         (JSC::mathProtoFuncMin):
3775         (JSC::mathProtoFuncPow):
3776         (JSC::mathProtoFuncRandom):
3777         (JSC::mathProtoFuncRound):
3778         (JSC::mathProtoFuncSin):
3779         (JSC::mathProtoFuncSqrt):
3780         (JSC::mathProtoFuncTan):
3781         * runtime/MathObject.h:
3782         (JSC::MathObject::createStructure):
3783         * runtime/NativeErrorConstructor.cpp:
3784         (JSC::callNativeErrorConstructor):
3785         * runtime/NumberConstructor.cpp:
3786         (JSC::numberConstructorNaNValue):
3787         (JSC::numberConstructorNegInfinity):
3788         (JSC::numberConstructorPosInfinity):
3789         (JSC::numberConstructorMaxValue):
3790         (JSC::numberConstructorMinValue):
3791         (JSC::callNumberConstructor):
3792         * runtime/NumberConstructor.h:
3793         (JSC::NumberConstructor::createStructure):
3794         * runtime/NumberObject.cpp:
3795         (JSC::NumberObject::getJSNumber):
3796         (JSC::constructNumber):
3797         * runtime/NumberObject.h:
3798         * runtime/NumberPrototype.cpp:
3799         (JSC::numberProtoFuncToString):
3800         (JSC::numberProtoFuncToLocaleString):
3801         (JSC::numberProtoFuncValueOf):
3802         (JSC::numberProtoFuncToFixed):
3803         (JSC::numberProtoFuncToExponential):
3804         (JSC::numberProtoFuncToPrecision):
3805         * runtime/ObjectConstructor.cpp:
3806         (JSC::constructObject):
3807         (JSC::callObjectConstructor):
3808         * runtime/ObjectPrototype.cpp:
3809         (JSC::objectProtoFuncValueOf):
3810         (JSC::objectProtoFuncHasOwnProperty):
3811         (JSC::objectProtoFuncIsPrototypeOf):
3812         (JSC::objectProtoFuncDefineGetter):
3813         (JSC::objectProtoFuncDefineSetter):
3814         (JSC::objectProtoFuncLookupGetter):
3815         (JSC::objectProtoFuncLookupSetter):
3816         (JSC::objectProtoFuncPropertyIsEnumerable):
3817         (JSC::objectProtoFuncToLocaleString):
3818         (JSC::objectProtoFuncToString):
3819         * runtime/ObjectPrototype.h:
3820         * runtime/Operations.cpp:
3821         (JSC::JSValue::equalSlowCase):
3822         (JSC::JSValue::strictEqualSlowCase):
3823         (JSC::throwOutOfMemoryError):
3824         (JSC::jsAddSlowCase):
3825         (JSC::jsTypeStringForValue):
3826         (JSC::jsIsObjectType):
3827         (JSC::jsIsFunctionType):
3828         * runtime/Operations.h:
3829         (JSC::JSValue::equal):
3830         (JSC::JSValue::equalSlowCaseInline):
3831         (JSC::JSValue::strictEqual):
3832         (JSC::JSValue::strictEqualSlowCaseInline):
3833         (JSC::jsLess):
3834         (JSC::jsLessEq):
3835         (JSC::jsAdd):
3836         (JSC::countPrototypeChainEntriesAndCheckForProxies):
3837         (JSC::resolveBase):
3838         * runtime/PropertySlot.cpp:
3839         (JSC::PropertySlot::functionGetter):
3840         * runtime/PropertySlot.h:
3841         (JSC::PropertySlot::PropertySlot):
3842         (JSC::PropertySlot::getValue):
3843         (JSC::PropertySlot::putValue):
3844         (JSC::PropertySlot::setValueSlot):
3845         (JSC::PropertySlot::setValue):
3846         (JSC::PropertySlot::setCustom):
3847         (JSC::PropertySlot::setCustomIndex):
3848         (JSC::PropertySlot::slotBase):
3849         (JSC::PropertySlot::setBase):
3850         (JSC::PropertySlot::):
3851         * runtime/Protect.h:
3852         (JSC::gcProtect):
3853         (JSC::gcUnprotect):
3854         (JSC::ProtectedPtr::operator JSValue):
3855         (JSC::ProtectedJSValue::ProtectedJSValue):
3856         (JSC::ProtectedJSValue::get):
3857         (JSC::ProtectedJSValue::operator JSValue):
3858         (JSC::ProtectedJSValue::operator->):
3859         (JSC::ProtectedJSValue::~ProtectedJSValue):
3860         (JSC::ProtectedJSValue::operator=):
3861         (JSC::operator==):
3862         (JSC::operator!=):
3863         * runtime/RegExpConstructor.cpp:
3864         (JSC::RegExpConstructor::getBackref):
3865         (JSC::RegExpConstructor::getLastParen):
3866         (JSC::RegExpConstructor::getLeftContext):
3867         (JSC::RegExpConstructor::getRightContext):
3868         (JSC::regExpConstructorDollar1):
3869         (JSC::regExpConstructorDollar2):
3870         (JSC::regExpConstructorDollar3):
3871         (JSC::regExpConstructorDollar4):
3872         (JSC::regExpConstructorDollar5):
3873         (JSC::regExpConstructorDollar6):
3874         (JSC::regExpConstructorDollar7):
3875         (JSC::regExpConstructorDollar8):
3876         (JSC::regExpConstructorDollar9):
3877         (JSC::regExpConstructorInput):
3878         (JSC::regExpConstructorMultiline):
3879         (JSC::regExpConstructorLastMatch):
3880         (JSC::regExpConstructorLastParen):
3881         (JSC::regExpConstructorLeftContext):
3882         (JSC::regExpConstructorRightContext):
3883         (JSC::RegExpConstructor::put):
3884         (JSC::setRegExpConstructorInput):
3885         (JSC::setRegExpConstructorMultiline):
3886         (JSC::constructRegExp):
3887         (JSC::callRegExpConstructor):
3888         * runtime/RegExpConstructor.h:
3889         (JSC::RegExpConstructor::createStructure):
3890         (JSC::asRegExpConstructor):
3891         * runtime/RegExpMatchesArray.h:
3892         (JSC::RegExpMatchesArray::put):
3893         * runtime/RegExpObject.cpp:
3894         (JSC::regExpObjectGlobal):
3895         (JSC::regExpObjectIgnoreCase):
3896         (JSC::regExpObjectMultiline):
3897         (JSC::regExpObjectSource):
3898         (JSC::regExpObjectLastIndex):
3899         (JSC::RegExpObject::put):
3900         (JSC::setRegExpObjectLastIndex):
3901         (JSC::RegExpObject::test):
3902         (JSC::RegExpObject::exec):
3903         (JSC::callRegExpObject):
3904         * runtime/RegExpObject.h:
3905         (JSC::RegExpObject::createStructure):
3906         (JSC::asRegExpObject):
3907         * runtime/RegExpPrototype.cpp:
3908         (JSC::regExpProtoFuncTest):
3909         (JSC::regExpProtoFuncExec):
3910         (JSC::regExpProtoFuncCompile):
3911         (JSC::regExpProtoFuncToString):
3912         * runtime/StringConstructor.cpp:
3913         (JSC::stringFromCharCodeSlowCase):
3914         (JSC::stringFromCharCode):
3915         (JSC::callStringConstructor):
3916         * runtime/StringObject.cpp:
3917         (JSC::StringObject::put):
3918         * runtime/StringObject.h:
3919         (JSC::StringObject::createStructure):
3920         (JSC::asStringObject):
3921         * runtime/StringObjectThatMasqueradesAsUndefined.h:
3922         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
3923         * runtime/StringPrototype.cpp:
3924         (JSC::stringProtoFuncReplace):
3925         (JSC::stringProtoFuncToString):
3926         (JSC::stringProtoFuncCharAt):
3927         (JSC::stringProtoFuncCharCodeAt):
3928         (JSC::stringProtoFuncConcat):
3929         (JSC::stringProtoFuncIndexOf):
3930         (JSC::stringProtoFuncLastIndexOf):
3931         (JSC::stringProtoFuncMatch):
3932         (JSC::stringProtoFuncSearch):
3933         (JSC::stringProtoFuncSlice):
3934         (JSC::stringProtoFuncSplit):
3935         (JSC::stringProtoFuncSubstr):
3936         (JSC::stringProtoFuncSubstring):
3937         (JSC::stringProtoFuncToLowerCase):
3938         (JSC::stringProtoFuncToUpperCase):
3939         (JSC::stringProtoFuncLocaleCompare):
3940         (JSC::stringProtoFuncBig):
3941         (JSC::stringProtoFuncSmall):
3942         (JSC::stringProtoFuncBlink):
3943         (JSC::stringProtoFuncBold):
3944         (JSC::stringProtoFuncFixed):
3945         (JSC::stringProtoFuncItalics):
3946         (JSC::stringProtoFuncStrike):
3947         (JSC::stringProtoFuncSub):
3948         (JSC::stringProtoFuncSup):
3949         (JSC::stringProtoFuncFontcolor):
3950         (JSC::stringProtoFuncFontsize):
3951         (JSC::stringProtoFuncAnchor):
3952         (JSC::stringProtoFuncLink):
3953         * runtime/Structure.cpp:
3954         (JSC::Structure::Structure):
3955         (JSC::Structure::changePrototypeTransition):
3956         * runtime/Structure.h:
3957         (JSC::Structure::create):
3958         (JSC::Structure::setPrototypeWithoutTransition):
3959         (JSC::Structure::storedPrototype):
3960
3961 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
3962
3963         Reviewed by Sam "That doesn't look like what I thought it looks like" Weinig.
3964         
3965         Beefed up the JSValuePtr class and removed some non-JSValuePtr dependencies
3966         on JSImmediate, in prepapration for making JSImmediate an implementation
3967         detail of JSValuePtr.
3968         
3969         SunSpider reports no change.
3970
3971         * interpreter/Interpreter.cpp:
3972         (JSC::Interpreter::privateExecute):
3973         * jit/JIT.cpp:
3974         (JSC::JIT::privateCompileMainPass):
3975         * jit/JITArithmetic.cpp:
3976         (JSC::JIT::compileFastArith_op_mod):
3977         * runtime/JSGlobalObjectFunctions.cpp:
3978         (JSC::globalFuncParseInt): Updated for interface changes.
3979
3980         * runtime/JSImmediate.h:
3981         (JSC::JSValuePtr::JSValuePtr):
3982         * runtime/JSValue.h:
3983         (JSC::JSValuePtr::):
3984         (JSC::jsImpossibleValue):
3985         (JSC::jsNull):
3986         (JSC::jsUndefined):
3987         (JSC::jsBoolean):
3988         (JSC::JSValuePtr::encode):
3989         (JSC::JSValuePtr::decode):
3990         (JSC::JSValuePtr::JSValuePtr):
3991         (JSC::JSValuePtr::operator bool):
3992         (JSC::JSValuePtr::operator==):
3993         (JSC::JSValuePtr::operator!=):
3994         (JSC::JSValuePtr::isUndefined):
3995         (JSC::JSValuePtr::isNull): Changed jsImpossibleValue(), jsNull(),
3996         jsUndefined(), and jsBoolean() to operate in terms of JSValuePtr instead
3997         of JSImmediate.
3998
3999         * wtf/StdLibExtras.h:
4000         (WTF::bitwise_cast): Fixed up for clarity.
4001
4002 2009-04-30  Gavin Barraclough  <barraclough@apple.com>
4003
4004         Reviewed by Geoff Garen.
4005
4006         Bug fix for rdar:/6845379.  If a case-insensitive regex contains
4007         a character class containing a range with an upper bound of \uFFFF
4008         the parser will infinite-loop whist adding other-case characters
4009         for characters in the range that do have another case.
4010
4011         * yarr/RegexCompiler.cpp:
4012         (JSC::Yarr::CharacterClassConstructor::putRange):
4013
4014 2009-04-30  Gavin Barraclough  <barraclough@apple.com>
4015
4016         Reviewed by Oliver Hunt.
4017
4018         OPCODE_SAMPLING without CODEBLOCK_SAMPLING is currently broken,
4019         since SamplingTool::Sample::isNull() checks the m_codeBlock
4020         member (which is always null without CODEBLOCK_SAMPLING).
4021
4022         Restructure the checks so make this work again.
4023
4024         * bytecode/SamplingTool.cpp:
4025         (JSC::SamplingTool::doRun):
4026         * bytecode/SamplingTool.h:
4027         (JSC::SamplingTool::Sample::isNull):
4028
4029 2009-04-30  Maciej Stachowiak  <mjs@apple.com>
4030
4031         Reviewed by Gavin Barraclough.
4032
4033         - Concatenate final three strings in simple replace case at one go
4034
4035         ~0.2% SunSpider speedup
4036
4037         * runtime/StringPrototype.cpp:
4038         (JSC::stringProtoFuncReplace): Use new replaceRange helper instead of
4039         taking substrings and concatenating three strings.
4040         * runtime/UString.cpp:
4041         (JSC::UString::replaceRange): New helper function.
4042         * runtime/UString.h:
4043
4044 2009-04-30  Geoffrey Garen  <ggaren@apple.com>
4045
4046         Rubber Stamped by Gavin Barraclough.
4047         
4048         Changed JSValueEncodedAsPtr* => EncodedJSValuePtr to support a non-pointer
4049         encoding for JSValuePtrs.
4050
4051         * API/APICast.h:
4052         (toJS):
4053         * bytecompiler/BytecodeGenerator.h:
4054         (JSC::BytecodeGenerator::JSValueHashTraits::constructDeletedValue):
4055         (JSC::BytecodeGenerator::JSValueHashTraits::isDeletedValue):
4056         * interpreter/Register.h:
4057         (JSC::Register::):
4058         * jit/JIT.cpp:
4059         (JSC::):
4060         * jit/JIT.h:
4061         * jit/JITCode.h:
4062         (JSC::):
4063         * jit/JITStubs.cpp:
4064         (JSC::JITStubs::cti_op_add):
4065         (JSC::JITStubs::cti_op_pre_inc):
4066         (JSC::JITStubs::cti_op_get_by_id_generic):
4067         (JSC::JITStubs::cti_op_get_by_id):
4068         (JSC::JITStubs::cti_op_get_by_id_second):
4069         (JSC::JITStubs::cti_op_get_by_id_self_fail):
4070         (JSC::JITStubs::cti_op_get_by_id_proto_list):
4071         (JSC::JITStubs::cti_op_get_by_id_proto_list_full):
4072         (JSC::JITStubs::cti_op_get_by_id_proto_fail):
4073         (JSC::JITStubs::cti_op_get_by_id_array_fail):
4074         (JSC::JITStubs::cti_op_get_by_id_string_fail):
4075         (JSC::JITStubs::cti_op_instanceof):
4076         (JSC::JITStubs::cti_op_del_by_id):
4077         (JSC::JITStubs::cti_op_mul):
4078         (JSC::JITStubs::cti_op_call_NotJSFunction):
4079         (JSC::JITStubs::cti_op_resolve):
4080         (JSC::JITStubs::cti_op_construct_NotJSConstruct):
4081         (JSC::JITStubs::cti_op_get_by_val):
4082         (JSC::JITStubs::cti_op_get_by_val_string):
4083         (JSC::JITStubs::cti_op_get_by_val_byte_array):
4084         (JSC::JITStubs::cti_op_sub):
4085         (JSC::JITStubs::cti_op_lesseq):
4086         (JSC::JITStubs::cti_op_negate):
4087         (JSC::JITStubs::cti_op_resolve_base):
4088         (JSC::JITStubs::cti_op_resolve_skip):
4089         (JSC::JITStubs::cti_op_resolve_global):
4090         (JSC::JITStubs::cti_op_div):
4091         (JSC::JITStubs::cti_op_pre_dec):
4092         (JSC::JITStubs::cti_op_not):
4093         (JSC::JITStubs::cti_op_eq):
4094         (JSC::JITStubs::cti_op_lshift):
4095         (JSC::JITStubs::cti_op_bitand):
4096         (JSC::JITStubs::cti_op_rshift):
4097         (JSC::JITStubs::cti_op_bitnot):
4098         (JSC::JITStubs::cti_op_mod):
4099         (JSC::JITStubs::cti_op_less):
4100         (JSC::JITStubs::cti_op_neq):
4101         (JSC::JITStubs::cti_op_urshift):
4102         (JSC::JITStubs::cti_op_bitxor):
4103         (JSC::JITStubs::cti_op_bitor):
4104         (JSC::JITStubs::cti_op_call_eval):
4105         (JSC::JITStubs::cti_op_throw):
4106         (JSC::JITStubs::cti_op_next_pname):
4107         (JSC::JITStubs::cti_op_typeof):
4108         (JSC::JITStubs::cti_op_is_undefined):
4109         (JSC::JITStubs::cti_op_is_boolean):
4110         (JSC::JITStubs::cti_op_is_number):
4111         (JSC::JITStubs::cti_op_is_string):
4112         (JSC::JITStubs::cti_op_is_object):
4113         (JSC::JITStubs::cti_op_is_function):
4114         (JSC::JITStubs::cti_op_stricteq):
4115         (JSC::JITStubs::cti_op_nstricteq):
4116         (JSC::JITStubs::cti_op_to_jsnumber):
4117         (JSC::JITStubs::cti_op_in):
4118         (JSC::JITStubs::cti_op_del_by_val):
4119         (JSC::JITStubs::cti_vm_throw):
4120         * jit/JITStubs.h:
4121         * runtime/JSValue.h:
4122         (JSC::JSValuePtr::encode):
4123         (JSC::JSValuePtr::decode):
4124
4125 2009-04-30  Gavin Barraclough  <barraclough@apple.com>
4126
4127         Reviewed by Oliver "Abandon Ship!" Hunt.
4128
4129         Fix a leak in Yarr.
4130
4131         All Disjunctions should be recorded in RegexPattern::m_disjunctions,
4132         so that they can be freed at the end of compilation - copyDisjunction
4133         is failing to do so.
4134
4135         * yarr/RegexCompiler.cpp:
4136         (JSC::Yarr::RegexPatternConstructor::copyDisjunction):
4137
4138 2009-04-30  Oliver Hunt  <oliver@apple.com>
4139
4140         Reviewed by Gavin Barraclough.
4141
4142         Add function to CallFrame for dumping the current JS caller
4143
4144         Added debug only method CallFrame::dumpCaller() that provide the call location
4145         of the deepest currently executing JS function.
4146
4147         * interpreter/CallFrame.cpp:
4148         (JSC::CallFrame::dumpCaller):
4149         * interpreter/CallFrame.h:
4150
4151 2009-04-30  Maciej Stachowiak  <mjs@apple.com>
4152
4153         Reviewed by Geoff Garen.
4154
4155         - make BaseStrings have themselves as a base, instead of nothing, to remove common branches
4156