Fix broken dependencies building JavaScriptCore on a freezing cold cat, caused
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2008-11-11  Mark Rowe  <mrowe@apple.com>
2
3         Fix broken dependencies building JavaScriptCore on a freezing cold cat, caused
4         by failure to update all instances of "kjs" to their new locations.
5
6         * JavaScriptCore.xcodeproj/project.pbxproj:
7
8 2008-11-11  Alexey Proskuryakov  <ap@webkit.org>
9
10         Rubber-stamped by Adam Roben.
11
12         * wtf/AVLTree.h: (WTF::AVLTree::Iterator::start_iter):
13         Fix indentation a little more.
14
15 2008-11-11  Cameron Zwarich  <zwarich@apple.com>
16
17         Rubber-stamped by Sam Weinig.
18
19         Clean up EvalCodeCache to match our coding style a bit more.
20
21         * VM/EvalCodeCache.h:
22         (JSC::EvalCodeCache::get):
23
24 2008-11-11  Cameron Zwarich  <zwarich@apple.com>
25
26         Rubber-stamped by Sam Weinig.
27
28         Bug 22179: Move EvalCodeCache from CodeBlock.h into its own file
29         <https://bugs.webkit.org/show_bug.cgi?id=22179>
30
31         * GNUmakefile.am:
32         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
33         * JavaScriptCore.xcodeproj/project.pbxproj:
34         * VM/CodeBlock.h:
35         * VM/EvalCodeCache.h: Copied from VM/CodeBlock.h.
36         * VM/Machine.cpp:
37
38 2008-11-11  Cameron Zwarich  <zwarich@apple.com>
39
40         Reviewed by Sam Weinig.
41
42         Remove the 'm_' prefix from the fields of the SwitchRecord struct.
43
44         * VM/CTI.cpp:
45         (JSC::CTI::privateCompile):
46         * VM/CTI.h:
47         (JSC::SwitchRecord):
48         (JSC::SwitchRecord::SwitchRecord):
49
50 2008-11-11  Cameron Zwarich  <zwarich@apple.com>
51
52         Rubber-stamped by Sam Weinig.
53
54         Make asInteger() a static function so that it has internal linkage.
55
56         * VM/CTI.cpp:
57         (JSC::asInteger):
58
59 2008-11-11  Maciej Stachowiak  <mjs@apple.com>
60
61         Reviewed by Mark Rowe.
62         
63         - shrink CodeBlock and AST related Vectors to exact fit (5-10M savings on membuster test)
64         
65         No perf regression combined with the last patch (each seems like a small regression individually)
66
67         * bytecompiler/CodeGenerator.cpp:
68         (JSC::CodeGenerator::generate):
69         * parser/Nodes.h:
70         (JSC::SourceElements::releaseContentsIntoVector):
71         * wtf/Vector.h:
72         (WTF::Vector::shrinkToFit):
73
74 2008-11-11  Maciej Stachowiak  <mjs@apple.com>
75
76         Reviewed by Mark Rowe.
77         
78         - remove inline capacity from declaration stacks (15M savings on membuster test)
79
80         No perf regression on SunSpider or V8 test combined with other upcoming memory improvement patch.
81         
82         * JavaScriptCore.exp:
83         * parser/Nodes.h:
84
85 2008-11-11  Cameron Zwarich  <zwarich@apple.com>
86
87         Reviewed by Oliver Hunt.
88
89         While r38286 removed the need for the m_callFrame member variable of
90         CTI, it should be also be removed.
91
92         * VM/CTI.h:
93
94 2008-11-10  Cameron Zwarich  <zwarich@apple.com>
95
96         Reviewed by Oliver Hunt.
97
98         Make CTI::asInteger() a non-member function, since it needs no access to
99         any of CTI's member variables.
100
101         * VM/CTI.cpp:
102         (JSC::asInteger):
103         * VM/CTI.h:
104
105 2008-11-10  Cameron Zwarich  <zwarich@apple.com>
106
107         Reviewed by Maciej Stachowiak.
108
109         Use 'value' instead of 'js' in CTI as a name for JSValue* to match our
110         usual convention elsewhere.
111
112         * VM/CTI.cpp:
113         (JSC::CTI::emitGetArg):
114         (JSC::CTI::emitGetPutArg):
115         (JSC::CTI::getConstantImmediateNumericArg):
116         (JSC::CTI::printOpcodeOperandTypes):
117
118 2008-11-10  Cameron Zwarich  <zwarich@apple.com>
119
120         Reviewed by Maciej Stachowiak.
121
122         Make CTI::getConstant() a member function of CodeBlock instead.
123
124         * VM/CTI.cpp:
125         (JSC::CTI::emitGetArg):
126         (JSC::CTI::emitGetPutArg):
127         (JSC::CTI::getConstantImmediateNumericArg):
128         (JSC::CTI::printOpcodeOperandTypes):
129         (JSC::CTI::privateCompileMainPass):
130         * VM/CTI.h:
131         * VM/CodeBlock.h:
132         (JSC::CodeBlock::getConstant):
133
134 2008-11-10  Cameron Zwarich  <zwarich@apple.com>
135
136         Reviewed by Sam Weinig.
137
138         Rename CodeBlock::isConstant() to isConstantRegisterIndex().
139
140         * VM/CTI.cpp:
141         (JSC::CTI::emitGetArg):
142         (JSC::CTI::emitGetPutArg):
143         (JSC::CTI::getConstantImmediateNumericArg):
144         (JSC::CTI::printOpcodeOperandTypes):
145         (JSC::CTI::privateCompileMainPass):
146         * VM/CodeBlock.h:
147         (JSC::CodeBlock::isConstantRegisterIndex):
148         * bytecompiler/CodeGenerator.cpp:
149         (JSC::CodeGenerator::emitEqualityOp):
150
151 2008-11-10  Gavin Barraclough  <barraclough@apple.com>
152
153         Build fix for non-CTI builds.
154
155         * VM/Machine.cpp:
156         (JSC::Machine::initialize):
157
158 2008-11-10  Cameron Zwarich  <zwarich@apple.com>
159
160         Reviewed by Sam Weinig.
161
162         Remove the unused labels member variable of CodeBlock.
163
164         * VM/CodeBlock.h:
165         * VM/LabelID.h:
166         (JSC::LabelID::setLocation):
167
168 2008-11-10  Gavin Barraclough  <barraclough@apple.com>
169
170         Reviewed by Camron Zwarich.
171
172         Batch compile the set of static trampolines at the point Machine is constructed, using a single allocation.
173         Refactor out m_callFrame from CTI, since this is only needed to access the global data (instead store a
174         pointer to the global data directly, since this is available at the point the Machine is constructed).
175         Add a method to align the code buffer, to allow JIT generation for multiple trampolines in one block.
176
177         * VM/CTI.cpp:
178         (JSC::CTI::getConstant):
179         (JSC::CTI::emitGetArg):
180         (JSC::CTI::emitGetPutArg):
181         (JSC::CTI::getConstantImmediateNumericArg):
182         (JSC::CTI::printOpcodeOperandTypes):
183         (JSC::CTI::CTI):
184         (JSC::CTI::compileBinaryArithOp):
185         (JSC::CTI::privateCompileMainPass):
186         (JSC::CTI::privateCompileGetByIdProto):
187         (JSC::CTI::privateCompileGetByIdChain):
188         (JSC::CTI::privateCompileCTIMachineTrampolines):
189         (JSC::CTI::freeCTIMachineTrampolines):
190         * VM/CTI.h:
191         (JSC::CTI::compile):
192         (JSC::CTI::compileGetByIdSelf):
193         (JSC::CTI::compileGetByIdProto):
194         (JSC::CTI::compileGetByIdChain):
195         (JSC::CTI::compilePutByIdReplace):
196         (JSC::CTI::compilePutByIdTransition):
197         (JSC::CTI::compileCTIMachineTrampolines):
198         (JSC::CTI::compilePatchGetArrayLength):
199         * VM/Machine.cpp:
200         (JSC::Machine::initialize):
201         (JSC::Machine::~Machine):
202         (JSC::Machine::execute):
203         (JSC::Machine::tryCTICachePutByID):
204         (JSC::Machine::tryCTICacheGetByID):
205         (JSC::Machine::cti_op_call_JSFunction):
206         (JSC::Machine::cti_vm_lazyLinkCall):
207         * VM/Machine.h:
208         * masm/X86Assembler.h:
209         (JSC::JITCodeBuffer::isAligned):
210         (JSC::X86Assembler::):
211         (JSC::X86Assembler::align):
212         * runtime/JSGlobalData.cpp:
213         (JSC::JSGlobalData::JSGlobalData):
214
215 2008-11-10  Maciej Stachowiak  <mjs@apple.com>
216
217         Reviewed by Antti Koivisto.
218         
219         - Make Vector::clear() release the Vector's memory (1MB savings on membuster)
220         https://bugs.webkit.org/show_bug.cgi?id=22170
221
222         * wtf/Vector.h:
223         (WTF::VectorBufferBase::deallocateBuffer): Set capacity to 0 as
224         well as size, otherwise shrinking capacity to 0 can fail to reset
225         the capacity and thus cause a future crash.
226         (WTF::Vector::~Vector): Shrink size not capacity; we only need
227         to call destructors, the buffer will be freed anyway.
228         (WTF::Vector::clear): Change this to shrinkCapacity(0), not just shrink(0).
229         (WTF::::shrinkCapacity): Use shrink() instead of resize() for case where
230         the size is greater than the new capacity, to work with types that have no
231         default constructor.
232
233 2008-11-10  Cameron Zwarich  <zwarich@apple.com>
234
235         Reviewed by Maciej Stachowiak.
236
237         Split multiple definitions into separate lines.
238
239         * VM/CTI.cpp:
240         (JSC::CTI::compileBinaryArithOp):
241
242 2008-11-10  Cameron Zwarich  <zwarich@apple.com>
243
244         Reviewed by Geoff Garen.
245
246         Bug 22162: Remove cachedValueGetter from the JavaScriptCore API implementation
247         <https://bugs.webkit.org/show_bug.cgi?id=22162>
248
249         There is no more need for the cachedValueGetter hack now that we have
250         PropertySlot::setValue(), so we should remove it.
251
252         * API/JSCallbackObject.h:
253         * API/JSCallbackObjectFunctions.h:
254         (JSC::::getOwnPropertySlot):
255
256 2008-11-10  Cameron Zwarich  <zwarich@apple.com>
257
258         Reviewed by Darin Adler.
259
260         Bug 22152: Remove asObject() call from JSCallbackObject::getOwnPropertySlot()
261         <https://bugs.webkit.org/show_bug.cgi?id=22152>
262
263         With the recent change to adopt asType() style cast functions with
264         assertions instead of static_casts in many places, the assertion for
265         the asObject() call in JSCallbackObject::getOwnPropertySlot() has been
266         failing when using any nontrivial client of the JavaScriptCore API.
267         The cast isn't even necessary to call slot.setCustom(), so it should
268         be removed.
269
270         * API/JSCallbackObjectFunctions.h:
271         (JSC::JSCallbackObject::getOwnPropertySlot):
272
273 2008-11-10  Alexey Proskuryakov  <ap@webkit.org>
274
275         Reviewed by Adam Roben.
276
277         A few coding style fixes for AVLTree.
278
279         * wtf/AVLTree.h: Moved to WTF namespace, Removed "KJS_" from include guards.
280         (WTF::AVLTree::Iterator::start_iter): Fixed indentation
281
282         * runtime/JSArray.cpp: Added "using namepace WTF".
283
284 2008-11-09  Cameron Zwarich  <zwarich@apple.com>
285
286         Not reviewed.
287
288         Speculatively fix the non-AllInOne build.
289
290         * runtime/NativeErrorConstructor.cpp:
291
292 2008-11-09  Darin Adler  <darin@apple.com>
293
294         Reviewed by Tim Hatcher.
295
296         - https://bugs.webkit.org/show_bug.cgi?id=22149
297           remove unused code from the parser
298
299         * AllInOneFile.cpp: Removed nodes2string.cpp.
300         * GNUmakefile.am: Ditto.
301         * JavaScriptCore.exp: Ditto.
302         * JavaScriptCore.pri: Ditto.
303         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
304         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
305         * JavaScriptCoreSources.bkl: Ditto.
306
307         * VM/CodeBlock.h: Added include.
308
309         * VM/Machine.cpp: (JSC::Machine::execute): Use the types from
310         DeclarationStacks as DeclarationStacks:: rather than Node:: since
311         "Node" really has little to do with it.
312         * bytecompiler/CodeGenerator.cpp:
313         (JSC::CodeGenerator::CodeGenerator): Ditto.
314
315         * jsc.cpp:
316         (Options::Options): Removed prettyPrint option.
317         (runWithScripts): Ditto.
318         (printUsageStatement): Ditto.
319         (parseArguments): Ditto.
320         (jscmain): Ditto.
321
322         * parser/Grammar.y: Removed use of obsolete ImmediateNumberNode.
323
324         * parser/Nodes.cpp:
325         (JSC::ThrowableExpressionData::emitThrowError): Use inline functions
326         instead of direct member access for ThrowableExpressionData values.
327         (JSC::BracketAccessorNode::emitCode): Ditto.
328         (JSC::DotAccessorNode::emitCode): Ditto.
329         (JSC::NewExprNode::emitCode): Ditto.
330         (JSC::EvalFunctionCallNode::emitCode): Ditto.
331         (JSC::FunctionCallValueNode::emitCode): Ditto.
332         (JSC::FunctionCallResolveNode::emitCode): Ditto.
333         (JSC::FunctionCallBracketNode::emitCode): Ditto.
334         (JSC::FunctionCallDotNode::emitCode): Ditto.
335         (JSC::PostfixResolveNode::emitCode): Ditto.
336         (JSC::PostfixBracketNode::emitCode): Ditto.
337         (JSC::PostfixDotNode::emitCode): Ditto.
338         (JSC::DeleteResolveNode::emitCode): Ditto.
339         (JSC::DeleteBracketNode::emitCode): Ditto.
340         (JSC::DeleteDotNode::emitCode): Ditto.
341         (JSC::PrefixResolveNode::emitCode): Ditto.
342         (JSC::PrefixBracketNode::emitCode): Ditto.
343         (JSC::PrefixDotNode::emitCode): Ditto.
344         (JSC::ThrowableBinaryOpNode::emitCode): Ditto.
345         (JSC::InstanceOfNode::emitCode): Ditto.
346         (JSC::ReadModifyResolveNode::emitCode): Ditto.
347         (JSC::AssignResolveNode::emitCode): Ditto.
348         (JSC::AssignDotNode::emitCode): Ditto.
349         (JSC::ReadModifyDotNode::emitCode): Ditto.
350         (JSC::AssignBracketNode::emitCode): Ditto.
351         (JSC::ReadModifyBracketNode::emitCode): Ditto.
352         (JSC::statementListEmitCode): Take a const StatementVector instead
353         of a non-const one. Also removed unused statementListPushFIFO.
354         (JSC::ForInNode::emitCode): Inline functions instead of member access.
355         (JSC::ThrowNode::emitCode): Ditto.
356         (JSC::EvalNode::emitCode): Ditto.
357         (JSC::FunctionBodyNode::emitCode): Ditto.
358         (JSC::ProgramNode::emitCode): Ditto.
359
360         * parser/Nodes.h: Removed unused includes and forward declarations.
361         Removed Precedence enum. Made many more members private instead of
362         protected or public. Removed unused NodeStack typedef. Moved the
363         VarStack and FunctionStack typedefs from Node to ScopeNode. Made
364         Node::emitCode pure virtual and changed classes that don't emit
365         any code to inherit from ParserRefCounted rather than Node.
366         Moved isReturnNode from Node to StatementNode. Removed the
367         streamTo, precedence, and needsParensIfLeftmost functions from
368         all classes. Removed the ImmediateNumberNode class and make
369         NumberNode::setValue nonvirtual.
370
371         * parser/nodes2string.cpp: Removed.
372
373 2008-11-09  Darin Adler  <darin@apple.com>
374
375         Reviewed by Sam Weinig and Maciej Stachowiak.
376         Includes some work done by Chris Brichford.
377
378         - fix https://bugs.webkit.org/show_bug.cgi?id=14886
379           Stack overflow due to deeply nested parse tree doing repeated string concatentation
380
381         Test: fast/js/large-expressions.html
382
383         1) Code generation is recursive, so takes stack proportional to the complexity
384            of the source code expression. Fixed by setting an arbitrary recursion limit
385            of 10,000 nodes.
386
387         2) Destruction of the syntax tree was recursive. Fixed by introducing a
388            non-recursive mechanism for destroying the tree.
389
390         * bytecompiler/CodeGenerator.cpp:
391         (JSC::CodeGenerator::CodeGenerator): Initialize depth to 0.
392         (JSC::CodeGenerator::emitThrowExpressionTooDeepException): Added. Emits the code
393         to throw a "too deep" exception.
394         * bytecompiler/CodeGenerator.h:
395         (JSC::CodeGenerator::emitNode): Check depth and emit an exception if we exceed
396         the maximum depth.
397
398         * parser/Nodes.cpp:
399         (JSC::NodeReleaser::releaseAllNodes): Added. To be called inside node destructors
400         to avoid recursive calls to destructors for nodes inside this one.
401         (JSC::NodeReleaser::release): Added. To be called inside releaseNodes functions.
402         Also added releaseNodes functions and calls to releaseAllNodes inside destructors
403         for each class derived from Node that has RefPtr to other nodes.
404         (JSC::NodeReleaser::adopt): Added. Used by the release function.
405         (JSC::NodeReleaser::adoptFunctionBodyNode): Added.
406
407         * parser/Nodes.h: Added declarations of releaseNodes and destructors in all classes
408         that needed it. Eliminated use of ListRefPtr and releaseNext, which are the two parts
409         of an older solution to the non-recursive destruction problem that works only for
410         lists, whereas the new solution works for other graphs. Changed ReverseBinaryOpNode
411         to use BinaryOpNode as a base class to avoid some duplicated code.
412
413 2008-11-08  Kevin Ollivier  <kevino@theolliviers.com>
414         
415         wx build fixes after addition of JSCore parser and bycompiler dirs. Also cleanup
416         the JSCore Bakefile's group names to be consistent.
417
418         * JavaScriptCoreSources.bkl:
419         * jscore.bkl:
420
421 2008-11-07  Cameron Zwarich  <zwarich@apple.com>
422
423         Reviewed by Geoff Garen.
424
425         Bug 21801: REGRESSION (r37821): YUI date formatting JavaScript puts the letter 'd' in place of the day
426         <https://bugs.webkit.org/show_bug.cgi?id=21801>
427
428         Fix the constant register check in the 'typeof' optimization in
429         CodeGenerator, which was completely broken after r37821.
430
431         * bytecompiler/CodeGenerator.cpp:
432         (JSC::CodeGenerator::emitEqualityOp):
433
434 2008-11-07  Cameron Zwarich  <zwarich@apple.com>
435
436         Reviewed by Geoff Garen.
437
438         Bug 22129: Move CTI::isConstant() to CodeBlock
439         <https://bugs.webkit.org/show_bug.cgi?id=22129>
440
441         * VM/CTI.cpp:
442         (JSC::CTI::emitGetArg):
443         (JSC::CTI::emitGetPutArg):
444         (JSC::CTI::getConstantImmediateNumericArg):
445         (JSC::CTI::printOpcodeOperandTypes):
446         (JSC::CTI::privateCompileMainPass):
447         * VM/CTI.h:
448         * VM/CodeBlock.h:
449         (JSC::CodeBlock::isConstant):
450
451 2008-11-07  Alp Toker  <alp@nuanti.com>
452
453         autotools fix. Always use the configured perl binary (which may be
454         different to the one in $PATH) when generating sources.
455
456         * GNUmakefile.am:
457
458 2008-11-07  Cameron Zwarich  <zwarich@apple.com>
459
460         Not reviewed.
461
462         Change grammar.cpp to Grammar.cpp and grammar.h to Grammar.h in several
463         build scripts.
464
465         * DerivedSources.make:
466         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
467         * JavaScriptCoreSources.bkl:
468
469 2008-11-07  Alp Toker  <alp@nuanti.com>
470
471         More grammar.cpp -> Grammar.cpp build fixes.
472
473         * AllInOneFile.cpp:
474         * GNUmakefile.am:
475
476 2008-11-07  Simon Hausmann  <hausmann@webkit.org>
477
478         Fix the build on case-sensitive file systems. grammar.y was renamed to
479         Grammar.y but Lexer.cpp includes grammar.h. The build bots didn't
480         notice this change because of stale files.
481
482         * parser/Lexer.cpp:
483
484 2008-11-07  Cameron Zwarich  <zwarich@apple.com>
485
486         Reviewed by Alexey Proskuryakov.
487
488         Rename the m_nextGlobal, m_nextParameter, and m_nextConstant member
489         variables of CodeGenerator to m_nextGlobalIndex, m_nextParameterIndex,
490         and m_nextConstantIndex respectively. This is to distinguish these from
491         member variables like m_lastConstant, which are actually RefPtrs to
492         Registers.
493
494         * bytecompiler/CodeGenerator.cpp:
495         (JSC::CodeGenerator::addGlobalVar):
496         (JSC::CodeGenerator::allocateConstants):
497         (JSC::CodeGenerator::CodeGenerator):
498         (JSC::CodeGenerator::addParameter):
499         (JSC::CodeGenerator::addConstant):
500         * bytecompiler/CodeGenerator.h:
501
502 2008-11-06  Gavin Barraclough  barraclough@apple.com
503
504         Reviewed by Oliver Hunt.
505
506         Do not make a cti_* call to perform an op_call unless either:
507         (1) The codeblock for the function body has not been generated.
508         (2) The number of arguments passed does not match the callee arity.
509
510         ~1% progression on sunspider --v8
511
512         * VM/CTI.cpp:
513         (JSC::CTI::compileOpCallInitializeCallFrame):
514         (JSC::CTI::compileOpCall):
515         (JSC::CTI::privateCompileSlowCases):
516         * VM/CTI.h:
517         * VM/Machine.cpp:
518         (JSC::Machine::cti_op_call_JSFunction):
519         (JSC::Machine::cti_op_call_arityCheck):
520         (JSC::Machine::cti_op_construct_JSConstruct):
521         * VM/Machine.h:
522         * kjs/nodes.h:
523
524 2008-11-06  Cameron Zwarich  <zwarich@apple.com>
525
526         Reviewed by Geoff Garen.
527
528         Move the remaining files in the kjs subdirectory of JavaScriptCore to
529         a new parser subdirectory, and remove the kjs subdirectory entirely.
530
531         * AllInOneFile.cpp:
532         * DerivedSources.make:
533         * GNUmakefile.am:
534         * JavaScriptCore.pri:
535         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
536         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
537         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
538         * JavaScriptCore.xcodeproj/project.pbxproj:
539         * JavaScriptCoreSources.bkl:
540         * VM/CodeBlock.h:
541         * VM/ExceptionHelpers.cpp:
542         * VM/SamplingTool.h:
543         * bytecompiler/CodeGenerator.h:
544         * jsc.pro:
545         * jscore.bkl:
546         * kjs: Removed.
547         * kjs/NodeInfo.h: Removed.
548         * kjs/Parser.cpp: Removed.
549         * kjs/Parser.h: Removed.
550         * kjs/ResultType.h: Removed.
551         * kjs/SourceCode.h: Removed.
552         * kjs/SourceProvider.h: Removed.
553         * kjs/grammar.y: Removed.
554         * kjs/keywords.table: Removed.
555         * kjs/lexer.cpp: Removed.
556         * kjs/lexer.h: Removed.
557         * kjs/nodes.cpp: Removed.
558         * kjs/nodes.h: Removed.
559         * kjs/nodes2string.cpp: Removed.
560         * parser: Added.
561         * parser/Grammar.y: Copied from kjs/grammar.y.
562         * parser/Keywords.table: Copied from kjs/keywords.table.
563         * parser/Lexer.cpp: Copied from kjs/lexer.cpp.
564         * parser/Lexer.h: Copied from kjs/lexer.h.
565         * parser/NodeInfo.h: Copied from kjs/NodeInfo.h.
566         * parser/Nodes.cpp: Copied from kjs/nodes.cpp.
567         * parser/Nodes.h: Copied from kjs/nodes.h.
568         * parser/Parser.cpp: Copied from kjs/Parser.cpp.
569         * parser/Parser.h: Copied from kjs/Parser.h.
570         * parser/ResultType.h: Copied from kjs/ResultType.h.
571         * parser/SourceCode.h: Copied from kjs/SourceCode.h.
572         * parser/SourceProvider.h: Copied from kjs/SourceProvider.h.
573         * parser/nodes2string.cpp: Copied from kjs/nodes2string.cpp.
574         * pcre/pcre.pri:
575         * pcre/pcre_exec.cpp:
576         * runtime/FunctionConstructor.cpp:
577         * runtime/JSActivation.h:
578         * runtime/JSFunction.h:
579         * runtime/JSGlobalData.cpp:
580         * runtime/JSGlobalObjectFunctions.cpp:
581         * runtime/JSObject.cpp:
582         (JSC::JSObject::toNumber):
583         * runtime/RegExp.cpp:
584
585 2008-11-06  Adam Roben  <aroben@apple.com>
586
587         Windows build fix after r38196
588
589         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Added bytecompiler/ to the
590         include path.
591
592 2008-11-06  Cameron Zwarich  <zwarich@apple.com>
593
594         Rubber-stamped by Sam Weinig.
595
596         Create a new bytecompiler subdirectory of JavaScriptCore and move some
597         relevant files to it.
598
599         * AllInOneFile.cpp:
600         * GNUmakefile.am:
601         * JavaScriptCore.pri:
602         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
603         * JavaScriptCore.xcodeproj/project.pbxproj:
604         * JavaScriptCoreSources.bkl:
605         * VM/CodeGenerator.cpp: Removed.
606         * VM/CodeGenerator.h: Removed.
607         * bytecompiler: Added.
608         * bytecompiler/CodeGenerator.cpp: Copied from VM/CodeGenerator.cpp.
609         * bytecompiler/CodeGenerator.h: Copied from VM/CodeGenerator.h.
610         * bytecompiler/LabelScope.h: Copied from kjs/LabelScope.h.
611         * jscore.bkl:
612         * kjs/LabelScope.h: Removed.
613
614 2008-11-06  Adam Roben  <aroben@apple.com>
615
616         Windows clean build fix after r38155
617
618         Rubberstamped by Cameron Zwarich.
619
620         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Update
621         the post-build event for the move of create_hash_table out of kjs/.
622
623 2008-11-06  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
624
625         Reviewed by Darin Adler.
626
627         https://bugs.webkit.org/show_bug.cgi?id=22107
628
629         Bug uncovered during RVCT port in functions not used. get_lt() and
630         get_gt() takes only one argument - remove second argument where
631         applicable.
632
633         * wtf/AVLTree.h:
634         (JSC::AVLTree::remove): Remove second argument of get_lt/get_gt().
635         (JSC::AVLTree::subst): Ditto.
636
637 2008-11-06  Alp Toker  <alp@nuanti.com>
638
639         Reviewed by Cameron Zwarich.
640
641         https://bugs.webkit.org/show_bug.cgi?id=22033
642         [GTK] CTI/Linux r38064 crashes; JIT requires executable memory
643
644         Mark pages allocated by the FastMalloc mmap code path executable with
645         PROT_EXEC. This fixes crashes seen on CPUs and kernels that enforce
646         non-executable memory (like ExecShield on Fedora Linux) when the JIT
647         is enabled.
648
649         This patch does not resolve the issue on debug builds so affected
650         developers may still need to pass --disable-jit to configure.
651
652         * wtf/TCSystemAlloc.cpp:
653         (TryMmap):
654         (TryDevMem):
655         (TCMalloc_SystemRelease):
656
657 2008-11-06  Peter Gal  <galpeter@inf.u-szeged.hu>
658
659         Reviewed by Cameron Zwarich.
660
661         Bug 22099: Make the Qt port build the JSC shell in the correct place
662         <https://bugs.webkit.org/show_bug.cgi?id=22099>
663
664         Adjust include paths and build destination dir for the 'jsc' executable
665         in the Qt build.
666
667         * jsc.pro:
668
669 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
670
671         Reviewed by Simon Hausmann.
672
673         Implemented the block allocation on Symbian through heap allocation.
674
675         Unfortunately there is no way to allocate virtual memory. The Posix
676         layer provides mmap() but no anonymous mapping. So this is a very slow
677         solution but it should work as a start.
678
679         * runtime/Collector.cpp:
680         (JSC::allocateBlock):
681         (JSC::freeBlock):
682
683 2008-11-06  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
684
685         Reviewed by Simon Hausmann.
686
687         Borrow some math functions from the MSVC port to the build with the
688         RVCT compiler.
689
690         * wtf/MathExtras.h:
691         (isinf):
692         (isnan):
693         (signbit):
694
695 2008-11-06  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
696
697         Reviewed by Simon Hausmann.
698
699         Include strings.h for strncasecmp().
700         This is needed for compilation inside Symbian and it is also
701         confirmed by the man-page on Linux.
702
703         * runtime/DateMath.cpp:
704
705 2008-11-06  Norbert Leser  <norbert.leser@nokia.com>
706
707         Reviewed by Simon Hausmann.
708
709         Implemented currentThreadStackBase for Symbian.
710
711         * runtime/Collector.cpp:
712         (JSC::currentThreadStackBase):
713
714 2008-11-06  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
715
716         Reviewed by Simon Hausmann.
717
718         RVCT does not support tm_gmtoff field, so disable that code just like
719         for MSVC.
720
721         * runtime/DateMath.h:
722         (JSC::GregorianDateTime::GregorianDateTime):
723         (JSC::GregorianDateTime::operator tm):
724
725 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
726
727         Reviewed by Simon Hausmann.
728
729         Define PLATFORM(UNIX) for S60. Effectively WebKit on S60 is compiled
730         on top of the Posix layer.
731
732         * wtf/Platform.h:
733
734 2008-11-06  Norbert Leser  <norbert.leser@nokia.com>
735
736         Reviewed by Simon Hausmann.
737
738         Added __SYMBIAN32__ condition for defining PLATFORM(SYMBIAN).
739
740         * wtf/Platform.h:
741
742 2008-11-06  Ariya Hidayat  <ariya.hidayat@trolltech.com>
743
744         Reviewed by Simon Hausmann.
745
746         Added WINSCW compiler define for Symbian S60.
747
748         * wtf/Platform.h:
749
750 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
751
752         Reviewed by Simon Hausmann.
753
754         Use the GCC defines of the WTF_ALIGN* macros for the RVCT and the
755         MINSCW compiler.
756
757         * wtf/Vector.h:
758
759 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
760
761         Reviewed by Simon Hausmann.
762
763         Define capabilities of the SYMBIAN platform. Some of the system
764         headers are actually dependent on RVCT.
765
766         * wtf/Platform.h:
767
768 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
769
770         Reviewed by Simon Hausmann.
771
772         Add missing stddef.h header needed for compilation in Symbian.
773
774         * runtime/Collector.h:
775
776 2008-11-06  Kristian Amlie  <kristian.amlie@nokia.com>
777
778         Reviewed by Simon Hausmann.
779
780         Added COMPILER(RVCT) to detect the ARM RVCT compiler used in the Symbian environment.
781
782         * wtf/Platform.h:
783
784 2008-11-06  Simon Hausmann  <hausmann@webkit.org>
785
786         Fix the Qt build, adjust include paths after move of jsc.pro.
787
788         * jsc.pro:
789
790 2008-11-06  Cameron Zwarich  <zwarich@apple.com>
791
792         Rubber-stamped by Sam Weinig.
793
794         Move kjs/Shell.cpp to the top level of the JavaScriptCore directory and
795         rename it to jsc.cpp to reflect the name of the binary compiled from it.
796
797         * GNUmakefile.am:
798         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
799         * JavaScriptCore.xcodeproj/project.pbxproj:
800         * jsc.cpp: Copied from kjs/Shell.cpp.
801         * jsc.pro:
802         * jscore.bkl:
803         * kjs/Shell.cpp: Removed.
804
805 2008-11-06  Cameron Zwarich  <zwarich@apple.com>
806
807         Rubber-stamped by Sam Weinig.
808
809         Move create_hash_table and jsc.pro out of the kjs directory and into the
810         root directory of JavaScriptCore.
811
812         * DerivedSources.make:
813         * JavaScriptCore.pri:
814         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
815         * JavaScriptCore.xcodeproj/project.pbxproj:
816         * create_hash_table: Copied from kjs/create_hash_table.
817         * jsc.pro: Copied from kjs/jsc.pro.
818         * kjs/create_hash_table: Removed.
819         * kjs/jsc.pro: Removed.
820         * make-generated-sources.sh:
821
822 2008-11-05  Gavin Barraclough  <barraclough@apple.com>
823
824         Reviewed by Maciej Stachowiak.
825
826         https://bugs.webkit.org/show_bug.cgi?id=22094
827
828         Fix for bug where the callee incorrectly recieves the caller's lexical
829         global object as this, rather than its own.  Implementation closely
830         follows the spec, passing jsNull, checking in the callee and replacing
831         with the global object where necessary.
832
833         * VM/CTI.cpp:
834         (JSC::CTI::compileOpCall):
835         * VM/Machine.cpp:
836         (JSC::Machine::cti_op_call_NotJSFunction):
837         (JSC::Machine::cti_op_call_eval):
838         * runtime/JSCell.h:
839         (JSC::JSValue::toThisObject):
840         * runtime/JSImmediate.cpp:
841         (JSC::JSImmediate::toThisObject):
842         * runtime/JSImmediate.h:
843
844 2008-11-05  Kevin Ollivier  <kevino@theolliviers.com>
845
846         wx build fix after Operations.cpp move.
847
848         * JavaScriptCoreSources.bkl:
849
850 2008-11-05  Cameron Zwarich  <zwarich@apple.com>
851
852         Not reviewed.
853
854         Fix the build for case-sensitive build systems and wxWindows.
855
856         * JavaScriptCoreSources.bkl:
857         * kjs/create_hash_table:
858
859 2008-11-05  Cameron Zwarich  <zwarich@apple.com>
860
861         Not reviewed.
862
863         Fix the build for case-sensitive build systems.
864
865         * JavaScriptCoreSources.bkl:
866         * kjs/Shell.cpp:
867         * runtime/Interpreter.cpp:
868         * runtime/JSArray.cpp:
869
870 2008-11-05  Cameron Zwarich  <zwarich@apple.com>
871
872         Not reviewed.
873
874         Fix the build for case-sensitive build systems.
875
876         * API/JSBase.cpp:
877         * API/JSObjectRef.cpp:
878         * runtime/CommonIdentifiers.h:
879         * runtime/Identifier.cpp:
880         * runtime/InitializeThreading.cpp:
881         * runtime/InternalFunction.h:
882         * runtime/JSString.h:
883         * runtime/Lookup.h:
884         * runtime/PropertyNameArray.h:
885         * runtime/PropertySlot.h:
886         * runtime/StructureID.cpp:
887         * runtime/StructureID.h:
888         * runtime/UString.cpp:
889
890 2008-11-05  Cameron Zwarich  <zwarich@apple.com>
891
892         Rubber-stamped by Sam Weinig.
893
894         Move more files to the runtime subdirectory of JavaScriptCore.
895
896         * API/APICast.h:
897         * API/JSBase.cpp:
898         * API/JSCallbackObject.cpp:
899         * API/JSClassRef.cpp:
900         * API/JSClassRef.h:
901         * API/JSStringRefCF.cpp:
902         * API/JSValueRef.cpp:
903         * API/OpaqueJSString.cpp:
904         * API/OpaqueJSString.h:
905         * AllInOneFile.cpp:
906         * GNUmakefile.am:
907         * JavaScriptCore.pri:
908         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
909         * JavaScriptCore.xcodeproj/project.pbxproj:
910         * JavaScriptCoreSources.bkl:
911         * VM/CodeBlock.h:
912         * VM/CodeGenerator.cpp:
913         * VM/Machine.cpp:
914         * VM/RegisterFile.h:
915         * debugger/Debugger.h:
916         * kjs/SourceProvider.h:
917         * kjs/TypeInfo.h: Removed.
918         * kjs/collector.cpp: Removed.
919         * kjs/collector.h: Removed.
920         * kjs/completion.h: Removed.
921         * kjs/create_hash_table:
922         * kjs/identifier.cpp: Removed.
923         * kjs/identifier.h: Removed.
924         * kjs/interpreter.cpp: Removed.
925         * kjs/interpreter.h: Removed.
926         * kjs/lexer.cpp:
927         * kjs/lexer.h:
928         * kjs/lookup.cpp: Removed.
929         * kjs/lookup.h: Removed.
930         * kjs/nodes.cpp:
931         * kjs/nodes.h:
932         * kjs/operations.cpp: Removed.
933         * kjs/operations.h: Removed.
934         * kjs/protect.h: Removed.
935         * kjs/regexp.cpp: Removed.
936         * kjs/regexp.h: Removed.
937         * kjs/ustring.cpp: Removed.
938         * kjs/ustring.h: Removed.
939         * pcre/pcre_exec.cpp:
940         * profiler/CallIdentifier.h:
941         * profiler/Profile.h:
942         * runtime/ArrayConstructor.cpp:
943         * runtime/ArrayPrototype.cpp:
944         * runtime/ArrayPrototype.h:
945         * runtime/Collector.cpp: Copied from kjs/collector.cpp.
946         * runtime/Collector.h: Copied from kjs/collector.h.
947         * runtime/CollectorHeapIterator.h:
948         * runtime/Completion.h: Copied from kjs/completion.h.
949         * runtime/ErrorPrototype.cpp:
950         * runtime/Identifier.cpp: Copied from kjs/identifier.cpp.
951         * runtime/Identifier.h: Copied from kjs/identifier.h.
952         * runtime/InitializeThreading.cpp:
953         * runtime/Interpreter.cpp: Copied from kjs/interpreter.cpp.
954         * runtime/Interpreter.h: Copied from kjs/interpreter.h.
955         * runtime/JSCell.h:
956         * runtime/JSGlobalData.cpp:
957         * runtime/JSGlobalData.h:
958         * runtime/JSLock.cpp:
959         * runtime/JSNumberCell.cpp:
960         * runtime/JSNumberCell.h:
961         * runtime/JSObject.cpp:
962         * runtime/JSValue.h:
963         * runtime/Lookup.cpp: Copied from kjs/lookup.cpp.
964         * runtime/Lookup.h: Copied from kjs/lookup.h.
965         * runtime/MathObject.cpp:
966         * runtime/NativeErrorPrototype.cpp:
967         * runtime/NumberPrototype.cpp:
968         * runtime/Operations.cpp: Copied from kjs/operations.cpp.
969         * runtime/Operations.h: Copied from kjs/operations.h.
970         * runtime/PropertyMapHashTable.h:
971         * runtime/Protect.h: Copied from kjs/protect.h.
972         * runtime/RegExp.cpp: Copied from kjs/regexp.cpp.
973         * runtime/RegExp.h: Copied from kjs/regexp.h.
974         * runtime/RegExpConstructor.cpp:
975         * runtime/RegExpObject.h:
976         * runtime/RegExpPrototype.cpp:
977         * runtime/SmallStrings.h:
978         * runtime/StringObjectThatMasqueradesAsUndefined.h:
979         * runtime/StructureID.cpp:
980         * runtime/StructureID.h:
981         * runtime/StructureIDTransitionTable.h:
982         * runtime/SymbolTable.h:
983         * runtime/TypeInfo.h: Copied from kjs/TypeInfo.h.
984         * runtime/UString.cpp: Copied from kjs/ustring.cpp.
985         * runtime/UString.h: Copied from kjs/ustring.h.
986         * wrec/CharacterClassConstructor.h:
987         * wrec/WREC.h:
988
989 2008-11-05  Geoffrey Garen  <ggaren@apple.com>
990
991         Suggested by Darin Adler.
992         
993         Removed two copy constructors that the compiler can generate for us
994         automatically.
995
996         * VM/LabelID.h:
997         (JSC::LabelID::setLocation):
998         (JSC::LabelID::offsetFrom):
999         (JSC::LabelID::ref):
1000         (JSC::LabelID::refCount):
1001         * kjs/LabelScope.h:
1002
1003 2008-11-05  Anders Carlsson  <andersca@apple.com>
1004
1005         Fix Snow Leopard build.
1006         
1007         * JavaScriptCore.xcodeproj/project.pbxproj:
1008
1009 2008-11-04  Cameron Zwarich  <zwarich@apple.com>
1010
1011         Rubber-stamped by Steve Falkenburg.
1012
1013         Move dtoa.cpp and dtoa.h to the WTF Visual Studio project to reflect
1014         their movement in the filesystem.
1015
1016         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1017         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1018
1019 2008-11-04  Cameron Zwarich  <zwarich@apple.com>
1020
1021         Rubber-stamped by Sam Weinig.
1022
1023         Move kjs/dtoa.h to the wtf subdirectory of JavaScriptCore.
1024
1025         * AllInOneFile.cpp:
1026         * GNUmakefile.am:
1027         * JavaScriptCore.pri:
1028         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1029         * JavaScriptCore.xcodeproj/project.pbxproj:
1030         * JavaScriptCoreSources.bkl:
1031         * kjs/dtoa.cpp: Removed.
1032         * kjs/dtoa.h: Removed.
1033         * wtf/dtoa.cpp: Copied from kjs/dtoa.cpp.
1034         * wtf/dtoa.h: Copied from kjs/dtoa.h.
1035
1036 2008-11-04  Cameron Zwarich  <zwarich@apple.com>
1037
1038         Rubber-stamped by Sam Weinig.
1039
1040         Move kjs/config.h to the top level of JavaScriptCore.
1041
1042         * GNUmakefile.am:
1043         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1044         * JavaScriptCore.xcodeproj/project.pbxproj:
1045         * config.h: Copied from kjs/config.h.
1046         * kjs/config.h: Removed.
1047
1048 2008-11-04  Darin Adler  <darin@apple.com>
1049
1050         Reviewed by Tim Hatcher.
1051
1052         * wtf/ThreadingNone.cpp: Tweak formatting.
1053
1054 2008-11-03  Darin Adler  <darin@apple.com>
1055
1056         Reviewed by Tim Hatcher.
1057
1058         - https://bugs.webkit.org/show_bug.cgi?id=22061
1059           create script to check for exit-time destructors
1060
1061         * JavaScriptCore.exp: Changed to export functions rather than
1062         a global for the atomically initialized static mutex.
1063
1064         * JavaScriptCore.xcodeproj/project.pbxproj: Added a script
1065         phase that runs the check-for-exit-time-destructors script.
1066
1067         * wtf/MainThread.cpp:
1068         (WTF::mainThreadFunctionQueueMutex): Changed to leak an object
1069         rather than using an exit time destructor.
1070         (WTF::functionQueue): Ditto.
1071         * wtf/unicode/icu/CollatorICU.cpp:
1072         (WTF::cachedCollatorMutex): Ditto.
1073
1074         * wtf/Threading.h: Changed other platforms to share the Windows
1075         approach where the mutex is internal and the functions are exported.
1076         * wtf/ThreadingGtk.cpp:
1077         (WTF::lockAtomicallyInitializedStaticMutex): Ditto.
1078         (WTF::unlockAtomicallyInitializedStaticMutex): Ditto.
1079         * wtf/ThreadingNone.cpp:
1080         (WTF::lockAtomicallyInitializedStaticMutex): Ditto.
1081         (WTF::unlockAtomicallyInitializedStaticMutex): Ditto.
1082         * wtf/ThreadingPthreads.cpp:
1083         (WTF::threadMapMutex): Changed to leak an object rather than using
1084         an exit time destructor.
1085         (WTF::lockAtomicallyInitializedStaticMutex): Mutex change.
1086         (WTF::unlockAtomicallyInitializedStaticMutex): Ditto.
1087         (WTF::threadMap): Changed to leak an object rather than using
1088         an exit time destructor.
1089         * wtf/ThreadingQt.cpp:
1090         (WTF::lockAtomicallyInitializedStaticMutex): Mutex change.
1091         (WTF::unlockAtomicallyInitializedStaticMutex): Ditto.
1092         * wtf/ThreadingWin.cpp:
1093         (WTF::lockAtomicallyInitializedStaticMutex): Added an assertion.
1094
1095 2008-11-04  Adam Roben  <aroben@apple.com>
1096
1097         Windows build fix
1098
1099         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Update
1100         the location of JSStaticScopeObject.{cpp,h}.
1101
1102 2008-11-04  Cameron Zwarich  <zwarich@apple.com>
1103
1104         Reviewed by Alexey Proskuryakov.
1105
1106         Move AllInOneFile.cpp to the top level of JavaScriptCore.
1107
1108         * AllInOneFile.cpp: Copied from kjs/AllInOneFile.cpp.
1109         * GNUmakefile.am:
1110         * JavaScriptCore.xcodeproj/project.pbxproj:
1111         * kjs/AllInOneFile.cpp: Removed.
1112
1113 2008-11-04  Cameron Zwarich  <zwarich@apple.com>
1114
1115         Rubber-stamped by Alexey Proskuryakov.
1116
1117         Add NodeInfo.h to the JavaScriptCore Xcode project.
1118
1119         * JavaScriptCore.xcodeproj/project.pbxproj:
1120
1121 2008-11-03  Cameron Zwarich  <zwarich@apple.com>
1122
1123         Rubber-stamped by Maciej Stachowiak.
1124
1125         Move more files into the runtime subdirectory of JavaScriptCore.
1126
1127         * API/JSBase.cpp:
1128         * API/JSCallbackConstructor.cpp:
1129         * API/JSCallbackFunction.cpp:
1130         * API/JSClassRef.cpp:
1131         * API/OpaqueJSString.cpp:
1132         * GNUmakefile.am:
1133         * JavaScriptCore.pri:
1134         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1135         * JavaScriptCore.xcodeproj/project.pbxproj:
1136         * JavaScriptCoreSources.bkl:
1137         * kjs/AllInOneFile.cpp:
1138         * kjs/ArgList.cpp: Removed.
1139         * kjs/ArgList.h: Removed.
1140         * kjs/Arguments.cpp: Removed.
1141         * kjs/Arguments.h: Removed.
1142         * kjs/BatchedTransitionOptimizer.h: Removed.
1143         * kjs/CollectorHeapIterator.h: Removed.
1144         * kjs/CommonIdentifiers.cpp: Removed.
1145         * kjs/CommonIdentifiers.h: Removed.
1146         * kjs/ExecState.cpp: Removed.
1147         * kjs/ExecState.h: Removed.
1148         * kjs/GetterSetter.cpp: Removed.
1149         * kjs/GetterSetter.h: Removed.
1150         * kjs/InitializeThreading.cpp: Removed.
1151         * kjs/InitializeThreading.h: Removed.
1152         * kjs/JSActivation.cpp: Removed.
1153         * kjs/JSActivation.h: Removed.
1154         * kjs/JSGlobalData.cpp: Removed.
1155         * kjs/JSGlobalData.h: Removed.
1156         * kjs/JSLock.cpp: Removed.
1157         * kjs/JSLock.h: Removed.
1158         * kjs/JSStaticScopeObject.cpp: Removed.
1159         * kjs/JSStaticScopeObject.h: Removed.
1160         * kjs/JSType.h: Removed.
1161         * kjs/PropertyNameArray.cpp: Removed.
1162         * kjs/PropertyNameArray.h: Removed.
1163         * kjs/ScopeChain.cpp: Removed.
1164         * kjs/ScopeChain.h: Removed.
1165         * kjs/ScopeChainMark.h: Removed.
1166         * kjs/SymbolTable.h: Removed.
1167         * kjs/Tracing.d: Removed.
1168         * kjs/Tracing.h: Removed.
1169         * runtime/ArgList.cpp: Copied from kjs/ArgList.cpp.
1170         * runtime/ArgList.h: Copied from kjs/ArgList.h.
1171         * runtime/Arguments.cpp: Copied from kjs/Arguments.cpp.
1172         * runtime/Arguments.h: Copied from kjs/Arguments.h.
1173         * runtime/BatchedTransitionOptimizer.h: Copied from kjs/BatchedTransitionOptimizer.h.
1174         * runtime/CollectorHeapIterator.h: Copied from kjs/CollectorHeapIterator.h.
1175         * runtime/CommonIdentifiers.cpp: Copied from kjs/CommonIdentifiers.cpp.
1176         * runtime/CommonIdentifiers.h: Copied from kjs/CommonIdentifiers.h.
1177         * runtime/ExecState.cpp: Copied from kjs/ExecState.cpp.
1178         * runtime/ExecState.h: Copied from kjs/ExecState.h.
1179         * runtime/GetterSetter.cpp: Copied from kjs/GetterSetter.cpp.
1180         * runtime/GetterSetter.h: Copied from kjs/GetterSetter.h.
1181         * runtime/InitializeThreading.cpp: Copied from kjs/InitializeThreading.cpp.
1182         * runtime/InitializeThreading.h: Copied from kjs/InitializeThreading.h.
1183         * runtime/JSActivation.cpp: Copied from kjs/JSActivation.cpp.
1184         * runtime/JSActivation.h: Copied from kjs/JSActivation.h.
1185         * runtime/JSGlobalData.cpp: Copied from kjs/JSGlobalData.cpp.
1186         * runtime/JSGlobalData.h: Copied from kjs/JSGlobalData.h.
1187         * runtime/JSLock.cpp: Copied from kjs/JSLock.cpp.
1188         * runtime/JSLock.h: Copied from kjs/JSLock.h.
1189         * runtime/JSStaticScopeObject.cpp: Copied from kjs/JSStaticScopeObject.cpp.
1190         * runtime/JSStaticScopeObject.h: Copied from kjs/JSStaticScopeObject.h.
1191         * runtime/JSType.h: Copied from kjs/JSType.h.
1192         * runtime/PropertyNameArray.cpp: Copied from kjs/PropertyNameArray.cpp.
1193         * runtime/PropertyNameArray.h: Copied from kjs/PropertyNameArray.h.
1194         * runtime/ScopeChain.cpp: Copied from kjs/ScopeChain.cpp.
1195         * runtime/ScopeChain.h: Copied from kjs/ScopeChain.h.
1196         * runtime/ScopeChainMark.h: Copied from kjs/ScopeChainMark.h.
1197         * runtime/SymbolTable.h: Copied from kjs/SymbolTable.h.
1198         * runtime/Tracing.d: Copied from kjs/Tracing.d.
1199         * runtime/Tracing.h: Copied from kjs/Tracing.h.
1200
1201 2008-11-03  Sam Weinig  <sam@webkit.org>
1202
1203         Reviewed by Mark Rowe.
1204
1205         Move #define to turn on dumping StructureID statistics to StructureID.cpp so that
1206         turning it on does not require a full rebuild. 
1207
1208         * runtime/StructureID.cpp:
1209         (JSC::StructureID::dumpStatistics):
1210         * runtime/StructureID.h:
1211
1212 2008-11-03  Alp Toker  <alp@nuanti.com>
1213
1214         Reviewed by Geoffrey Garen.
1215
1216         Fix warning when building on Darwin without JSC_MULTIPLE_THREADS
1217         enabled.
1218
1219         * kjs/InitializeThreading.cpp:
1220
1221 2008-11-02  Matt Lilek  <webkit@mattlilek.com>
1222
1223         Reviewed by Cameron Zwarich.
1224
1225         Bug 22042: REGRESSION(r38066): ASSERTION FAILED: source in CodeBlock
1226         <https://bugs.webkit.org/show_bug.cgi?id=22042>
1227
1228         Rename parameter name to avoid ASSERT.
1229
1230         * VM/CodeBlock.h:
1231         (JSC::CodeBlock::CodeBlock):
1232         (JSC::ProgramCodeBlock::ProgramCodeBlock):
1233         (JSC::EvalCodeBlock::EvalCodeBlock):
1234
1235 2008-11-02  Cameron Zwarich  <zwarich@apple.com>
1236
1237         Reviewed by Oliver Hunt.
1238
1239         Bug 22035: Remove the '_' suffix on constructor parameter names for structs
1240         <https://bugs.webkit.org/show_bug.cgi?id=22035>
1241
1242         * API/JSCallbackObject.h:
1243         (JSC::JSCallbackObject::JSCallbackObjectData::JSCallbackObjectData):
1244         * VM/CodeBlock.h:
1245         (JSC::CodeBlock::CodeBlock):
1246         (JSC::ProgramCodeBlock::ProgramCodeBlock):
1247         (JSC::EvalCodeBlock::EvalCodeBlock):
1248         * wrec/WREC.h:
1249         (JSC::Quantifier::Quantifier):
1250
1251 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
1252
1253         Rubber-stamped by Geoff Garen.
1254
1255         Rename SourceRange.h to SourceCode.h.
1256
1257         * API/JSBase.cpp:
1258         * GNUmakefile.am:
1259         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1260         * JavaScriptCore.xcodeproj/project.pbxproj:
1261         * VM/CodeBlock.h:
1262         * kjs/SourceCode.h: Copied from kjs/SourceRange.h.
1263         * kjs/SourceRange.h: Removed.
1264         * kjs/grammar.y:
1265         * kjs/lexer.h:
1266         * kjs/nodes.cpp:
1267         (JSC::ForInNode::ForInNode):
1268         * kjs/nodes.h:
1269         (JSC::ThrowableExpressionData::setExceptionSourceCode):
1270
1271 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
1272
1273         Reviewed by Darin Adler.
1274
1275         Bug 22019: Move JSC::Interpreter::shouldPrintExceptions() to WebCore::Console
1276         <https://bugs.webkit.org/show_bug.cgi?id=22019>
1277
1278         The JSC::Interpreter::shouldPrintExceptions() function is not used at
1279         all in JavaScriptCore, so it should be moved to WebCore::Console, its
1280         only user.
1281
1282         * JavaScriptCore.exp:
1283         * kjs/interpreter.cpp:
1284         * kjs/interpreter.h:
1285
1286 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
1287
1288         Not reviewed.
1289
1290         Windows build fix.
1291
1292         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1293
1294 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
1295
1296         Rubber-stamped by Sam Weinig.
1297
1298         Remove the call to Interpreter::setShouldPrintExceptions() from the
1299         GlobalObject constructor in the shell. The shouldPrintExceptions()
1300         information is not used anywhere in JavaScriptCore, only in WebCore.
1301
1302         * kjs/Shell.cpp:
1303         (GlobalObject::GlobalObject):
1304
1305 2008-10-31  Kevin Ollivier  <kevino@theolliviers.com>
1306
1307         wxMSW build fix.
1308
1309         * wtf/Threading.h:
1310
1311 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
1312
1313         Rubber-stamped by Sam Weinig.
1314
1315         Move more files from the kjs subdirectory of JavaScriptCore to the
1316         runtime subdirectory.
1317
1318         * GNUmakefile.am:
1319         * JavaScriptCore.pri:
1320         * JavaScriptCore.xcodeproj/project.pbxproj:
1321         * JavaScriptCoreSources.bkl:
1322         * kjs/AllInOneFile.cpp:
1323         * kjs/RegExpConstructor.cpp: Removed.
1324         * kjs/RegExpConstructor.h: Removed.
1325         * kjs/RegExpMatchesArray.h: Removed.
1326         * kjs/RegExpObject.cpp: Removed.
1327         * kjs/RegExpObject.h: Removed.
1328         * kjs/RegExpPrototype.cpp: Removed.
1329         * kjs/RegExpPrototype.h: Removed.
1330         * runtime/RegExpConstructor.cpp: Copied from kjs/RegExpConstructor.cpp.
1331         * runtime/RegExpConstructor.h: Copied from kjs/RegExpConstructor.h.
1332         * runtime/RegExpMatchesArray.h: Copied from kjs/RegExpMatchesArray.h.
1333         * runtime/RegExpObject.cpp: Copied from kjs/RegExpObject.cpp.
1334         * runtime/RegExpObject.h: Copied from kjs/RegExpObject.h.
1335         * runtime/RegExpPrototype.cpp: Copied from kjs/RegExpPrototype.cpp.
1336         * runtime/RegExpPrototype.h: Copied from kjs/RegExpPrototype.h.
1337
1338 2008-10-31  Mark Rowe  <mrowe@apple.com>
1339
1340         Revert an incorrect portion of r38034.
1341
1342         * profiler/ProfilerServer.mm:
1343
1344 2008-10-31  Mark Rowe  <mrowe@apple.com>
1345
1346         Fix the 64-bit build.
1347
1348         Disable strict aliasing in ProfilerServer.mm as it leads to the compiler being unhappy
1349         with the common Obj-C idiom self = [super init];
1350
1351         * JavaScriptCore.xcodeproj/project.pbxproj:
1352
1353 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
1354
1355         Reviewed by Alexey Proskuryakov.
1356
1357         Change a header guard to match our coding style.
1358
1359         * kjs/InitializeThreading.h:
1360
1361 2008-10-30  Geoffrey Garen  <ggaren@apple.com>
1362
1363         Reviewed by Oliver Hunt.
1364         
1365         Fixed a small bit of https://bugs.webkit.org/show_bug.cgi?id=21962
1366         AST uses way too much memory
1367         
1368         Removed a word from StatementNode by nixing LabelStack and turning it
1369         into a compile-time data structure managed by CodeGenerator.
1370         
1371         v8 tests and SunSpider, run by Gavin, report no change.
1372
1373         * GNUmakefile.am:
1374         * JavaScriptCore.order:
1375         * JavaScriptCore.pri:
1376         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1377         * JavaScriptCore.xcodeproj/project.pbxproj:
1378         * kjs/AllInOneFile.cpp:
1379         * JavaScriptCoreSources.bkl: I sure hope this builds!
1380         
1381         * VM/CodeGenerator.cpp:
1382         (JSC::CodeGenerator::CodeGenerator):
1383         (JSC::CodeGenerator::newLabelScope):
1384         (JSC::CodeGenerator::breakTarget):
1385         (JSC::CodeGenerator::continueTarget):
1386         * VM/CodeGenerator.h: Nixed the JumpContext system because it depended
1387         on a LabelStack in the AST, and it was a little cumbersome on the client
1388         side. Replaced with LabelScope, which tracks all break / continue
1389         information in the CodeGenerator, just like we track LabelIDs and other
1390         stacks of compile-time data.
1391
1392         * kjs/LabelScope.h: Added.
1393         (JSC::LabelScope::):
1394         (JSC::LabelScope::LabelScope):
1395         (JSC::LabelScope::ref):
1396         (JSC::LabelScope::deref):
1397         (JSC::LabelScope::refCount):
1398         (JSC::LabelScope::breakTarget):
1399         (JSC::LabelScope::continueTarget):
1400         (JSC::LabelScope::type):
1401         (JSC::LabelScope::name):
1402         (JSC::LabelScope::scopeDepth): Simple abstraction for holding everything
1403         you might want to know about a break-able / continue-able scope.
1404
1405         * kjs/LabelStack.cpp: Removed.
1406         * kjs/LabelStack.h: Removed.
1407
1408         * kjs/grammar.y: No need to push labels at parse time -- we don't store
1409         LabelStacks in the AST anymore.
1410
1411         * kjs/nodes.cpp:
1412         (JSC::DoWhileNode::emitCode):
1413         (JSC::WhileNode::emitCode):
1414         (JSC::ForNode::emitCode):
1415         (JSC::ForInNode::emitCode):
1416         (JSC::ContinueNode::emitCode):
1417         (JSC::BreakNode::emitCode):
1418         (JSC::SwitchNode::emitCode):
1419         (JSC::LabelNode::emitCode):
1420         * kjs/nodes.h:
1421         (JSC::StatementNode::):
1422         (JSC::LabelNode::): Use LabelScope where we used to use JumpContext.
1423         Simplified a bunch of code. Touched up label-related error messages a
1424         bit.
1425
1426         * kjs/nodes2string.cpp:
1427         (JSC::LabelNode::streamTo): Updated for rename.
1428
1429 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
1430
1431         Reviewed by Darin Adler.
1432
1433         Bug 22005: Move StructureIDChain into its own file
1434         <https://bugs.webkit.org/show_bug.cgi?id=22005>
1435
1436         * GNUmakefile.am:
1437         * JavaScriptCore.pri:
1438         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1439         * JavaScriptCore.xcodeproj/project.pbxproj:
1440         * JavaScriptCoreSources.bkl:
1441         * runtime/StructureID.cpp:
1442         * runtime/StructureID.h:
1443         * runtime/StructureIDChain.cpp: Copied from runtime/StructureID.cpp.
1444         * runtime/StructureIDChain.h: Copied from runtime/StructureID.h.
1445
1446 2008-10-31  Steve Falkenburg  <sfalken@apple.com>
1447
1448         Build fix.
1449
1450         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1451
1452 2008-10-31  Steve Falkenburg  <sfalken@apple.com>
1453
1454         Build fix.
1455
1456         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1457
1458 2008-10-31  Darin Adler  <darin@apple.com>
1459
1460         Reviewed by Dan Bernstein.
1461
1462         - fix storage leak seen on buildbot
1463
1464         Some other cleanup too. The storage leak was caused by the fact
1465         that HashTraits<CallIdentifier>::needsDestruction was false, so
1466         the call identifier objects didn't get deleted.
1467
1468         * profiler/CallIdentifier.h:
1469         
1470         Added a default constructor to create empty call identifiers.
1471
1472         Changed the normal constructor to use const UString&
1473         to avoid extra copying and reference count thrash.
1474         
1475         Removed the explicit copy constructor definition, since it's what
1476         the compiler will automatically generate. (Rule of thumb: Either
1477         you need both a custom copy constructor and a custom assignment
1478         operator, or neither.)
1479
1480         Moved the CallIdentifier hash function out of the WTF namespace;
1481         there's no reason to put it there.
1482
1483         Changed the CallIdentifier hash function to be a struct rather than
1484         a specialization of the IntHash struct template. Having it be
1485         a specialization made no sense, since CallIdentifier is not an integer,
1486         and did no good.
1487
1488         Removed explicit definition of emptyValueIsZero in the hash traits,
1489         since inheriting from GenericHashTraits already makes that false.
1490
1491         Removed explicit definition of emptyValue, instead relying on the
1492         default constructor and GenericHashTraits.
1493
1494         Removed explicit definition of needsDestruction, because we want it
1495         to have its default value: true, not false. This fixes the leak!
1496
1497         Changed constructDeletedValue and isDeletedValue to use a line number
1498         of numeric_limits<unsigned>::max() to indicate a value is deleted.
1499         Previously this used empty strings for the empty value and null strings
1500         for the deleted value, but it's more efficient to use null for both.
1501
1502 2008-10-31  Timothy Hatcher  <timothy@apple.com>
1503
1504         Emit the WillExecuteStatement debugger hook before the for loop body
1505         when the statement node for the body isn't a block. This allows
1506         breakpoints on those statements in the Web Inspector.
1507
1508         https://bugs.webkit.org/show_bug.cgi?id=22004
1509
1510         Reviewed by Darin Adler.
1511
1512         * kjs/nodes.cpp:
1513         (JSC::ForNode::emitCode): Emit the WillExecuteStatement
1514         debugger hook before the statement node if isn't a block.
1515         Also emit the WillExecuteStatement debugger hook for the
1516         loop as the first op-code.
1517         (JSC::ForInNode::emitCode): Ditto.
1518
1519 2008-10-31  Timothy Hatcher  <timothy@apple.com>
1520
1521         Fixes console warnings about not having an autorelease pool.
1522         Also fixes the build for Snow Leopard, by including individual
1523         Foundation headers instead of Foundation.h.
1524
1525         https://bugs.webkit.org/show_bug.cgi?id=21995
1526
1527         Reviewed by Oliver Hunt.
1528
1529         * profiler/ProfilerServer.mm:
1530         (-[ProfilerServer init]): Create a NSAutoreleasePool and drain it.
1531
1532 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
1533
1534         Not reviewed.
1535
1536         Speculative wxWindows build fix.
1537
1538         * JavaScriptCoreSources.bkl:
1539         * jscore.bkl:
1540
1541 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
1542
1543         Rubber-stamped by Maciej Stachowiak.
1544
1545         Move VM/JSPropertyNameIterator.cpp and VM/JSPropertyNameIterator.h to
1546         the runtime directory.
1547
1548         * GNUmakefile.am:
1549         * JavaScriptCore.pri:
1550         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1551         * JavaScriptCore.xcodeproj/project.pbxproj:
1552         * JavaScriptCoreSources.bkl:
1553         * VM/JSPropertyNameIterator.cpp: Removed.
1554         * VM/JSPropertyNameIterator.h: Removed.
1555         * runtime/JSPropertyNameIterator.cpp: Copied from VM/JSPropertyNameIterator.cpp.
1556         * runtime/JSPropertyNameIterator.h: Copied from VM/JSPropertyNameIterator.h.
1557
1558 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
1559
1560         Not reviewed.
1561
1562         Speculative wxWindows build fix.
1563
1564         * jscore.bkl:
1565
1566 2008-10-30  Mark Rowe  <mrowe@apple.com>
1567
1568         Reviewed by Jon Homeycutt.
1569
1570         Explicitly default to building for only the native architecture in debug and release builds.
1571
1572         * Configurations/DebugRelease.xcconfig:
1573
1574 2008-10-30  Cameron Zwarich  <zwarich@apple.com>
1575
1576         Rubber-stamped by Sam Weinig.
1577
1578         Create a debugger directory in JavaScriptCore and move the relevant
1579         files to it.
1580
1581         * GNUmakefile.am:
1582         * JavaScriptCore.pri:
1583         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1584         * JavaScriptCore.xcodeproj/project.pbxproj:
1585         * VM/CodeBlock.cpp:
1586         * VM/CodeGenerator.h:
1587         * VM/Machine.cpp:
1588         * debugger: Added.
1589         * debugger/Debugger.cpp: Copied from kjs/debugger.cpp.
1590         * debugger/Debugger.h: Copied from kjs/debugger.h.
1591         * debugger/DebuggerCallFrame.cpp: Copied from kjs/DebuggerCallFrame.cpp.
1592         * debugger/DebuggerCallFrame.h: Copied from kjs/DebuggerCallFrame.h.
1593         * kjs/AllInOneFile.cpp:
1594         * kjs/DebuggerCallFrame.cpp: Removed.
1595         * kjs/DebuggerCallFrame.h: Removed.
1596         * kjs/Parser.cpp:
1597         * kjs/Parser.h:
1598         * kjs/debugger.cpp: Removed.
1599         * kjs/debugger.h: Removed.
1600         * kjs/interpreter.cpp:
1601         * kjs/nodes.cpp:
1602         * runtime/FunctionConstructor.cpp:
1603         * runtime/JSGlobalObject.cpp:
1604
1605 2008-10-30  Benjamin K. Stuhl  <bks24@cornell.edu>
1606
1607         gcc 4.3.3/linux-x86 generates "suggest parentheses around && within ||"
1608         warnings; add some parentheses to disambiguate things. No functional
1609         changes, so no tests.
1610
1611         https://bugs.webkit.org/show_bug.cgi?id=21973
1612         Add parentheses to clean up some gcc warnings
1613
1614         Reviewed by Dan Bernstein.
1615
1616         * wtf/ASCIICType.h:
1617         (WTF::isASCIIAlphanumeric):
1618         (WTF::isASCIIHexDigit):
1619
1620 2008-10-30  Kevin Lindeman  <klindeman@apple.com>
1621
1622         Adds ProfilerServer, which is a distributed notification listener
1623         that allows starting and stopping the profiler remotely for use
1624         in conjunction with the profiler's DTace probes.
1625
1626         https://bugs.webkit.org/show_bug.cgi?id=21719
1627
1628         Reviewed by Timothy Hatcher.
1629
1630         * JavaScriptCore.xcodeproj/project.pbxproj:
1631         * kjs/JSGlobalData.cpp:
1632         (JSC::JSGlobalData::JSGlobalData): Calls startProfilerServerIfNeeded.
1633         * profiler/ProfilerServer.h: Added.
1634         * profiler/ProfilerServer.mm: Added.
1635         (+[ProfilerServer sharedProfileServer]):
1636         (-[ProfilerServer init]):
1637         (-[ProfilerServer startProfiling]):
1638         (-[ProfilerServer stopProfiling]):
1639         (JSC::startProfilerServerIfNeeded):
1640
1641 2008-10-30  Kevin Ollivier  <kevino@theolliviers.com>
1642
1643         wx build fix after PropertyMap and StructureID merge.
1644
1645         * JavaScriptCoreSources.bkl:
1646
1647 2008-10-30  Cameron Zwarich  <zwarich@apple.com>
1648
1649         Reviewed by Mark Rowe.
1650
1651         Change the JavaScriptCore Xcode project to use relative paths for the
1652         PCRE source files.
1653
1654         * JavaScriptCore.xcodeproj/project.pbxproj:
1655
1656 2008-10-30  Sam Weinig  <sam@webkit.org>
1657
1658         Reviewed by Cameron Zwarich and Geoffrey Garen.
1659
1660         Fix for https://bugs.webkit.org/show_bug.cgi?id=21989
1661         Merge PropertyMap and StructureID
1662
1663         - Move PropertyMap code into StructureID in preparation for lazily
1664           creating the map on gets.
1665         - Make remove with transition explicit by adding removePropertyTransition.
1666         - Make the put/remove without transition explicit.
1667         - Make cache invalidation part of put/remove without transition.
1668
1669         1% speedup on SunSpider; 0.5% speedup on v8 suite.
1670
1671         * GNUmakefile.am:
1672         * JavaScriptCore.exp:
1673         * JavaScriptCore.pri:
1674         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1675         * JavaScriptCore.xcodeproj/project.pbxproj:
1676         * JavaScriptCoreSources.bkl:
1677         * kjs/AllInOneFile.cpp:
1678         * kjs/identifier.h:
1679         * runtime/JSObject.cpp:
1680         (JSC::JSObject::removeDirect):
1681         * runtime/JSObject.h:
1682         (JSC::JSObject::putDirect):
1683         * runtime/PropertyMap.cpp: Removed.
1684         * runtime/PropertyMap.h: Removed.
1685         * runtime/PropertyMapHashTable.h: Copied from runtime/PropertyMap.h.
1686         * runtime/StructureID.cpp:
1687         (JSC::StructureID::dumpStatistics):
1688         (JSC::StructureID::StructureID):
1689         (JSC::StructureID::~StructureID):
1690         (JSC::StructureID::getEnumerablePropertyNames):
1691         (JSC::StructureID::addPropertyTransition):
1692         (JSC::StructureID::removePropertyTransition):
1693         (JSC::StructureID::toDictionaryTransition):
1694         (JSC::StructureID::changePrototypeTransition):
1695         (JSC::StructureID::getterSetterTransition):
1696         (JSC::StructureID::addPropertyWithoutTransition):
1697         (JSC::StructureID::removePropertyWithoutTransition):
1698         (JSC::PropertyMapStatisticsExitLogger::~PropertyMapStatisticsExitLogger):
1699         (JSC::StructureID::checkConsistency):
1700         (JSC::StructureID::copyPropertyTable):
1701         (JSC::StructureID::get):
1702         (JSC::StructureID::put):
1703         (JSC::StructureID::remove):
1704         (JSC::StructureID::insertIntoPropertyMapHashTable):
1705         (JSC::StructureID::expandPropertyMapHashTable):
1706         (JSC::StructureID::createPropertyMapHashTable):
1707         (JSC::StructureID::rehashPropertyMapHashTable):
1708         (JSC::comparePropertyMapEntryIndices):
1709         (JSC::StructureID::getEnumerablePropertyNamesInternal):
1710         * runtime/StructureID.h:
1711         (JSC::StructureID::propertyStorageSize):
1712         (JSC::StructureID::isEmpty):
1713         (JSC::StructureID::get):
1714
1715 2008-10-30  Cameron Zwarich  <zwarich@apple.com>
1716
1717         Reviewed by Oliver Hunt.
1718
1719         Bug 21987: CTI::putDoubleResultToJSNumberCellOrJSImmediate() hardcodes its result register
1720         <https://bugs.webkit.org/show_bug.cgi?id=21987>
1721
1722         CTI::putDoubleResultToJSNumberCellOrJSImmediate() hardcodes its result
1723         register as ecx, but it should be tempReg1, which is ecx at all of its
1724         callsites.
1725
1726         * VM/CTI.cpp:
1727         (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate):
1728
1729 2008-10-30  Cameron Zwarich  <zwarich@apple.com>
1730
1731         Reviewed by Sam Weinig.
1732
1733         Bug 21985: Opcodes should use eax as their destination register whenever possible
1734         <https://bugs.webkit.org/show_bug.cgi?id=21985>
1735
1736         Change more opcodes to use eax as the register for their final result,
1737         and change calls to emitPutResult() that pass eax to rely on the default
1738         value of eax.
1739
1740         * VM/CTI.cpp:
1741         (JSC::CTI::privateCompileMainPass):
1742
1743 2008-10-30  Alp Toker  <alp@nuanti.com>
1744
1745         Build fix attempt for older gcc on the trunk-mac-intel build bot
1746         (error: initializer for scalar variable requires one element).
1747
1748         Modify the initializer syntax slightly with an additional comma.
1749
1750         * VM/Machine.cpp:
1751         (JSC::Machine::cti_op_call_JSFunction):
1752         (JSC::Machine::cti_op_construct_JSConstruct):
1753         (JSC::Machine::cti_op_resolve_func):
1754         (JSC::Machine::cti_op_post_inc):
1755         (JSC::Machine::cti_op_resolve_with_base):
1756         (JSC::Machine::cti_op_post_dec):
1757
1758 2008-10-30  Alp Toker  <alp@nuanti.com>
1759
1760         Reviewed by Alexey Proskuryakov.
1761
1762         https://bugs.webkit.org/show_bug.cgi?id=21571
1763         VoidPtrPair breaks CTI on Linux
1764
1765         The VoidPtrPair return change made in r37457 does not work on Linux
1766         since POD structs aren't passed in registers.
1767
1768         This patch uses a union to vectorize VoidPtrPair to a uint64_t and
1769         matches Darwin/MSVC fixing CTI/WREC on Linux.
1770
1771         Alexey reports no measurable change in Mac performance with this fix.
1772
1773         * VM/Machine.cpp:
1774         (JSC::Machine::cti_op_call_JSFunction):
1775         (JSC::Machine::cti_op_construct_JSConstruct):
1776         (JSC::Machine::cti_op_resolve_func):
1777         (JSC::Machine::cti_op_post_inc):
1778         (JSC::Machine::cti_op_resolve_with_base):
1779         (JSC::Machine::cti_op_post_dec):
1780         * VM/Machine.h:
1781         (JSC::):
1782
1783 2008-10-29  Oliver Hunt  <oliver@apple.com>
1784
1785         Reviewed by Geoff Garen.
1786
1787         Initial work to reduce cost of JSNumberCell allocation
1788
1789         This does the initial work needed to bring more of number
1790         allocation into CTI code directly, rather than just falling
1791         back onto the slow paths if we can't guarantee that a number
1792         cell can be reused.
1793
1794         Initial implementation only used by op_negate to make sure
1795         it all works.  In a negate heavy (though not dominated) test
1796         it results in a 10% win in the non-reusable cell case.
1797
1798         * VM/CTI.cpp:
1799         (JSC::):
1800         (JSC::CTI::emitAllocateNumber):
1801         (JSC::CTI::emitNakedFastCall):
1802         (JSC::CTI::emitArithIntToImmWithJump):
1803         (JSC::CTI::privateCompileMainPass):
1804         (JSC::CTI::privateCompileSlowCases):
1805         * VM/CTI.h:
1806         * VM/CodeBlock.cpp:
1807         (JSC::CodeBlock::dump):
1808         * VM/CodeGenerator.cpp:
1809         (JSC::CodeGenerator::emitUnaryOp):
1810         * VM/CodeGenerator.h:
1811         (JSC::CodeGenerator::emitToJSNumber):
1812         (JSC::CodeGenerator::emitTypeOf):
1813         (JSC::CodeGenerator::emitGetPropertyNames):
1814         * VM/Machine.cpp:
1815         (JSC::Machine::privateExecute):
1816         * VM/Machine.h:
1817         * kjs/ResultType.h:
1818         (JSC::ResultType::isReusableNumber):
1819         (JSC::ResultType::toInt):
1820         * kjs/nodes.cpp:
1821         (JSC::UnaryOpNode::emitCode):
1822         (JSC::BinaryOpNode::emitCode):
1823         (JSC::EqualNode::emitCode):
1824         * masm/X86Assembler.h:
1825         (JSC::X86Assembler::):
1826         (JSC::X86Assembler::negl_r):
1827         (JSC::X86Assembler::xorpd_mr):
1828         * runtime/JSNumberCell.h:
1829         (JSC::JSNumberCell::JSNumberCell):
1830
1831 2008-10-29  Steve Falkenburg  <sfalken@apple.com>
1832
1833         <rdar://problem/6326563> Crash on launch
1834
1835         For Windows, export explicit functions rather than exporting data for atomicallyInitializedStaticMutex.
1836         
1837         Exporting data from a DLL on Windows requires specifying __declspec(dllimport) in the header used by
1838         callers, but __declspec(dllexport) when defined in the DLL implementation. By instead exporting
1839         the explicit lock/unlock functions, we can avoid this.
1840         
1841         Fixes a crash on launch, since we were previously erroneously exporting atomicallyInitializedStaticMutex as a function.
1842         
1843         Reviewed by Darin Adler.
1844
1845         * wtf/Threading.h:
1846         (WTF::lockAtomicallyInitializedStaticMutex):
1847         (WTF::unlockAtomicallyInitializedStaticMutex):
1848         * wtf/ThreadingWin.cpp:
1849         (WTF::lockAtomicallyInitializedStaticMutex):
1850         (WTF::unlockAtomicallyInitializedStaticMutex):
1851
1852 2008-10-29  Sam Weinig  <sam@webkit.org>
1853
1854         Reviewed by Oliver Hunt.
1855
1856         Remove direct use of PropertyMap.
1857
1858         * JavaScriptCore.exp:
1859         * runtime/JSObject.cpp:
1860         (JSC::JSObject::mark):
1861         (JSC::JSObject::put):
1862         (JSC::JSObject::deleteProperty):
1863         (JSC::JSObject::getPropertyAttributes):
1864         (JSC::JSObject::removeDirect):
1865         * runtime/JSObject.h:
1866         (JSC::JSObject::getDirect):
1867         (JSC::JSObject::getDirectLocation):
1868         (JSC::JSObject::hasCustomProperties):
1869         (JSC::JSObject::JSObject):
1870         (JSC::JSObject::putDirect):
1871         * runtime/PropertyMap.cpp:
1872         (JSC::PropertyMap::get):
1873         * runtime/PropertyMap.h:
1874         (JSC::PropertyMap::isEmpty):
1875         (JSC::PropertyMap::get):
1876         * runtime/StructureID.cpp:
1877         (JSC::StructureID::dumpStatistics):
1878         * runtime/StructureID.h:
1879         (JSC::StructureID::propertyStorageSize):
1880         (JSC::StructureID::get):
1881         (JSC::StructureID::put):
1882         (JSC::StructureID::remove):
1883         (JSC::StructureID::isEmpty):
1884
1885 2008-10-29  Sam Weinig  <sam@webkit.org>
1886
1887         Reviewed by Geoffrey Garen.
1888
1889         Rename and move the StructureID transition table to its own file.
1890
1891         * GNUmakefile.am:
1892         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1893         * JavaScriptCore.xcodeproj/project.pbxproj:
1894         * runtime/StructureID.cpp:
1895         (JSC::StructureID::addPropertyTransition):
1896         * runtime/StructureID.h:
1897         (JSC::StructureID::):
1898         * runtime/StructureIDTransitionTable.h: Copied from runtime/StructureID.h.
1899         (JSC::StructureIDTransitionTableHash::hash):
1900         (JSC::StructureIDTransitionTableHash::equal):
1901
1902 2008-10-29  Sam Weinig  <sam@webkit.org>
1903
1904         Reviewed by Cameron Zwarich.
1905
1906         Fix for https://bugs.webkit.org/show_bug.cgi?id=21958
1907         Pack bits in StructureID to reduce the size of each StructureID by 2 words.
1908
1909         * runtime/PropertyMap.h:
1910         (JSC::PropertyMap::propertyMapSize):
1911         * runtime/StructureID.cpp:
1912         (JSC::StructureID::dumpStatistics): Add additional size statistics when dumping.
1913         (JSC::StructureID::StructureID):
1914         * runtime/StructureID.h:
1915
1916 2008-10-29  Kevin Ollivier  <kevino@theolliviers.com>
1917
1918         wx build fixes after addition of runtime and ImageBuffer changes.
1919
1920         * JavaScriptCoreSources.bkl:
1921         * jscore.bkl:
1922
1923 2008-10-29  Timothy Hatcher  <timothy@apple.com>
1924
1925         Emit the WillExecuteStatement debugger hook before the "else" body
1926         when there is no block for the "else" body. This allows breakpoints
1927         on those statements in the Web Inspector.
1928
1929         https://bugs.webkit.org/show_bug.cgi?id=21944
1930
1931         Reviewed by Maciej Stachowiak.
1932
1933         * kjs/nodes.cpp:
1934         (JSC::IfElseNode::emitCode): Emit the WillExecuteStatement
1935         debugger hook before the else node if isn't a block.
1936
1937 2008-10-29  Alexey Proskuryakov  <ap@webkit.org>
1938
1939         Build fix.
1940
1941         * JavaScriptCore.exp: Export HashTable::deleteTable().
1942
1943 2008-10-28  Alp Toker  <alp@nuanti.com>
1944
1945         Fix builddir != srcdir builds after kjs -> runtime breakage. Sources
1946         may now be generated in both kjs/ and runtime/.
1947
1948         Also sort the sources list for readability.
1949
1950         * GNUmakefile.am:
1951
1952 2008-10-28  Alp Toker  <alp@nuanti.com>
1953
1954         Reviewed by Cameron Zwarich.
1955
1956         Build fix attempt after kjs -> runtime rename.
1957
1958         * GNUmakefile.am:
1959
1960 2008-10-28  Cameron Zwarich  <zwarich@apple.com>
1961
1962         Not reviewed.
1963
1964         Remove a duplicate includes directory.
1965
1966         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1967
1968 2008-10-28  Cameron Zwarich  <zwarich@apple.com>
1969
1970         Not reviewed.
1971
1972         Attempt to fix the Windows build.
1973
1974         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1975         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1976
1977 2008-10-28  Dan Bernstein  <mitz@apple.com>
1978
1979         Reviewed by Mark Rowe.
1980
1981         - export WTF::atomicallyInitializedStaticMutex
1982
1983         * JavaScriptCore.exp:
1984
1985 2008-10-28  Geoffrey Garen  <ggaren@apple.com>
1986
1987         Reviewed by Cameron Zwarich.
1988         
1989         Fixed CodeBlock dumping to accurately report constant register indices.
1990
1991         * VM/CodeBlock.cpp:
1992         (JSC::CodeBlock::dump):
1993
1994 2008-10-28  Cameron Zwarich  <zwarich@apple.com>
1995
1996         Not reviewed.
1997
1998         More Qt build fixes.
1999
2000         * JavaScriptCore.pri:
2001
2002 2008-10-28  Cameron Zwarich  <zwarich@apple.com>
2003
2004         Not reviewed.
2005
2006         Fix the Qt build, hopefully for real this time.
2007
2008         * JavaScriptCore.pri:
2009
2010 2008-10-28  Cameron Zwarich  <zwarich@apple.com>
2011
2012         Not reviewed.
2013
2014         Fix the Qt build.
2015
2016         * JavaScriptCore.pri:
2017
2018 2008-10-28  Cameron Zwarich  <zwarich@apple.com>
2019
2020         Not reviewed.
2021
2022         Fix the Windows build.
2023
2024         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2025
2026 2008-10-28  Cameron Zwarich  <zwarich@apple.com>
2027
2028         Rubber-stamped by Sam Weinig.
2029
2030         Create a runtime directory in JavaScriptCore and begin moving files to
2031         it. This is the first step towards removing the kjs directory and
2032         placing files in more meaningful subdirectories of JavaScriptCore.
2033
2034         * API/JSBase.cpp:
2035         * API/JSCallbackConstructor.cpp:
2036         * API/JSCallbackConstructor.h:
2037         * API/JSCallbackFunction.cpp:
2038         * API/JSClassRef.cpp:
2039         * API/JSClassRef.h:
2040         * API/JSStringRefCF.cpp:
2041         * API/JSValueRef.cpp:
2042         * API/OpaqueJSString.cpp:
2043         * DerivedSources.make:
2044         * GNUmakefile.am:
2045         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2046         * JavaScriptCore.xcodeproj/project.pbxproj:
2047         * kjs/AllInOneFile.cpp:
2048         * kjs/ArrayConstructor.cpp: Removed.
2049         * kjs/ArrayConstructor.h: Removed.
2050         * kjs/ArrayPrototype.cpp: Removed.
2051         * kjs/ArrayPrototype.h: Removed.
2052         * kjs/BooleanConstructor.cpp: Removed.
2053         * kjs/BooleanConstructor.h: Removed.
2054         * kjs/BooleanObject.cpp: Removed.
2055         * kjs/BooleanObject.h: Removed.
2056         * kjs/BooleanPrototype.cpp: Removed.
2057         * kjs/BooleanPrototype.h: Removed.
2058         * kjs/CallData.cpp: Removed.
2059         * kjs/CallData.h: Removed.
2060         * kjs/ClassInfo.h: Removed.
2061         * kjs/ConstructData.cpp: Removed.
2062         * kjs/ConstructData.h: Removed.
2063         * kjs/DateConstructor.cpp: Removed.
2064         * kjs/DateConstructor.h: Removed.
2065         * kjs/DateInstance.cpp: Removed.
2066         * kjs/DateInstance.h: Removed.
2067         * kjs/DateMath.cpp: Removed.
2068         * kjs/DateMath.h: Removed.
2069         * kjs/DatePrototype.cpp: Removed.
2070         * kjs/DatePrototype.h: Removed.
2071         * kjs/Error.cpp: Removed.
2072         * kjs/Error.h: Removed.
2073         * kjs/ErrorConstructor.cpp: Removed.
2074         * kjs/ErrorConstructor.h: Removed.
2075         * kjs/ErrorInstance.cpp: Removed.
2076         * kjs/ErrorInstance.h: Removed.
2077         * kjs/ErrorPrototype.cpp: Removed.
2078         * kjs/ErrorPrototype.h: Removed.
2079         * kjs/FunctionConstructor.cpp: Removed.
2080         * kjs/FunctionConstructor.h: Removed.
2081         * kjs/FunctionPrototype.cpp: Removed.
2082         * kjs/FunctionPrototype.h: Removed.
2083         * kjs/GlobalEvalFunction.cpp: Removed.
2084         * kjs/GlobalEvalFunction.h: Removed.
2085         * kjs/InternalFunction.cpp: Removed.
2086         * kjs/InternalFunction.h: Removed.
2087         * kjs/JSArray.cpp: Removed.
2088         * kjs/JSArray.h: Removed.
2089         * kjs/JSCell.cpp: Removed.
2090         * kjs/JSCell.h: Removed.
2091         * kjs/JSFunction.cpp: Removed.
2092         * kjs/JSFunction.h: Removed.
2093         * kjs/JSGlobalObject.cpp: Removed.
2094         * kjs/JSGlobalObject.h: Removed.
2095         * kjs/JSGlobalObjectFunctions.cpp: Removed.
2096         * kjs/JSGlobalObjectFunctions.h: Removed.
2097         * kjs/JSImmediate.cpp: Removed.
2098         * kjs/JSImmediate.h: Removed.
2099         * kjs/JSNotAnObject.cpp: Removed.
2100         * kjs/JSNotAnObject.h: Removed.
2101         * kjs/JSNumberCell.cpp: Removed.
2102         * kjs/JSNumberCell.h: Removed.
2103         * kjs/JSObject.cpp: Removed.
2104         * kjs/JSObject.h: Removed.
2105         * kjs/JSString.cpp: Removed.
2106         * kjs/JSString.h: Removed.
2107         * kjs/JSValue.cpp: Removed.
2108         * kjs/JSValue.h: Removed.
2109         * kjs/JSVariableObject.cpp: Removed.
2110         * kjs/JSVariableObject.h: Removed.
2111         * kjs/JSWrapperObject.cpp: Removed.
2112         * kjs/JSWrapperObject.h: Removed.
2113         * kjs/MathObject.cpp: Removed.
2114         * kjs/MathObject.h: Removed.
2115         * kjs/NativeErrorConstructor.cpp: Removed.
2116         * kjs/NativeErrorConstructor.h: Removed.
2117         * kjs/NativeErrorPrototype.cpp: Removed.
2118         * kjs/NativeErrorPrototype.h: Removed.
2119         * kjs/NumberConstructor.cpp: Removed.
2120         * kjs/NumberConstructor.h: Removed.
2121         * kjs/NumberObject.cpp: Removed.
2122         * kjs/NumberObject.h: Removed.
2123         * kjs/NumberPrototype.cpp: Removed.
2124         * kjs/NumberPrototype.h: Removed.
2125         * kjs/ObjectConstructor.cpp: Removed.
2126         * kjs/ObjectConstructor.h: Removed.
2127         * kjs/ObjectPrototype.cpp: Removed.
2128         * kjs/ObjectPrototype.h: Removed.
2129         * kjs/PropertyMap.cpp: Removed.
2130         * kjs/PropertyMap.h: Removed.
2131         * kjs/PropertySlot.cpp: Removed.
2132         * kjs/PropertySlot.h: Removed.
2133         * kjs/PrototypeFunction.cpp: Removed.
2134         * kjs/PrototypeFunction.h: Removed.
2135         * kjs/PutPropertySlot.h: Removed.
2136         * kjs/SmallStrings.cpp: Removed.
2137         * kjs/SmallStrings.h: Removed.
2138         * kjs/StringConstructor.cpp: Removed.
2139         * kjs/StringConstructor.h: Removed.
2140         * kjs/StringObject.cpp: Removed.
2141         * kjs/StringObject.h: Removed.
2142         * kjs/StringObjectThatMasqueradesAsUndefined.h: Removed.
2143         * kjs/StringPrototype.cpp: Removed.
2144         * kjs/StringPrototype.h: Removed.
2145         * kjs/StructureID.cpp: Removed.
2146         * kjs/StructureID.h: Removed.
2147         * kjs/completion.h:
2148         * kjs/interpreter.h:
2149         * runtime: Added.
2150         * runtime/ArrayConstructor.cpp: Copied from kjs/ArrayConstructor.cpp.
2151         * runtime/ArrayConstructor.h: Copied from kjs/ArrayConstructor.h.
2152         * runtime/ArrayPrototype.cpp: Copied from kjs/ArrayPrototype.cpp.
2153         * runtime/ArrayPrototype.h: Copied from kjs/ArrayPrototype.h.
2154         * runtime/BooleanConstructor.cpp: Copied from kjs/BooleanConstructor.cpp.
2155         * runtime/BooleanConstructor.h: Copied from kjs/BooleanConstructor.h.
2156         * runtime/BooleanObject.cpp: Copied from kjs/BooleanObject.cpp.
2157         * runtime/BooleanObject.h: Copied from kjs/BooleanObject.h.
2158         * runtime/BooleanPrototype.cpp: Copied from kjs/BooleanPrototype.cpp.
2159         * runtime/BooleanPrototype.h: Copied from kjs/BooleanPrototype.h.
2160         * runtime/CallData.cpp: Copied from kjs/CallData.cpp.
2161         * runtime/CallData.h: Copied from kjs/CallData.h.
2162         * runtime/ClassInfo.h: Copied from kjs/ClassInfo.h.
2163         * runtime/ConstructData.cpp: Copied from kjs/ConstructData.cpp.
2164         * runtime/ConstructData.h: Copied from kjs/ConstructData.h.
2165         * runtime/DateConstructor.cpp: Copied from kjs/DateConstructor.cpp.
2166         * runtime/DateConstructor.h: Copied from kjs/DateConstructor.h.
2167         * runtime/DateInstance.cpp: Copied from kjs/DateInstance.cpp.
2168         * runtime/DateInstance.h: Copied from kjs/DateInstance.h.
2169         * runtime/DateMath.cpp: Copied from kjs/DateMath.cpp.
2170         * runtime/DateMath.h: Copied from kjs/DateMath.h.
2171         * runtime/DatePrototype.cpp: Copied from kjs/DatePrototype.cpp.
2172         * runtime/DatePrototype.h: Copied from kjs/DatePrototype.h.
2173         * runtime/Error.cpp: Copied from kjs/Error.cpp.
2174         * runtime/Error.h: Copied from kjs/Error.h.
2175         * runtime/ErrorConstructor.cpp: Copied from kjs/ErrorConstructor.cpp.
2176         * runtime/ErrorConstructor.h: Copied from kjs/ErrorConstructor.h.
2177         * runtime/ErrorInstance.cpp: Copied from kjs/ErrorInstance.cpp.
2178         * runtime/ErrorInstance.h: Copied from kjs/ErrorInstance.h.
2179         * runtime/ErrorPrototype.cpp: Copied from kjs/ErrorPrototype.cpp.
2180         * runtime/ErrorPrototype.h: Copied from kjs/ErrorPrototype.h.
2181         * runtime/FunctionConstructor.cpp: Copied from kjs/FunctionConstructor.cpp.
2182         * runtime/FunctionConstructor.h: Copied from kjs/FunctionConstructor.h.
2183         * runtime/FunctionPrototype.cpp: Copied from kjs/FunctionPrototype.cpp.
2184         * runtime/FunctionPrototype.h: Copied from kjs/FunctionPrototype.h.
2185         * runtime/GlobalEvalFunction.cpp: Copied from kjs/GlobalEvalFunction.cpp.
2186         * runtime/GlobalEvalFunction.h: Copied from kjs/GlobalEvalFunction.h.
2187         * runtime/InternalFunction.cpp: Copied from kjs/InternalFunction.cpp.
2188         * runtime/InternalFunction.h: Copied from kjs/InternalFunction.h.
2189         * runtime/JSArray.cpp: Copied from kjs/JSArray.cpp.
2190         * runtime/JSArray.h: Copied from kjs/JSArray.h.
2191         * runtime/JSCell.cpp: Copied from kjs/JSCell.cpp.
2192         * runtime/JSCell.h: Copied from kjs/JSCell.h.
2193         * runtime/JSFunction.cpp: Copied from kjs/JSFunction.cpp.
2194         * runtime/JSFunction.h: Copied from kjs/JSFunction.h.
2195         * runtime/JSGlobalObject.cpp: Copied from kjs/JSGlobalObject.cpp.
2196         * runtime/JSGlobalObject.h: Copied from kjs/JSGlobalObject.h.
2197         * runtime/JSGlobalObjectFunctions.cpp: Copied from kjs/JSGlobalObjectFunctions.cpp.
2198         * runtime/JSGlobalObjectFunctions.h: Copied from kjs/JSGlobalObjectFunctions.h.
2199         * runtime/JSImmediate.cpp: Copied from kjs/JSImmediate.cpp.
2200         * runtime/JSImmediate.h: Copied from kjs/JSImmediate.h.
2201         * runtime/JSNotAnObject.cpp: Copied from kjs/JSNotAnObject.cpp.
2202         * runtime/JSNotAnObject.h: Copied from kjs/JSNotAnObject.h.
2203         * runtime/JSNumberCell.cpp: Copied from kjs/JSNumberCell.cpp.
2204         * runtime/JSNumberCell.h: Copied from kjs/JSNumberCell.h.
2205         * runtime/JSObject.cpp: Copied from kjs/JSObject.cpp.
2206         * runtime/JSObject.h: Copied from kjs/JSObject.h.
2207         * runtime/JSString.cpp: Copied from kjs/JSString.cpp.
2208         * runtime/JSString.h: Copied from kjs/JSString.h.
2209         * runtime/JSValue.cpp: Copied from kjs/JSValue.cpp.
2210         * runtime/JSValue.h: Copied from kjs/JSValue.h.
2211         * runtime/JSVariableObject.cpp: Copied from kjs/JSVariableObject.cpp.
2212         * runtime/JSVariableObject.h: Copied from kjs/JSVariableObject.h.
2213         * runtime/JSWrapperObject.cpp: Copied from kjs/JSWrapperObject.cpp.
2214         * runtime/JSWrapperObject.h: Copied from kjs/JSWrapperObject.h.
2215         * runtime/MathObject.cpp: Copied from kjs/MathObject.cpp.
2216         * runtime/MathObject.h: Copied from kjs/MathObject.h.
2217         * runtime/NativeErrorConstructor.cpp: Copied from kjs/NativeErrorConstructor.cpp.
2218         * runtime/NativeErrorConstructor.h: Copied from kjs/NativeErrorConstructor.h.
2219         * runtime/NativeErrorPrototype.cpp: Copied from kjs/NativeErrorPrototype.cpp.
2220         * runtime/NativeErrorPrototype.h: Copied from kjs/NativeErrorPrototype.h.
2221         * runtime/NumberConstructor.cpp: Copied from kjs/NumberConstructor.cpp.
2222         * runtime/NumberConstructor.h: Copied from kjs/NumberConstructor.h.
2223         * runtime/NumberObject.cpp: Copied from kjs/NumberObject.cpp.
2224         * runtime/NumberObject.h: Copied from kjs/NumberObject.h.
2225         * runtime/NumberPrototype.cpp: Copied from kjs/NumberPrototype.cpp.
2226         * runtime/NumberPrototype.h: Copied from kjs/NumberPrototype.h.
2227         * runtime/ObjectConstructor.cpp: Copied from kjs/ObjectConstructor.cpp.
2228         * runtime/ObjectConstructor.h: Copied from kjs/ObjectConstructor.h.
2229         * runtime/ObjectPrototype.cpp: Copied from kjs/ObjectPrototype.cpp.
2230         * runtime/ObjectPrototype.h: Copied from kjs/ObjectPrototype.h.
2231         * runtime/PropertyMap.cpp: Copied from kjs/PropertyMap.cpp.
2232         * runtime/PropertyMap.h: Copied from kjs/PropertyMap.h.
2233         * runtime/PropertySlot.cpp: Copied from kjs/PropertySlot.cpp.
2234         * runtime/PropertySlot.h: Copied from kjs/PropertySlot.h.
2235         * runtime/PrototypeFunction.cpp: Copied from kjs/PrototypeFunction.cpp.
2236         * runtime/PrototypeFunction.h: Copied from kjs/PrototypeFunction.h.
2237         * runtime/PutPropertySlot.h: Copied from kjs/PutPropertySlot.h.
2238         * runtime/SmallStrings.cpp: Copied from kjs/SmallStrings.cpp.
2239         * runtime/SmallStrings.h: Copied from kjs/SmallStrings.h.
2240         * runtime/StringConstructor.cpp: Copied from kjs/StringConstructor.cpp.
2241         * runtime/StringConstructor.h: Copied from kjs/StringConstructor.h.
2242         * runtime/StringObject.cpp: Copied from kjs/StringObject.cpp.
2243         * runtime/StringObject.h: Copied from kjs/StringObject.h.
2244         * runtime/StringObjectThatMasqueradesAsUndefined.h: Copied from kjs/StringObjectThatMasqueradesAsUndefined.h.
2245         * runtime/StringPrototype.cpp: Copied from kjs/StringPrototype.cpp.
2246         * runtime/StringPrototype.h: Copied from kjs/StringPrototype.h.
2247         * runtime/StructureID.cpp: Copied from kjs/StructureID.cpp.
2248         * runtime/StructureID.h: Copied from kjs/StructureID.h.
2249
2250 2008-10-28  Geoffrey Garen  <ggaren@apple.com>
2251
2252         Reviewed by Sam Weinig.
2253         
2254         Fixed https://bugs.webkit.org/show_bug.cgi?id=21919
2255         Sampler reports bogus time in op_enter during 3d-raytrace.js
2256         
2257         Fixed a bug where we would pass the incorrect Instruction* during some
2258         parts of CTI codegen.
2259
2260         * VM/CTI.cpp:
2261         (JSC::CTI::privateCompileMainPass):
2262         (JSC::CTI::privateCompileSlowCases):
2263         * VM/SamplingTool.cpp:
2264         (JSC::SamplingTool::run):
2265         * wtf/Platform.h:
2266
2267 2008-10-28  Kevin McCullough  <kmccullough@apple.com>
2268
2269         Reviewed by Dan Bernstein.
2270
2271         -Removed unused includes.
2272         Apparent .4% speedup in Sunspider
2273
2274         * kjs/JSObject.cpp:
2275         * kjs/interpreter.cpp:
2276
2277 2008-10-28  Alp Toker  <alp@nuanti.com>
2278
2279         Include copyright license files in the autotools dist target.
2280
2281         Change suggested by Mike Hommey.
2282
2283         * GNUmakefile.am:
2284
2285 2008-10-27  Geoffrey Garen  <ggaren@apple.com>
2286
2287         Reviewed by Maciej Stachowiak.
2288         
2289         Stop discarding CodeBlock samples that can't be charged to a specific
2290         opcode. Instead, charge the relevant CodeBlock, and provide a footnote
2291         explaining the situation.
2292         
2293         This will help us tell which CodeBlocks are hot, even if we can't
2294         identify specific lines of code within the CodeBlocks.
2295
2296         * VM/SamplingTool.cpp:
2297         (JSC::ScopeSampleRecord::sample):
2298         (JSC::compareScopeSampleRecords):
2299         (JSC::SamplingTool::dump):
2300
2301         * VM/SamplingTool.h:
2302         (JSC::ScopeSampleRecord::ScopeSampleRecord):
2303         (JSC::ScopeSampleRecord::~ScopeSampleRecord):
2304
2305 2008-10-27  Geoffrey Garen  <ggaren@apple.com>
2306
2307         Reviewed by Sam Weinig.
2308         
2309         Added a mutex around the SamplingTool's ScopeNode* map, to solve a crash
2310         when sampling the v8 tests.
2311
2312         * VM/SamplingTool.cpp:
2313         (JSC::SamplingTool::run):
2314         (JSC::SamplingTool::notifyOfScope):
2315         * VM/SamplingTool.h: Since new ScopeNodes can be created after
2316         the SamplingTools has begun sampling, reads and writes to / from the
2317         map need to be synchronized. Shark says this doesn't measurably increase
2318         sampling overhead.
2319
2320 2008-10-25  Geoffrey Garen  <ggaren@apple.com>
2321
2322         Not reviewed.
2323         
2324         Try to fix Windows build.
2325
2326         * VM/Machine.cpp:
2327         (JSC::Machine::privateExecute): Provide a dummy value to the
2328         HostCallRecord in CTI non-sampling builds, to silence compiler warning.
2329
2330 2008-10-25  Geoffrey Garen  <ggaren@apple.com>
2331
2332         Not reviewed.
2333         
2334         Try to fix Windows build.
2335
2336         * VM/SamplingTool.h:
2337         (JSC::SamplingTool::encodeSample): Explicitly cast bool to int, to
2338         silence compiler warning.
2339
2340 2008-10-25  Geoffrey Garen  <ggaren@apple.com>
2341
2342         Reviewed by Sam Weinig, with Gavin Barraclough's help.
2343         
2344         Fixed Sampling Tool:
2345             - Made CodeBlock sampling work with CTI
2346             - Improved accuracy by unifying most sampling data into a single
2347               32bit word, which can be written / read atomically.
2348             - Split out three different #ifdefs for modularity: OPCODE_SAMPLING;
2349               CODEBLOCK_SAMPLING; OPCODE_STATS.
2350             - Improved reporting clarity
2351             - Refactored for code clarity
2352
2353         * JavaScriptCore.exp: Exported another symbol.
2354
2355         * VM/CTI.cpp:
2356         (JSC::CTI::emitCTICall):
2357         (JSC::CTI::compileOpCall):
2358         (JSC::CTI::emitSlowScriptCheck):
2359         (JSC::CTI::compileBinaryArithOpSlowCase):
2360         (JSC::CTI::privateCompileMainPass):
2361         (JSC::CTI::privateCompileSlowCases):
2362         (JSC::CTI::privateCompile):
2363         * VM/CTI.h: Updated CTI codegen to use the unified SamplingTool interface
2364         for encoding samples. (This required passing the current vPC to a lot
2365         more functions, since the unified interface samples the current vPC.)
2366         Added hooks for writing the current CodeBlock* on function entry and
2367         after a function call, for the sake of the CodeBlock sampler. Removed
2368         obsolete hook for clearing the current sample inside op_end. Also removed
2369         the custom enum used to differentiate flavors of op_call, since the
2370         OpcodeID enum works just as well. (This was important in an earlier
2371         version of the patch, but now it's just cleanup.)
2372
2373         * VM/CodeBlock.cpp:
2374         (JSC::CodeBlock::lineNumberForVPC):
2375         * VM/CodeBlock.h: Upated for refactored #ifdefs. Changed lineNumberForVPC
2376         to be robust against vPCs not recorded for exception handling, since
2377         the Sampler may ask for an arbitrary vPC.
2378
2379         * VM/Machine.cpp:
2380         (JSC::Machine::execute):
2381         (JSC::Machine::privateExecute):
2382         (JSC::Machine::cti_op_call_NotJSFunction):
2383         (JSC::Machine::cti_op_construct_NotJSConstruct):
2384         * VM/Machine.h:
2385         (JSC::Machine::setSampler):
2386         (JSC::Machine::sampler):
2387         (JSC::Machine::jitCodeBuffer): Upated for refactored #ifdefs. Changed
2388         Machine to use SamplingTool helper objects to record movement in and
2389         out of host code. This makes samples a bit more precise.
2390         
2391         * VM/Opcode.cpp:
2392         (JSC::OpcodeStats::~OpcodeStats):
2393         * VM/Opcode.h: Upated for refactored #ifdefs. Added a little more padding,
2394         to accomodate our more verbose opcode names.
2395
2396         * VM/SamplingTool.cpp:
2397         (JSC::ScopeSampleRecord::sample): Only count a sample toward our total
2398         if we actually record it. This solves cases where a CodeBlock will
2399         claim to have been sampled many times, with reported samples that don't
2400         match.
2401
2402         (JSC::SamplingTool::run): Read the current sample into a Sample helper
2403         object, to ensure that the data doesn't change while we're analyzing it,
2404         and to help decode the data. Only access the CodeBlock sampling hash
2405         table if CodeBlock sampling has been enabled, so non-CodeBlock sampling
2406         runs can operate with even less overhead.
2407
2408         (JSC::SamplingTool::dump): I reorganized this code a lot to print the
2409         most important info at the top, print as a table, annotate and document
2410         the stuff I didn't understand when I started, etc.
2411
2412         * VM/SamplingTool.h: New helper classes, described above.
2413
2414         * kjs/Parser.h:
2415         * kjs/Shell.cpp:
2416         (runWithScripts):
2417         * kjs/nodes.cpp:
2418         (JSC::ScopeNode::ScopeNode): Updated for new sampling APIs.
2419
2420         * wtf/Platform.h: Moved sampling #defines here, since our custom is to
2421         put ENABLE #defines into Platform.h. Made explicit the fact that
2422         CODEBLOCK_SAMPLING depends on OPCODE_SAMPLING.
2423
2424 2008-10-25  Jan Michael Alonzo  <jmalonzo@webkit.org>
2425
2426         JSC Build fix, not reviewed.
2427
2428         * VM/CTI.cpp: add missing include stdio.h for debug builds
2429
2430 2008-10-24  Eric Seidel  <eric@webkit.org>
2431
2432         Reviewed by Darin Adler.
2433         
2434         Get rid of a bonus ASSERT when using a null string as a regexp.
2435         Specifically calling: RegularExpression::match() with String::empty()
2436         will hit this ASSERT.
2437         Chromium hits this, but I don't know of any way to make a layout test.
2438
2439         * pcre/pcre_exec.cpp:
2440         (jsRegExpExecute):
2441
2442 2008-10-24  Alexey Proskuryakov  <ap@webkit.org>
2443
2444         Suggested and rubber-stamped by Geoff Garen.
2445
2446         Fix a crash when opening Font Picker.
2447
2448         The change also hopefully fixes this bug, which I could never reproduce:
2449         https://bugs.webkit.org/show_bug.cgi?id=20241
2450         <rdar://problem/6290576> Safari crashes at JSValueUnprotect() when fontpicker view close
2451
2452         * API/JSContextRef.cpp: (JSContextGetGlobalObject): Use lexical global object instead of
2453         dynamic one.
2454
2455 2008-10-24  Cameron Zwarich  <zwarich@apple.com>
2456
2457         Reviewed by Geoff Garen.
2458
2459         Remove ScopeChainNode::bottom() and inline it into its only caller,
2460         ScopeChainnode::globalObject().
2461
2462         * kjs/JSGlobalObject.h:
2463         (JSC::ScopeChainNode::globalObject):
2464         * kjs/ScopeChain.h:
2465         (JSC::ScopeChain::bottom):
2466
2467 2008-10-24  Cameron Zwarich  <zwarich@apple.com>
2468
2469         Reviewed by Maciej Stachowiak.
2470
2471         Bug 21862: Create JSFunction prototype property lazily
2472         <https://bugs.webkit.org/show_bug.cgi?id=21862>
2473
2474         This is a 1.5% speedup on SunSpider and a 1.4% speedup on the V8
2475         benchmark suite, including a 3.8% speedup on Earley-Boyer.
2476
2477         * kjs/JSFunction.cpp:
2478         (JSC::JSFunction::getOwnPropertySlot):
2479         * kjs/nodes.cpp:
2480         (JSC::FuncDeclNode::makeFunction):
2481         (JSC::FuncExprNode::makeFunction):
2482
2483 2008-10-24  Greg Bolsinga  <bolsinga@apple.com>
2484
2485         Reviewed by Sam Weinig.
2486
2487         https://bugs.webkit.org/show_bug.cgi?id=21475
2488         
2489         Provide support for the Geolocation API
2490         
2491         http://dev.w3.org/geo/api/spec-source.html
2492
2493         * wtf/Platform.h: ENABLE_GEOLOCATION defaults to 0
2494
2495 2008-10-24  Darin Adler  <darin@apple.com>
2496
2497         - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732
2498
2499         * API/APICast.h:
2500         * API/JSCallbackConstructor.h:
2501         * API/JSCallbackFunction.cpp:
2502         * API/JSCallbackFunction.h:
2503         * API/JSCallbackObject.h:
2504         * API/JSCallbackObjectFunctions.h:
2505         * API/JSContextRef.cpp:
2506         * API/JSObjectRef.cpp:
2507         * API/JSValueRef.cpp:
2508         * VM/CTI.cpp:
2509         * VM/CTI.h:
2510         * VM/CodeBlock.cpp:
2511         * VM/CodeBlock.h:
2512         * VM/CodeGenerator.cpp:
2513         * VM/CodeGenerator.h:
2514         * VM/ExceptionHelpers.cpp:
2515         * VM/ExceptionHelpers.h:
2516         * VM/JSPropertyNameIterator.cpp:
2517         * VM/JSPropertyNameIterator.h:
2518         * VM/Machine.cpp:
2519         * VM/Machine.h:
2520         * VM/Register.h:
2521         * kjs/ArgList.cpp:
2522         * kjs/ArgList.h:
2523         * kjs/Arguments.cpp:
2524         * kjs/Arguments.h:
2525         * kjs/ArrayConstructor.cpp:
2526         * kjs/ArrayPrototype.cpp:
2527         * kjs/BooleanConstructor.cpp:
2528         * kjs/BooleanConstructor.h:
2529         * kjs/BooleanObject.h:
2530         * kjs/BooleanPrototype.cpp:
2531         * kjs/CallData.cpp:
2532         * kjs/CallData.h:
2533         * kjs/ConstructData.cpp:
2534         * kjs/ConstructData.h:
2535         * kjs/DateConstructor.cpp:
2536         * kjs/DateInstance.h:
2537         * kjs/DatePrototype.cpp:
2538         * kjs/DatePrototype.h:
2539         * kjs/DebuggerCallFrame.cpp:
2540         * kjs/DebuggerCallFrame.h:
2541         * kjs/ErrorConstructor.cpp:
2542         * kjs/ErrorPrototype.cpp:
2543         * kjs/ExecState.cpp:
2544         * kjs/ExecState.h:
2545         * kjs/FunctionConstructor.cpp:
2546         * kjs/FunctionPrototype.cpp:
2547         * kjs/FunctionPrototype.h:
2548         * kjs/GetterSetter.cpp:
2549         * kjs/GetterSetter.h:
2550         * kjs/InternalFunction.h:
2551         * kjs/JSActivation.cpp:
2552         * kjs/JSActivation.h:
2553         * kjs/JSArray.cpp:
2554         * kjs/JSArray.h:
2555         * kjs/JSCell.cpp:
2556         * kjs/JSCell.h:
2557         * kjs/JSFunction.cpp:
2558         * kjs/JSFunction.h:
2559         * kjs/JSGlobalData.h:
2560         * kjs/JSGlobalObject.cpp:
2561         * kjs/JSGlobalObject.h:
2562         * kjs/JSGlobalObjectFunctions.cpp:
2563         * kjs/JSGlobalObjectFunctions.h:
2564         * kjs/JSImmediate.cpp:
2565         * kjs/JSImmediate.h:
2566         * kjs/JSNotAnObject.cpp:
2567         * kjs/JSNotAnObject.h:
2568         * kjs/JSNumberCell.cpp:
2569         * kjs/JSNumberCell.h:
2570         * kjs/JSObject.cpp:
2571         * kjs/JSObject.h:
2572         * kjs/JSStaticScopeObject.cpp:
2573         * kjs/JSStaticScopeObject.h:
2574         * kjs/JSString.cpp:
2575         * kjs/JSString.h:
2576         * kjs/JSValue.h:
2577         * kjs/JSVariableObject.h:
2578         * kjs/JSWrapperObject.h:
2579         * kjs/MathObject.cpp:
2580         * kjs/MathObject.h:
2581         * kjs/NativeErrorConstructor.cpp:
2582         * kjs/NumberConstructor.cpp:
2583         * kjs/NumberConstructor.h:
2584         * kjs/NumberObject.cpp:
2585         * kjs/NumberObject.h:
2586         * kjs/NumberPrototype.cpp:
2587         * kjs/ObjectConstructor.cpp:
2588         * kjs/ObjectPrototype.cpp:
2589         * kjs/ObjectPrototype.h:
2590         * kjs/PropertyMap.h:
2591         * kjs/PropertySlot.cpp:
2592         * kjs/PropertySlot.h:
2593         * kjs/RegExpConstructor.cpp:
2594         * kjs/RegExpConstructor.h:
2595         * kjs/RegExpMatchesArray.h:
2596         * kjs/RegExpObject.cpp:
2597         * kjs/RegExpObject.h:
2598         * kjs/RegExpPrototype.cpp:
2599         * kjs/Shell.cpp:
2600         * kjs/StringConstructor.cpp:
2601         * kjs/StringObject.cpp:
2602         * kjs/StringObject.h:
2603         * kjs/StringObjectThatMasqueradesAsUndefined.h:
2604         * kjs/StringPrototype.cpp:
2605         * kjs/StructureID.cpp:
2606         * kjs/StructureID.h:
2607         * kjs/collector.cpp:
2608         * kjs/collector.h:
2609         * kjs/completion.h:
2610         * kjs/grammar.y:
2611         * kjs/interpreter.cpp:
2612         * kjs/interpreter.h:
2613         * kjs/lookup.cpp:
2614         * kjs/lookup.h:
2615         * kjs/nodes.h:
2616         * kjs/operations.cpp:
2617         * kjs/operations.h:
2618         * kjs/protect.h:
2619         * profiler/ProfileGenerator.cpp:
2620         * profiler/Profiler.cpp:
2621         * profiler/Profiler.h:
2622         Use JSValue* instead of JSValuePtr.
2623
2624 2008-10-24  David Kilzer  <ddkilzer@apple.com>
2625
2626         Rolled out r37840.
2627
2628         * wtf/Platform.h:
2629
2630 2008-10-23  Greg Bolsinga  <bolsinga@apple.com>
2631
2632         Reviewed by Sam Weinig.
2633
2634         https://bugs.webkit.org/show_bug.cgi?id=21475
2635         
2636         Provide support for the Geolocation API
2637         
2638         http://dev.w3.org/geo/api/spec-source.html
2639
2640         * wtf/Platform.h: ENABLE_GEOLOCATION defaults to 0
2641
2642 2008-10-23  David Kilzer  <ddkilzer@apple.com>
2643
2644         Bug 21832: Fix scripts using 'new File::Temp' for Perl 5.10
2645
2646         <https://bugs.webkit.org/show_bug.cgi?id=21832>
2647
2648         Reviewed by Sam Weinig.
2649
2650         * pcre/dftables: Use imported tempfile() from File::Temp instead of
2651         'new File::Temp' to make the script work with Perl 5.10.
2652
2653 2008-10-23  Gavin Barraclough  <barraclough@apple.com>
2654
2655         Reviewed by Oliver Hunt.
2656
2657         Fix hideous pathological case performance when looking up repatch info, bug #21727.
2658
2659         When repatching JIT code to optimize we look up records providing information about
2660         the generated code (also used to track recsources used in linking to be later released). 
2661         The lookup was being performed using a linear scan of all such records.
2662
2663         (1) Split up the different types of reptach information.  This means we can search them
2664             separately, and in some cases should reduce their size.
2665         (2) In the case of property accesses, search with a binary chop over the data.
2666         (3) In the case of calls, pass a pointer to the repatch info into the relink function.
2667
2668         * VM/CTI.cpp:
2669         (JSC::CTI::CTI):
2670         (JSC::CTI::compileOpCall):
2671         (JSC::CTI::privateCompileMainPass):
2672         (JSC::CTI::privateCompileSlowCases):
2673         (JSC::CTI::privateCompile):
2674         (JSC::CTI::unlinkCall):
2675         (JSC::CTI::linkCall):
2676         * VM/CTI.h:
2677         * VM/CodeBlock.cpp:
2678         (JSC::CodeBlock::dump):
2679         (JSC::CodeBlock::~CodeBlock):
2680         (JSC::CodeBlock::unlinkCallers):
2681         (JSC::CodeBlock::derefStructureIDs):
2682         * VM/CodeBlock.h:
2683         (JSC::StructureStubInfo::StructureStubInfo):
2684         (JSC::CallLinkInfo::CallLinkInfo):
2685         (JSC::CallLinkInfo::setUnlinked):
2686         (JSC::CallLinkInfo::isLinked):
2687         (JSC::getStructureStubInfoReturnLocation):
2688         (JSC::binaryChop):
2689         (JSC::CodeBlock::addCaller):
2690         (JSC::CodeBlock::getStubInfo):
2691         * VM/CodeGenerator.cpp:
2692         (JSC::CodeGenerator::emitResolve):
2693         (JSC::CodeGenerator::emitGetById):
2694         (JSC::CodeGenerator::emitPutById):
2695         (JSC::CodeGenerator::emitCall):
2696         (JSC::CodeGenerator::emitConstruct):
2697         * VM/Machine.cpp:
2698         (JSC::Machine::cti_vm_lazyLinkCall):
2699
2700 2008-10-23  Peter Kasting  <pkasting@google.com>
2701
2702         Reviewed by Adam Roben.
2703
2704         https://bugs.webkit.org/show_bug.cgi?id=21833
2705         Place JavaScript Debugger hooks under #if ENABLE(JAVASCRIPT_DEBUGGER).
2706
2707         * wtf/Platform.h:
2708
2709 2008-10-23  David Kilzer  <ddkilzer@apple.com>
2710
2711         Bug 21831: Fix create_hash_table for Perl 5.10
2712
2713         <https://bugs.webkit.org/show_bug.cgi?id=21831>
2714
2715         Reviewed by Sam Weinig.
2716
2717         * kjs/create_hash_table: Escaped square brackets so that Perl 5.10
2718         doesn't try to use @nameEntries.
2719
2720 2008-10-23  Darin Adler  <darin@apple.com>
2721
2722         - roll out https://bugs.webkit.org/show_bug.cgi?id=21732
2723           to remove the JSValuePtr class, to fix two problems
2724
2725             1) slowness under MSVC, since it doesn't handle a
2726                class with a single pointer in it as efficiently
2727                as a pointer
2728
2729             2) uninitialized pointers in Vector
2730
2731         * JavaScriptCore.exp: Updated.
2732
2733         * API/APICast.h:
2734         (toRef):
2735         * VM/CTI.cpp:
2736         (JSC::CTI::asInteger):
2737         * VM/CodeGenerator.cpp:
2738         (JSC::CodeGenerator::addConstant):
2739         * VM/CodeGenerator.h:
2740         (JSC::CodeGenerator::JSValueHashTraits::constructDeletedValue):
2741         (JSC::CodeGenerator::JSValueHashTraits::isDeletedValue):
2742         * VM/Machine.cpp:
2743         (JSC::Machine::cti_op_add):
2744         (JSC::Machine::cti_op_pre_inc):
2745         (JSC::Machine::cti_op_get_by_id):
2746         (JSC::Machine::cti_op_get_by_id_second):
2747         (JSC::Machine::cti_op_get_by_id_generic):
2748         (JSC::Machine::cti_op_get_by_id_fail):
2749         (JSC::Machine::cti_op_instanceof):
2750         (JSC::Machine::cti_op_del_by_id):
2751         (JSC::Machine::cti_op_mul):
2752         (JSC::Machine::cti_op_call_NotJSFunction):
2753         (JSC::Machine::cti_op_resolve):
2754         (JSC::Machine::cti_op_construct_NotJSConstruct):
2755         (JSC::Machine::cti_op_get_by_val):
2756         (JSC::Machine::cti_op_sub):
2757         (JSC::Machine::cti_op_lesseq):
2758         (JSC::Machine::cti_op_negate):
2759         (JSC::Machine::cti_op_resolve_base):
2760         (JSC::Machine::cti_op_resolve_skip):
2761         (JSC::Machine::cti_op_resolve_global):
2762         (JSC::Machine::cti_op_div):
2763         (JSC::Machine::cti_op_pre_dec):
2764         (JSC::Machine::cti_op_not):
2765         (JSC::Machine::cti_op_eq):
2766         (JSC::Machine::cti_op_lshift):
2767         (JSC::Machine::cti_op_bitand):
2768         (JSC::Machine::cti_op_rshift):
2769         (JSC::Machine::cti_op_bitnot):
2770         (JSC::Machine::cti_op_mod):
2771         (JSC::Machine::cti_op_less):
2772         (JSC::Machine::cti_op_neq):
2773         (JSC::Machine::cti_op_urshift):
2774         (JSC::Machine::cti_op_bitxor):
2775         (JSC::Machine::cti_op_bitor):
2776         (JSC::Machine::cti_op_call_eval):
2777         (JSC::Machine::cti_op_throw):
2778         (JSC::Machine::cti_op_next_pname):
2779         (JSC::Machine::cti_op_typeof):
2780         (JSC::Machine::cti_op_is_undefined):
2781         (JSC::Machine::cti_op_is_boolean):
2782         (JSC::Machine::cti_op_is_number):
2783         (JSC::Machine::cti_op_is_string):
2784         (JSC::Machine::cti_op_is_object):
2785         (JSC::Machine::cti_op_is_function):
2786         (JSC::Machine::cti_op_stricteq):
2787         (JSC::Machine::cti_op_nstricteq):
2788         (JSC::Machine::cti_op_to_jsnumber):
2789         (JSC::Machine::cti_op_in):
2790         (JSC::Machine::cti_op_del_by_val):
2791         (JSC::Machine::cti_vm_throw):
2792         Removed calls to payload functions.
2793
2794         * VM/Register.h:
2795         (JSC::Register::Register): Removed overload for JSCell and call
2796         to payload function.
2797
2798         * kjs/JSCell.h: Changed JSCell to derive from JSValue again.
2799         Removed JSValuePtr constructor.
2800         (JSC::asCell): Changed cast from reinterpret_cast to static_cast.
2801
2802         * kjs/JSImmediate.h: Removed JSValuePtr class. Added typedef back.
2803
2804         * kjs/JSValue.h:
2805         (JSC::JSValue::JSValue): Added empty protected inline constructor back.
2806         (JSC::JSValue::~JSValue): Same for destructor.
2807         Removed == and != operator for JSValuePtr.
2808
2809         * kjs/PropertySlot.h:
2810         (JSC::PropertySlot::PropertySlot): Chnaged argument to const JSValue*
2811         and added a const_cast.
2812
2813         * kjs/protect.h: Removed overloads and specialization for JSValuePtr.
2814
2815 2008-10-22  Oliver Hunt  <oliver@apple.com>
2816
2817         Reviewed by Maciej Stachowiak.
2818
2819         Really "fix" CTI mode on windows 2k3.
2820
2821         This adds new methods fastMallocExecutable and fastFreeExecutable
2822         to wrap allocation for cti code.  This still just makes fastMalloc
2823         return executable memory all the time, which will be fixed in a
2824         later patch.
2825
2826         However in windows debug builds all executable allocations will be
2827         allocated on separate executable pages, which should resolve any
2828         remaining 2k3 issues.  Conveniently the 2k3 bot will now also fail
2829         if there are any fastFree vs. fastFreeExecutable errors.
2830
2831         * ChangeLog:
2832         * VM/CodeBlock.cpp:
2833         (JSC::CodeBlock::~CodeBlock):
2834         * kjs/regexp.cpp:
2835         (JSC::RegExp::~RegExp):
2836         * masm/X86Assembler.h:
2837         (JSC::JITCodeBuffer::copy):
2838         * wtf/FastMalloc.cpp:
2839         (WTF::fastMallocExecutable):
2840         (WTF::fastFreeExecutable):
2841         (WTF::TCMallocStats::fastMallocExecutable):
2842         (WTF::TCMallocStats::fastFreeExecutable):
2843         * wtf/FastMalloc.h:
2844
2845 2008-10-22  Darin Adler  <darin@apple.com>
2846
2847         Reviewed by Sam Weinig.
2848
2849         - fix https://bugs.webkit.org/show_bug.cgi?id=21294
2850           Bug 21294: Devirtualize getOwnPropertySlot()
2851
2852         A bit over 3% faster on V8 tests.
2853
2854         * JavascriptCore.exp: Export leak-related functions..
2855
2856         * API/JSCallbackConstructor.h:
2857         (JSC::JSCallbackConstructor::createStructureID): Set HasStandardGetOwnPropertySlot
2858         since this class doesn't override getPropertySlot.
2859         * API/JSCallbackFunction.h:
2860         (JSC::JSCallbackFunction::createStructureID): Ditto.
2861
2862         * VM/ExceptionHelpers.cpp:
2863         (JSC::InterruptedExecutionError::InterruptedExecutionError): Use a structure
2864         that's created just for this class instead of trying to share a single "null
2865         prototype" structure.
2866
2867         * VM/Machine.cpp:
2868         (JSC::Machine::cti_op_create_arguments_no_params): Rename
2869         Arguments::ArgumentsNoParameters to Arguments::NoParameters.
2870         
2871         * kjs/Arguments.h: Rename the enum from Arguments::ArgumentsParameters to
2872         Arguments::NoParametersType and the value from Arguments::ArgumentsNoParameters
2873         to Arguments::NoParameters.
2874         (JSC::Arguments::createStructureID): Added. Returns a structure without
2875         HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.
2876         (JSC::Arguments::Arguments): Added an assertion that there are no parameters.
2877
2878         * kjs/DatePrototype.h:
2879         (JSC::DatePrototype::createStructureID): Added. Returns a structure without
2880         HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.
2881
2882         * kjs/FunctionPrototype.h:
2883         (JSC::FunctionPrototype::createStructureID): Set HasStandardGetOwnPropertySlot
2884         since this class doesn't override getPropertySlot.
2885         * kjs/InternalFunction.h:
2886         (JSC::InternalFunction::createStructureID): Ditto.
2887
2888         * kjs/JSArray.h:
2889         (JSC::JSArray::createStructureID): Added. Returns a structure without
2890         HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.
2891
2892         * kjs/JSCell.h: Added declaration of fastGetOwnPropertySlot; a non-virtual
2893         version that uses the structure bit to decide whether to call the virtual
2894         version.
2895
2896         * kjs/JSFunction.h:
2897         (JSC::JSFunction::createStructureID): Added. Returns a structure without
2898         HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.
2899
2900         * kjs/JSGlobalData.cpp:
2901         (JSC::JSGlobalData::JSGlobalData): Initialize new structures; removed
2902         nullProtoStructureID.
2903         * kjs/JSGlobalData.h: Added new structures. Removed nullProtoStructureID.
2904
2905         * kjs/JSGlobalObject.h:
2906         (JSC::JSGlobalObject::createStructureID): Added. Returns a structure without
2907         HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.
2908
2909         * kjs/JSNotAnObject.h:
2910         (JSC::JSNotAnObjectErrorStub::JSNotAnObjectErrorStub): Use a structure
2911         that's created just for this class instead of trying to share a single "null
2912         prototype" structure.
2913         (JSC::JSNotAnObjectErrorStub::isNotAnObjectErrorStub): Marked this function
2914         virtual for clarity and made it private since no one should call it if they
2915         already have a pointer to this specific type.
2916         (JSC::JSNotAnObject::JSNotAnObject): Use a structure that's created just
2917         for this class instead of trying to share a single "null prototype" structure.
2918         (JSC::JSNotAnObject::createStructureID): Added. Returns a structure without
2919         HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.
2920
2921         * kjs/JSObject.h:
2922         (JSC::JSObject::createStructureID): Added HasStandardGetOwnPropertySlot.
2923         (JSC::JSObject::inlineGetOwnPropertySlot): Added. Used so we can share code
2924         between getOwnPropertySlot and fastGetOwnPropertySlot.
2925         (JSC::JSObject::getOwnPropertySlot): Moved so that functions are above the
2926         functions that call them. Moved the guts of this function into
2927         inlineGetOwnPropertySlot.
2928         (JSC::JSCell::fastGetOwnPropertySlot): Added. Checks the
2929         HasStandardGetOwnPropertySlot bit and if it's set, calls
2930         inlineGetOwnPropertySlot, otherwise calls getOwnPropertySlot.
2931         (JSC::JSObject::getPropertySlot): Changed to call fastGetOwnPropertySlot.
2932         (JSC::JSValue::get): Changed to call fastGetOwnPropertySlot.
2933
2934         * kjs/JSWrapperObject.h: Made constructor protected to emphasize that
2935         this class is only a base class and never instantiated.
2936
2937         * kjs/MathObject.h:
2938         (JSC::MathObject::createStructureID): Added. Returns a structure without
2939         HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.
2940         * kjs/NumberConstructor.h:
2941         (JSC::NumberConstructor::createStructureID): Ditto.
2942         * kjs/RegExpConstructor.h:
2943         (JSC::RegExpConstructor::createStructureID): Ditto.
2944         * kjs/RegExpObject.h:
2945         (JSC::RegExpObject::createStructureID): Ditto.
2946         * kjs/StringObject.h:
2947         (JSC::StringObject::createStructureID): Ditto.
2948
2949         * kjs/TypeInfo.h: Added HasStandardGetOwnPropertySlot flag and
2950         hasStandardGetOwnPropertySlot accessor function.
2951
2952 2008-10-22  Cameron Zwarich  <zwarich@apple.com>
2953
2954         Reviewed by Geoff Garen.
2955
2956         Bug 21803: Fuse op_jfalse with op_eq_null and op_neq_null
2957         <https://bugs.webkit.org/show_bug.cgi?id=21803>
2958
2959         Fuse op_jfalse with op_eq_null and op_neq_null to make the new opcodes
2960         op_jeq_null and op_jneq_null.
2961
2962         This is a 2.6% speedup on the V8 Raytrace benchmark, and strangely also
2963         a 4.7% speedup on the V8 Arguments benchmark, even though it uses
2964         neither of the two new opcodes.
2965
2966         * VM/CTI.cpp:
2967         (JSC::CTI::privateCompileMainPass):
2968         * VM/CodeBlock.cpp:
2969         (JSC::CodeBlock::dump):
2970         * VM/CodeGenerator.cpp:
2971         (JSC::CodeGenerator::emitJumpIfTrue):
2972         (JSC::CodeGenerator::emitJumpIfFalse):
2973         * VM/Machine.cpp:
2974         (JSC::Machine::privateExecute):
2975         * VM/Opcode.h:
2976
2977 2008-10-22  Darin Fisher  <darin@chromium.org>
2978
2979         Reviewed by Eric Seidel.
2980
2981         Should not define PLATFORM(WIN,MAC,GTK) when PLATFORM(CHROMIUM) is defined
2982         https://bugs.webkit.org/show_bug.cgi?id=21757
2983
2984         PLATFORM(CHROMIUM) implies HAVE_ACCESSIBILITY
2985
2986         * wtf/Platform.h:
2987
2988 2008-10-22  Cameron Zwarich  <zwarich@apple.com>
2989
2990         Reviewed by Alexey Proskuryakov.
2991
2992         Correct opcode names in documentation.
2993
2994         * VM/Machine.cpp:
2995         (JSC::Machine::privateExecute):
2996
2997 2008-10-21  Oliver Hunt <oliver@apple.com>
2998
2999         RS=Maciej Stachowiak.
3000
3001         Force FastMalloc to make all allocated pages executable in
3002         a vague hope this will allow the Win2k3 bot to be able to
3003         run tests.
3004
3005         Filed Bug 21783: Need more granular control over allocation of executable memory
3006         to cover a more granular version of this patch.
3007
3008         * wtf/TCSystemAlloc.cpp:
3009         (TryVirtualAlloc):
3010
3011 2008-10-21  Alexey Proskuryakov  <ap@webkit.org>
3012
3013         Reviewed by Darin Adler.
3014
3015         https://bugs.webkit.org/show_bug.cgi?id=21769
3016         MessagePort should be GC protected if there are messages to be delivered
3017
3018         * wtf/MessageQueue.h:
3019         (WTF::::isEmpty): Added. Also added a warning for methods that return a snapshot of queue
3020         state, thus likely to cause race conditions.
3021
3022 2008-10-21  Darin Adler  <darin@apple.com>
3023
3024         Reviewed by Maciej Stachowiak.
3025
3026         - convert post-increment to pre-increment in a couple more places for speed
3027
3028         Speeds up V8 benchmarks a little on most computers. (But, strangely, slows
3029         them down a little on my computer.)
3030
3031         * kjs/nodes.cpp:
3032         (JSC::statementListEmitCode): Removed default argument, since we always want
3033         to specify this explicitly.
3034         (JSC::ForNode::emitCode): Tolerate ignoredResult() as the dst -- means the
3035         same thing as 0.
3036         (JSC::ReturnNode::emitCode): Ditto.
3037         (JSC::ThrowNode::emitCode): Ditto.
3038         (JSC::FunctionBodyNode::emitCode): Pass ignoredResult() so that we know we
3039         don't have to compute the result of function statements.
3040
3041 2008-10-21  Peter Kasting  <pkasting@google.com>
3042
3043         Reviewed by Maciej Stachowiak.
3044
3045         Fix an include of a non-public header to use "" instead of <>.
3046
3047         * API/JSProfilerPrivate.cpp:
3048
3049 2008-10-20  Sam Weinig  <sam@webkit.org>
3050
3051         Reviewed by Cameron Zwarich.
3052
3053         Fix for https://bugs.webkit.org/show_bug.cgi?id=21766
3054         REGRESSION: 12 JSC tests fail
3055
3056         The JSGlobalObject was mutating the shared nullProtoStructureID when
3057         used in jsc.  Instead of using nullProtoStructureID, use a new StructureID.
3058
3059         * API/JSCallbackObject.h:
3060         * API/JSCallbackObjectFunctions.h:
3061         (JSC::::JSCallbackObject):
3062         * API/JSContextRef.cpp:
3063         (JSGlobalContextCreateInGroup):
3064         * kjs/JSGlobalObject.h:
3065         (JSC::JSGlobalObject::JSGlobalObject):
3066         * kjs/Shell.cpp:
3067         (GlobalObject::GlobalObject):
3068         (jscmain):
3069
3070 2008-10-20  Cameron Zwarich  <zwarich@apple.com>
3071
3072         Reviewed by Maciej Stachowiak.
3073
3074         Remove an untaken branch in CodeGenerator::emitJumpIfFalse(). This
3075         function is never called with a backwards target LabelID, and there is
3076         even an assertion to this effect at the top of the function body.
3077
3078         * VM/CodeGenerator.cpp:
3079         (JSC::CodeGenerator::emitJumpIfFalse):
3080
3081 2008-10-20  Cameron Zwarich  <zwarich@apple.com>
3082
3083         Rubber-stamped by Sam Weinig.
3084
3085         Add opcode documentation for undocumented opcodes.
3086
3087         * VM/Machine.cpp:
3088         (JSC::Machine::privateExecute):
3089
3090 2008-10-16  Sam Weinig  <sam@webkit.org>
3091
3092         Reviewed by Cameron Zwarich.
3093
3094         Fix for https://bugs.webkit.org/show_bug.cgi?id=21683
3095         Don't create intermediate StructureIDs for builtin objects
3096
3097         Second stage in reduce number of StructureIDs created when initializing the
3098         JSGlobalObject.
3099
3100         - Use putDirectWithoutTransition for the remaining singleton objects to reduce
3101           the number of StructureIDs create for about:blank from 132 to 73.
3102
3103         * kjs/ArrayConstructor.cpp:
3104         (JSC::ArrayConstructor::ArrayConstructor):
3105         * kjs/BooleanConstructor.cpp:
3106         (JSC::BooleanConstructor::BooleanConstructor):
3107         * kjs/BooleanPrototype.cpp:
3108         (JSC::BooleanPrototype::BooleanPrototype):
3109         * kjs/DateConstructor.cpp:
3110         (JSC::DateConstructor::DateConstructor):
3111         * kjs/ErrorConstructor.cpp:
3112         (JSC::ErrorConstructor::ErrorConstructor):
3113         * kjs/ErrorPrototype.cpp:
3114         (JSC::ErrorPrototype::ErrorPrototype):
3115         * kjs/FunctionConstructor.cpp:
3116         (JSC::FunctionConstructor::FunctionConstructor):
3117         * kjs/FunctionPrototype.cpp:
3118         (JSC::FunctionPrototype::FunctionPrototype):
3119         (JSC::FunctionPrototype::addFunctionProperties):
3120         * kjs/FunctionPrototype.h:
3121         (JSC::FunctionPrototype::createStructureID):
3122         * kjs/InternalFunction.cpp:
3123         * kjs/InternalFunction.h:
3124         (JSC::InternalFunction::InternalFunction):
3125         * kjs/JSGlobalObject.cpp:
3126         (JSC::JSGlobalObject::reset):
3127         * kjs/JSObject.h:
3128         * kjs/MathObject.cpp:
3129         (JSC::MathObject::MathObject):
3130         * kjs/NumberConstructor.cpp:
3131         (JSC::NumberConstructor::NumberConstructor):
3132         * kjs/NumberPrototype.cpp:
3133         (JSC::NumberPrototype::NumberPrototype):
3134         * kjs/ObjectConstructor.cpp:
3135         (JSC::ObjectConstructor::ObjectConstructor):
3136         * kjs/RegExpConstructor.cpp:
3137         (JSC::RegExpConstructor::RegExpConstructor):
3138         * kjs/RegExpPrototype.cpp:
3139         (JSC::RegExpPrototype::RegExpPrototype):
3140         * kjs/StringConstructor.cpp:
3141         (JSC::StringConstructor::StringConstructor):
3142         * kjs/StringPrototype.cpp:
3143         (JSC::StringPrototype::StringPrototype):
3144         * kjs/StructureID.cpp:
3145         (JSC::StructureID::dumpStatistics):
3146         * kjs/StructureID.h:
3147         (JSC::StructureID::setPrototypeWithoutTransition):
3148
3149 2008-10-20  Alp Toker  <alp@nuanti.com>
3150
3151         Fix autotools dist build target by listing recently added header
3152         files only. Not reviewed.
3153
3154         * GNUmakefile.am:
3155
3156 2008-10-20  Geoffrey Garen  <ggaren@apple.com>
3157
3158         Reviewed by Anders Carlsson.
3159
3160         * VM/Machine.cpp:
3161         (JSC::Machine::tryCacheGetByID): Removed a redundant and sometimes
3162         incorrect cast, which started ASSERTing after Darin's last checkin.
3163
3164 2008-10-20  Geoffrey Garen  <ggaren@apple.com>
3165
3166         Not reviewed.
3167         
3168         Re-enable CTI, which I accidentally disabled while checking in fixes
3169         to bytecode.
3170
3171         * wtf/Platform.h:
3172
3173 2008-10-20  Alp Toker  <alp@nuanti.com>
3174
3175         Rubber-stamped by Mark Rowe.
3176
3177         Typo fix in function name: mimimum -> minimum.
3178
3179         * kjs/DateMath.cpp:
3180         (JSC::minimumYearForDST):
3181         (JSC::equivalentYearForDST):
3182
3183 2008-10-20  Alp Toker  <alp@nuanti.com>
3184
3185         Reviewed by Mark Rowe.
3186
3187         Use pthread instead of GThread where possible in the GTK+ port. This
3188         fixes issues with global initialisation, particularly on GTK+/Win32
3189         where a late g_thread_init() will cause hangs.
3190
3191         * GNUmakefile.am:
3192         * wtf/Platform.h:
3193         * wtf/Threading.h:
3194         * wtf/ThreadingGtk.cpp:
3195         * wtf/ThreadingPthreads.cpp:
3196
3197 2008-10-20  Geoffrey Garen  <ggaren@apple.com>
3198
3199         Reviewed by Darin Adler.
3200         
3201         Fixed https://bugs.webkit.org/show_bug.cgi?id=21735
3202         Emit profiling instrumentation only if the Web Inspector's profiling
3203         feature is enabled
3204
3205         22.2% speedup on empty function call benchmark.
3206         2.9% speedup on v8 benchmark.
3207         0.7% speedup on SunSpider.
3208         
3209         Lesser but similar speedups in bytecode.
3210
3211         * VM/CTI.cpp:
3212         (JSC::CTI::compileOpCall):
3213         (JSC::CTI::privateCompileMainPass):
3214         (JSC::CTI::privateCompileSlowCases): Nixed JITed profiler hooks. Profiler
3215         hooks now have their own opcodes. Added support for compiling profiler
3216         hook opcodes.
3217         
3218         (JSC::CodeBlock::dump): Dump support for the new profiling opcodes.
3219
3220         * VM/CodeGenerator.h:
3221         * VM/CodeGenerator.cpp:
3222         (JSC::CodeGenerator::CodeGenerator):
3223         (JSC::CodeGenerator::emitCall):
3224         (JSC::CodeGenerator::emitConstruct): Conditionally emit profiling hooks
3225         around call and construct, at the call site. (It's easier to get things
3226         right this way, if you have profiled code calling non-profiled code.
3227         Also, you get a slightly more accurate profile, since you charge the full
3228         cost of the call / construct operation to the callee.)
3229         
3230         Also, fixed a bug where construct would fetch the ".prototype" property
3231         from the constructor before evaluating the arguments to the constructor,
3232         incorrectly allowing an "invalid constructor" exception to short-circuit
3233         argument evaluation. I encountered this bug when trying to make
3234         constructor exceptions work with profiling.
3235
3236         * VM/Machine.cpp:
3237         (JSC::Machine::callEval): Removed obsolete profiler hooks.
3238
3239         (JSC::Machine::throwException): Added a check for an exception thrown
3240         within a call instruction. We didn't need this before because the call
3241         instruction would check for a valid call before involing the profiler.
3242         (JSC::Machine::execute): Added a didExecute hook at the end of top-level
3243         function invocation, since op_ret no longer does this for us.
3244
3245         (JSC::Machine::privateExecute): Removed obsolete profiler hooks. Added
3246         profiler opcodes. Changed some ++vPC to vPC[x] notation, since the
3247         latter is better for performance, and it makes reasoning about the
3248         current opcode in exception handling much simpler.
3249
3250         (JSC::Machine::cti_op_call_NotJSFunction): Removed obsolete profiler
3251         hooks.
3252
3253         (JSC::Machine::cti_op_create_arguments_no_params): Added missing
3254         CTI_STACK_HACK that I noticed when adding CTI_STACK_HACK to the new
3255         profiler opcode functions.
3256
3257         (JSC::Machine::cti_op_profile_will_call):
3258         (JSC::Machine::cti_op_profile_did_call): The new profiler opcode
3259         functions.
3260
3261         (JSC::Machine::cti_op_construct_NotJSConstruct): Removed obsolete profiler
3262         hooks.
3263
3264         * VM/Machine.h:
3265         (JSC::Machine::isCallOpcode): Helper for exception handling.
3266
3267         * VM/Opcode.h: Declare new opcodes.
3268
3269         * kjs/JSGlobalObject.h:
3270         (JSC::JSGlobalObject::supportsProfiling): Added virtual interface that
3271         allows WebCore to specify whether the target global object has the Web
3272         Inspector's profiling feature enabled.
3273
3274         * profiler/Profiler.cpp:
3275         (JSC::Profiler::willExecute):
3276         (JSC::Profiler::didExecute):
3277         (JSC::Profiler::createCallIdentifier):
3278         * profiler/Profiler.h: Added support for invoking the profiler with
3279         an arbitrary JSValue*, and not a known object. We didn't need this
3280         before because the call instruction would check for a valid call before
3281         involing the profiler.
3282
3283 2008-10-20  Darin Adler  <darin@apple.com>
3284
3285         Reviewed by Geoff Garen.
3286
3287         - get CTI working on Windows again
3288
3289         * VM/CTI.cpp:
3290         (JSC::CTI::emitCTICall): Add an overload for functions that
3291         return JSObject*.
3292         * VM/CTI.h: Use JSValue* and JSObject* as return types for
3293         cti_op functions. Apparently, MSVC doesn't handle returning
3294         the JSValuePtr struct in a register. We'll have to look into
3295         this more.
3296
3297         * VM/Machine.cpp:
3298         (JSC::Machine::cti_op_convert_this):
3299         (JSC::Machine::cti_op_add):
3300         (JSC::Machine::cti_op_pre_inc):
3301         (JSC::Machine::cti_op_new_object):
3302         (JSC::Machine::cti_op_get_by_id):
3303         (JSC::Machine::cti_op_get_by_id_second):
3304         (JSC::Machine::cti_op_get_by_id_generic):
3305         (JSC::Machine::cti_op_get_by_id_fail):
3306         (JSC::Machine::cti_op_instanceof):
3307         (JSC::Machine::cti_op_del_by_id):
3308         (JSC::Machine::cti_op_mul):
3309         (JSC::Machine::cti_op_new_func):
3310         (JSC::Machine::cti_op_push_activation):
3311         (JSC::Machine::cti_op_call_NotJSFunction):
3312         (JSC::Machine::cti_op_new_array):
3313         (JSC::Machine::cti_op_resolve):
3314         (JSC::Machine::cti_op_construct_JSConstructFast):
3315         (JSC::Machine::cti_op_construct_NotJSConstruct):
3316         (JSC::Machine::cti_op_get_by_val):
3317         (JSC::Machine::cti_op_sub):
3318         (JSC::Machine::cti_op_lesseq):
3319         (JSC::Machine::cti_op_negate):
3320         (JSC::Machine::cti_op_resolve_base):
3321         (JSC::Machine::cti_op_resolve_skip):
3322         (JSC::Machine::cti_op_resolve_global):
3323         (JSC::Machine::cti_op_div):
3324         (JSC::Machine::cti_op_pre_dec):
3325         (JSC::Machine::cti_op_not):
3326         (JSC::Machine::cti_op_eq):
3327         (JSC::Machine::cti_op_lshift):
3328         (JSC::Machine::cti_op_bitand):
3329         (JSC::Machine::cti_op_rshift):
3330         (JSC::Machine::cti_op_bitnot):
3331         (JSC::Machine::cti_op_new_func_exp):
3332         (JSC::Machine::cti_op_mod):
3333         (JSC::Machine::cti_op_less):
3334         (JSC::Machine::cti_op_neq):
3335         (JSC::Machine::cti_op_urshift):
3336         (JSC::Machine::cti_op_bitxor):
3337         (JSC::Machine::cti_op_new_regexp):
3338         (JSC::Machine::cti_op_bitor):
3339         (JSC::Machine::cti_op_call_eval):
3340         (JSC::Machine::cti_op_throw):
3341         (JSC::Machine::cti_op_next_pname):
3342         (JSC::Machine::cti_op_typeof):
3343         (JSC::Machine::cti_op_is_undefined):
3344         (JSC::Machine::cti_op_is_boolean):
3345         (JSC::Machine::cti_op_is_number):
3346         (JSC::Machine::cti_op_is_string):
3347         (JSC::Machine::cti_op_is_object):
3348         (JSC::Machine::cti_op_is_function):
3349         (JSC::Machine::cti_op_stricteq):
3350         (JSC::Machine::cti_op_nstricteq):
3351         (JSC::Machine::cti_op_to_jsnumber):
3352         (JSC::Machine::cti_op_in):
3353         (JSC::Machine::cti_op_push_new_scope):
3354         (JSC::Machine::cti_op_del_by_val):
3355         (JSC::Machine::cti_op_new_error):
3356         (JSC::Machine::cti_vm_throw):
3357         Change these functions to return pointer types, and never
3358         JSValuePtr.
3359         * VM/Machine.h: Ditto.
3360
3361 2008-10-20  Geoffrey Garen  <ggaren@apple.com>
3362
3363         Reviewed by Darin Adler.
3364         
3365         Fixed some recent break-age in bytecode mode.
3366
3367         * VM/CodeBlock.cpp:
3368         (JSC::CodeBlock::printStructureIDs): Fixed up an ASSERT caused by
3369         Gavin's last checkin. This is a temporary fix so I can keep on moving.
3370         I'll send email about what I think is an underlying problem soon.
3371
3372         * VM/Machine.cpp:
3373         (JSC::Machine::privateExecute): Removed a redundant and sometimes
3374         incorrect cast, which started ASSERTing after Darin's last checkin.
3375
3376 2008-10-20  Darin Adler  <darin@apple.com>
3377
3378         - another similar Windows build fix
3379
3380         * VM/CTI.cpp: Changed return type to JSObject* instead of JSValuePtr.
3381
3382 2008-10-20  Darin Adler  <darin@apple.com>
3383
3384         - try to fix Windows build
3385
3386         * VM/CTI.cpp: Use JSValue* instead of JSValuePtr for ctiTrampoline.
3387         * VM/CTI.h: Ditto.
3388
3389 2008-10-19  Darin Adler  <darin@apple.com>
3390
3391         Reviewed by Cameron Zwarich.
3392
3393         - finish https://bugs.webkit.org/show_bug.cgi?id=21732
3394           improve performance by eliminating JSValue as a base class for JSCell
3395
3396         * VM/Machine.cpp:
3397         (JSC::Machine::cti_op_call_profiler): Use asFunction.
3398         (JSC::Machine::cti_vm_lazyLinkCall): Ditto.
3399         (JSC::Machine::cti_op_construct_JSConstructFast): Use asObject.
3400
3401         * kjs/JSCell.h: Re-sort friend classes. Eliminate inheritance from
3402         JSValue. Changed cast in asCell from static_cast to reinterpret_cast.
3403         Removed JSValue::getNumber(double&) and one of JSValue::getObject
3404         overloads.
3405
3406         * kjs/JSValue.h: Made the private constructor and destructor both
3407         non-virtual and also remove the definitions. This class can never
3408         be instantiated or derived.
3409
3410 2008-10-19  Darin Adler  <darin@apple.com>
3411
3412         Reviewed by Cameron Zwarich.
3413
3414         - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
3415           improve performance by eliminating JSValue as a base class for JSCell
3416
3417         Change JSValuePtr from a typedef into a class. This allows us to support
3418         conversion from JSCell* to JSValuePtr even if JSCell isn't derived from
3419         JSValue.
3420
3421         * JavaScriptCore.exp: Updated symbols that involve JSValuePtr, since
3422         it's now a distinct type.
3423
3424         * API/APICast.h:
3425         (toRef): Extract the JSValuePtr payload explicitly since we can't just
3426         cast any more.
3427         * VM/CTI.cpp:
3428         (JSC::CTI::asInteger): Ditto.
3429
3430         * VM/CodeGenerator.cpp:
3431         (JSC::CodeGenerator::addConstant): Get at the payload directly.
3432         (JSC::CodeGenerator::emitLoad): Added an overload of JSCell* because
3433         otherwise classes derived from JSValue end up calling the bool
3434         overload instead of JSValuePtr.
3435         * VM/CodeGenerator.h: Ditto. Also update traits to use JSValue*
3436         and the payload functions.
3437
3438         * VM/Register.h: Added a JSCell* overload and use of payload functions.
3439
3440         * kjs/JSCell.h:
3441         (JSC::asCell): Use payload function.
3442         (JSC::JSValue::asCell): Use JSValue* instead of JSValuePtr.
3443         (JSC::JSValuePtr::JSValuePtr): Added. Constructor that takes JSCell*
3444         and creates a JSValuePtr.
3445
3446         * kjs/JSImmediate.h: Added JSValuePtr class. Also updated makeValue
3447         and makeInt to work with JSValue* and the payload function.
3448
3449         * kjs/JSValue.h: Added == and != operators for JSValuePtr. Put them
3450         here because eventually all the JSValue functions should go here
3451         except what's needed by JSImmediate. Also fix asValue to use
3452         JSValue* instead of JSValuePtr.
3453
3454         * kjs/PropertySlot.h: Change constructor to take JSValuePtr.
3455
3456         * kjs/protect.h: Update gcProtect functions to work with JSCell*
3457         as well as JSValuePtr. Also updated the ProtectedPtr<JSValuePtr>
3458         specialization to work more directly. Also changed all the call
3459         sites to use gcProtectNullTolerant.
3460
3461 2008-10-19  Darin Adler  <darin@apple.com>
3462
3463         Reviewed by Oliver Hunt.
3464
3465         - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
3466           improve performance by eliminating JSValue as a base class for JSCell
3467
3468         Remove most uses of JSValue, which will be removed in a future patch.
3469
3470         * VM/Machine.cpp:
3471         (JSC::fastToUInt32): Call toUInt32SlowCase function; no longer a member
3472         of JSValue.
3473         * kjs/JSNumberCell.h:
3474         (JSC::JSNumberCell::toInt32): Ditto.
3475         (JSC::JSNumberCell::toUInt32): Ditto.
3476
3477         * kjs/JSValue.cpp:
3478         (JSC::toInt32SlowCase): Made a non-member function.
3479         (JSC::JSValue::toInt32SlowCase): Changed to call non-member function.
3480         (JSC::toUInt32SlowCase): More of the same.
3481         (JSC::JSValue::toUInt32SlowCase): Ditto.
3482
3483         * kjs/JSValue.h: Moved static member function so they are no longer
3484         member functions at all.
3485
3486         * VM/CTI.h: Removed forward declaration of JSValue.
3487         * VM/ExceptionHelpers.h: Ditto.
3488         * kjs/CallData.h: Ditto.
3489         * kjs/ConstructData.h: Ditto.
3490         * kjs/JSGlobalObjectFunctions.h: Ditto.
3491         * kjs/PropertyMap.h: Ditto.
3492         * kjs/StructureID.h: Ditto.
3493         * kjs/collector.h: Ditto.
3494         * kjs/completion.h: Ditto.
3495
3496         * kjs/grammar.y:
3497         (JSC::makeBitwiseNotNode): Call new non-member toInt32 function.
3498         (JSC::makeLeftShiftNode): More of the same.
3499         (JSC::makeRightShiftNode): Ditto.
3500
3501         * kjs/protect.h: Added a specialization for ProtectedPtr<JSValuePtr>
3502         so this can be used with JSValuePtr.
3503
3504 2008-10-18  Darin Adler  <darin@apple.com>
3505
3506         Reviewed by Oliver Hunt.
3507
3508         - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
3509           improve performance by eliminating JSValue as a base class for JSCell
3510
3511         Tweak a little more to get closer to where we can make JSValuePtr a class.
3512
3513         * API/APICast.h:
3514         (toJS): Change back to JSValue* here, since we're converting the
3515         pointer type.
3516         * VM/CTI.cpp:
3517         (JSC::CTI::unlinkCall): Call asPointer.
3518         * VM/CTI.h: Cast to JSValue* here, since it's a pointer cast.
3519         * kjs/DebuggerCallFrame.h:
3520         (JSC::DebuggerCallFrame::DebuggerCallFrame): Call noValue.
3521         * kjs/JSGlobalData.cpp:
3522         (JSC::JSGlobalData::JSGlobalData): Call noValue.
3523         * kjs/JSImmediate.cpp:
3524         (JSC::JSImmediate::toObject): Remove unneeded const_cast.
3525         * kjs/JSWrapperObject.h:
3526         (JSC::JSWrapperObject::JSWrapperObject): Call noValue.
3527
3528 2008-10-18  Darin Adler  <darin@apple.com>
3529
3530         - fix non-all-in-one build
3531
3532         * kjs/completion.h:
3533         (JSC::Completion::Completion): Add include of JSValue.h.
3534
3535 2008-10-18  Darin Adler  <darin@apple.com>
3536
3537         Reviewed by Oliver Hunt.
3538
3539         - fix assertions I introduced with my casting changes
3540
3541         These were showing up as failures in the JavaScriptCore tests.
3542
3543         * VM/Machine.cpp:
3544         (JSC::Machine::cti_op_instanceof): Remove the bogus asCell casting that
3545         was at the top of the function, and instead cast at the point of use.
3546         (JSC::Machine::cti_op_construct_NotJSConstruct): Moved the cast to
3547         object after checking the construct type.
3548
3549 2008-10-18  Darin Adler  <darin@apple.com>
3550
3551         - fix non-all-in-one build
3552