2008-12-02 Geoffrey Garen <ggaren@apple.com>
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2008-12-02  Geoffrey Garen  <ggaren@apple.com>
2
3         Reviewed by Geoffrey Garen. (Patch by Cameron Zwarich <zwarich@apple.com>.)
4         
5         Fixed https://bugs.webkit.org/show_bug.cgi?id=22482
6         REGRESSION (r37991): Occasionally see "Scene rendered incorrectly"
7         message when running the V8 Raytrace benchmark
8         
9         Rolled out r37991. It didn't properly save xmm0, which is caller-save,
10         before calling helper functions.
11         
12         SunSpider and v8 benchmarks show little change -- possibly a .2%
13         SunSpider regression, possibly a .2% v8 benchmark speedup.
14
15         * assembler/X86Assembler.h:
16         (JSC::X86Assembler::):
17         * bytecode/CodeBlock.cpp:
18         (JSC::CodeBlock::dump):
19         * bytecode/Instruction.h:
20         (JSC::Instruction::):
21         * bytecompiler/BytecodeGenerator.cpp:
22         (JSC::BytecodeGenerator::emitUnaryOp):
23         * bytecompiler/BytecodeGenerator.h:
24         (JSC::BytecodeGenerator::emitToJSNumber):
25         (JSC::BytecodeGenerator::emitTypeOf):
26         (JSC::BytecodeGenerator::emitGetPropertyNames):
27         * interpreter/Interpreter.cpp:
28         (JSC::Interpreter::privateExecute):
29         * interpreter/Interpreter.h:
30         * jit/JIT.cpp:
31         (JSC::JIT::privateCompileMainPass):
32         (JSC::JIT::privateCompileSlowCases):
33         * jit/JIT.h:
34         * parser/Nodes.cpp:
35         (JSC::UnaryOpNode::emitBytecode):
36         (JSC::BinaryOpNode::emitBytecode):
37         (JSC::EqualNode::emitBytecode):
38         * parser/ResultType.h:
39         (JSC::ResultType::isReusable):
40         (JSC::ResultType::mightBeNumber):
41         * runtime/JSNumberCell.h:
42
43 2008-12-01  Gavin Barraclough  <barraclough@apple.com>
44
45         Reviewed by Geoffrey Garen.
46
47         Remove unused (sampling only, and derivable) argument to JIT::emitCTICall.
48         https://bugs.webkit.org/show_bug.cgi?id=22587
49
50         * jit/JIT.cpp:
51         (JSC::JIT::emitCTICall):
52         (JSC::JIT::compileOpCall):
53         (JSC::JIT::emitSlowScriptCheck):
54         (JSC::JIT::compileBinaryArithOpSlowCase):
55         (JSC::JIT::privateCompileMainPass):
56         (JSC::JIT::privateCompileSlowCases):
57         (JSC::JIT::privateCompile):
58         * jit/JIT.h:
59
60 2008-12-02  Dimitri Glazkov  <dglazkov@chromium.org>
61
62         Reviewed by Eric Seidel.
63         
64         Fix the inheritance chain for JSFunction.
65
66         * runtime/JSFunction.cpp:
67         (JSC::JSFunction::info): Add InternalFunction::info as parent class
68
69 2008-12-02  Simon Hausmann  <hausmann@webkit.org>
70
71         Reviewed by Tor Arne Vestbø.
72
73         Fix ability to include JavaScriptCore.pri from other .pro files.
74
75         * JavaScriptCore.pri: Moved -O3 setting into the .pro files.
76         * JavaScriptCore.pro:
77         * jsc.pro:
78
79 2008-12-01  Geoffrey Garen  <ggaren@apple.com>
80
81         Reviewed by Cameron Zwarich, with help from Gavin Barraclough.
82         
83         Fixed https://bugs.webkit.org/show_bug.cgi?id=22583.
84
85         Refactored regular expression parsing to parse sequences of characters
86         as a single unit, in preparation for optimizing sequences of characters.
87         
88         SunSpider reports no change.
89
90         * JavaScriptCore.xcodeproj/project.pbxproj:
91         * wrec/Escapes.h: Added. Set of classes for representing an escaped
92         token in a pattern.
93
94         * wrec/Quantifier.h:
95         (JSC::WREC::Quantifier::Quantifier): Simplified this constructor slightly,
96         to match the new Escape constructor.
97
98         * wrec/WRECGenerator.cpp:
99         (JSC::WREC::Generator::generatePatternCharacterSequence):
100         * wrec/WRECGenerator.h: Added an interface for generating a sequence
101         of pattern characters at a time. It doesn't do anything special yet.
102
103         * wrec/WRECParser.cpp:
104         (JSC::WREC::Parser::consumeGreedyQuantifier):
105         (JSC::WREC::Parser::consumeQuantifier): Renamed "parse" to "consume" in
106         these functions, to match "consumeEscape."
107
108         (JSC::WREC::Parser::parsePatternCharacterSequence): New function for
109         iteratively aggregating a sequence of characters in a pattern.
110
111         (JSC::WREC::Parser::parseCharacterClassQuantifier):
112         (JSC::WREC::Parser::parseBackreferenceQuantifier): Renamed "parse" to
113         "consume" in these functions, to match "consumeEscape."
114
115         (JSC::WREC::Parser::parseCharacterClass): Refactored to use the common
116         escape processing code in consumeEscape.
117
118         (JSC::WREC::Parser::parseEscape): Refactored to use the common
119         escape processing code in consumeEscape.
120
121         (JSC::WREC::Parser::consumeEscape): Factored escaped token processing
122         into a common function, since we were doing this in a few places.
123
124         (JSC::WREC::Parser::parseTerm): Refactored to use the common
125         escape processing code in consumeEscape.
126
127         * wrec/WRECParser.h:
128         (JSC::WREC::Parser::consumeOctal): Refactored to use a helper function
129         for reading a digit.
130
131 2008-12-01  Cameron Zwarich  <zwarich@apple.com>
132
133         Reviewed by Oliver Hunt.
134
135         Bug 20340: SegmentedVector segment allocations can lead to unsafe use of temporary registers
136         <https://bugs.webkit.org/show_bug.cgi?id=20340>
137
138         SegmentedVector currently frees segments and reallocates them when used
139         as a stack. This can lead to unsafe use of pointers into freed segments.
140
141         In order to fix this problem, SegmentedVector will be changed to only
142         grow and never shrink. Also, rename the reserveCapacity() member
143         function to grow() to match the actual usage in BytecodeGenerator, where
144         this function is used to allocate a group of registers at once, rather
145         than merely saving space for them.
146
147         * bytecompiler/BytecodeGenerator.cpp:
148         (JSC::BytecodeGenerator::BytecodeGenerator): Use grow() instead of 
149         reserveCapacity().
150         * bytecompiler/SegmentedVector.h:
151         (JSC::SegmentedVector::SegmentedVector):
152         (JSC::SegmentedVector::last):
153         (JSC::SegmentedVector::append):
154         (JSC::SegmentedVector::removeLast):
155         (JSC::SegmentedVector::grow): Renamed from reserveCapacity().
156         (JSC::SegmentedVector::clear):
157
158 2008-12-01  Mark Rowe  <mrowe@apple.com>
159
160         Rubber-stamped by Anders Carlsson.
161
162         Disable WREC for x86_64 since memory allocated by the system allocator is not marked executable,
163         which causes 64-bit debug builds to crash.  Once we have a dedicated allocator for executable
164         memory we can turn this back on.
165
166         * wtf/Platform.h:
167
168 2008-12-01  Antti Koivisto  <antti@apple.com>
169
170         Reviewed by Maciej Stachowiak.
171         
172         Restore inline buffer after vector is shrunk back below its inline capacity.
173
174         * wtf/Vector.h:
175         (WTF::):
176         (WTF::VectorBuffer::restoreInlineBufferIfNeeded):
177         (WTF::::shrinkCapacity):
178
179 2008-11-30  Antti Koivisto  <antti@apple.com>
180
181         Reviewed by Mark Rowe.
182         
183         Try to return free pages in the current thread cache too.
184
185         * wtf/FastMalloc.cpp:
186         (WTF::TCMallocStats::releaseFastMallocFreeMemory):
187
188 2008-12-01  David Levin  <levin@chromium.org>
189
190         Reviewed by Alexey Proskuryakov.
191
192         https://bugs.webkit.org/show_bug.cgi?id=22567
193         Make HashTable work as expected with respect to threads. Specifically, it has class-level
194         thread safety and constant methods work on constant objects without synchronization.
195         
196         No observable change in behavior, so no test. This only affects debug builds.
197
198         * wtf/HashTable.cpp:
199         (WTF::hashTableStatsMutex):
200         (WTF::HashTableStats::~HashTableStats):
201         (WTF::HashTableStats::recordCollisionAtCount):
202         Guarded variable access with a mutex.
203
204         * wtf/HashTable.h:
205         (WTF::::lookup):
206         (WTF::::lookupForWriting):
207         (WTF::::fullLookupForWriting):
208         (WTF::::add):
209         (WTF::::reinsert):
210         (WTF::::remove):
211         (WTF::::rehash):
212         Changed increments of static variables to use atomicIncrement.
213
214         (WTF::::invalidateIterators):
215         (WTF::addIterator):
216         (WTF::removeIterator):
217         Guarded mutable access with a mutex.
218
219 2008-11-29  Gavin Barraclough  <barraclough@apple.com>
220
221         Reviewed by Camron Zwarich.
222
223         Enable WREC on PLATFORM(X86_64).  This change predominantly requires changes to the
224         WREC::Generator::generateEnter method to support the x86-64 ABI, and addition of
225         support for a limited number of quadword operations in the X86Assembler.
226
227         This patch will cause the JS heap to be allocated with RWX permissions on 64-bit Mac
228         platforms.  This is a regression with respect to previous 64-bit behaviour, but is no
229         more permissive than on 32-bit builds.  This issue should be addressed at some point.
230         (This is tracked by bug #21783.)
231
232         https://bugs.webkit.org/show_bug.cgi?id=22554
233         Greater than 4x speedup on regexp-dna, on x86-64.
234
235         * assembler/MacroAssembler.h:
236         (JSC::MacroAssembler::addPtr):
237         (JSC::MacroAssembler::loadPtr):
238         (JSC::MacroAssembler::storePtr):
239         (JSC::MacroAssembler::pop):
240         (JSC::MacroAssembler::push):
241         (JSC::MacroAssembler::move):
242         * assembler/X86Assembler.h:
243         (JSC::X86Assembler::):
244         (JSC::X86Assembler::movq_rr):
245         (JSC::X86Assembler::addl_i8m):
246         (JSC::X86Assembler::addl_i32r):
247         (JSC::X86Assembler::addq_i8r):
248         (JSC::X86Assembler::addq_i32r):
249         (JSC::X86Assembler::movq_mr):
250         (JSC::X86Assembler::movq_rm):
251         * wrec/WREC.h:
252         * wrec/WRECGenerator.cpp:
253         (JSC::WREC::Generator::generateEnter):
254         (JSC::WREC::Generator::generateReturnSuccess):
255         (JSC::WREC::Generator::generateReturnFailure):
256         * wtf/Platform.h:
257         * wtf/TCSystemAlloc.cpp:
258
259 2008-12-01  Cameron Zwarich  <zwarich@apple.com>
260
261         Reviewed by Sam Weinig.
262
263         Preliminary work for bug 20340: SegmentedVector segment allocations can lead to unsafe use of temporary registers
264         <https://bugs.webkit.org/show_bug.cgi?id=20340>
265
266         SegmentedVector currently frees segments and reallocates them when used
267         as a stack. This can lead to unsafe use of pointers into freed segments.
268
269         In order to fix this problem, SegmentedVector will be changed to only
270         grow and never shrink, with the sole exception of clearing all of its
271         data, a capability that is required by Lexer. This patch changes the
272         public interface to only allow for these capabilities.
273
274         * bytecompiler/BytecodeGenerator.cpp:
275         (JSC::BytecodeGenerator::BytecodeGenerator): Use reserveCapacity()
276         instead of resize() for m_globals and m_parameters.
277         * bytecompiler/SegmentedVector.h:
278         (JSC::SegmentedVector::resize): Removed.
279         (JSC::SegmentedVector::reserveCapacity): Added.
280         (JSC::SegmentedVector::clear): Added.
281         (JSC::SegmentedVector::shrink): Removed.
282         (JSC::SegmentedVector::grow): Removed.
283         * parser/Lexer.cpp:
284         (JSC::Lexer::clear): Use clear() instead of resize(0).
285
286 2008-11-30  Sam Weinig  <sam@webkit.org>
287
288         Reviewed by Mark Rowe.
289
290         Renames jumps to m_jumps in JumpList.
291
292         * assembler/MacroAssembler.h:
293         (JSC::MacroAssembler::JumpList::link):
294         (JSC::MacroAssembler::JumpList::linkTo):
295         (JSC::MacroAssembler::JumpList::append):
296
297 2008-11-30  Antti Koivisto  <antti@apple.com>
298
299         Reviewed by Mark Rowe.
300         
301         https://bugs.webkit.org/show_bug.cgi?id=22557
302         
303         Report free size in central and thread caches too.
304
305         * wtf/FastMalloc.cpp:
306         (WTF::TCMallocStats::fastMallocStatistics):
307         * wtf/FastMalloc.h:
308
309 2008-11-29  Antti Koivisto  <antti@apple.com>
310
311         Reviewed by Dan Bernstein.
312         
313         https://bugs.webkit.org/show_bug.cgi?id=22557
314         Add statistics for JavaScript GC heap.
315
316         * JavaScriptCore.exp:
317         * runtime/Collector.cpp:
318         (JSC::Heap::objectCount):
319         (JSC::addToStatistics):
320         (JSC::Heap::statistics):
321         * runtime/Collector.h:
322
323 2008-11-29  Antti Koivisto  <antti@apple.com>
324
325         Fix debug build by adding a stub method.
326
327         * wtf/FastMalloc.cpp:
328         (WTF::fastMallocStatistics):
329
330 2008-11-29  Antti Koivisto  <antti@apple.com>
331
332         Reviewed by Alexey Proskuryakov.
333         
334         https://bugs.webkit.org/show_bug.cgi?id=22557
335         
336         Add function for getting basic statistics from FastMalloc.
337
338         * JavaScriptCore.exp:
339         * wtf/FastMalloc.cpp:
340         (WTF::DLL_Length):
341         (WTF::TCMalloc_PageHeap::ReturnedBytes):
342         (WTF::TCMallocStats::fastMallocStatistics):
343         * wtf/FastMalloc.h:
344
345 2008-11-29  Cameron Zwarich  <zwarich@apple.com>
346
347         Not reviewed.
348
349         The C++ standard does not automatically grant the friendships of an
350         enclosing class to its nested subclasses, so we should do so explicitly.
351         This fixes the GCC 4.0 build, although both GCC 4.2 and Visual C++ 2005
352         accept the incorrect code as it is.
353
354         * assembler/MacroAssembler.h:
355
356 2008-11-29  Gavin Barraclough  <barraclough@apple.com>
357
358         Reviewed by Camron Zwarich.
359
360         Add the class MacroAssembler to provide some abstraction of code generation,
361         and change WREC to make use of this class, rather than directly accessing
362         the X86Assembler.
363
364         This patch also allows WREC to be compiled without the rest of the JIT enabled.
365
366         * JavaScriptCore.xcodeproj/project.pbxproj:
367         * assembler/MacroAssembler.h: Added.
368         (JSC::MacroAssembler::):
369         (JSC::MacroAssembler::MacroAssembler):
370         (JSC::MacroAssembler::copyCode):
371         (JSC::MacroAssembler::Address::Address):
372         (JSC::MacroAssembler::ImplicitAddress::ImplicitAddress):
373         (JSC::MacroAssembler::BaseIndex::BaseIndex):
374         (JSC::MacroAssembler::Label::Label):
375         (JSC::MacroAssembler::Jump::Jump):
376         (JSC::MacroAssembler::Jump::link):
377         (JSC::MacroAssembler::Jump::linkTo):
378         (JSC::MacroAssembler::JumpList::link):
379         (JSC::MacroAssembler::JumpList::linkTo):
380         (JSC::MacroAssembler::JumpList::append):
381         (JSC::MacroAssembler::Imm32::Imm32):
382         (JSC::MacroAssembler::add32):
383         (JSC::MacroAssembler::or32):
384         (JSC::MacroAssembler::sub32):
385         (JSC::MacroAssembler::loadPtr):
386         (JSC::MacroAssembler::load32):
387         (JSC::MacroAssembler::load16):
388         (JSC::MacroAssembler::storePtr):
389         (JSC::MacroAssembler::store32):
390         (JSC::MacroAssembler::pop):
391         (JSC::MacroAssembler::push):
392         (JSC::MacroAssembler::peek):
393         (JSC::MacroAssembler::poke):
394         (JSC::MacroAssembler::move):
395         (JSC::MacroAssembler::compareImm32ForBranch):
396         (JSC::MacroAssembler::compareImm32ForBranchEquality):
397         (JSC::MacroAssembler::jae32):
398         (JSC::MacroAssembler::je32):
399         (JSC::MacroAssembler::je16):
400         (JSC::MacroAssembler::jg32):
401         (JSC::MacroAssembler::jge32):
402         (JSC::MacroAssembler::jl32):
403         (JSC::MacroAssembler::jle32):
404         (JSC::MacroAssembler::jne32):
405         (JSC::MacroAssembler::jump):
406         (JSC::MacroAssembler::breakpoint):
407         (JSC::MacroAssembler::ret):
408         * assembler/X86Assembler.h:
409         (JSC::X86Assembler::cmpw_rm):
410         * interpreter/Interpreter.cpp:
411         (JSC::Interpreter::Interpreter):
412         * interpreter/Interpreter.h:
413         (JSC::Interpreter::assemblerBuffer):
414         * runtime/RegExp.cpp:
415         (JSC::RegExp::RegExp):
416         * wrec/WREC.cpp:
417         (JSC::WREC::Generator::compileRegExp):
418         * wrec/WREC.h:
419         * wrec/WRECFunctors.cpp:
420         (JSC::WREC::GeneratePatternCharacterFunctor::generateAtom):
421         (JSC::WREC::GenerateCharacterClassFunctor::generateAtom):
422         (JSC::WREC::GenerateBackreferenceFunctor::generateAtom):
423         (JSC::WREC::GenerateParenthesesNonGreedyFunctor::generateAtom):
424         * wrec/WRECFunctors.h:
425         (JSC::WREC::GenerateParenthesesNonGreedyFunctor::GenerateParenthesesNonGreedyFunctor):
426         * wrec/WRECGenerator.cpp:
427         (JSC::WREC::Generator::generateEnter):
428         (JSC::WREC::Generator::generateReturnSuccess):
429         (JSC::WREC::Generator::generateSaveIndex):
430         (JSC::WREC::Generator::generateIncrementIndex):
431         (JSC::WREC::Generator::generateLoadCharacter):
432         (JSC::WREC::Generator::generateJumpIfEndOfInput):
433         (JSC::WREC::Generator::generateJumpIfNotEndOfInput):
434         (JSC::WREC::Generator::generateReturnFailure):
435         (JSC::WREC::Generator::generateBacktrack1):
436         (JSC::WREC::Generator::generateBacktrackBackreference):
437         (JSC::WREC::Generator::generateBackreferenceQuantifier):
438         (JSC::WREC::Generator::generateNonGreedyQuantifier):
439         (JSC::WREC::Generator::generateGreedyQuantifier):
440         (JSC::WREC::Generator::generatePatternCharacter):
441         (JSC::WREC::Generator::generateCharacterClassInvertedRange):
442         (JSC::WREC::Generator::generateCharacterClassInverted):
443         (JSC::WREC::Generator::generateCharacterClass):
444         (JSC::WREC::Generator::generateParentheses):
445         (JSC::WREC::Generator::generateParenthesesNonGreedy):
446         (JSC::WREC::Generator::generateParenthesesResetTrampoline):
447         (JSC::WREC::Generator::generateAssertionBOL):
448         (JSC::WREC::Generator::generateAssertionEOL):
449         (JSC::WREC::Generator::generateAssertionWordBoundary):
450         (JSC::WREC::Generator::generateBackreference):
451         (JSC::WREC::Generator::terminateAlternative):
452         (JSC::WREC::Generator::terminateDisjunction):
453         * wrec/WRECGenerator.h:
454         (JSC::WREC::Generator::Generator):
455         * wrec/WRECParser.cpp:
456         (JSC::WREC::Parser::parsePatternCharacterQualifier):
457         (JSC::WREC::Parser::parseCharacterClassQuantifier):
458         (JSC::WREC::Parser::parseBackreferenceQuantifier):
459         (JSC::WREC::Parser::parseParentheses):
460         (JSC::WREC::Parser::parseCharacterClass):
461         (JSC::WREC::Parser::parseOctalEscape):
462         (JSC::WREC::Parser::parseEscape):
463         (JSC::WREC::Parser::parseTerm):
464         (JSC::WREC::Parser::parseDisjunction):
465         * wrec/WRECParser.h:
466         (JSC::WREC::Parser::Parser):
467         (JSC::WREC::Parser::parsePattern):
468         (JSC::WREC::Parser::parseAlternative):
469         * wtf/Platform.h:
470
471 2008-11-28  Simon Hausmann  <hausmann@webkit.org>
472
473         Reviewed by Tor Arne Vestbø.
474
475         Fix compilation on Windows CE
476
477         Port away from the use of errno after calling strtol(), instead
478         detect conversion errors by checking the result and the stop
479         position.
480
481         * runtime/DateMath.cpp:
482         (JSC::parseLong):
483         (JSC::parseDate):
484
485 2008-11-28  Joerg Bornemann  <joerg.bornemann@trolltech.com>
486
487         Reviewed by Simon Hausmann.
488
489         Implement lowResUTCTime() on Windows CE using GetSystemTime as _ftime() is not available.
490
491         * runtime/DateMath.cpp:
492         (JSC::lowResUTCTime):
493
494 2008-11-28  Simon Hausmann  <hausmann@webkit.org>
495
496         Rubber-stamped by Tor Arne Vestbø.
497
498         Removed unnecessary inclusion of errno.h, which also fixes compilation on Windows CE.
499
500         * runtime/JSGlobalObjectFunctions.cpp:
501
502 2008-11-27  Cameron Zwarich  <zwarich@apple.com>
503
504         Not reviewed.
505
506         r38825 made JSFunction::m_body private, but some inspector code in
507         WebCore sets the field. Add setters for it.
508
509         * runtime/JSFunction.h:
510         (JSC::JSFunction::setBody):
511
512 2008-11-27  Sam Weinig  <sam@webkit.org>
513
514         Reviewed by Cameron Zwarich.
515
516         Fix FIXME by adding accessor for JSFunction's m_body property.
517
518         * interpreter/Interpreter.cpp:
519         (JSC::Interpreter::cti_op_call_JSFunction):
520         (JSC::Interpreter::cti_vm_dontLazyLinkCall):
521         (JSC::Interpreter::cti_vm_lazyLinkCall):
522         * profiler/Profiler.cpp:
523         (JSC::createCallIdentifierFromFunctionImp):
524         * runtime/Arguments.h:
525         (JSC::Arguments::getArgumentsData):
526         (JSC::Arguments::Arguments):
527         * runtime/FunctionPrototype.cpp:
528         (JSC::functionProtoFuncToString):
529         * runtime/JSFunction.h:
530         (JSC::JSFunction::JSFunction):
531         (JSC::JSFunction::body):
532
533 2008-11-27  Sam Weinig  <sam@webkit.org>
534
535         Reviewed by Oliver Hunt.
536
537         Remove unused member variables from ProgramNode.
538
539         * parser/Nodes.h:
540
541 2008-11-27  Brent Fulgham  <bfulgham@gmail.com>
542
543         Reviewed by Alexey Proskuryakov.
544
545         Enable mouse panning feaure on Windows Cairo build.
546         See http://bugs.webkit.org/show_bug.cgi?id=22525
547
548         * wtf/Platform.h: Enable mouse panning feaure on Windows Cairo build.
549
550 2008-11-27  Alp Toker  <alp@nuanti.com>
551
552         Change recently introduced C++ comments in Platform.h to C comments to
553         fix the minidom build with traditional C.
554
555         Build GtkLauncher and minidom with the '-ansi' compiler flag to detect
556         API header breakage at build time.
557
558         * GNUmakefile.am:
559         * wtf/Platform.h:
560
561 2008-11-27  Alp Toker  <alp@nuanti.com>
562
563         Remove C++ comment from JavaScriptCore API headers (introduced r35449).
564         Fixes build for ANSI C applications using the public API.
565
566         * API/WebKitAvailability.h:
567
568 2008-11-26  Eric Seidel  <eric@webkit.org>
569
570         No review, build fix only.
571
572         Fix the JSC Chromium Mac build by adding JavaScriptCore/icu into the include path
573
574         * JavaScriptCore.scons:
575
576 2008-11-25  Cameron Zwarich  <zwarich@apple.com>
577
578         Reviewed by Maciej Stachowiak.
579
580         Remove the unused member function JSFunction::getParameterName().
581
582         * runtime/JSFunction.cpp:
583         * runtime/JSFunction.h:
584
585 2008-11-24  Gavin Barraclough  <barraclough@apple.com>
586
587         Reviewed by Geoff Garen.
588
589         Polymorpic caching for get by id chain.  Similar to the polymorphic caching already implemented
590         for self and proto accesses (implemented by allowing multiple trampolines to be JIT genertaed,
591         and linked together) - the get by id chain caching is implemented as a genericization of the
592         proto list caching, allowing cached access lists to contain a mix of proto and proto chain
593         accesses (since in JS style inheritance hierarchies you may commonly see a mix of properties
594         being overridden on the direct prototype, or higher up its prototype chain).
595
596         In order to allow this patch to compile there is a fix to appease gcc 4.2 compiler issues
597         (removing the jumps between fall-through cases in privateExecute).
598         
599         This patch also removes redundant immediate checking from the reptach code, and fixes a related
600         memory leak (failure to deallocate trampolines). 
601
602         ~2% progression on v8 tests (bulk on the win on deltablue)
603
604         * bytecode/Instruction.h:
605         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::):
606         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
607         (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
608         (JSC::PolymorphicAccessStructureList::derefStructures):
609         * interpreter/Interpreter.cpp:
610         (JSC::countPrototypeChainEntriesAndCheckForProxies):
611         (JSC::Interpreter::tryCacheGetByID):
612         (JSC::Interpreter::privateExecute):
613         (JSC::Interpreter::tryCTICacheGetByID):
614         (JSC::Interpreter::cti_op_get_by_id_self_fail):
615         (JSC::getPolymorphicAccessStructureListSlot):
616         (JSC::Interpreter::cti_op_get_by_id_proto_list):
617         * interpreter/Interpreter.h:
618         * jit/JIT.cpp:
619         (JSC::JIT::privateCompileGetByIdProto):
620         (JSC::JIT::privateCompileGetByIdSelfList):
621         (JSC::JIT::privateCompileGetByIdProtoList):
622         (JSC::JIT::privateCompileGetByIdChainList):
623         (JSC::JIT::privateCompileGetByIdChain):
624         (JSC::JIT::privateCompilePatchGetArrayLength):
625         * jit/JIT.h:
626         (JSC::JIT::compileGetByIdChainList):
627
628 2008-11-25  Cameron Zwarich  <zwarich@apple.com>
629
630         Reviewed by Alexey Proskuryakov.
631
632         Move the collect() call in Heap::heapAllocate() that is conditionally
633         compiled under COLLECT_ON_EVERY_ALLOCATION so that it is before we get
634         information about the heap. This was causing assertion failures for me
635         while I was reducing a bug.
636
637         * runtime/Collector.cpp:
638         (JSC::Heap::heapAllocate):
639
640 2008-11-24  Cameron Zwarich  <zwarich@apple.com>
641
642         Reviewed by Geoff Garen.
643
644         Bug 13790: Function declarations are not treated as statements (used to affect starcraft2.com)
645         <https://bugs.webkit.org/show_bug.cgi?id=13790>
646
647         Modify the parser to treat function declarations as statements,
648         simplifying the grammar in the process. Technically, according to the
649         grammar in the ECMA spec, function declarations are not statements and
650         can not be used everywhere that statements can, but it is not worth the
651         possibility compatibility issues just to stick to the spec in this case.
652
653         * parser/Grammar.y:
654         * parser/Nodes.cpp:
655         (JSC::FuncDeclNode::emitBytecode): Avoid returning ignoredResult()
656         as a result, because it causes a crash in DoWhileNode::emitBytecode().
657
658 2008-11-24  Geoffrey Garen  <ggaren@apple.com>
659
660         Reviewed by Sam Weinig.
661         
662         Unroll the regexp matching loop by 1. 10% speedup on simple matching
663         stress test. No change on SunSpider.
664         
665         (I decided not to unroll to arbitrary levels because the returns diminsh
666         quickly.)
667
668         * wrec/WREC.cpp:
669         (JSC::WREC::compileRegExp):
670         * wrec/WRECGenerator.cpp:
671         (JSC::WREC::Generator::generateJumpIfEndOfInput):
672         (JSC::WREC::Generator::generateJumpIfNotEndOfInput):
673         * wrec/WRECGenerator.h:
674         * wrec/WRECParser.h:
675         (JSC::WREC::Parser::error):
676         (JSC::WREC::Parser::parsePattern):
677
678 2008-11-24  Geoffrey Garen  <ggaren@apple.com>
679
680         Reviewed by Sam Weinig.
681         
682         Removed some unnecessary "Generator::" prefixes.
683
684         * wrec/WRECGenerator.cpp:
685         (JSC::WREC::Generator::generateEnter):
686         (JSC::WREC::Generator::generateReturnSuccess):
687         (JSC::WREC::Generator::generateSaveIndex):
688         (JSC::WREC::Generator::generateIncrementIndex):
689         (JSC::WREC::Generator::generateLoopIfNotEndOfInput):
690         (JSC::WREC::Generator::generateReturnFailure):
691
692 2008-11-24  Geoffrey Garen  <ggaren@apple.com>
693
694         Reviewed by Sam Weinig.
695         
696         Made a bunch of WREC::Parser functions private, and added an explicit
697         "reset()" function, so a parser can be reused.
698
699         * wrec/WRECParser.h:
700         (JSC::WREC::Parser::Parser):
701         (JSC::WREC::Parser::generator):
702         (JSC::WREC::Parser::ignoreCase):
703         (JSC::WREC::Parser::multiline):
704         (JSC::WREC::Parser::recordSubpattern):
705         (JSC::WREC::Parser::numSubpatterns):
706         (JSC::WREC::Parser::parsePattern):
707         (JSC::WREC::Parser::parseAlternative):
708         (JSC::WREC::Parser::reset):
709
710 2008-11-24  Gavin Barraclough  <barraclough@apple.com>
711
712         Reviewed by Camron Zwarich.
713
714         Implement repatching for get by id chain.
715         Previously the access is performed in a function stub, in the repatch form
716         the trampoline is not called to; instead the hot path is relinked to jump
717         directly to the trampoline, if it fails it will jump to the slow case.
718
719         https://bugs.webkit.org/show_bug.cgi?id=22449
720         3% progression on deltablue.
721
722         * jit/JIT.cpp:
723         (JSC::JIT::privateCompileGetByIdProto):
724         (JSC::JIT::privateCompileGetByIdChain):
725
726 2008-11-24  Joerg Bornemann  <joerg.bornemann@trolltech.com>
727
728         Reviewed by Simon Hausmann.
729
730         https://bugs.webkit.org/show_bug.cgi?id=20746
731
732         Various small compilation fixes to make the Qt port of WebKit
733         compile on Windows CE.
734
735         * config.h: Don't set _CRT_RAND_S for CE, it's not available.
736         * jsc.cpp: Disabled use of debugger includes for CE. It
737           does not have the debugging functions.
738         * runtime/DateMath.cpp: Use localtime() on Windows CE.
739         * wtf/Assertions.cpp: Compile on Windows CE without debugger.
740         * wtf/Assertions.h: Include windows.h before defining ASSERT.
741         * wtf/MathExtras.h: Include stdlib.h instead of xmath.h.
742         * wtf/Platform.h: Disable ERRNO_H and detect endianess based
743           on the Qt endianess. On Qt for Windows CE the endianess is
744           defined by the vendor specific build spec.
745         * wtf/Threading.h: Use the volatile-less atomic functions.
746         * wtf/dtoa.cpp: Compile without errno.
747         * wtf/win/MainThreadWin.cpp: Don't include windows.h on CE after
748         Assertions.h due to the redefinition of ASSERT.
749
750 2008-11-22  Gavin Barraclough  <barraclough@apple.com>
751
752         Reviewed by Camron Zwarich.
753
754         Replace accidentally deleted immediate check from get by id chain trampoline.
755         https://bugs.webkit.org/show_bug.cgi?id=22413
756
757         * jit/JIT.cpp:
758         (JSC::JIT::privateCompileGetByIdChain):
759
760 2008-11-21  Gavin Barraclough  <barraclough@apple.com>
761
762         Reviewed by Oliver Hunt.
763
764         Add (really) polymorphic caching for get by id self.
765         Very similar to caching of prototype accesses, described below.
766
767         Oh, also, probably shouldn't have been leaking those structure list objects.
768         
769         4% preogression on deltablue.
770
771         * bytecode/CodeBlock.cpp:
772         (JSC::CodeBlock::dump):
773         (JSC::CodeBlock::derefStructures):
774         (JSC::PrototypeStructureList::derefStructures):
775         * bytecode/Instruction.h:
776         * bytecode/Opcode.h:
777         * interpreter/Interpreter.cpp:
778         (JSC::Interpreter::privateExecute):
779         (JSC::Interpreter::cti_op_get_by_id_self_fail):
780         * jit/JIT.cpp:
781         (JSC::JIT::privateCompileMainPass):
782         (JSC::JIT::privateCompileGetByIdSelfList):
783         (JSC::JIT::patchGetByIdSelf):
784         * jit/JIT.h:
785         (JSC::JIT::compileGetByIdSelfList):
786
787 2008-11-21  Geoffrey Garen  <ggaren@apple.com>
788
789         Reviewed by Sam Weinig.
790         
791         Fixed many crashes seen 'round the world (but only in release builds).
792         
793         Update outputParameter offset to reflect slight re-ordering of push
794         instructions in r38669.
795
796         * wrec/WRECGenerator.cpp:
797
798 2008-11-21  Geoffrey Garen  <ggaren@apple.com>
799
800         Reviewed by Sam Weinig.
801         
802         A little more RegExp refactoring.
803         
804         Deployed a helper function for reading the next character. Used the "link
805         vector of jumps" helper in a place I missed before.
806
807         * wrec/WRECGenerator.cpp:
808         (JSC::WREC::Generator::generateLoadCharacter):
809         (JSC::WREC::Generator::generatePatternCharacter):
810         (JSC::WREC::Generator::generateCharacterClass):
811         (JSC::WREC::Generator::generateAssertionEOL):
812         (JSC::WREC::Generator::generateAssertionWordBoundary):
813         * wrec/WRECGenerator.h:
814
815 2008-11-21  Alexey Proskuryakov  <ap@webkit.org>
816
817         Reviewed by Dan Bernstein.
818
819         https://bugs.webkit.org/show_bug.cgi?id=22402
820         Replace abort() with CRASH()
821
822         * wtf/Assertions.h: Added a different method to crash, which should work even is 0xbbadbeef
823         is a valid memory address.
824
825         * runtime/Collector.cpp:
826         * wtf/FastMalloc.cpp:
827         * wtf/FastMalloc.h:
828         * wtf/TCSpinLock.h:
829         Replace abort() with CRASH().
830
831 2008-11-21  Alexey Proskuryakov  <ap@webkit.org>
832
833         Reverted fix for bug 22042 (Replace abort() with CRASH()), because it was breaking
834         FOR_EACH_OPCODE_ID macro somehow, making Safari crash.
835
836         * runtime/Collector.cpp:
837         (JSC::Heap::heapAllocate):
838         (JSC::Heap::collect):
839         * wtf/Assertions.h:
840         * wtf/FastMalloc.cpp:
841         (WTF::fastMalloc):
842         (WTF::fastCalloc):
843         (WTF::fastRealloc):
844         (WTF::InitSizeClasses):
845         (WTF::PageHeapAllocator::New):
846         (WTF::TCMallocStats::do_malloc):
847         * wtf/FastMalloc.h:
848         * wtf/TCSpinLock.h:
849         (TCMalloc_SpinLock::Init):
850         (TCMalloc_SpinLock::Finalize):
851         (TCMalloc_SpinLock::Lock):
852         (TCMalloc_SpinLock::Unlock):
853
854 2008-11-21  Geoffrey Garen  <ggaren@apple.com>
855
856         Reviewed by Sam Weinig.
857         
858         A little more RegExp refactoring.
859         
860         Moved all assembly from WREC.cpp into WRECGenerator helper functions.
861         This should help with portability and readability.
862         
863         Removed ASSERTs after calls to executableCopy(), and changed
864         executableCopy() to ASSERT instead.
865
866         * assembler/X86Assembler.h:
867         (JSC::X86Assembler::executableCopy):
868         * jit/JIT.cpp:
869         (JSC::JIT::privateCompile):
870         (JSC::JIT::privateCompileGetByIdSelf):
871         (JSC::JIT::privateCompileGetByIdProto):
872         (JSC::JIT::privateCompileGetByIdChain):
873         (JSC::JIT::privateCompilePutByIdReplace):
874         (JSC::JIT::privateCompilePutByIdTransition):
875         (JSC::JIT::privateCompileCTIMachineTrampolines):
876         (JSC::JIT::privateCompilePatchGetArrayLength):
877         * wrec/WREC.cpp:
878         (JSC::WREC::compileRegExp):
879         * wrec/WRECGenerator.cpp:
880         (JSC::WREC::Generator::generateEnter):
881         (JSC::WREC::Generator::generateReturnSuccess):
882         (JSC::WREC::Generator::generateSaveIndex):
883         (JSC::WREC::Generator::generateIncrementIndex):
884         (JSC::WREC::Generator::generateLoopIfNotEndOfInput):
885         (JSC::WREC::Generator::generateReturnFailure):
886         * wrec/WRECGenerator.h:
887         * wrec/WRECParser.h:
888         (JSC::WREC::Parser::ignoreCase):
889         (JSC::WREC::Parser::generator):
890
891 2008-11-21  Alexey Proskuryakov  <ap@webkit.org>
892
893         Build fix.
894
895         * wtf/Assertions.h: Use ::abort for C++ code.
896
897 2008-11-21  Alexey Proskuryakov  <ap@webkit.org>
898
899         Reviewed by Sam Weinig.
900
901         https://bugs.webkit.org/show_bug.cgi?id=22402
902         Replace abort() with CRASH()
903
904         * wtf/Assertions.h: Added abort() after an attempt to crash for extra safety.
905
906         * runtime/Collector.cpp:
907         * wtf/FastMalloc.cpp:
908         * wtf/FastMalloc.h:
909         * wtf/TCSpinLock.h:
910         Replace abort() with CRASH().
911
912 2008-11-21  Geoffrey Garen  <ggaren@apple.com>
913
914         Reviewed by Sam Weinig.
915         
916         Renamed wrec => generator.
917
918         * wrec/WRECFunctors.cpp:
919         (JSC::WREC::GeneratePatternCharacterFunctor::generateAtom):
920         (JSC::WREC::GeneratePatternCharacterFunctor::backtrack):
921         (JSC::WREC::GenerateCharacterClassFunctor::generateAtom):
922         (JSC::WREC::GenerateCharacterClassFunctor::backtrack):
923         (JSC::WREC::GenerateBackreferenceFunctor::generateAtom):
924         (JSC::WREC::GenerateBackreferenceFunctor::backtrack):
925         (JSC::WREC::GenerateParenthesesNonGreedyFunctor::generateAtom):
926
927 2008-11-19  Gavin Barraclough  <barraclough@apple.com>
928
929         Reviewed by Darin Adler.
930
931         Add support for (really) polymorphic caching of prototype accesses.
932         
933         If a cached prototype access misses, cti_op_get_by_id_proto_list is called.
934         When this occurs the Structure pointers from the instruction stream are copied
935         off into a new ProtoStubInfo object.  A second prototype access trampoline is
936         generated, and chained onto the first.  Subsequent missed call to
937         cti_op_get_by_id_proto_list_append, which append futher new trampolines, up to
938         PROTOTYPE_LIST_CACHE_SIZE (currently 4).  If any of the misses result in an
939         access other than to a direct prototype property, list formation is halted (or
940         for the initial miss, does not take place at all).
941
942         Separate fail case functions are provided for each access since this contributes
943         to the performance progression (enables better processor branch prediction).
944
945         Overall this is a near 5% progression on v8, with around 10% wins on richards
946         and deltablue.
947
948         * bytecode/CodeBlock.cpp:
949         (JSC::CodeBlock::dump):
950         (JSC::CodeBlock::derefStructures):
951         * bytecode/Instruction.h:
952         (JSC::ProtoStructureList::ProtoStubInfo::set):
953         (JSC::ProtoStructureList::ProtoStructureList):
954         (JSC::Instruction::Instruction):
955         (JSC::Instruction::):
956         * bytecode/Opcode.h:
957         * interpreter/Interpreter.cpp:
958         (JSC::Interpreter::privateExecute):
959         (JSC::Interpreter::tryCTICacheGetByID):
960         (JSC::Interpreter::cti_op_put_by_id_fail):
961         (JSC::Interpreter::cti_op_get_by_id_self_fail):
962         (JSC::Interpreter::cti_op_get_by_id_proto_list):
963         (JSC::Interpreter::cti_op_get_by_id_proto_list_append):
964         (JSC::Interpreter::cti_op_get_by_id_proto_list_full):
965         (JSC::Interpreter::cti_op_get_by_id_proto_fail):
966         (JSC::Interpreter::cti_op_get_by_id_chain_fail):
967         (JSC::Interpreter::cti_op_get_by_id_array_fail):
968         (JSC::Interpreter::cti_op_get_by_id_string_fail):
969         * interpreter/Interpreter.h:
970         * jit/JIT.cpp:
971         (JSC::JIT::privateCompileMainPass):
972         (JSC::JIT::privateCompileGetByIdSelf):
973         (JSC::JIT::privateCompileGetByIdProto):
974         (JSC::JIT::privateCompileGetByIdProtoList):
975         (JSC::JIT::privateCompileGetByIdChain):
976         (JSC::JIT::privateCompileCTIMachineTrampolines):
977         (JSC::JIT::privateCompilePatchGetArrayLength):
978         * jit/JIT.h:
979         (JSC::JIT::compileGetByIdProtoList):
980
981 2008-11-20  Sam Weinig  <sam@webkit.org>
982
983         Try and fix the tiger build.
984
985         * parser/Grammar.y:
986
987 2008-11-20  Eric Seidel  <eric@webkit.org>
988
989         Reviewed by Darin Adler.
990
991         Make JavaScriptCore Chromium build under Windows (cmd only, cygwin almost works)
992         https://bugs.webkit.org/show_bug.cgi?id=22347
993
994         * JavaScriptCore.scons:
995         * parser/Parser.cpp: Add using std::auto_ptr since we use auto_ptr
996
997 2008-11-20  Steve Falkenburg  <sfalken@apple.com>
998
999         Fix build.
1000         
1001         Reviewed by Sam Weinig.
1002
1003         * parser/Parser.cpp:
1004         (JSC::Parser::reparse):
1005
1006 2008-11-20  Geoffrey Garen  <ggaren@apple.com>
1007
1008         Reviewed by Sam Weinig.
1009
1010         A little more RegExp refactoring.
1011         
1012         Created a helper function in the assembler for linking a vector of
1013         JmpSrc to a location, and deployed it in a bunch of places.
1014
1015         * JavaScriptCore.xcodeproj/project.pbxproj:
1016         * assembler/X86Assembler.h:
1017         (JSC::X86Assembler::link):
1018         * wrec/WREC.cpp:
1019         (JSC::WREC::compileRegExp):
1020         * wrec/WRECGenerator.cpp:
1021         (JSC::WREC::Generator::generateNonGreedyQuantifier):
1022         (JSC::WREC::Generator::generateGreedyQuantifier):
1023         (JSC::WREC::Generator::generateCharacterClassInverted):
1024         (JSC::WREC::Generator::generateParentheses):
1025         (JSC::WREC::Generator::generateParenthesesResetTrampoline):
1026         (JSC::WREC::Generator::generateAssertionBOL):
1027         (JSC::WREC::Generator::generateAssertionEOL):
1028         (JSC::WREC::Generator::generateAssertionWordBoundary):
1029         (JSC::WREC::Generator::terminateAlternative):
1030         (JSC::WREC::Generator::terminateDisjunction):
1031         * wrec/WRECParser.cpp:
1032         * wrec/WRECParser.h:
1033         (JSC::WREC::Parser::consumeHex):
1034
1035 2008-11-20  Sam Weinig  <sam@webkit.org>
1036
1037         Fix non-mac builds.
1038
1039         * parser/Lexer.cpp:
1040         * parser/Parser.cpp:
1041
1042 2008-11-20  Sam Weinig  <sam@webkit.org>
1043
1044         Reviewed by Darin Adler.
1045
1046         Patch for https://bugs.webkit.org/show_bug.cgi?id=22385
1047         <rdar://problem/6390179>
1048         Lazily reparse FunctionBodyNodes on first execution.
1049
1050         - Saves 57MB on Membuster head.
1051
1052         * bytecompiler/BytecodeGenerator.cpp:
1053         (JSC::BytecodeGenerator::generate): Remove vector shrinking since this is now
1054         handled by destroying the ScopeNodeData after generation.
1055
1056         * parser/Grammar.y: Add alternate NoNode version of the grammar
1057         that does not create nodes.  This is used to lazily create FunctionBodyNodes
1058         on first execution.
1059
1060         * parser/Lexer.cpp:
1061         (JSC::Lexer::setCode): Fix bug where on reparse, the Lexer was confused about
1062         what position and length meant. Position is the current position in the original
1063         data buffer (important for getting correct line/column information) and length
1064         the end offset in the original buffer.
1065         * parser/Lexer.h:
1066         (JSC::Lexer::sourceCode): Positions are relative to the beginning of the buffer.
1067
1068         * parser/Nodes.cpp:
1069         (JSC::ScopeNodeData::ScopeNodeData): Move initialization of ScopeNode data here.
1070         (JSC::ScopeNode::ScopeNode): Add constructor that only sets the JSGlobalData
1071         for FunctionBodyNode stubs.
1072         (JSC::ScopeNode::~ScopeNode): Release m_children now that we don't inherit from
1073         BlockNode.
1074         (JSC::ScopeNode::releaseNodes): Ditto.
1075         (JSC::EvalNode::generateBytecode): Only shrink m_children, as we need to keep around
1076         the rest of the data.
1077         (JSC::FunctionBodyNode::FunctionBodyNode): Add constructor that only sets the
1078         JSGlobalData. 
1079         (JSC::FunctionBodyNode::create): Ditto.
1080         (JSC::FunctionBodyNode::generateBytecode): If we don't have the data, do a reparse
1081         to construct it. Then after generation, destroy the data.
1082         (JSC::ProgramNode::generateBytecode): After generation, destroy the AST data.
1083         * parser/Nodes.h:
1084         (JSC::ExpressionNode::): Add isFuncExprNode for FunctionConstructor.
1085         (JSC::StatementNode::): Add isExprStatementNode for FunctionConstructor.
1086         (JSC::ExprStatementNode::): Ditto.
1087         (JSC::ExprStatementNode::expr): Add accessor for FunctionConstructor.
1088         (JSC::FuncExprNode::): Add isFuncExprNode for FunctionConstructor
1089
1090         (JSC::ScopeNode::adoptData): Adopts a ScopeNodeData.
1091         (JSC::ScopeNode::data): Accessor for ScopeNodeData.
1092         (JSC::ScopeNode::destroyData): Deletes the ScopeNodeData.
1093         (JSC::ScopeNode::setFeatures): Added.
1094         (JSC::ScopeNode::varStack): Added assert.
1095         (JSC::ScopeNode::functionStack): Ditto.
1096         (JSC::ScopeNode::children): Ditto.
1097         (JSC::ScopeNode::neededConstants): Ditto.
1098         Factor m_varStack, m_functionStack, m_children and m_numConstants into ScopeNodeData.
1099
1100         * parser/Parser.cpp:
1101         (JSC::Parser::reparse): Reparse the SourceCode in the FunctionBodyNode and set
1102         set up the ScopeNodeData for it. 
1103         * parser/Parser.h:
1104
1105         * parser/SourceCode.h:
1106         (JSC::SourceCode::endOffset): Added for use in the lexer.
1107
1108         * runtime/FunctionConstructor.cpp:
1109         (JSC::getFunctionBody): Assuming a ProgramNode with one FunctionExpression in it,
1110         get the FunctionBodyNode.  Any issues signifies a parse failure in constructFunction. 
1111         (JSC::constructFunction): Make parsing functions in the form new Function(""), easier
1112         by concatenating the strings together (with some glue) and parsing the function expression
1113         as a ProgramNode from which we can receive the FunctionBodyNode. This has the added benefit
1114         of not having special parsing code for the arguments and lazily constructing the 
1115         FunctionBodyNode's AST on first execution.
1116
1117         * runtime/Identifier.h:
1118         (JSC::operator!=): Added.
1119
1120 2008-11-20  Sam Weinig  <sam@webkit.org>
1121
1122         Reviewed by Geoffrey Garen.
1123
1124         Speedup the lexer to offset coming re-parsing patch.
1125
1126         - .6% progression on Sunspider.
1127
1128         * bytecompiler/SegmentedVector.h:
1129         (JSC::SegmentedVector::shrink): Fixed bug where m_size would not be
1130         set when shrinking to 0.
1131
1132         * parser/Lexer.cpp:
1133         (JSC::Lexer::Lexer):
1134         (JSC::Lexer::isIdentStart): Use isASCIIAlpha and isASCII to avoid going into ICU in the common cases.
1135         (JSC::Lexer::isIdentPart): Use isASCIIAlphanumeric and isASCII to avoid going into ICU in the common cases
1136         (JSC::isDecimalDigit): Use version in ASCIICType.h. Inlining it was a regression.
1137         (JSC::Lexer::isHexDigit): Ditto.
1138         (JSC::Lexer::isOctalDigit): Ditto.
1139         (JSC::Lexer::clear): Resize the m_identifiers SegmentedVector to initial
1140         capacity
1141         * parser/Lexer.h: Remove unused m_strings vector. Make m_identifiers
1142         a SegmentedVector<Identifier> to avoid allocating a new Identifier* for
1143         each identifier found.  The SegmentedVector is need so we can passes 
1144         references to the Identifier to the parser, which remain valid even when
1145         the vector is resized.
1146         (JSC::Lexer::makeIdentifier): Inline and return a reference to the added
1147         Identifier.
1148
1149 2008-11-20  Sam Weinig  <sam@webkit.org>
1150
1151         Reviewed by Darin Adler.
1152
1153         Add isASCII to ASCIICType.  Use coming soon!
1154
1155         * wtf/ASCIICType.h:
1156         (WTF::isASCII):
1157
1158 2008-11-20  Sam Weinig  <sam@webkit.org>
1159
1160         Reviewed by Darin Adler.
1161
1162         Add OwnPtr constructor and OwnPtr::adopt that take an auto_ptr.
1163
1164         * wtf/OwnPtr.h:
1165         (WTF::OwnPtr::OwnPtr):
1166         (WTF::OwnPtr::adopt):
1167
1168 2008-11-20  Alexey Proskuryakov  <ap@webkit.org>
1169
1170         Reviewed by Darin Adler.
1171
1172         https://bugs.webkit.org/show_bug.cgi?id=22364
1173         Crashes seen on Tiger buildbots due to worker threads exhausting pthread keys
1174
1175         * runtime/Collector.cpp:
1176         (JSC::Heap::Heap):
1177         (JSC::Heap::destroy):
1178         (JSC::Heap::makeUsableFromMultipleThreads):
1179         (JSC::Heap::registerThread):
1180         * runtime/Collector.h:
1181         Pthread key for tracking threads is only created on request now, because this is a limited
1182         resource, and thread tracking is not needed for worker heaps, or for WebCore heap.
1183
1184         * API/JSContextRef.cpp: (JSGlobalContextCreateInGroup): Call makeUsableFromMultipleThreads().
1185
1186         * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::sharedInstance): Ditto.
1187
1188         * runtime/JSGlobalData.h: (JSC::JSGlobalData::makeUsableFromMultipleThreads): Just forward
1189         the call to Heap, which clients need not know about, ideally.
1190
1191 2008-11-20  Geoffrey Garen  <ggaren@apple.com>
1192
1193         Reviewed by Sam Weinig.
1194         
1195         A little more WREC refactoring.
1196         
1197         Removed the "Register" suffix from register names in WREC, and renamed:
1198             currentPosition => index
1199             currentValue => character
1200             quantifierCount => repeatCount
1201             
1202         Added a top-level parsePattern function to the WREC parser, which
1203         allowed me to remove the error() and atEndOfPattern() accessors.
1204         
1205         Factored out an MSVC customization into a constant.
1206         
1207         Renamed nextLabel => beginPattern.
1208
1209         * wrec/WREC.cpp:
1210         (JSC::WREC::compileRegExp):
1211         * wrec/WRECGenerator.cpp:
1212         (JSC::WREC::Generator::generateBacktrack1):
1213         (JSC::WREC::Generator::generateBacktrackBackreference):
1214         (JSC::WREC::Generator::generateBackreferenceQuantifier):
1215         (JSC::WREC::Generator::generateNonGreedyQuantifier):
1216         (JSC::WREC::Generator::generateGreedyQuantifier):
1217         (JSC::WREC::Generator::generatePatternCharacter):
1218         (JSC::WREC::Generator::generateCharacterClassInvertedRange):
1219         (JSC::WREC::Generator::generateCharacterClassInverted):
1220         (JSC::WREC::Generator::generateCharacterClass):
1221         (JSC::WREC::Generator::generateParentheses):
1222         (JSC::WREC::Generator::generateParenthesesResetTrampoline):
1223         (JSC::WREC::Generator::generateAssertionBOL):
1224         (JSC::WREC::Generator::generateAssertionEOL):
1225         (JSC::WREC::Generator::generateAssertionWordBoundary):
1226         (JSC::WREC::Generator::generateBackreference):
1227         (JSC::WREC::Generator::generateDisjunction):
1228         (JSC::WREC::Generator::terminateDisjunction):
1229         * wrec/WRECGenerator.h:
1230         * wrec/WRECParser.h:
1231         (JSC::WREC::Parser::parsePattern):
1232
1233 2008-11-19  Geoffrey Garen  <ggaren@apple.com>
1234
1235         Reviewed by Darin Adler.
1236         
1237         https://bugs.webkit.org/show_bug.cgi?id=22361
1238         A little more RegExp refactoring.
1239         
1240         Consistently named variables holding the starting position at which
1241         regexp matching should begin to "startOffset".
1242         
1243         A few more "regExpObject" => "regExpConstructor" changes.
1244         
1245         Refactored RegExpObject::match for clarity, and replaced a slow "get"
1246         of the "global" property with a fast access to the global bit.
1247         
1248         Made the error message you see when RegExpObject::match has no input a
1249         little more informative, as in Firefox.
1250
1251         * runtime/RegExp.cpp:
1252         (JSC::RegExp::match):
1253         * runtime/RegExp.h:
1254         * runtime/RegExpObject.cpp:
1255         (JSC::RegExpObject::match):
1256         * runtime/StringPrototype.cpp:
1257         (JSC::stringProtoFuncReplace):
1258         (JSC::stringProtoFuncMatch):
1259         (JSC::stringProtoFuncSearch):
1260
1261 2008-11-19  Geoffrey Garen  <ggaren@apple.com>
1262
1263         Reviewed by Sam Weinig.
1264         
1265         A little more refactoring.
1266         
1267         Removed the "emit" and "emitUnlinked" prefixes from the assembler.
1268         
1269         Moved the JmpSrc and JmpDst class definitions to the top of the X86
1270         assembler class, in accordance with WebKit style guidelines.
1271
1272         * assembler/X86Assembler.h:
1273         (JSC::X86Assembler::JmpSrc::JmpSrc):
1274         (JSC::X86Assembler::JmpDst::JmpDst):
1275         (JSC::X86Assembler::int3):
1276         (JSC::X86Assembler::pushl_m):
1277         (JSC::X86Assembler::popl_m):
1278         (JSC::X86Assembler::movl_rr):
1279         (JSC::X86Assembler::addl_rr):
1280         (JSC::X86Assembler::addl_i8r):
1281         (JSC::X86Assembler::addl_i8m):
1282         (JSC::X86Assembler::addl_i32r):
1283         (JSC::X86Assembler::addl_mr):
1284         (JSC::X86Assembler::andl_rr):
1285         (JSC::X86Assembler::andl_i32r):
1286         (JSC::X86Assembler::cmpl_i8r):
1287         (JSC::X86Assembler::cmpl_rr):
1288         (JSC::X86Assembler::cmpl_rm):
1289         (JSC::X86Assembler::cmpl_mr):
1290         (JSC::X86Assembler::cmpl_i32r):
1291         (JSC::X86Assembler::cmpl_i32m):
1292         (JSC::X86Assembler::cmpl_i8m):
1293         (JSC::X86Assembler::cmpw_rm):
1294         (JSC::X86Assembler::orl_rr):
1295         (JSC::X86Assembler::orl_mr):
1296         (JSC::X86Assembler::orl_i32r):
1297         (JSC::X86Assembler::subl_rr):
1298         (JSC::X86Assembler::subl_i8r):
1299         (JSC::X86Assembler::subl_i8m):
1300         (JSC::X86Assembler::subl_i32r):
1301         (JSC::X86Assembler::subl_mr):
1302         (JSC::X86Assembler::testl_i32r):
1303         (JSC::X86Assembler::testl_i32m):
1304         (JSC::X86Assembler::testl_rr):
1305         (JSC::X86Assembler::xorl_i8r):
1306         (JSC::X86Assembler::xorl_rr):
1307         (JSC::X86Assembler::sarl_i8r):
1308         (JSC::X86Assembler::sarl_CLr):
1309         (JSC::X86Assembler::shl_i8r):
1310         (JSC::X86Assembler::shll_CLr):
1311         (JSC::X86Assembler::imull_rr):
1312         (JSC::X86Assembler::imull_i32r):
1313         (JSC::X86Assembler::idivl_r):
1314         (JSC::X86Assembler::negl_r):
1315         (JSC::X86Assembler::movl_mr):
1316         (JSC::X86Assembler::movzbl_rr):
1317         (JSC::X86Assembler::movzwl_mr):
1318         (JSC::X86Assembler::movl_rm):
1319         (JSC::X86Assembler::movl_i32r):
1320         (JSC::X86Assembler::movl_i32m):
1321         (JSC::X86Assembler::leal_mr):
1322         (JSC::X86Assembler::jmp_r):
1323         (JSC::X86Assembler::jmp_m):
1324         (JSC::X86Assembler::movsd_mr):
1325         (JSC::X86Assembler::xorpd_mr):
1326         (JSC::X86Assembler::movsd_rm):
1327         (JSC::X86Assembler::movd_rr):
1328         (JSC::X86Assembler::cvtsi2sd_rr):
1329         (JSC::X86Assembler::cvttsd2si_rr):
1330         (JSC::X86Assembler::addsd_mr):
1331         (JSC::X86Assembler::subsd_mr):
1332         (JSC::X86Assembler::mulsd_mr):
1333         (JSC::X86Assembler::addsd_rr):
1334         (JSC::X86Assembler::subsd_rr):
1335         (JSC::X86Assembler::mulsd_rr):
1336         (JSC::X86Assembler::ucomis_rr):
1337         (JSC::X86Assembler::pextrw_irr):
1338         (JSC::X86Assembler::call):
1339         (JSC::X86Assembler::jmp):
1340         (JSC::X86Assembler::jne):
1341         (JSC::X86Assembler::jnz):
1342         (JSC::X86Assembler::je):
1343         (JSC::X86Assembler::jl):
1344         (JSC::X86Assembler::jb):
1345         (JSC::X86Assembler::jle):
1346         (JSC::X86Assembler::jbe):
1347         (JSC::X86Assembler::jge):
1348         (JSC::X86Assembler::jg):
1349         (JSC::X86Assembler::ja):
1350         (JSC::X86Assembler::jae):
1351         (JSC::X86Assembler::jo):
1352         (JSC::X86Assembler::jp):
1353         (JSC::X86Assembler::js):
1354         (JSC::X86Assembler::predictNotTaken):
1355         (JSC::X86Assembler::convertToFastCall):
1356         (JSC::X86Assembler::restoreArgumentReference):
1357         (JSC::X86Assembler::restoreArgumentReferenceForTrampoline):
1358         (JSC::X86Assembler::modRm_rr):
1359         (JSC::X86Assembler::modRm_rr_Unchecked):
1360         (JSC::X86Assembler::modRm_rm):
1361         (JSC::X86Assembler::modRm_rm_Unchecked):
1362         (JSC::X86Assembler::modRm_rmsib):
1363         (JSC::X86Assembler::modRm_opr):
1364         (JSC::X86Assembler::modRm_opr_Unchecked):
1365         (JSC::X86Assembler::modRm_opm):
1366         (JSC::X86Assembler::modRm_opm_Unchecked):
1367         (JSC::X86Assembler::modRm_opmsib):
1368         * jit/JIT.cpp:
1369         (JSC::JIT::emitNakedCall):
1370         (JSC::JIT::emitNakedFastCall):
1371         (JSC::JIT::emitCTICall):
1372         (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
1373         (JSC::JIT::emitJumpSlowCaseIfNotImmNum):
1374         (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
1375         (JSC::JIT::emitFastArithIntToImmOrSlowCase):
1376         (JSC::JIT::emitArithIntToImmWithJump):
1377         (JSC::JIT::compileOpCall):
1378         (JSC::JIT::compileOpStrictEq):
1379         (JSC::JIT::emitSlowScriptCheck):
1380         (JSC::JIT::putDoubleResultToJSNumberCellOrJSImmediate):
1381         (JSC::JIT::compileBinaryArithOp):
1382         (JSC::JIT::privateCompileMainPass):
1383         (JSC::JIT::privateCompileSlowCases):
1384         (JSC::JIT::privateCompile):
1385         (JSC::JIT::privateCompileGetByIdSelf):
1386         (JSC::JIT::privateCompileGetByIdProto):
1387         (JSC::JIT::privateCompileGetByIdChain):
1388         (JSC::JIT::privateCompilePutByIdReplace):
1389         (JSC::JIT::privateCompilePutByIdTransition):
1390         (JSC::JIT::privateCompileCTIMachineTrampolines):
1391         (JSC::JIT::privateCompilePatchGetArrayLength):
1392         * wrec/WREC.cpp:
1393         (JSC::WREC::compileRegExp):
1394         * wrec/WRECGenerator.cpp:
1395         (JSC::WREC::Generator::generateBackreferenceQuantifier):
1396         (JSC::WREC::Generator::generateNonGreedyQuantifier):
1397         (JSC::WREC::Generator::generateGreedyQuantifier):
1398         (JSC::WREC::Generator::generatePatternCharacter):
1399         (JSC::WREC::Generator::generateCharacterClassInvertedRange):
1400         (JSC::WREC::Generator::generateCharacterClassInverted):
1401         (JSC::WREC::Generator::generateCharacterClass):
1402         (JSC::WREC::Generator::generateParentheses):
1403         (JSC::WREC::Generator::generateParenthesesNonGreedy):
1404         (JSC::WREC::Generator::generateParenthesesResetTrampoline):
1405         (JSC::WREC::Generator::generateAssertionBOL):
1406         (JSC::WREC::Generator::generateAssertionEOL):
1407         (JSC::WREC::Generator::generateAssertionWordBoundary):
1408         (JSC::WREC::Generator::generateBackreference):
1409         (JSC::WREC::Generator::generateDisjunction):
1410
1411 2008-11-19  Simon Hausmann  <hausmann@webkit.org>
1412
1413         Sun CC build fix, removed trailing comman for last enum value.
1414
1415         * wtf/unicode/qt4/UnicodeQt4.h:
1416         (WTF::Unicode::):
1417
1418 2008-11-19  Mark Rowe  <mrowe@apple.com>
1419
1420         Reviewed by Alexey Proskuryakov.
1421
1422         Expand the workaround for Apple GCC compiler bug <rdar://problem/6354696> to all versions of GCC 4.0.1.
1423         It has been observed with builds 5465 (Xcode 3.0) and 5484 (Xcode 3.1), and there is no evidence
1424         that it has been fixed in newer builds of GCC 4.0.1.
1425
1426         This addresses <https://bugs.webkit.org/show_bug.cgi?id=22351> (WebKit nightly crashes on launch on 10.4.11).
1427
1428         * wtf/StdLibExtras.h:
1429
1430 2008-11-18  Cameron Zwarich  <zwarich@apple.com>
1431
1432         Reviewed by Maciej Stachowiak and Geoff Garen.
1433
1434         Bug 22287: ASSERTION FAILED: Not enough jumps linked in slow case codegen in CTI::privateCompileSlowCases())
1435         <https://bugs.webkit.org/show_bug.cgi?id=22287>
1436
1437         Fix a typo in the number cell reuse code where the first and second
1438         operands are sometimes confused.
1439
1440         * jit/JIT.cpp:
1441         (JSC::JIT::compileBinaryArithOpSlowCase):
1442
1443 2008-11-18  Dan Bernstein  <mitz@apple.com>
1444
1445         - try to fix the Windows build
1446
1447         * interpreter/Interpreter.cpp:
1448         (JSC::Interpreter::privateExecute):
1449
1450 2008-11-18  Geoffrey Garen  <ggaren@apple.com>
1451
1452         Reviewed by Sam Weinig.
1453         
1454         Minor RegExp cleanup.
1455         
1456         SunSpider says no change.
1457
1458         * runtime/RegExpObject.cpp:
1459         (JSC::RegExpObject::match): Renamed "regExpObj" to "regExpConstructor".
1460
1461         * wrec/WREC.cpp:
1462         (JSC::WREC::compileRegExp): Instead of checking for a NULL output vector,
1463         ASSERT that the output vector is not NULL. (The rest of WREC is not
1464         safe to use with a NULL output vector, and we probably don't want to
1465         spend the time and/or performance to make it safe.)
1466
1467 2008-11-18  Geoffrey Garen  <ggaren@apple.com>
1468
1469         Reviewed by Darin Adler.
1470         
1471         A little more renaming and refactoring.
1472         
1473         VM_CHECK_EXCEPTION() => CHECK_FOR_EXCEPTION().
1474         NEXT_INSTRUCTION => NEXT_INSTRUCTION().
1475
1476         Removed the "Error_" and "TempError_" prefixes from WREC error types.
1477
1478         Refactored the WREC parser so it doesn't need a "setError" function,
1479         and changed "isEndOfPattern" and its use -- they read kind of backwards
1480         before.
1481         
1482         Changed our "TODO:" error messages at least to say something, since you
1483         can't say "TODO:" in shipping software.
1484
1485         * interpreter/Interpreter.cpp:
1486         (JSC::Interpreter::privateExecute):
1487         (JSC::Interpreter::cti_op_convert_this):
1488         (JSC::Interpreter::cti_op_add):
1489         (JSC::Interpreter::cti_op_pre_inc):
1490         (JSC::Interpreter::cti_op_loop_if_less):
1491         (JSC::Interpreter::cti_op_loop_if_lesseq):
1492         (JSC::Interpreter::cti_op_put_by_id):
1493         (JSC::Interpreter::cti_op_put_by_id_second):
1494         (JSC::Interpreter::cti_op_put_by_id_generic):
1495         (JSC::Interpreter::cti_op_put_by_id_fail):
1496         (JSC::Interpreter::cti_op_get_by_id):
1497         (JSC::Interpreter::cti_op_get_by_id_second):
1498         (JSC::Interpreter::cti_op_get_by_id_generic):
1499         (JSC::Interpreter::cti_op_get_by_id_fail):
1500         (JSC::Interpreter::cti_op_instanceof):
1501         (JSC::Interpreter::cti_op_del_by_id):
1502         (JSC::Interpreter::cti_op_mul):
1503         (JSC::Interpreter::cti_op_call_NotJSFunction):
1504         (JSC::Interpreter::cti_op_resolve):
1505         (JSC::Interpreter::cti_op_construct_NotJSConstruct):
1506         (JSC::Interpreter::cti_op_get_by_val):
1507         (JSC::Interpreter::cti_op_resolve_func):
1508         (JSC::Interpreter::cti_op_sub):
1509         (JSC::Interpreter::cti_op_put_by_val):
1510         (JSC::Interpreter::cti_op_put_by_val_array):
1511         (JSC::Interpreter::cti_op_lesseq):
1512         (JSC::Interpreter::cti_op_loop_if_true):
1513         (JSC::Interpreter::cti_op_negate):
1514         (JSC::Interpreter::cti_op_resolve_skip):
1515         (JSC::Interpreter::cti_op_resolve_global):
1516         (JSC::Interpreter::cti_op_div):
1517         (JSC::Interpreter::cti_op_pre_dec):
1518         (JSC::Interpreter::cti_op_jless):
1519         (JSC::Interpreter::cti_op_not):
1520         (JSC::Interpreter::cti_op_jtrue):
1521         (JSC::Interpreter::cti_op_post_inc):
1522         (JSC::Interpreter::cti_op_eq):
1523         (JSC::Interpreter::cti_op_lshift):
1524         (JSC::Interpreter::cti_op_bitand):
1525         (JSC::Interpreter::cti_op_rshift):
1526         (JSC::Interpreter::cti_op_bitnot):
1527         (JSC::Interpreter::cti_op_resolve_with_base):
1528         (JSC::Interpreter::cti_op_mod):
1529         (JSC::Interpreter::cti_op_less):
1530         (JSC::Interpreter::cti_op_neq):
1531         (JSC::Interpreter::cti_op_post_dec):
1532         (JSC::Interpreter::cti_op_urshift):
1533         (JSC::Interpreter::cti_op_bitxor):
1534         (JSC::Interpreter::cti_op_bitor):
1535         (JSC::Interpreter::cti_op_push_scope):
1536         (JSC::Interpreter::cti_op_to_jsnumber):
1537         (JSC::Interpreter::cti_op_in):
1538         (JSC::Interpreter::cti_op_del_by_val):
1539         * wrec/WREC.cpp:
1540         (JSC::WREC::compileRegExp):
1541         * wrec/WRECParser.cpp:
1542         (JSC::WREC::Parser::parseGreedyQuantifier):
1543         (JSC::WREC::Parser::parseParentheses):
1544         (JSC::WREC::Parser::parseCharacterClass):
1545         (JSC::WREC::Parser::parseEscape):
1546         * wrec/WRECParser.h:
1547         (JSC::WREC::Parser::):
1548         (JSC::WREC::Parser::atEndOfPattern):
1549
1550 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
1551
1552         Reviewed by Darin Adler.
1553
1554         https://bugs.webkit.org/show_bug.cgi?id=22337
1555         Enable workers by default
1556
1557         * Configurations/JavaScriptCore.xcconfig: Define ENABLE_WORKERS.
1558
1559 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
1560
1561         - Windows build fix
1562
1563         * wrec/WRECFunctors.h:
1564         * wrec/WRECGenerator.h:
1565         * wrec/WRECParser.h:
1566         CharacterClass is a struct, not a class, fix forward declarations.
1567
1568 2008-11-18  Dan Bernstein  <mitz@apple.com>
1569
1570         - Windows build fix
1571
1572         * assembler/X86Assembler.h:
1573
1574 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1575
1576         Not reviewed.
1577         
1578         Try to fix gtk build.
1579
1580         * wrec/Quantifier.h:
1581
1582 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1583
1584         Not reviewed.
1585         
1586         Try to fix gtk build.
1587
1588         * assembler/AssemblerBuffer.h:
1589
1590 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1591
1592         Reviewed by Sam Weinig.
1593         
1594         Split WREC classes out into individual files, with a few modifications
1595         to more closely match the WebKit coding style.
1596
1597         * GNUmakefile.am:
1598         * JavaScriptCore.scons:
1599         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1600         * JavaScriptCore.xcodeproj/project.pbxproj:
1601         * assembler/X86Assembler.h:
1602         * runtime/RegExp.cpp:
1603         * wrec/CharacterClass.cpp: Copied from wrec/CharacterClassConstructor.cpp.
1604         (JSC::WREC::CharacterClass::newline):
1605         (JSC::WREC::CharacterClass::digits):
1606         (JSC::WREC::CharacterClass::spaces):
1607         (JSC::WREC::CharacterClass::wordchar):
1608         (JSC::WREC::CharacterClass::nondigits):
1609         (JSC::WREC::CharacterClass::nonspaces):
1610         (JSC::WREC::CharacterClass::nonwordchar):
1611         * wrec/CharacterClass.h: Copied from wrec/CharacterClassConstructor.h.
1612         * wrec/CharacterClassConstructor.cpp:
1613         (JSC::WREC::CharacterClassConstructor::addSortedRange):
1614         (JSC::WREC::CharacterClassConstructor::append):
1615         * wrec/CharacterClassConstructor.h:
1616         * wrec/Quantifier.h: Copied from wrec/WREC.h.
1617         * wrec/WREC.cpp:
1618         (JSC::WREC::compileRegExp):
1619         * wrec/WREC.h:
1620         * wrec/WRECFunctors.cpp: Copied from wrec/WREC.cpp.
1621         * wrec/WRECFunctors.h: Copied from wrec/WREC.cpp.
1622         (JSC::WREC::GenerateAtomFunctor::~GenerateAtomFunctor):
1623         (JSC::WREC::GeneratePatternCharacterFunctor::GeneratePatternCharacterFunctor):
1624         (JSC::WREC::GenerateCharacterClassFunctor::GenerateCharacterClassFunctor):
1625         (JSC::WREC::GenerateBackreferenceFunctor::GenerateBackreferenceFunctor):
1626         (JSC::WREC::GenerateParenthesesNonGreedyFunctor::GenerateParenthesesNonGreedyFunctor):
1627         * wrec/WRECGenerator.cpp: Copied from wrec/WREC.cpp.
1628         (JSC::WREC::Generator::generatePatternCharacter):
1629         (JSC::WREC::Generator::generateCharacterClassInvertedRange):
1630         (JSC::WREC::Generator::generateCharacterClassInverted):
1631         (JSC::WREC::Generator::generateCharacterClass):
1632         (JSC::WREC::Generator::generateParentheses):
1633         (JSC::WREC::Generator::generateAssertionBOL):
1634         (JSC::WREC::Generator::generateAssertionEOL):
1635         (JSC::WREC::Generator::generateAssertionWordBoundary):
1636         * wrec/WRECGenerator.h: Copied from wrec/WREC.h.
1637         * wrec/WRECParser.cpp: Copied from wrec/WREC.cpp.
1638         (JSC::WREC::Parser::parseGreedyQuantifier):
1639         (JSC::WREC::Parser::parseCharacterClassQuantifier):
1640         (JSC::WREC::Parser::parseParentheses):
1641         (JSC::WREC::Parser::parseCharacterClass):
1642         (JSC::WREC::Parser::parseEscape):
1643         (JSC::WREC::Parser::parseTerm):
1644         * wrec/WRECParser.h: Copied from wrec/WREC.h.
1645         (JSC::WREC::Parser::):
1646         (JSC::WREC::Parser::Parser):
1647         (JSC::WREC::Parser::setError):
1648         (JSC::WREC::Parser::error):
1649         (JSC::WREC::Parser::recordSubpattern):
1650         (JSC::WREC::Parser::numSubpatterns):
1651         (JSC::WREC::Parser::ignoreCase):
1652         (JSC::WREC::Parser::multiline):
1653
1654 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1655
1656         Not reviewed.
1657         
1658         Try to fix a few builds.
1659
1660         * JavaScriptCoreSources.bkl:
1661
1662 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1663
1664         Not reviewed.
1665         
1666         Try to fix a few builds.
1667
1668         * JavaScriptCore.pri:
1669         * JavaScriptCore.scons:
1670         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1671
1672 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1673
1674         Reviewed by Sam Weinig.
1675         
1676         Moved VM/CTI.* => jit/JIT.*.
1677         
1678         Removed VM.
1679
1680         * GNUmakefile.am:
1681         * JavaScriptCore.pri:
1682         * JavaScriptCore.scons:
1683         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1684         * JavaScriptCore.xcodeproj/project.pbxproj:
1685         * VM/CTI.cpp: Removed.
1686         * VM/CTI.h: Removed.
1687         * bytecode/CodeBlock.cpp:
1688         * interpreter/Interpreter.cpp:
1689         * jit: Added.
1690         * jit/JIT.cpp: Copied from VM/CTI.cpp.
1691         * jit/JIT.h: Copied from VM/CTI.h.
1692         * runtime/RegExp.cpp:
1693
1694 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1695
1696         Reviewed by Sam Weinig.
1697         
1698         Moved runtime/ExecState.* => interpreter/CallFrame.*.
1699
1700         * API/JSBase.cpp:
1701         * API/OpaqueJSString.cpp:
1702         * GNUmakefile.am:
1703         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1704         * JavaScriptCore.xcodeproj/project.pbxproj:
1705         * debugger/DebuggerCallFrame.h:
1706         * interpreter/CallFrame.cpp: Copied from runtime/ExecState.cpp.
1707         * interpreter/CallFrame.h: Copied from runtime/ExecState.h.
1708         * interpreter/Interpreter.cpp:
1709         * parser/Nodes.cpp:
1710         * profiler/ProfileGenerator.cpp:
1711         * profiler/Profiler.cpp:
1712         * runtime/ClassInfo.h:
1713         * runtime/Collector.cpp:
1714         * runtime/Completion.cpp:
1715         * runtime/ExceptionHelpers.cpp:
1716         * runtime/ExecState.cpp: Removed.
1717         * runtime/ExecState.h: Removed.
1718         * runtime/Identifier.cpp:
1719         * runtime/JSFunction.cpp:
1720         * runtime/JSGlobalObjectFunctions.cpp:
1721         * runtime/JSLock.cpp:
1722         * runtime/JSNumberCell.h:
1723         * runtime/JSObject.h:
1724         * runtime/JSString.h:
1725         * runtime/Lookup.h:
1726         * runtime/PropertyNameArray.h:
1727
1728 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1729
1730         Not reviewed.
1731         
1732         Try to fix Windows build.
1733
1734         * API/APICast.h:
1735
1736 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1737
1738         Not reviewed.
1739         
1740         Try to fix Windows build.
1741
1742         * API/APICast.h:
1743         * runtime/ExecState.h:
1744
1745 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1746
1747         Reviewed by Sam Weinig.
1748         
1749         Moved VM/SamplingTool.* => bytecode/SamplingTool.*.
1750
1751         * GNUmakefile.am:
1752         * JavaScriptCore.pri:
1753         * JavaScriptCore.scons:
1754         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1755         * JavaScriptCore.xcodeproj/project.pbxproj:
1756         * JavaScriptCoreSources.bkl:
1757         * VM/SamplingTool.cpp: Removed.
1758         * VM/SamplingTool.h: Removed.
1759         * bytecode/SamplingTool.cpp: Copied from VM/SamplingTool.cpp.
1760         * bytecode/SamplingTool.h: Copied from VM/SamplingTool.h.
1761         * jsc.cpp:
1762         (runWithScripts):
1763
1764 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1765
1766         Not reviewed.
1767         
1768         Try to fix Windows build.
1769
1770         * runtime/ExecState.h:
1771
1772 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1773
1774         Reviewed by Sam Weinig.
1775         
1776         Moved VM/ExceptionHelpers.cpp => runtime/ExceptionHelpers.cpp.
1777
1778         * GNUmakefile.am:
1779         * JavaScriptCore.pri:
1780         * JavaScriptCore.scons:
1781         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1782         * JavaScriptCore.xcodeproj/project.pbxproj:
1783         * JavaScriptCoreSources.bkl:
1784         * VM/ExceptionHelpers.cpp: Removed.
1785         * runtime/ExceptionHelpers.cpp: Copied from VM/ExceptionHelpers.cpp.
1786
1787 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1788
1789         Reviewed by Sam Weinig.
1790         
1791         Moved VM/RegisterFile.cpp => interpreter/RegisterFile.cpp.
1792
1793         * AllInOneFile.cpp:
1794         * GNUmakefile.am:
1795         * JavaScriptCore.pri:
1796         * JavaScriptCore.scons:
1797         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1798         * JavaScriptCore.xcodeproj/project.pbxproj:
1799         * JavaScriptCoreSources.bkl:
1800         * VM/RegisterFile.cpp: Removed.
1801         * interpreter/RegisterFile.cpp: Copied from VM/RegisterFile.cpp.
1802
1803 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1804
1805         Not reviewed.
1806         
1807         Try to fix Windows build.
1808
1809         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1810
1811 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1812
1813         Not reviewed.
1814         
1815         Try to fix Windows build.
1816
1817         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1818
1819 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1820
1821         Not reviewed.
1822         
1823         Try to fix Windows build.
1824
1825         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1826
1827 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1828
1829         Reviewed by Sam Weinig.
1830         
1831         Moved:
1832             VM/ExceptionHelpers.h => runtime/ExceptionHelpers.h
1833             VM/Register.h => interpreter/Register.h
1834             VM/RegisterFile.h => interpreter/RegisterFile.h
1835         
1836         
1837         * GNUmakefile.am:
1838         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1839         * JavaScriptCore.xcodeproj/project.pbxproj:
1840         * VM/ExceptionHelpers.h: Removed.
1841         * VM/Register.h: Removed.
1842         * VM/RegisterFile.h: Removed.
1843         * interpreter/Register.h: Copied from VM/Register.h.
1844         * interpreter/RegisterFile.h: Copied from VM/RegisterFile.h.
1845         * runtime/ExceptionHelpers.h: Copied from VM/ExceptionHelpers.h.
1846
1847 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1848
1849         Not reviewed.
1850         
1851         Try to fix Qt build.
1852
1853         * JavaScriptCore.pri:
1854
1855 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1856
1857         Reviewed by Sam Weinig.
1858         
1859         Moved VM/Machine.cpp => interpreter/Interpreter.cpp.
1860
1861         * DerivedSources.make:
1862         * GNUmakefile.am:
1863         * JavaScriptCore.pri:
1864         * JavaScriptCore.scons:
1865         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1866         * JavaScriptCore.xcodeproj/project.pbxproj:
1867         * JavaScriptCoreSources.bkl:
1868         * VM/Machine.cpp: Removed.
1869         * interpreter/Interpreter.cpp: Copied from VM/Machine.cpp.
1870
1871 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1872
1873         Reviewed by Sam Weinig.
1874         
1875         Moved VM/Machine.h => interpreter/Interpreter.h
1876
1877         * GNUmakefile.am:
1878         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1879         * JavaScriptCore.xcodeproj/project.pbxproj:
1880         * VM/CTI.cpp:
1881         * VM/CTI.h:
1882         * VM/ExceptionHelpers.cpp:
1883         * VM/Machine.cpp:
1884         * VM/Machine.h: Removed.
1885         * VM/SamplingTool.cpp:
1886         * bytecode/CodeBlock.cpp:
1887         * bytecompiler/BytecodeGenerator.cpp:
1888         * bytecompiler/BytecodeGenerator.h:
1889         * debugger/DebuggerCallFrame.cpp:
1890         * interpreter: Added.
1891         * interpreter/Interpreter.h: Copied from VM/Machine.h.
1892         * profiler/ProfileGenerator.cpp:
1893         * runtime/Arguments.h:
1894         * runtime/ArrayPrototype.cpp:
1895         * runtime/Collector.cpp:
1896         * runtime/Completion.cpp:
1897         * runtime/ExecState.h:
1898         * runtime/FunctionPrototype.cpp:
1899         * runtime/JSActivation.cpp:
1900         * runtime/JSFunction.cpp:
1901         * runtime/JSGlobalData.cpp:
1902         * runtime/JSGlobalObject.cpp:
1903         * runtime/JSGlobalObjectFunctions.cpp:
1904         * wrec/WREC.cpp:
1905
1906 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1907
1908         Reviewed by Sam Weinig.
1909         
1910         Moved runtime/Interpreter.cpp => runtime/Completion.cpp.
1911
1912         Moved functions from Interpreter.h to Completion.h, and removed
1913         Interpreter.h from the project.
1914
1915         * API/JSBase.cpp:
1916         * AllInOneFile.cpp:
1917         * GNUmakefile.am:
1918         * JavaScriptCore.pri:
1919         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1920         * JavaScriptCore.xcodeproj/project.pbxproj:
1921         * JavaScriptCoreSources.bkl:
1922         * jsc.cpp:
1923         * runtime/Completion.cpp: Copied from runtime/Interpreter.cpp.
1924         * runtime/Completion.h:
1925         * runtime/Interpreter.cpp: Removed.
1926         * runtime/Interpreter.h: Removed.
1927
1928 2008-11-17  Gabor Loki  <loki@inf.u-szeged.hu>
1929
1930         Reviewed by Darin Adler.
1931
1932         <https://bugs.webkit.org/show_bug.cgi?id=22312>
1933         Fix PCRE include path problem on Qt-port
1934
1935         * JavaScriptCore.pri:
1936         * pcre/pcre.pri:
1937
1938 2008-11-17  Gabor Loki  <loki@inf.u-szeged.hu>
1939
1940         Reviewed by Darin Adler.
1941
1942         <https://bugs.webkit.org/show_bug.cgi?id=22313>
1943         Add missing CTI source to the build system on Qt-port
1944
1945         * JavaScriptCore.pri:
1946
1947 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1948
1949         Not reviewed.
1950         
1951         Try to fix JSGlue build.
1952
1953         * JavaScriptCore.xcodeproj/project.pbxproj:
1954
1955 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1956
1957         Not reviewed.
1958         
1959         Try to fix Qt build.
1960
1961         * jsc.pro:
1962
1963 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1964
1965         Not reviewed.
1966         
1967         Try to fix Qt build.
1968
1969         * JavaScriptCore.pri:
1970
1971 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1972
1973         Not reviewed.
1974         
1975         Try to fix Qt build.
1976
1977         * JavaScriptCore.pri:
1978
1979 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
1980
1981         Reviewed by Sam Weinig.
1982         
1983         More file moves:
1984         
1985         VM/CodeBlock.* => bytecode/CodeBlock.*
1986         VM/EvalCodeCache.h => bytecode/EvalCodeCache.h
1987         VM/Instruction.h => bytecode/Instruction.h
1988         VM/Opcode.* => bytecode/Opcode.*
1989
1990         * GNUmakefile.am:
1991         * JavaScriptCore.scons:
1992         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1993         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1994         * JavaScriptCore.xcodeproj/project.pbxproj:
1995         * JavaScriptCoreSources.bkl:
1996         * VM/CodeBlock.cpp: Removed.
1997         * VM/CodeBlock.h: Removed.
1998         * VM/EvalCodeCache.h: Removed.
1999         * VM/Instruction.h: Removed.
2000         * VM/Opcode.cpp: Removed.
2001         * VM/Opcode.h: Removed.
2002         * bytecode: Added.
2003         * bytecode/CodeBlock.cpp: Copied from VM/CodeBlock.cpp.
2004         * bytecode/CodeBlock.h: Copied from VM/CodeBlock.h.
2005         * bytecode/EvalCodeCache.h: Copied from VM/EvalCodeCache.h.
2006         * bytecode/Instruction.h: Copied from VM/Instruction.h.
2007         * bytecode/Opcode.cpp: Copied from VM/Opcode.cpp.
2008         * bytecode/Opcode.h: Copied from VM/Opcode.h.
2009         * jsc.pro:
2010         * jscore.bkl:
2011
2012 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
2013
2014         Not reviewed.
2015         
2016         Try to fix a few more builds.
2017
2018         * GNUmakefile.am:
2019         * JavaScriptCore.pri:
2020         * JavaScriptCore.scons:
2021         * JavaScriptCoreSources.bkl:
2022
2023 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
2024
2025         Not reviewed.
2026         
2027         Try to fix gtk build.
2028
2029         * GNUmakefile.am:
2030
2031 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
2032
2033         Not reviewed.
2034         
2035         Try to fix Windows build.
2036
2037         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2038
2039 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
2040
2041         Reviewed by Sam Weinig.
2042         
2043         Some file moves:
2044         
2045         VM/LabelID.h => bytecompiler/Label.h
2046         VM/RegisterID.h => bytecompiler/RegisterID.h
2047         VM/SegmentedVector.h => bytecompiler/SegmentedVector.h
2048         bytecompiler/CodeGenerator.* => bytecompiler/BytecodeGenerator.*
2049
2050         * AllInOneFile.cpp:
2051         * JavaScriptCore.xcodeproj/project.pbxproj:
2052         * VM/LabelID.h: Removed.
2053         * VM/RegisterID.h: Removed.
2054         * VM/SegmentedVector.h: Removed.
2055         * bytecompiler/BytecodeGenerator.cpp: Copied from bytecompiler/CodeGenerator.cpp.
2056         * bytecompiler/BytecodeGenerator.h: Copied from bytecompiler/CodeGenerator.h.
2057         * bytecompiler/CodeGenerator.cpp: Removed.
2058         * bytecompiler/CodeGenerator.h: Removed.
2059         * bytecompiler/Label.h: Copied from VM/LabelID.h.
2060         * bytecompiler/LabelScope.h:
2061         * bytecompiler/RegisterID.h: Copied from VM/RegisterID.h.
2062         * bytecompiler/SegmentedVector.h: Copied from VM/SegmentedVector.h.
2063         * jsc.cpp:
2064         * parser/Nodes.cpp:
2065
2066 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
2067
2068         Not reviewed.
2069         
2070         Try to fix Windows build.
2071
2072         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2073
2074 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
2075
2076         Not reviewed.
2077         
2078         Try to fix Windows build.
2079
2080         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2081
2082 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
2083
2084         Not reviewed.
2085         
2086         Try to fix Windows build.
2087
2088         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2089
2090 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2091
2092         Not reviewed.
2093         
2094         Try to fix Windows build.
2095
2096         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
2097
2098 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2099
2100         Not reviewed.
2101         
2102         Try to fix Windows build.
2103
2104         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2105
2106 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2107
2108         Reviewed by Sam Weinig.
2109         
2110         Moved masm => assembler and split "AssemblerBuffer.h" out of "X86Assembler.h".
2111         
2112         Also renamed ENABLE_MASM to ENABLE_ASSEMBLER.
2113
2114         * GNUmakefile.am:
2115         * JavaScriptCore.xcodeproj/project.pbxproj:
2116         * assembler: Added.
2117         * assembler/AssemblerBuffer.h: Copied from masm/X86Assembler.h.
2118         (JSC::AssemblerBuffer::AssemblerBuffer):
2119         (JSC::AssemblerBuffer::~AssemblerBuffer):
2120         (JSC::AssemblerBuffer::ensureSpace):
2121         (JSC::AssemblerBuffer::isAligned):
2122         (JSC::AssemblerBuffer::putByteUnchecked):
2123         (JSC::AssemblerBuffer::putByte):
2124         (JSC::AssemblerBuffer::putShortUnchecked):
2125         (JSC::AssemblerBuffer::putShort):
2126         (JSC::AssemblerBuffer::putIntUnchecked):
2127         (JSC::AssemblerBuffer::putInt):
2128         (JSC::AssemblerBuffer::data):
2129         (JSC::AssemblerBuffer::size):
2130         (JSC::AssemblerBuffer::reset):
2131         (JSC::AssemblerBuffer::executableCopy):
2132         (JSC::AssemblerBuffer::grow):
2133         * assembler/X86Assembler.h: Copied from masm/X86Assembler.h.
2134         * masm: Removed.
2135         * masm/X86Assembler.h: Removed.
2136         * wtf/Platform.h:
2137
2138 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2139
2140         Not reviewed.
2141         
2142         Try to fix gtk build.
2143
2144         * GNUmakefile.am:
2145
2146 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2147
2148         Not reviewed.
2149         
2150         Fixed tyop.
2151
2152         * VM/CTI.cpp:
2153
2154 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2155
2156         Not reviewed.
2157         
2158         Try to fix windows build.
2159
2160         * VM/CTI.cpp:
2161
2162 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2163
2164         Not reviewed.
2165         
2166         Try to fix gtk build.
2167
2168         * GNUmakefile.am:
2169
2170 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2171
2172         Reviewed by Sam Weinig.
2173
2174         Renamed ENABLE_CTI and ENABLE(CTI) to ENABLE_JIT and ENABLE(JIT).
2175
2176         * VM/CTI.cpp:
2177         * VM/CTI.h:
2178         * VM/CodeBlock.cpp:
2179         (JSC::CodeBlock::~CodeBlock):
2180         * VM/CodeBlock.h:
2181         (JSC::CodeBlock::CodeBlock):
2182         * VM/Machine.cpp:
2183         (JSC::Interpreter::Interpreter):
2184         (JSC::Interpreter::initialize):
2185         (JSC::Interpreter::~Interpreter):
2186         (JSC::Interpreter::execute):
2187         (JSC::Interpreter::privateExecute):
2188         * VM/Machine.h:
2189         * bytecompiler/CodeGenerator.cpp:
2190         (JSC::prepareJumpTableForStringSwitch):
2191         * runtime/JSFunction.cpp:
2192         (JSC::JSFunction::~JSFunction):
2193         * runtime/JSGlobalData.h:
2194         * wrec/WREC.h:
2195         * wtf/Platform.h:
2196         * wtf/TCSystemAlloc.cpp:
2197
2198 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2199
2200         Not reviewed.
2201         
2202         Try to fix gtk build.
2203
2204         * VM/CTI.cpp:
2205
2206 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2207
2208         Reviewed by a few people on squirrelfish-dev.
2209         
2210         Renamed CTI => JIT.
2211
2212         * VM/CTI.cpp:
2213         (JSC::JIT::killLastResultRegister):
2214         (JSC::JIT::emitGetVirtualRegister):
2215         (JSC::JIT::emitGetVirtualRegisters):
2216         (JSC::JIT::emitPutCTIArgFromVirtualRegister):
2217         (JSC::JIT::emitPutCTIArg):
2218         (JSC::JIT::emitGetCTIArg):
2219         (JSC::JIT::emitPutCTIArgConstant):
2220         (JSC::JIT::getConstantImmediateNumericArg):
2221         (JSC::JIT::emitPutCTIParam):
2222         (JSC::JIT::emitGetCTIParam):
2223         (JSC::JIT::emitPutToCallFrameHeader):
2224         (JSC::JIT::emitGetFromCallFrameHeader):
2225         (JSC::JIT::emitPutVirtualRegister):
2226         (JSC::JIT::emitInitRegister):
2227         (JSC::JIT::printBytecodeOperandTypes):
2228         (JSC::JIT::emitAllocateNumber):
2229         (JSC::JIT::emitNakedCall):
2230         (JSC::JIT::emitNakedFastCall):
2231         (JSC::JIT::emitCTICall):
2232         (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
2233         (JSC::JIT::linkSlowCaseIfNotJSCell):
2234         (JSC::JIT::emitJumpSlowCaseIfNotImmNum):
2235         (JSC::JIT::emitJumpSlowCaseIfNotImmNums):
2236         (JSC::JIT::getDeTaggedConstantImmediate):
2237         (JSC::JIT::emitFastArithDeTagImmediate):
2238         (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
2239         (JSC::JIT::emitFastArithReTagImmediate):
2240         (JSC::JIT::emitFastArithPotentiallyReTagImmediate):
2241         (JSC::JIT::emitFastArithImmToInt):
2242         (JSC::JIT::emitFastArithIntToImmOrSlowCase):
2243         (JSC::JIT::emitFastArithIntToImmNoCheck):
2244         (JSC::JIT::emitArithIntToImmWithJump):
2245         (JSC::JIT::emitTagAsBoolImmediate):
2246         (JSC::JIT::JIT):
2247         (JSC::JIT::compileOpCallInitializeCallFrame):
2248         (JSC::JIT::compileOpCallSetupArgs):
2249         (JSC::JIT::compileOpCallEvalSetupArgs):
2250         (JSC::JIT::compileOpConstructSetupArgs):
2251         (JSC::JIT::compileOpCall):
2252         (JSC::JIT::compileOpStrictEq):
2253         (JSC::JIT::emitSlowScriptCheck):
2254         (JSC::JIT::putDoubleResultToJSNumberCellOrJSImmediate):
2255         (JSC::JIT::compileBinaryArithOp):
2256         (JSC::JIT::compileBinaryArithOpSlowCase):
2257         (JSC::JIT::privateCompileMainPass):
2258         (JSC::JIT::privateCompileLinkPass):
2259         (JSC::JIT::privateCompileSlowCases):
2260         (JSC::JIT::privateCompile):
2261         (JSC::JIT::privateCompileGetByIdSelf):
2262         (JSC::JIT::privateCompileGetByIdProto):
2263         (JSC::JIT::privateCompileGetByIdChain):
2264         (JSC::JIT::privateCompilePutByIdReplace):
2265         (JSC::JIT::privateCompilePutByIdTransition):
2266         (JSC::JIT::unlinkCall):
2267         (JSC::JIT::linkCall):
2268         (JSC::JIT::privateCompileCTIMachineTrampolines):
2269         (JSC::JIT::freeCTIMachineTrampolines):
2270         (JSC::JIT::patchGetByIdSelf):
2271         (JSC::JIT::patchPutByIdReplace):
2272         (JSC::JIT::privateCompilePatchGetArrayLength):
2273         (JSC::JIT::emitGetVariableObjectRegister):
2274         (JSC::JIT::emitPutVariableObjectRegister):
2275         * VM/CTI.h:
2276         (JSC::JIT::compile):
2277         (JSC::JIT::compileGetByIdSelf):
2278         (JSC::JIT::compileGetByIdProto):
2279         (JSC::JIT::compileGetByIdChain):
2280         (JSC::JIT::compilePutByIdReplace):
2281         (JSC::JIT::compilePutByIdTransition):
2282         (JSC::JIT::compileCTIMachineTrampolines):
2283         (JSC::JIT::compilePatchGetArrayLength):
2284         * VM/CodeBlock.cpp:
2285         (JSC::CodeBlock::unlinkCallers):
2286         * VM/Machine.cpp:
2287         (JSC::Interpreter::initialize):
2288         (JSC::Interpreter::~Interpreter):
2289         (JSC::Interpreter::execute):
2290         (JSC::Interpreter::tryCTICachePutByID):
2291         (JSC::Interpreter::tryCTICacheGetByID):
2292         (JSC::Interpreter::cti_op_call_JSFunction):
2293         (JSC::Interpreter::cti_vm_dontLazyLinkCall):
2294         (JSC::Interpreter::cti_vm_lazyLinkCall):
2295         * VM/Machine.h:
2296         * VM/RegisterFile.h:
2297         * parser/Nodes.h:
2298         * runtime/JSArray.h:
2299         * runtime/JSCell.h:
2300         * runtime/JSFunction.h:
2301         * runtime/JSImmediate.h:
2302         * runtime/JSNumberCell.h:
2303         * runtime/JSObject.h:
2304         * runtime/JSString.h:
2305         * runtime/JSVariableObject.h:
2306         * runtime/ScopeChain.h:
2307         * runtime/Structure.h:
2308         * runtime/TypeInfo.h:
2309         * runtime/UString.h:
2310
2311 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2312
2313         Not reviewed.
2314         
2315         Try to fix wx build.
2316
2317         * jscore.bkl:
2318
2319 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2320
2321         Reviewed by Sam Weinig.
2322
2323         Nixed X86:: and X86Assembler:: prefixes in a lot of places using typedefs.
2324
2325         * VM/CTI.cpp:
2326         (JSC::CTI::emitGetVirtualRegister):
2327         (JSC::CTI::emitGetVirtualRegisters):
2328         (JSC::CTI::emitPutCTIArgFromVirtualRegister):
2329         (JSC::CTI::emitPutCTIArg):
2330         (JSC::CTI::emitGetCTIArg):
2331         (JSC::CTI::emitPutCTIParam):
2332         (JSC::CTI::emitGetCTIParam):
2333         (JSC::CTI::emitPutToCallFrameHeader):
2334         (JSC::CTI::emitGetFromCallFrameHeader):
2335         (JSC::CTI::emitPutVirtualRegister):
2336         (JSC::CTI::emitNakedCall):
2337         (JSC::CTI::emitNakedFastCall):
2338         (JSC::CTI::emitCTICall):
2339         (JSC::CTI::emitJumpSlowCaseIfNotJSCell):
2340         (JSC::CTI::emitJumpSlowCaseIfNotImmNum):
2341         (JSC::CTI::emitJumpSlowCaseIfNotImmNums):
2342         (JSC::CTI::emitFastArithDeTagImmediate):
2343         (JSC::CTI::emitFastArithDeTagImmediateJumpIfZero):
2344         (JSC::CTI::emitFastArithReTagImmediate):
2345         (JSC::CTI::emitFastArithPotentiallyReTagImmediate):
2346         (JSC::CTI::emitFastArithImmToInt):
2347         (JSC::CTI::emitFastArithIntToImmOrSlowCase):
2348         (JSC::CTI::emitFastArithIntToImmNoCheck):
2349         (JSC::CTI::emitArithIntToImmWithJump):
2350         (JSC::CTI::emitTagAsBoolImmediate):
2351         (JSC::CTI::compileOpCall):
2352         (JSC::CTI::compileOpStrictEq):
2353         (JSC::CTI::emitSlowScriptCheck):
2354         (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate):
2355         (JSC::CTI::compileBinaryArithOp):
2356         (JSC::CTI::compileBinaryArithOpSlowCase):
2357         (JSC::CTI::privateCompileMainPass):
2358         (JSC::CTI::privateCompileSlowCases):
2359         (JSC::CTI::privateCompile):
2360         (JSC::CTI::privateCompileGetByIdSelf):
2361         (JSC::CTI::privateCompileGetByIdProto):
2362         (JSC::CTI::privateCompileGetByIdChain):
2363         (JSC::CTI::privateCompilePutByIdReplace):
2364         (JSC::CTI::privateCompilePutByIdTransition):
2365         (JSC::CTI::privateCompileCTIMachineTrampolines):
2366         (JSC::CTI::privateCompilePatchGetArrayLength):
2367         (JSC::CTI::emitGetVariableObjectRegister):
2368         (JSC::CTI::emitPutVariableObjectRegister):
2369         * VM/CTI.h:
2370         (JSC::CallRecord::CallRecord):
2371         (JSC::JmpTable::JmpTable):
2372         (JSC::SlowCaseEntry::SlowCaseEntry):
2373         (JSC::CTI::JSRInfo::JSRInfo):
2374         * wrec/WREC.h:
2375
2376 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2377
2378         Not reviewed.
2379         
2380         Try to fix Qt build.
2381
2382         * JavaScriptCore.pri:
2383
2384 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2385
2386         Reviewed by Sam Weinig.
2387         
2388         Renamed OBJECT_OFFSET => FIELD_OFFSET
2389
2390         Nixed use of OBJECT_OFFSET outside of CTI.cpp by making CTI a friend in
2391         more places.
2392
2393         * VM/CTI.cpp:
2394         (JSC::CTI::compileOpCallInitializeCallFrame):
2395         (JSC::CTI::compileOpCall):
2396         (JSC::CTI::emitSlowScriptCheck):
2397         (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate):
2398         (JSC::CTI::compileBinaryArithOp):
2399         (JSC::CTI::privateCompileMainPass):
2400         (JSC::CTI::privateCompileSlowCases):
2401         (JSC::CTI::privateCompile):
2402         (JSC::CTI::privateCompileGetByIdSelf):
2403         (JSC::CTI::privateCompileGetByIdProto):
2404         (JSC::CTI::privateCompileGetByIdChain):
2405         (JSC::CTI::privateCompilePutByIdReplace):
2406         (JSC::CTI::privateCompilePutByIdTransition):
2407         (JSC::CTI::privateCompileCTIMachineTrampolines):
2408         (JSC::CTI::privateCompilePatchGetArrayLength):
2409         (JSC::CTI::emitGetVariableObjectRegister):
2410         (JSC::CTI::emitPutVariableObjectRegister):
2411         * runtime/JSValue.h:
2412         * runtime/JSVariableObject.h:
2413
2414 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2415
2416         Reviewed by Sam Weinig.
2417         
2418         Renames:
2419         
2420         X86Assembler::copy => X86Assembler::executableCopy
2421         AssemblerBuffer::copy => AssemblerBuffer::executableCopy
2422
2423         * VM/CTI.cpp:
2424         (JSC::CTI::privateCompile):
2425         (JSC::CTI::privateCompileGetByIdSelf):
2426         (JSC::CTI::privateCompileGetByIdProto):
2427         (JSC::CTI::privateCompileGetByIdChain):
2428         (JSC::CTI::privateCompilePutByIdReplace):
2429         (JSC::CTI::privateCompilePutByIdTransition):
2430         (JSC::CTI::privateCompileCTIMachineTrampolines):
2431         (JSC::CTI::privateCompilePatchGetArrayLength):
2432         * masm/X86Assembler.h:
2433         (JSC::AssemblerBuffer::executableCopy):
2434         (JSC::X86Assembler::executableCopy):
2435         * wrec/WREC.cpp:
2436         (JSC::WREC::compileRegExp):
2437
2438 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2439
2440         Reviewed by Sam Weinig.
2441         
2442         Renamed WREC => JSC::WREC, removing JSC:: prefix in a lot of places.
2443         Renamed WRECFunction => WREC::CompiledRegExp, and deployed this type
2444         name in place of a few casts.
2445
2446         * runtime/RegExp.cpp:
2447         (JSC::RegExp::RegExp):
2448         (JSC::RegExp::~RegExp):
2449         (JSC::RegExp::match):
2450         * runtime/RegExp.h:
2451         * wrec/CharacterClassConstructor.cpp:
2452         * wrec/CharacterClassConstructor.h:
2453         * wrec/WREC.cpp:
2454         (JSC::WREC::compileRegExp):
2455         * wrec/WREC.h:
2456         (JSC::WREC::Generator::Generator):
2457         (JSC::WREC::Parser::Parser):
2458         (JSC::WREC::Parser::parseAlternative):
2459
2460 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2461
2462         Reviewed by Sam Weinig.
2463         
2464         Renamed BytecodeInterpreter => Interpreter.
2465
2466         * JavaScriptCore.exp:
2467         * VM/CTI.cpp:
2468         (JSC::):
2469         (JSC::CTI::compileOpCall):
2470         (JSC::CTI::emitSlowScriptCheck):
2471         (JSC::CTI::compileBinaryArithOpSlowCase):
2472         (JSC::CTI::privateCompileMainPass):
2473         (JSC::CTI::privateCompileSlowCases):
2474         (JSC::CTI::privateCompile):
2475         (JSC::CTI::privateCompileGetByIdSelf):
2476         (JSC::CTI::privateCompileGetByIdProto):
2477         (JSC::CTI::privateCompileGetByIdChain):
2478         (JSC::CTI::privateCompilePutByIdReplace):
2479         (JSC::CTI::privateCompilePutByIdTransition):
2480         (JSC::CTI::privateCompileCTIMachineTrampolines):
2481         (JSC::CTI::freeCTIMachineTrampolines):
2482         (JSC::CTI::patchGetByIdSelf):
2483         (JSC::CTI::patchPutByIdReplace):
2484         (JSC::CTI::privateCompilePatchGetArrayLength):
2485         * VM/CTI.h:
2486         * VM/CodeBlock.cpp:
2487         (JSC::CodeBlock::printStructures):
2488         (JSC::CodeBlock::derefStructures):
2489         (JSC::CodeBlock::refStructures):
2490         * VM/Machine.cpp:
2491         (JSC::jsLess):
2492         (JSC::jsLessEq):
2493         (JSC::Interpreter::resolve):
2494         (JSC::Interpreter::resolveSkip):
2495         (JSC::Interpreter::resolveGlobal):
2496         (JSC::Interpreter::resolveBase):
2497         (JSC::Interpreter::resolveBaseAndProperty):
2498         (JSC::Interpreter::resolveBaseAndFunc):
2499         (JSC::Interpreter::slideRegisterWindowForCall):
2500         (JSC::Interpreter::callEval):
2501         (JSC::Interpreter::Interpreter):
2502         (JSC::Interpreter::initialize):
2503         (JSC::Interpreter::~Interpreter):
2504         (JSC::Interpreter::dumpCallFrame):
2505         (JSC::Interpreter::dumpRegisters):
2506         (JSC::Interpreter::isOpcode):
2507         (JSC::Interpreter::unwindCallFrame):
2508         (JSC::Interpreter::throwException):
2509         (JSC::Interpreter::execute):
2510         (JSC::Interpreter::debug):
2511         (JSC::Interpreter::resetTimeoutCheck):
2512         (JSC::Interpreter::checkTimeout):
2513         (JSC::Interpreter::createExceptionScope):
2514         (JSC::Interpreter::tryCachePutByID):
2515         (JSC::Interpreter::uncachePutByID):
2516         (JSC::Interpreter::tryCacheGetByID):
2517         (JSC::Interpreter::uncacheGetByID):
2518         (JSC::Interpreter::privateExecute):
2519         (JSC::Interpreter::retrieveArguments):
2520         (JSC::Interpreter::retrieveCaller):
2521         (JSC::Interpreter::retrieveLastCaller):
2522         (JSC::Interpreter::findFunctionCallFrame):
2523         (JSC::Interpreter::tryCTICachePutByID):
2524         (JSC::Interpreter::tryCTICacheGetByID):
2525         (JSC::Interpreter::cti_op_convert_this):
2526         (JSC::Interpreter::cti_op_end):
2527         (JSC::Interpreter::cti_op_add):
2528         (JSC::Interpreter::cti_op_pre_inc):
2529         (JSC::Interpreter::cti_timeout_check):
2530         (JSC::Interpreter::cti_register_file_check):
2531         (JSC::Interpreter::cti_op_loop_if_less):
2532         (JSC::Interpreter::cti_op_loop_if_lesseq):
2533         (JSC::Interpreter::cti_op_new_object):
2534         (JSC::Interpreter::cti_op_put_by_id):
2535         (JSC::Interpreter::cti_op_put_by_id_second):
2536         (JSC::Interpreter::cti_op_put_by_id_generic):
2537         (JSC::Interpreter::cti_op_put_by_id_fail):
2538         (JSC::Interpreter::cti_op_get_by_id):
2539         (JSC::Interpreter::cti_op_get_by_id_second):
2540         (JSC::Interpreter::cti_op_get_by_id_generic):
2541         (JSC::Interpreter::cti_op_get_by_id_fail):
2542         (JSC::Interpreter::cti_op_instanceof):
2543         (JSC::Interpreter::cti_op_del_by_id):
2544         (JSC::Interpreter::cti_op_mul):
2545         (JSC::Interpreter::cti_op_new_func):
2546         (JSC::Interpreter::cti_op_call_JSFunction):
2547         (JSC::Interpreter::cti_op_call_arityCheck):
2548         (JSC::Interpreter::cti_vm_dontLazyLinkCall):
2549         (JSC::Interpreter::cti_vm_lazyLinkCall):
2550         (JSC::Interpreter::cti_op_push_activation):
2551         (JSC::Interpreter::cti_op_call_NotJSFunction):
2552         (JSC::Interpreter::cti_op_create_arguments):
2553         (JSC::Interpreter::cti_op_create_arguments_no_params):
2554         (JSC::Interpreter::cti_op_tear_off_activation):
2555         (JSC::Interpreter::cti_op_tear_off_arguments):
2556         (JSC::Interpreter::cti_op_profile_will_call):
2557         (JSC::Interpreter::cti_op_profile_did_call):
2558         (JSC::Interpreter::cti_op_ret_scopeChain):
2559         (JSC::Interpreter::cti_op_new_array):
2560         (JSC::Interpreter::cti_op_resolve):
2561         (JSC::Interpreter::cti_op_construct_JSConstruct):
2562         (JSC::Interpreter::cti_op_construct_NotJSConstruct):
2563         (JSC::Interpreter::cti_op_get_by_val):
2564         (JSC::Interpreter::cti_op_resolve_func):
2565         (JSC::Interpreter::cti_op_sub):
2566         (JSC::Interpreter::cti_op_put_by_val):
2567         (JSC::Interpreter::cti_op_put_by_val_array):
2568         (JSC::Interpreter::cti_op_lesseq):
2569         (JSC::Interpreter::cti_op_loop_if_true):
2570         (JSC::Interpreter::cti_op_negate):
2571         (JSC::Interpreter::cti_op_resolve_base):
2572         (JSC::Interpreter::cti_op_resolve_skip):
2573         (JSC::Interpreter::cti_op_resolve_global):
2574         (JSC::Interpreter::cti_op_div):
2575         (JSC::Interpreter::cti_op_pre_dec):
2576         (JSC::Interpreter::cti_op_jless):
2577         (JSC::Interpreter::cti_op_not):
2578         (JSC::Interpreter::cti_op_jtrue):
2579         (JSC::Interpreter::cti_op_post_inc):
2580         (JSC::Interpreter::cti_op_eq):
2581         (JSC::Interpreter::cti_op_lshift):
2582         (JSC::Interpreter::cti_op_bitand):
2583         (JSC::Interpreter::cti_op_rshift):
2584         (JSC::Interpreter::cti_op_bitnot):
2585         (JSC::Interpreter::cti_op_resolve_with_base):
2586         (JSC::Interpreter::cti_op_new_func_exp):
2587         (JSC::Interpreter::cti_op_mod):
2588         (JSC::Interpreter::cti_op_less):
2589         (JSC::Interpreter::cti_op_neq):
2590         (JSC::Interpreter::cti_op_post_dec):
2591         (JSC::Interpreter::cti_op_urshift):
2592         (JSC::Interpreter::cti_op_bitxor):
2593         (JSC::Interpreter::cti_op_new_regexp):
2594         (JSC::Interpreter::cti_op_bitor):
2595         (JSC::Interpreter::cti_op_call_eval):
2596         (JSC::Interpreter::cti_op_throw):
2597         (JSC::Interpreter::cti_op_get_pnames):
2598         (JSC::Interpreter::cti_op_next_pname):
2599         (JSC::Interpreter::cti_op_push_scope):
2600         (JSC::Interpreter::cti_op_pop_scope):
2601         (JSC::Interpreter::cti_op_typeof):
2602         (JSC::Interpreter::cti_op_is_undefined):
2603         (JSC::Interpreter::cti_op_is_boolean):
2604         (JSC::Interpreter::cti_op_is_number):
2605         (JSC::Interpreter::cti_op_is_string):
2606         (JSC::Interpreter::cti_op_is_object):
2607         (JSC::Interpreter::cti_op_is_function):
2608         (JSC::Interpreter::cti_op_stricteq):
2609         (JSC::Interpreter::cti_op_nstricteq):
2610         (JSC::Interpreter::cti_op_to_jsnumber):
2611         (JSC::Interpreter::cti_op_in):
2612         (JSC::Interpreter::cti_op_push_new_scope):
2613         (JSC::Interpreter::cti_op_jmp_scopes):
2614         (JSC::Interpreter::cti_op_put_by_index):
2615         (JSC::Interpreter::cti_op_switch_imm):
2616         (JSC::Interpreter::cti_op_switch_char):
2617         (JSC::Interpreter::cti_op_switch_string):
2618         (JSC::Interpreter::cti_op_del_by_val):
2619         (JSC::Interpreter::cti_op_put_getter):
2620         (JSC::Interpreter::cti_op_put_setter):
2621         (JSC::Interpreter::cti_op_new_error):
2622         (JSC::Interpreter::cti_op_debug):
2623         (JSC::Interpreter::cti_vm_throw):
2624         * VM/Machine.h:
2625         * VM/Register.h:
2626         * VM/SamplingTool.h:
2627         (JSC::SamplingTool::SamplingTool):
2628         * bytecompiler/CodeGenerator.cpp:
2629         (JSC::BytecodeGenerator::generate):
2630         (JSC::BytecodeGenerator::BytecodeGenerator):
2631         * jsc.cpp:
2632         (runWithScripts):
2633         * runtime/ExecState.h:
2634         (JSC::ExecState::interpreter):
2635         * runtime/JSCell.h:
2636         * runtime/JSFunction.h:
2637         * runtime/JSGlobalData.cpp:
2638         (JSC::JSGlobalData::JSGlobalData):
2639         * runtime/JSGlobalData.h:
2640         * runtime/JSString.h:
2641         * wrec/WREC.cpp:
2642         (WREC::compileRegExp):
2643         * wrec/WREC.h:
2644
2645 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2646
2647         Roll out r38461 (my last patch) because it broke the world.
2648
2649 2008-11-16  Geoffrey Garen  <ggaren@apple.com>
2650
2651         Reviewed by Sam Weinig.
2652
2653         A few more renames:
2654
2655         BytecodeInterpreter => Interpreter
2656         WREC => JSC::WREC, removing JSC:: prefix in a lot of places
2657         X86Assembler::copy => X86Assembler::executableCopy
2658         AssemblerBuffer::copy => AssemblerBuffer::executableCopy
2659         WRECFunction => WREC::RegExpFunction
2660         OBJECT_OFFSET => FIELD_OFFSET
2661         
2662         Also:
2663
2664         Nixed use of OBJECT_OFFSET outside of CTI.cpp by making CTI a friend in more places.
2665         Nixed X86:: and X86Assembler:: prefixes in a lot of places using typedefs
2666
2667         * JavaScriptCore.exp:
2668         * VM/CTI.cpp:
2669         (JSC::):
2670         (JSC::CTI::emitGetVirtualRegister):
2671         (JSC::CTI::emitGetVirtualRegisters):
2672         (JSC::CTI::emitPutCTIArgFromVirtualRegister):
2673         (JSC::CTI::emitPutCTIArg):
2674         (JSC::CTI::emitGetCTIArg):
2675         (JSC::CTI::emitPutCTIParam):
2676         (JSC::CTI::emitGetCTIParam):
2677         (JSC::CTI::emitPutToCallFrameHeader):
2678         (JSC::CTI::emitGetFromCallFrameHeader):
2679         (JSC::CTI::emitPutVirtualRegister):
2680         (JSC::CTI::emitNakedCall):
2681         (JSC::CTI::emitNakedFastCall):
2682         (JSC::CTI::emitCTICall):
2683         (JSC::CTI::emitJumpSlowCaseIfNotJSCell):
2684         (JSC::CTI::emitJumpSlowCaseIfNotImmNum):
2685         (JSC::CTI::emitJumpSlowCaseIfNotImmNums):
2686         (JSC::CTI::emitFastArithDeTagImmediate):
2687         (JSC::CTI::emitFastArithDeTagImmediateJumpIfZero):
2688         (JSC::CTI::emitFastArithReTagImmediate):
2689         (JSC::CTI::emitFastArithPotentiallyReTagImmediate):
2690         (JSC::CTI::emitFastArithImmToInt):
2691         (JSC::CTI::emitFastArithIntToImmOrSlowCase):
2692         (JSC::CTI::emitFastArithIntToImmNoCheck):
2693         (JSC::CTI::emitArithIntToImmWithJump):
2694         (JSC::CTI::emitTagAsBoolImmediate):
2695         (JSC::CTI::compileOpCallInitializeCallFrame):
2696         (JSC::CTI::compileOpCall):
2697         (JSC::CTI::compileOpStrictEq):
2698         (JSC::CTI::emitSlowScriptCheck):
2699         (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate):
2700         (JSC::CTI::compileBinaryArithOp):
2701         (JSC::CTI::compileBinaryArithOpSlowCase):
2702         (JSC::CTI::privateCompileMainPass):
2703         (JSC::CTI::privateCompileSlowCases):
2704         (JSC::CTI::privateCompile):
2705         (JSC::CTI::privateCompileGetByIdSelf):
2706         (JSC::CTI::privateCompileGetByIdProto):
2707         (JSC::CTI::privateCompileGetByIdChain):
2708         (JSC::CTI::privateCompilePutByIdReplace):
2709         (JSC::CTI::privateCompilePutByIdTransition):
2710         (JSC::CTI::privateCompileCTIMachineTrampolines):
2711         (JSC::CTI::freeCTIMachineTrampolines):
2712         (JSC::CTI::patchGetByIdSelf):
2713         (JSC::CTI::patchPutByIdReplace):
2714         (JSC::CTI::privateCompilePatchGetArrayLength):
2715         (JSC::CTI::emitGetVariableObjectRegister):
2716         (JSC::CTI::emitPutVariableObjectRegister):
2717         * VM/CTI.h:
2718         (JSC::CallRecord::CallRecord):
2719         (JSC::JmpTable::JmpTable):
2720         (JSC::SlowCaseEntry::SlowCaseEntry):
2721         (JSC::CTI::JSRInfo::JSRInfo):
2722         * VM/CodeBlock.cpp:
2723         (JSC::CodeBlock::printStructures):
2724         (JSC::CodeBlock::derefStructures):
2725         (JSC::CodeBlock::refStructures):
2726         * VM/Machine.cpp:
2727         (JSC::jsLess):
2728         (JSC::jsLessEq):
2729         (JSC::Interpreter::resolve):
2730         (JSC::Interpreter::resolveSkip):
2731         (JSC::Interpreter::resolveGlobal):
2732         (JSC::Interpreter::resolveBase):
2733         (JSC::Interpreter::resolveBaseAndProperty):
2734         (JSC::Interpreter::resolveBaseAndFunc):
2735         (JSC::Interpreter::slideRegisterWindowForCall):
2736         (JSC::Interpreter::callEval):
2737         (JSC::Interpreter::Interpreter):
2738         (JSC::Interpreter::initialize):
2739         (JSC::Interpreter::~Interpreter):
2740         (JSC::Interpreter::dumpCallFrame):
2741         (JSC::Interpreter::dumpRegisters):
2742         (JSC::Interpreter::isOpcode):
2743         (JSC::Interpreter::unwindCallFrame):
2744         (JSC::Interpreter::throwException):
2745         (JSC::Interpreter::execute):
2746         (JSC::Interpreter::debug):
2747         (JSC::Interpreter::resetTimeoutCheck):
2748         (JSC::Interpreter::checkTimeout):
2749         (JSC::Interpreter::createExceptionScope):
2750         (JSC::Interpreter::tryCachePutByID):
2751         (JSC::Interpreter::uncachePutByID):
2752         (JSC::Interpreter::tryCacheGetByID):
2753         (JSC::Interpreter::uncacheGetByID):
2754         (JSC::Interpreter::privateExecute):
2755         (JSC::Interpreter::retrieveArguments):
2756         (JSC::Interpreter::retrieveCaller):
2757         (JSC::Interpreter::retrieveLastCaller):
2758         (JSC::Interpreter::findFunctionCallFrame):
2759         (JSC::Interpreter::tryCTICachePutByID):
2760         (JSC::Interpreter::tryCTICacheGetByID):
2761         (JSC::):
2762         (JSC::Interpreter::cti_op_convert_this):
2763         (JSC::Interpreter::cti_op_end):
2764         (JSC::Interpreter::cti_op_add):
2765         (JSC::Interpreter::cti_op_pre_inc):
2766         (JSC::Interpreter::cti_timeout_check):
2767         (JSC::Interpreter::cti_register_file_check):
2768         (JSC::Interpreter::cti_op_loop_if_less):
2769         (JSC::Interpreter::cti_op_loop_if_lesseq):
2770         (JSC::Interpreter::cti_op_new_object):
2771         (JSC::Interpreter::cti_op_put_by_id):
2772         (JSC::Interpreter::cti_op_put_by_id_second):
2773         (JSC::Interpreter::cti_op_put_by_id_generic):
2774         (JSC::Interpreter::cti_op_put_by_id_fail):
2775         (JSC::Interpreter::cti_op_get_by_id):
2776         (JSC::Interpreter::cti_op_get_by_id_second):
2777         (JSC::Interpreter::cti_op_get_by_id_generic):
2778         (JSC::Interpreter::cti_op_get_by_id_fail):
2779         (JSC::Interpreter::cti_op_instanceof):
2780         (JSC::Interpreter::cti_op_del_by_id):
2781         (JSC::Interpreter::cti_op_mul):
2782         (JSC::Interpreter::cti_op_new_func):
2783         (JSC::Interpreter::cti_op_call_JSFunction):
2784         (JSC::Interpreter::cti_op_call_arityCheck):
2785         (JSC::Interpreter::cti_vm_dontLazyLinkCall):
2786         (JSC::Interpreter::cti_vm_lazyLinkCall):
2787         (JSC::Interpreter::cti_op_push_activation):
2788         (JSC::Interpreter::cti_op_call_NotJSFunction):
2789         (JSC::Interpreter::cti_op_create_arguments):
2790         (JSC::Interpreter::cti_op_create_arguments_no_params):
2791         (JSC::Interpreter::cti_op_tear_off_activation):
2792         (JSC::Interpreter::cti_op_tear_off_arguments):
2793         (JSC::Interpreter::cti_op_profile_will_call):
2794         (JSC::Interpreter::cti_op_profile_did_call):
2795         (JSC::Interpreter::cti_op_ret_scopeChain):
2796         (JSC::Interpreter::cti_op_new_array):
2797         (JSC::Interpreter::cti_op_resolve):
2798         (JSC::Interpreter::cti_op_construct_JSConstruct):
2799         (JSC::Interpreter::cti_op_construct_NotJSConstruct):
2800         (JSC::Interpreter::cti_op_get_by_val):
2801         (JSC::Interpreter::cti_op_resolve_func):
2802         (JSC::Interpreter::cti_op_sub):
2803         (JSC::Interpreter::cti_op_put_by_val):
2804         (JSC::Interpreter::cti_op_put_by_val_array):
2805         (JSC::Interpreter::cti_op_lesseq):
2806         (JSC::Interpreter::cti_op_loop_if_true):
2807         (JSC::Interpreter::cti_op_negate):
2808         (JSC::Interpreter::cti_op_resolve_base):
2809         (JSC::Interpreter::cti_op_resolve_skip):
2810         (JSC::Interpreter::cti_op_resolve_global):
2811         (JSC::Interpreter::cti_op_div):
2812         (JSC::Interpreter::cti_op_pre_dec):
2813         (JSC::Interpreter::cti_op_jless):
2814         (JSC::Interpreter::cti_op_not):
2815         (JSC::Interpreter::cti_op_jtrue):
2816         (JSC::Interpreter::cti_op_post_inc):
2817         (JSC::Interpreter::cti_op_eq):
2818         (JSC::Interpreter::cti_op_lshift):
2819         (JSC::Interpreter::cti_op_bitand):
2820         (JSC::Interpreter::cti_op_rshift):
2821         (JSC::Interpreter::cti_op_bitnot):
2822         (JSC::Interpreter::cti_op_resolve_with_base):
2823         (JSC::Interpreter::cti_op_new_func_exp):
2824         (JSC::Interpreter::cti_op_mod):
2825         (JSC::Interpreter::cti_op_less):
2826         (JSC::Interpreter::cti_op_neq):
2827         (JSC::Interpreter::cti_op_post_dec):
2828         (JSC::Interpreter::cti_op_urshift):
2829         (JSC::Interpreter::cti_op_bitxor):
2830         (JSC::Interpreter::cti_op_new_regexp):
2831         (JSC::Interpreter::cti_op_bitor):
2832         (JSC::Interpreter::cti_op_call_eval):
2833         (JSC::Interpreter::cti_op_throw):
2834         (JSC::Interpreter::cti_op_get_pnames):
2835         (JSC::Interpreter::cti_op_next_pname):
2836         (JSC::Interpreter::cti_op_push_scope):
2837         (JSC::Interpreter::cti_op_pop_scope):
2838         (JSC::Interpreter::cti_op_typeof):
2839         (JSC::Interpreter::cti_op_is_undefined):
2840         (JSC::Interpreter::cti_op_is_boolean):
2841         (JSC::Interpreter::cti_op_is_number):
2842         (JSC::Interpreter::cti_op_is_string):
2843         (JSC::Interpreter::cti_op_is_object):
2844         (JSC::Interpreter::cti_op_is_function):
2845         (JSC::Interpreter::cti_op_stricteq):
2846         (JSC::Interpreter::cti_op_nstricteq):
2847         (JSC::Interpreter::cti_op_to_jsnumber):
2848         (JSC::Interpreter::cti_op_in):
2849         (JSC::Interpreter::cti_op_push_new_scope):
2850         (JSC::Interpreter::cti_op_jmp_scopes):
2851         (JSC::Interpreter::cti_op_put_by_index):
2852         (JSC::Interpreter::cti_op_switch_imm):
2853         (JSC::Interpreter::cti_op_switch_char):
2854         (JSC::Interpreter::cti_op_switch_string):
2855         (JSC::Interpreter::cti_op_del_by_val):
2856         (JSC::Interpreter::cti_op_put_getter):
2857         (JSC::Interpreter::cti_op_put_setter):
2858         (JSC::Interpreter::cti_op_new_error):
2859         (JSC::Interpreter::cti_op_debug):
2860         (JSC::Interpreter::cti_vm_throw):
2861         * VM/Machine.h:
2862         * VM/Register.h:
2863         * VM/SamplingTool.cpp:
2864         (JSC::SamplingTool::dump):
2865         * VM/SamplingTool.h:
2866         (JSC::SamplingTool::SamplingTool):
2867         * bytecompiler/CodeGenerator.cpp:
2868         (JSC::BytecodeGenerator::generate):
2869         (JSC::BytecodeGenerator::BytecodeGenerator):
2870         * jsc.cpp:
2871         (runWithScripts):
2872         * masm/X86Assembler.h:
2873         (JSC::AssemblerBuffer::executableCopy):
2874         (JSC::X86Assembler::executableCopy):
2875         * runtime/ExecState.h:
2876         (JSC::ExecState::interpreter):
2877         * runtime/JSCell.h:
2878         * runtime/JSFunction.h:
2879         * runtime/JSGlobalData.cpp:
2880         (JSC::JSGlobalData::JSGlobalData):
2881         * runtime/JSGlobalData.h:
2882         * runtime/JSImmediate.h:
2883         * runtime/JSString.h:
2884         * runtime/JSValue.h:
2885         * runtime/JSVariableObject.h:
2886         * runtime/RegExp.cpp:
2887         (JSC::RegExp::RegExp):
2888         (JSC::RegExp::~RegExp):
2889         (JSC::RegExp::match):
2890         * runtime/RegExp.h:
2891         * wrec/CharacterClassConstructor.cpp:
2892         * wrec/CharacterClassConstructor.h:
2893         * wrec/WREC.cpp:
2894         (JSC::WREC::compileRegExp):
2895         * wrec/WREC.h:
2896         (JSC::WREC::Generator::Generator):
2897         (JSC::WREC::Parser::):
2898         (JSC::WREC::Parser::Parser):
2899         (JSC::WREC::Parser::parseAlternative):
2900
2901 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
2902
2903         Reviewed by Darin Adler.
2904
2905         https://bugs.webkit.org/show_bug.cgi?id=21810
2906         Remove use of static C++ objects that are destroyed at exit time (destructors)
2907
2908         Conditionally have the DEFINE_STATIC_LOCAL workaround <rdar://problem/6354696> 
2909         (Codegen issue with C++ static reference in gcc build 5465) based upon the compiler 
2910         build versions. It will use the:
2911         static T& = *new T;
2912         style for all other compilers.
2913
2914         * wtf/StdLibExtras.h:
2915
2916 2008-11-16  Alexey Proskuryakov  <ap@webkit.org>
2917
2918         Reviewed by Dan Bernstein.
2919
2920         https://bugs.webkit.org/show_bug.cgi?id=22290
2921         Remove cross-heap GC and MessagePort multi-threading support
2922
2923         It is broken (and may not be implementable at all), and no longer needed, as we
2924         don't use MessagePorts for communication with workers any more.
2925
2926         * JavaScriptCore.exp:
2927         * runtime/Collector.cpp:
2928         (JSC::Heap::collect):
2929         * runtime/JSGlobalObject.cpp:
2930         * runtime/JSGlobalObject.h:
2931         Remove hooks for cross-heap GC.
2932
2933 2008-11-15  Sam Weinig  <sam@webkit.org>
2934
2935         Reviewed by Cameron Zwarich.
2936
2937         Cleanup jsc command line code a little.
2938
2939         * jsc.cpp:
2940         (functionQuit):
2941         (main): Use standard exit status macros
2942         (cleanupGlobalData): Factor out cleanup code into this function.
2943         (printUsageStatement): Use standard exit status macros.
2944
2945 2008-11-15  Sam Weinig  <sam@webkit.org>
2946
2947         Reviewed by Cameron Zwarich.
2948
2949         Cleanup BytecodeGenerator constructors.
2950
2951         * bytecompiler/CodeGenerator.cpp:
2952         (JSC::BytecodeGenerator::BytecodeGenerator):
2953         * bytecompiler/CodeGenerator.h:
2954         * parser/Nodes.cpp:
2955         (JSC::ProgramNode::generateBytecode):
2956
2957 2008-11-15  Darin Adler  <darin@apple.com>
2958
2959         Rubber stamped by Geoff Garen.
2960
2961         - do the long-planned StructureID -> Structure rename
2962
2963         * API/JSCallbackConstructor.cpp:
2964         (JSC::JSCallbackConstructor::JSCallbackConstructor):
2965         * API/JSCallbackConstructor.h:
2966         (JSC::JSCallbackConstructor::createStructure):
2967         * API/JSCallbackFunction.h:
2968         (JSC::JSCallbackFunction::createStructure):
2969         * API/JSCallbackObject.h:
2970         (JSC::JSCallbackObject::createStructure):
2971         * API/JSCallbackObjectFunctions.h:
2972         (JSC::::JSCallbackObject):
2973         * API/JSValueRef.cpp:
2974         (JSValueIsInstanceOfConstructor):
2975         * GNUmakefile.am:
2976         * JavaScriptCore.exp:
2977         * JavaScriptCore.pri:
2978         * JavaScriptCore.scons:
2979         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2980         * JavaScriptCore.xcodeproj/project.pbxproj:
2981         * JavaScriptCoreSources.bkl:
2982         * VM/CTI.cpp:
2983         (JSC::CTI::compileBinaryArithOp):
2984         (JSC::CTI::privateCompileMainPass):
2985         (JSC::CTI::privateCompileGetByIdSelf):
2986         (JSC::CTI::privateCompileGetByIdProto):
2987         (JSC::CTI::privateCompileGetByIdChain):
2988         (JSC::CTI::privateCompilePutByIdReplace):
2989         (JSC::transitionWillNeedStorageRealloc):
2990         (JSC::CTI::privateCompilePutByIdTransition):
2991         (JSC::CTI::patchGetByIdSelf):
2992         (JSC::CTI::patchPutByIdReplace):
2993         * VM/CTI.h:
2994         (JSC::CTI::compileGetByIdSelf):
2995         (JSC::CTI::compileGetByIdProto):
2996         (JSC::CTI::compileGetByIdChain):
2997         (JSC::CTI::compilePutByIdReplace):
2998         (JSC::CTI::compilePutByIdTransition):
2999         * VM/CodeBlock.cpp:
3000         (JSC::CodeBlock::printStructure):
3001         (JSC::CodeBlock::printStructures):
3002         (JSC::CodeBlock::dump):
3003         (JSC::CodeBlock::~CodeBlock):
3004         (JSC::CodeBlock::derefStructures):
3005         (JSC::CodeBlock::refStructures):
3006         * VM/CodeBlock.h:
3007         * VM/Instruction.h:
3008         (JSC::Instruction::Instruction):
3009         (JSC::Instruction::):
3010         * VM/Machine.cpp:
3011         (JSC::jsTypeStringForValue):
3012         (JSC::jsIsObjectType):
3013         (JSC::BytecodeInterpreter::resolveGlobal):
3014         (JSC::BytecodeInterpreter::BytecodeInterpreter):
3015         (JSC::cachePrototypeChain):
3016         (JSC::BytecodeInterpreter::tryCachePutByID):
3017         (JSC::BytecodeInterpreter::uncachePutByID):
3018         (JSC::BytecodeInterpreter::tryCacheGetByID):
3019         (JSC::BytecodeInterpreter::uncacheGetByID):
3020         (JSC::BytecodeInterpreter::privateExecute):
3021         (JSC::BytecodeInterpreter::tryCTICachePutByID):
3022         (JSC::BytecodeInterpreter::tryCTICacheGetByID):
3023         (JSC::BytecodeInterpreter::cti_op_instanceof):
3024         (JSC::BytecodeInterpreter::cti_op_construct_JSConstruct):
3025         (JSC::BytecodeInterpreter::cti_op_resolve_global):
3026         (JSC::BytecodeInterpreter::cti_op_is_undefined):
3027         * runtime/Arguments.h:
3028         (JSC::Arguments::createStructure):
3029         * runtime/ArrayConstructor.cpp:
3030         (JSC::ArrayConstructor::ArrayConstructor):
3031         * runtime/ArrayConstructor.h:
3032         * runtime/ArrayPrototype.cpp:
3033         (JSC::ArrayPrototype::ArrayPrototype):
3034         * runtime/ArrayPrototype.h:
3035         * runtime/BatchedTransitionOptimizer.h:
3036         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
3037         (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
3038         * runtime/BooleanConstructor.cpp:
3039         (JSC::BooleanConstructor::BooleanConstructor):
3040         * runtime/BooleanConstructor.h:
3041         * runtime/BooleanObject.cpp:
3042         (JSC::BooleanObject::BooleanObject):
3043         * runtime/BooleanObject.h:
3044         * runtime/BooleanPrototype.cpp:
3045         (JSC::BooleanPrototype::BooleanPrototype):
3046         * runtime/BooleanPrototype.h:
3047         * runtime/DateConstructor.cpp:
3048         (JSC::DateConstructor::DateConstructor):
3049         * runtime/DateConstructor.h:
3050         * runtime/DateInstance.cpp:
3051         (JSC::DateInstance::DateInstance):
3052         * runtime/DateInstance.h:
3053         * runtime/DatePrototype.cpp:
3054         (JSC::DatePrototype::DatePrototype):
3055         * runtime/DatePrototype.h:
3056         (JSC::DatePrototype::createStructure):
3057         * runtime/ErrorConstructor.cpp:
3058         (JSC::ErrorConstructor::ErrorConstructor):
3059         * runtime/ErrorConstructor.h:
3060         * runtime/ErrorInstance.cpp:
3061         (JSC::ErrorInstance::ErrorInstance):
3062         * runtime/ErrorInstance.h:
3063         * runtime/ErrorPrototype.cpp:
3064         (JSC::ErrorPrototype::ErrorPrototype):
3065         * runtime/ErrorPrototype.h:
3066         * runtime/FunctionConstructor.cpp:
3067         (JSC::FunctionConstructor::FunctionConstructor):
3068         * runtime/FunctionConstructor.h:
3069         * runtime/FunctionPrototype.cpp:
3070         (JSC::FunctionPrototype::FunctionPrototype):
3071         (JSC::FunctionPrototype::addFunctionProperties):
3072         * runtime/FunctionPrototype.h:
3073         (JSC::FunctionPrototype::createStructure):
3074         * runtime/GlobalEvalFunction.cpp:
3075         (JSC::GlobalEvalFunction::GlobalEvalFunction):
3076         * runtime/GlobalEvalFunction.h:
3077         * runtime/Identifier.h:
3078         * runtime/InternalFunction.cpp:
3079         (JSC::InternalFunction::InternalFunction):
3080         * runtime/InternalFunction.h:
3081         (JSC::InternalFunction::createStructure):
3082         (JSC::InternalFunction::InternalFunction):
3083         * runtime/JSActivation.cpp:
3084         (JSC::JSActivation::JSActivation):
3085         * runtime/JSActivation.h:
3086         (JSC::JSActivation::createStructure):
3087         * runtime/JSArray.cpp:
3088         (JSC::JSArray::JSArray):
3089         * runtime/JSArray.h:
3090         (JSC::JSArray::createStructure):
3091         * runtime/JSCell.h:
3092         (JSC::JSCell::JSCell):
3093         (JSC::JSCell::isObject):
3094         (JSC::JSCell::isString):
3095         (JSC::JSCell::structure):
3096         (JSC::JSValue::needsThisConversion):
3097         * runtime/JSFunction.cpp:
3098         (JSC::JSFunction::construct):
3099         * runtime/JSFunction.h:
3100         (JSC::JSFunction::JSFunction):
3101         (JSC::JSFunction::createStructure):
3102         * runtime/JSGlobalData.cpp:
3103         (JSC::JSGlobalData::JSGlobalData):
3104         (JSC::JSGlobalData::createLeaked):
3105         * runtime/JSGlobalData.h:
3106         * runtime/JSGlobalObject.cpp:
3107         (JSC::markIfNeeded):
3108         (JSC::JSGlobalObject::reset):
3109         * runtime/JSGlobalObject.h:
3110         (JSC::JSGlobalObject::JSGlobalObject):
3111         (JSC::JSGlobalObject::argumentsStructure):
3112         (JSC::JSGlobalObject::arrayStructure):
3113         (JSC::JSGlobalObject::booleanObjectStructure):
3114         (JSC::JSGlobalObject::callbackConstructorStructure):
3115         (JSC::JSGlobalObject::callbackFunctionStructure):
3116         (JSC::JSGlobalObject::callbackObjectStructure):
3117         (JSC::JSGlobalObject::dateStructure):
3118         (JSC::JSGlobalObject::emptyObjectStructure):
3119         (JSC::JSGlobalObject::errorStructure):
3120         (JSC::JSGlobalObject::functionStructure):
3121         (JSC::JSGlobalObject::numberObjectStructure):
3122         (JSC::JSGlobalObject::prototypeFunctionStructure):
3123         (JSC::JSGlobalObject::regExpMatchesArrayStructure):
3124         (JSC::JSGlobalObject::regExpStructure):
3125         (JSC::JSGlobalObject::stringObjectStructure):
3126         (JSC::JSGlobalObject::createStructure):
3127         (JSC::Structure::prototypeForLookup):
3128         * runtime/JSNotAnObject.h:
3129         (JSC::JSNotAnObject::createStructure):
3130         * runtime/JSNumberCell.h:
3131         (JSC::JSNumberCell::createStructure):
3132         (JSC::JSNumberCell::JSNumberCell):
3133         * runtime/JSObject.cpp:
3134         (JSC::JSObject::mark):
3135         (JSC::JSObject::put):
3136         (JSC::JSObject::deleteProperty):
3137         (JSC::JSObject::defineGetter):
3138         (JSC::JSObject::defineSetter):
3139         (JSC::JSObject::getPropertyAttributes):
3140         (JSC::JSObject::getPropertyNames):
3141         (JSC::JSObject::removeDirect):
3142         (JSC::JSObject::createInheritorID):
3143         * runtime/JSObject.h:
3144         (JSC::JSObject::getDirect):
3145         (JSC::JSObject::getDirectLocation):
3146         (JSC::JSObject::hasCustomProperties):
3147         (JSC::JSObject::hasGetterSetterProperties):
3148         (JSC::JSObject::createStructure):
3149         (JSC::JSObject::JSObject):
3150         (JSC::JSObject::~JSObject):
3151         (JSC::JSObject::prototype):
3152         (JSC::JSObject::setPrototype):
3153         (JSC::JSObject::setStructure):
3154         (JSC::JSObject::inheritorID):
3155         (JSC::JSObject::inlineGetOwnPropertySlot):
3156         (JSC::JSObject::getOwnPropertySlotForWrite):
3157         (JSC::JSCell::fastGetOwnPropertySlot):
3158         (JSC::JSObject::putDirect):
3159         (JSC::JSObject::putDirectWithoutTransition):
3160         (JSC::JSObject::transitionTo):
3161         * runtime/JSPropertyNameIterator.h:
3162         (JSC::JSPropertyNameIterator::next):
3163         * runtime/JSStaticScopeObject.h:
3164         (JSC::JSStaticScopeObject::JSStaticScopeObject):
3165         (JSC::JSStaticScopeObject::createStructure):
3166         * runtime/JSString.h:
3167         (JSC::JSString::JSString):
3168         (JSC::JSString::createStructure):
3169         * runtime/JSVariableObject.h:
3170         (JSC::JSVariableObject::JSVariableObject):
3171         * runtime/JSWrapperObject.h:
3172         (JSC::JSWrapperObject::JSWrapperObject):
3173         * runtime/MathObject.cpp:
3174         (JSC::MathObject::MathObject):
3175         * runtime/MathObject.h:
3176         (JSC::MathObject::createStructure):
3177         * runtime/NativeErrorConstructor.cpp:
3178         (JSC::NativeErrorConstructor::NativeErrorConstructor):
3179         * runtime/NativeErrorConstructor.h:
3180         * runtime/NativeErrorPrototype.cpp:
3181         (JSC::NativeErrorPrototype::NativeErrorPrototype):
3182         * runtime/NativeErrorPrototype.h:
3183         * runtime/NumberConstructor.cpp:
3184         (JSC::NumberConstructor::NumberConstructor):
3185         * runtime/NumberConstructor.h:
3186         (JSC::NumberConstructor::createStructure):
3187         * runtime/NumberObject.cpp:
3188         (JSC::NumberObject::NumberObject):
3189         * runtime/NumberObject.h:
3190         * runtime/NumberPrototype.cpp:
3191         (JSC::NumberPrototype::NumberPrototype):
3192         * runtime/NumberPrototype.h:
3193         * runtime/ObjectConstructor.cpp:
3194         (JSC::ObjectConstructor::ObjectConstructor):
3195         * runtime/ObjectConstructor.h:
3196         * runtime/ObjectPrototype.cpp:
3197         (JSC::ObjectPrototype::ObjectPrototype):
3198         * runtime/ObjectPrototype.h:
3199         * runtime/Operations.h:
3200         (JSC::equalSlowCaseInline):
3201         * runtime/PropertyNameArray.h:
3202         (JSC::PropertyNameArrayData::setCachedStructure):
3203         (JSC::PropertyNameArrayData::cachedStructure):
3204         (JSC::PropertyNameArrayData::setCachedPrototypeChain):
3205         (JSC::PropertyNameArrayData::cachedPrototypeChain):
3206         (JSC::PropertyNameArrayData::PropertyNameArrayData):
3207         * runtime/PrototypeFunction.cpp:
3208         (JSC::PrototypeFunction::PrototypeFunction):
3209         * runtime/PrototypeFunction.h:
3210         * runtime/RegExpConstructor.cpp:
3211         (JSC::RegExpConstructor::RegExpConstructor):
3212         * runtime/RegExpConstructor.h:
3213         (JSC::RegExpConstructor::createStructure):
3214         * runtime/RegExpObject.cpp:
3215         (JSC::RegExpObject::RegExpObject):
3216         * runtime/RegExpObject.h:
3217         (JSC::RegExpObject::createStructure):
3218         * runtime/RegExpPrototype.cpp:
3219         (JSC::RegExpPrototype::RegExpPrototype):
3220         * runtime/RegExpPrototype.h:
3221         * runtime/StringConstructor.cpp:
3222         (JSC::StringConstructor::StringConstructor):
3223         * runtime/StringConstructor.h:
3224         * runtime/StringObject.cpp:
3225         (JSC::StringObject::StringObject):
3226         * runtime/StringObject.h:
3227         (JSC::StringObject::createStructure):
3228         * runtime/StringObjectThatMasqueradesAsUndefined.h:
3229         (JSC::StringObjectThatMasqueradesAsUndefined::create):
3230         (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
3231         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
3232         * runtime/StringPrototype.cpp:
3233         (JSC::StringPrototype::StringPrototype):
3234         * runtime/StringPrototype.h:
3235         * runtime/Structure.cpp: Copied from JavaScriptCore/runtime/StructureID.cpp.
3236         (JSC::Structure::dumpStatistics):
3237         (JSC::Structure::Structure):
3238         (JSC::Structure::~Structure):
3239         (JSC::Structure::startIgnoringLeaks):
3240         (JSC::Structure::stopIgnoringLeaks):
3241         (JSC::Structure::materializePropertyMap):
3242         (JSC::Structure::getEnumerablePropertyNames):
3243         (JSC::Structure::clearEnumerationCache):
3244         (JSC::Structure::growPropertyStorageCapacity):
3245         (JSC::Structure::addPropertyTransitionToExistingStructure):
3246         (JSC::Structure::addPropertyTransition):
3247         (JSC::Structure::removePropertyTransition):
3248         (JSC::Structure::changePrototypeTransition):
3249         (JSC::Structure::getterSetterTransition):
3250         (JSC::Structure::toDictionaryTransition):
3251         (JSC::Structure::fromDictionaryTransition):
3252         (JSC::Structure::addPropertyWithoutTransition):
3253         (JSC::Structure::removePropertyWithoutTransition):
3254         (JSC::Structure::createCachedPrototypeChain):
3255         (JSC::Structure::checkConsistency):
3256         (JSC::Structure::copyPropertyTable):
3257         (JSC::Structure::get):
3258         (JSC::Structure::put):
3259         (JSC::Structure::remove):
3260         (JSC::Structure::insertIntoPropertyMapHashTable):
3261         (JSC::Structure::createPropertyMapHashTable):
3262         (JSC::Structure::expandPropertyMapHashTable):
3263         (JSC::Structure::rehashPropertyMapHashTable):
3264         (JSC::Structure::getEnumerablePropertyNamesInternal):
3265         * runtime/Structure.h: Copied from JavaScriptCore/runtime/StructureID.h.
3266         (JSC::Structure::create):
3267         (JSC::Structure::previousID):
3268         (JSC::Structure::setCachedPrototypeChain):
3269         (JSC::Structure::cachedPrototypeChain):
3270         (JSC::Structure::):
3271         (JSC::Structure::get):
3272         * runtime/StructureChain.cpp: Copied from JavaScriptCore/runtime/StructureIDChain.cpp.
3273         (JSC::StructureChain::StructureChain):
3274         (JSC::structureChainsAreEqual):
3275         * runtime/StructureChain.h: Copied from JavaScriptCore/runtime/StructureIDChain.h.
3276         (JSC::StructureChain::create):
3277         (JSC::StructureChain::head):
3278         * runtime/StructureID.cpp: Removed.
3279         * runtime/StructureID.h: Removed.
3280         * runtime/StructureIDChain.cpp: Removed.
3281         * runtime/StructureIDChain.h: Removed.
3282         * runtime/StructureIDTransitionTable.h: Removed.
3283         * runtime/StructureTransitionTable.h: Copied from JavaScriptCore/runtime/StructureIDTransitionTable.h.
3284
3285 2008-11-15  Darin Adler  <darin@apple.com>
3286
3287         - fix non-WREC build
3288
3289         * runtime/RegExp.cpp: Put "using namespace WREC" inside #if ENABLE(WREC).
3290
3291 2008-11-15  Kevin Ollivier  <kevino@theolliviers.com>
3292
3293         Reviewed by Timothy Hatcher.
3294         
3295         As ThreadingNone doesn't implement threads, isMainThread should return true,
3296         not false.
3297         
3298         https://bugs.webkit.org/show_bug.cgi?id=22285
3299
3300         * wtf/ThreadingNone.cpp:
3301         (WTF::isMainThread):
3302
3303 2008-11-15  Geoffrey Garen  <ggaren@apple.com>
3304
3305         Reviewed by Sam Weinig.
3306         
3307         Moved all WREC-related code into WREC.cpp and put it in a WREC namespace.
3308         Removed the WREC prefix from class names.
3309
3310         * VM/CTI.cpp:
3311         * VM/CTI.h:
3312         * VM/Machine.h:
3313         (JSC::BytecodeInterpreter::assemblerBuffer):
3314         * masm/X86Assembler.h:
3315         * runtime/RegExp.cpp:
3316         (JSC::RegExp::RegExp):
3317         * wrec/CharacterClassConstructor.cpp:
3318         * wrec/CharacterClassConstructor.h:
3319         * wrec/WREC.cpp:
3320         (WREC::GenerateParenthesesNonGreedyFunctor::GenerateParenthesesNonGreedyFunctor):
3321         (WREC::GeneratePatternCharacterFunctor::generateAtom):
3322         (WREC::GeneratePatternCharacterFunctor::backtrack):
3323         (WREC::GenerateCharacterClassFunctor::generateAtom):
3324         (WREC::GenerateCharacterClassFunctor::backtrack):
3325         (WREC::GenerateBackreferenceFunctor::generateAtom):
3326         (WREC::GenerateBackreferenceFunctor::backtrack):
3327         (WREC::GenerateParenthesesNonGreedyFunctor::generateAtom):
3328         (WREC::GenerateParenthesesNonGreedyFunctor::backtrack):
3329         (WREC::Generator::generateBacktrack1):
3330         (WREC::Generator::generateBacktrackBackreference):
3331         (WREC::Generator::generateBackreferenceQuantifier):
3332         (WREC::Generator::generateNonGreedyQuantifier):
3333         (WREC::Generator::generateGreedyQuantifier):
3334         (WREC::Generator::generatePatternCharacter):
3335         (WREC::Generator::generateCharacterClassInvertedRange):
3336         (WREC::Generator::generateCharacterClassInverted):
3337         (WREC::Generator::generateCharacterClass):
3338         (WREC::Generator::generateParentheses):
3339         (WREC::Generator::generateParenthesesNonGreedy):
3340         (WREC::Generator::generateParenthesesResetTrampoline):
3341         (WREC::Generator::generateAssertionBOL):
3342         (WREC::Generator::generateAssertionEOL):
3343         (WREC::Generator::generateAssertionWordBoundary):
3344         (WREC::Generator::generateBackreference):
3345         (WREC::Generator::generateDisjunction):
3346         (WREC::Generator::terminateDisjunction):
3347         (WREC::Parser::parseGreedyQuantifier):
3348         (WREC::Parser::parseQuantifier):
3349         (WREC::Parser::parsePatternCharacterQualifier):
3350         (WREC::Parser::parseCharacterClassQuantifier):
3351         (WREC::Parser::parseBackreferenceQuantifier):
3352         (WREC::Parser::parseParentheses):
3353         (WREC::Parser::parseCharacterClass):
3354         (WREC::Parser::parseOctalEscape):
3355         (WREC::Parser::parseEscape):
3356         (WREC::Parser::parseTerm):
3357         (WREC::Parser::parseDisjunction):
3358         (WREC::compileRegExp):
3359         * wrec/WREC.h:
3360         (WREC::Generator::Generator):
3361         (WREC::Parser::Parser):
3362         (WREC::Parser::parseAlternative):
3363
3364 2008-11-15  Geoffrey Garen  <ggaren@apple.com>
3365
3366         Reviewed by Sam Weinig.
3367         
3368         Changed another case of "m_jit" to "m_assembler".
3369
3370         * VM/CTI.cpp:
3371         * wrec/WREC.cpp:
3372         * wrec/WREC.h:
3373         (JSC::WRECGenerator::WRECGenerator):
3374         (JSC::WRECParser::WRECParser):
3375
3376 2008-11-15  Geoffrey Garen  <ggaren@apple.com>
3377
3378         Reviewed by Sam Weinig.
3379         
3380         Renamed "jit" to "assembler" and, for brevity, replaced *jit.* with __
3381         using a macro.
3382
3383         * VM/CTI.cpp:
3384         (JSC::CTI::emitGetVirtualRegister):
3385         (JSC::CTI::emitPutCTIArgFromVirtualRegister):
3386         (JSC::CTI::emitPutCTIArg):
3387         (JSC::CTI::emitGetCTIArg):
3388         (JSC::CTI::emitPutCTIArgConstant):
3389         (JSC::CTI::emitPutCTIParam):
3390         (JSC::CTI::emitGetCTIParam):
3391         (JSC::CTI::emitPutToCallFrameHeader):
3392         (JSC::CTI::emitGetFromCallFrameHeader):
3393         (JSC::CTI::emitPutVirtualRegister):
3394         (JSC::CTI::emitInitRegister):
3395         (JSC::CTI::emitAllocateNumber):
3396         (JSC::CTI::emitNakedCall):
3397         (JSC::CTI::emitNakedFastCall):
3398         (JSC::CTI::emitCTICall):
3399         (JSC::CTI::emitJumpSlowCaseIfNotJSCell):
3400         (JSC::CTI::linkSlowCaseIfNotJSCell):
3401         (JSC::CTI::emitJumpSlowCaseIfNotImmNum):
3402         (JSC::CTI::emitJumpSlowCaseIfNotImmNums):
3403         (JSC::CTI::emitFastArithDeTagImmediate):
3404         (JSC::CTI::emitFastArithDeTagImmediateJumpIfZero):
3405         (JSC::CTI::emitFastArithReTagImmediate):
3406         (JSC::CTI::emitFastArithPotentiallyReTagImmediate):
3407         (JSC::CTI::emitFastArithImmToInt):
3408         (JSC::CTI::emitFastArithIntToImmOrSlowCase):
3409         (JSC::CTI::emitFastArithIntToImmNoCheck):
3410         (JSC::CTI::emitArithIntToImmWithJump):
3411         (JSC::CTI::emitTagAsBoolImmediate):
3412         (JSC::CTI::CTI):
3413         (JSC::CTI::compileOpCallInitializeCallFrame):
3414         (JSC::CTI::compileOpCall):
3415         (JSC::CTI::compileOpStrictEq):
3416         (JSC::CTI::emitSlowScriptCheck):
3417         (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate):
3418         (JSC::CTI::compileBinaryArithOp):
3419         (JSC::CTI::compileBinaryArithOpSlowCase):
3420         (JSC::CTI::privateCompileMainPass):
3421         (JSC::CTI::privateCompileLinkPass):
3422         (JSC::CTI::privateCompileSlowCases):
3423         (JSC::CTI::privateCompile):
3424         (JSC::CTI::privateCompileGetByIdSelf):
3425         (JSC::CTI::privateCompileGetByIdProto):
3426         (JSC::CTI::privateCompileGetByIdChain):
3427         (JSC::CTI::privateCompilePutByIdReplace):
3428         (JSC::CTI::privateCompilePutByIdTransition):
3429         (JSC::CTI::privateCompileCTIMachineTrampolines):
3430         (JSC::CTI::privateCompilePatchGetArrayLength):
3431         (JSC::CTI::emitGetVariableObjectRegister):
3432         (JSC::CTI::emitPutVariableObjectRegister):
3433         (JSC::CTI::compileRegExp):
3434         * VM/CTI.h:
3435         * wrec/WREC.cpp:
3436         (JSC::WRECGenerator::generateBacktrack1):
3437         (JSC::WRECGenerator::generateBacktrackBackreference):
3438         (JSC::WRECGenerator::generateBackreferenceQuantifier):
3439         (JSC::WRECGenerator::generateNonGreedyQuantifier):
3440         (JSC::WRECGenerator::generateGreedyQuantifier):
3441         (JSC::WRECGenerator::generatePatternCharacter):
3442         (JSC::WRECGenerator::generateCharacterClassInvertedRange):
3443         (JSC::WRECGenerator::generateCharacterClassInverted):
3444         (JSC::WRECGenerator::generateCharacterClass):
3445         (JSC::WRECGenerator::generateParentheses):
3446         (JSC::WRECGenerator::generateParenthesesNonGreedy):
3447         (JSC::WRECGenerator::generateParenthesesResetTrampoline):
3448         (JSC::WRECGenerator::generateAssertionBOL):
3449         (JSC::WRECGenerator::generateAssertionEOL):
3450         (JSC::WRECGenerator::generateAssertionWordBoundary):
3451         (JSC::WRECGenerator::generateBackreference):
3452         (JSC::WRECGenerator::generateDisjunction):
3453         (JSC::WRECGenerator::terminateDisjunction):
3454
3455 2008-11-15  Sam Weinig  <sam@webkit.org>
3456
3457         Reviewed by Geoffrey Garen.
3458
3459         Remove dead method declaration.
3460
3461         * bytecompiler/CodeGenerator.h:
3462
3463 2008-11-15  Geoffrey Garen  <ggaren@apple.com>
3464
3465         Reviewed by Sam Weinig.
3466         
3467         Renamed LabelID to Label, Label::isForwardLabel to Label::isForward.
3468
3469         * VM/LabelID.h:
3470         (JSC::Label::Label):
3471         (JSC::Label::isForward):
3472         * bytecompiler/CodeGenerator.cpp:
3473         (JSC::BytecodeGenerator::newLabel):
3474         (JSC::BytecodeGenerator::emitLabel):
3475         (JSC::BytecodeGenerator::emitJump):
3476         (JSC::BytecodeGenerator::emitJumpIfTrue):
3477         (JSC::BytecodeGenerator::emitJumpIfFalse):
3478         (JSC::BytecodeGenerator::pushFinallyContext):
3479         (JSC::BytecodeGenerator::emitComplexJumpScopes):
3480         (JSC::BytecodeGenerator::emitJumpScopes):
3481         (JSC::BytecodeGenerator::emitNextPropertyName):
3482         (JSC::BytecodeGenerator::emitCatch):
3483         (JSC::BytecodeGenerator::emitJumpSubroutine):
3484         (JSC::prepareJumpTableForImmediateSwitch):
3485         (JSC::prepareJumpTableForCharacterSwitch):
3486         (JSC::prepareJumpTableForStringSwitch):
3487         (JSC::BytecodeGenerator::endSwitch):
3488         * bytecompiler/CodeGenerator.h:
3489         * bytecompiler/LabelScope.h:
3490         (JSC::LabelScope::LabelScope):
3491         (JSC::LabelScope::breakTarget):
3492         (JSC::LabelScope::continueTarget):
3493         * parser/Nodes.cpp:
3494         (JSC::LogicalOpNode::emitBytecode):
3495         (JSC::ConditionalNode::emitBytecode):
3496         (JSC::IfNode::emitBytecode):
3497         (JSC::IfElseNode::emitBytecode):
3498         (JSC::DoWhileNode::emitBytecode):
3499         (JSC::WhileNode::emitBytecode):
3500         (JSC::ForNode::emitBytecode):
3501         (JSC::ForInNode::emitBytecode):
3502         (JSC::ReturnNode::emitBytecode):
3503         (JSC::CaseBlockNode::emitBytecodeForBlock):
3504         (JSC::TryNode::emitBytecode):
3505
3506 2008-11-15  Geoffrey Garen  <ggaren@apple.com>
3507
3508         Reviewed by Sam Weinig.
3509         
3510         Renamed JITCodeBuffer to AssemblerBuffer and renamed its data members
3511         to be more like the rest of our buffer classes, with a size and a
3512         capacity.
3513         
3514         Added an assert in the unchecked put case to match the test in the checked
3515         put case.
3516         
3517         Changed a C-style cast to a C++-style cast.
3518         
3519         Renamed MAX_INSTRUCTION_SIZE to maxInstructionSize.
3520
3521         * VM/CTI.cpp:
3522         (JSC::CTI::CTI):
3523         (JSC::CTI::compileRegExp):
3524         * VM/Machine.cpp:
3525         (JSC::BytecodeInterpreter::BytecodeInterpreter):
3526         * VM/Machine.h:
3527         (JSC::BytecodeInterpreter::assemblerBuffer):
3528         * masm/X86Assembler.h:
3529         (JSC::AssemblerBuffer::AssemblerBuffer):
3530         (JSC::AssemblerBuffer::~AssemblerBuffer):
3531         (JSC::AssemblerBuffer::ensureSpace):
3532         (JSC::AssemblerBuffer::isAligned):
3533         (JSC::AssemblerBuffer::putByteUnchecked):
3534         (JSC::AssemblerBuffer::putByte):
3535         (JSC::AssemblerBuffer::putShortUnchecked):
3536         (JSC::AssemblerBuffer::putShort):
3537         (JSC::AssemblerBuffer::putIntUnchecked):
3538         (JSC::AssemblerBuffer::putInt):
3539         (JSC::AssemblerBuffer::data):
3540         (JSC::AssemblerBuffer::size):
3541         (JSC::AssemblerBuffer::reset):
3542         (JSC::AssemblerBuffer::copy):
3543         (JSC::AssemblerBuffer::grow):
3544         (JSC::X86Assembler::):
3545         (JSC::X86Assembler::X86Assembler):
3546         (JSC::X86Assembler::testl_i32r):
3547         (JSC::X86Assembler::movl_mr):
3548         (JSC::X86Assembler::movl_rm):
3549         (JSC::X86Assembler::movl_i32m):
3550         (JSC::X86Assembler::emitCall):
3551         (JSC::X86Assembler::label):
3552         (JSC::X86Assembler::emitUnlinkedJmp):
3553         (JSC::X86Assembler::emitUnlinkedJne):
3554         (JSC::X86Assembler::emitUnlinkedJe):
3555         (JSC::X86Assembler::emitUnlinkedJl):
3556         (JSC::X86Assembler::emitUnlinkedJb):