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