Sort all our Xcode projects
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2009-07-10  Adam Roben  <aroben@apple.com>
2
3         Sort all our Xcode projects
4
5         Accomplished using sort-Xcode-project-file.
6
7         Requested by Dave Kilzer.
8
9         * JavaScriptCore.xcodeproj/project.pbxproj:
10
11 2009-07-09  Maciej Stachowiak  <mjs@apple.com>
12
13         Not reviewed, build fix.
14
15         Windows build fix for the last change.
16
17         * wtf/dtoa.cpp: Forgot to include Vector.h
18
19 2009-07-09  Maciej Stachowiak  <mjs@apple.com>
20
21         Reviewed by Darin Adler.
22
23         REGRESSION: crash in edge cases of floating point parsing.
24         https://bugs.webkit.org/show_bug.cgi?id=27110
25         <rdar://problem/7044458>
26         
27         Tests: fast/css/number-parsing-crash.html
28                fast/css/number-parsing-crash.html
29                fast/js/number-parsing-crash.html
30         
31         * wtf/dtoa.cpp:
32         (WTF::BigInt::BigInt): Converted this to more a proper class, using a Vector
33         with inline capacity
34
35         (WTF::lshift): Rearranged logic somewhat nontrivially to deal with the new way of sizing BigInts.
36         Added an assertion to verify that invariants are maintained.
37
38         All other functions are adapted fairly mechanically to the above changes.
39         (WTF::BigInt::clear):
40         (WTF::BigInt::size):
41         (WTF::BigInt::resize):
42         (WTF::BigInt::words):
43         (WTF::BigInt::append):
44         (WTF::multadd):
45         (WTF::s2b):
46         (WTF::i2b):
47         (WTF::mult):
48         (WTF::cmp):
49         (WTF::diff):
50         (WTF::b2d):
51         (WTF::d2b):
52         (WTF::ratio):
53         (WTF::strtod):
54         (WTF::quorem):
55         (WTF::dtoa):
56
57 2009-07-09  Drew Wilson  <atwilson@google.com>
58
59         Reviewed by Alexey Proskuryakov.
60
61         Turned on CHANNEL_MESSAGING by default because the MessageChannel API
62         can now be implemented for Web Workers and is reasonably stable.
63
64         * Configurations/FeatureDefines.xcconfig:
65
66 2009-07-09  Oliver Hunt  <oliver@apple.com>
67
68         Reviewed by NOBODY (Build fix).
69
70         * interpreter/Interpreter.cpp:
71         (JSC::Interpreter::privateExecute):
72
73 2009-07-09  Oliver Hunt  <oliver@apple.com>
74
75         Reviewed by Darin Adler.
76
77         Bug 27016 - Interpreter crashes due to invalid array indexes
78         <https://bugs.webkit.org/show_bug.cgi?id=27016>
79
80         Unsigned vs signed conversions results in incorrect behaviour in
81         64bit interpreter builds.
82
83         * interpreter/Interpreter.cpp:
84         (JSC::Interpreter::privateExecute):
85
86 2009-07-09  Dimitri Glazkov  <dglazkov@chromium.org>
87
88         Reviewed by Darin Fisher.
89
90         [Chromium] Upstream JavaScriptCore.gypi, the project file for Chromium build.
91         https://bugs.webkit.org/show_bug.cgi?id=27135
92
93         * JavaScriptCore.gypi: Added.
94
95 2009-07-09  Joe Mason  <joe.mason@torchmobile.com>
96
97         Reviewed by George Staikos.
98         
99         Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
100
101         https://bugs.webkit.org/show_bug.cgi?id=27031
102         Add an override for deleteOwnedPtr(HDC) on Windows
103         
104         * wtf/OwnPtrCommon.h:
105         * wtf/OwnPtrWin.cpp:
106         (WTF::deleteOwnedPtr):
107
108 2009-07-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
109
110         Reviewed by Darin Adler.
111
112         Guard singal.h dependency with HAVE(SIGNAL_H) to enable building jsc
113         on SYMBIAN.
114
115         https://bugs.webkit.org/show_bug.cgi?id=27026
116
117         Based on Norbert Leser's work.
118
119         * jsc.cpp:
120         (printUsageStatement):
121         (parseArguments):
122         * wtf/Platform.h:
123
124 2009-07-07  Gavin Barraclough  <barraclough@apple.com>
125
126         Reviewed by Sam Weinig.
127
128         Stop loading constants into the register file.
129
130         Instead, use high register values (highest bit bar the sign bit set) to indicate
131         constants in the instruction stream, and when we encounter such a value load it
132         directly from the CodeBlock.
133
134         Since constants are no longer copied into the register file, this patch renders
135         the 'unexpected constant' mechanism redundant, and removes it.
136
137         2% improvement, thanks to Sam Weinig.
138
139         * bytecode/CodeBlock.cpp:
140         (JSC::CodeBlock::dump):
141         (JSC::CodeBlock::CodeBlock):
142         (JSC::CodeBlock::mark):
143         (JSC::CodeBlock::shrinkToFit):
144         * bytecode/CodeBlock.h:
145         (JSC::CodeBlock::isTemporaryRegisterIndex):
146         (JSC::CodeBlock::constantRegister):
147         (JSC::CodeBlock::isConstantRegisterIndex):
148         (JSC::CodeBlock::getConstant):
149         (JSC::ExecState::r):
150         * bytecode/Opcode.h:
151         * bytecompiler/BytecodeGenerator.cpp:
152         (JSC::BytecodeGenerator::preserveLastVar):
153         (JSC::BytecodeGenerator::BytecodeGenerator):
154         (JSC::BytecodeGenerator::addConstantValue):
155         (JSC::BytecodeGenerator::emitEqualityOp):
156         (JSC::BytecodeGenerator::emitLoad):
157         (JSC::BytecodeGenerator::emitResolveBase):
158         (JSC::BytecodeGenerator::emitResolveWithBase):
159         (JSC::BytecodeGenerator::emitNewError):
160         * bytecompiler/BytecodeGenerator.h:
161         (JSC::BytecodeGenerator::emitNode):
162         * interpreter/CallFrame.h:
163         (JSC::ExecState::noCaller):
164         (JSC::ExecState::hasHostCallFrameFlag):
165         (JSC::ExecState::addHostCallFrameFlag):
166         (JSC::ExecState::removeHostCallFrameFlag):
167         * interpreter/Interpreter.cpp:
168         (JSC::Interpreter::resolve):
169         (JSC::Interpreter::resolveSkip):
170         (JSC::Interpreter::resolveGlobal):
171         (JSC::Interpreter::resolveBase):
172         (JSC::Interpreter::resolveBaseAndProperty):
173         (JSC::Interpreter::resolveBaseAndFunc):
174         (JSC::Interpreter::dumpRegisters):
175         (JSC::Interpreter::throwException):
176         (JSC::Interpreter::createExceptionScope):
177         (JSC::Interpreter::privateExecute):
178         (JSC::Interpreter::retrieveArguments):
179         * jit/JIT.cpp:
180         (JSC::JIT::privateCompileMainPass):
181         * jit/JITInlineMethods.h:
182         (JSC::JIT::emitLoadDouble):
183         (JSC::JIT::emitLoadInt32ToDouble):
184         * jit/JITOpcodes.cpp:
185         (JSC::JIT::emit_op_new_error):
186         (JSC::JIT::emit_op_enter):
187         (JSC::JIT::emit_op_enter_with_activation):
188         * parser/Nodes.cpp:
189         (JSC::DeleteResolveNode::emitBytecode):
190         (JSC::DeleteValueNode::emitBytecode):
191         (JSC::PrefixResolveNode::emitBytecode):
192         * runtime/JSActivation.cpp:
193         (JSC::JSActivation::JSActivation):
194         * wtf/Platform.h:
195
196 2009-07-07  Mark Rowe  <mrowe@apple.com>
197
198         Reviewed by Darin Adler.
199
200         Fix <https://bugs.webkit.org/show_bug.cgi?id=27025> / <rdar://problem/7033448>.
201         Bug 27025: Crashes and regression test failures related to regexps in 64-bit
202
203         For x86_64 RegexGenerator uses rbx, a callee-save register, as a scratch register but
204         neglects to save and restore it.  The change in handling of the output vector in r45545
205         altered code generation so that the RegExp::match was now storing important data in rbx,
206         which caused crashes and bogus results when it was clobbered.
207
208         * yarr/RegexJIT.cpp:
209         (JSC::Yarr::RegexGenerator::generateEnter): Save rbx.
210         (JSC::Yarr::RegexGenerator::generateReturn): Restore rbx.
211
212 2009-07-06  Ada Chan  <adachan@apple.com>
213
214         Reviewed by Darin Adler and Mark Rowe.
215
216         Decommitted spans are added to the list of normal spans rather than 
217         the returned spans in TCMalloc_PageHeap::Delete().
218         https://bugs.webkit.org/show_bug.cgi?id=26998
219         
220         In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in 
221         the process of merging with neighboring spans that are also decommitted.  
222         The merged span needs to be placed in the list of returned spans (spans 
223         whose memory has been returned to the system).  Right now it's always added 
224         to the list of the normal spans which can theoretically cause thrashing.  
225
226         * wtf/FastMalloc.cpp:
227         (WTF::TCMalloc_PageHeap::Delete):
228
229 2009-07-05  Lars Knoll  <lars.knoll@nokia.com>
230
231         Reviewed by Maciej Stachowiak.
232
233         https://bugs.webkit.org/show_bug.cgi?id=26843
234
235         Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
236
237         The Metrowerks compiler on the Symbian platform moves the globally
238         defined Hashtables into read-only memory, despite one of the members
239         being mutable. This causes crashes at run-time due to write access to
240         read-only memory.
241
242         Avoid the use of const with this compiler by introducing the
243         JSC_CONST_HASHTABLE macro.
244
245         Based on idea by Norbert Leser.
246
247         * runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW.
248         * create_hash_table: Use JSC_CONST_HASHTABLE for hashtables.
249         * runtime/JSGlobalData.cpp: Import various global hashtables via the macro.
250
251 2009-07-04  Dan Bernstein  <mitz@apple.com>
252
253         - debug build fix
254
255         * runtime/RegExpConstructor.cpp:
256         (JSC::RegExpConstructor::getLastParen):
257
258 2009-07-03  Yong Li  <yong.li@torchmobile.com>
259
260         Reviewed by Maciej Stachowiak (and revised slightly)
261
262         RegExp::match to be optimized
263         https://bugs.webkit.org/show_bug.cgi?id=26957
264
265         Allow regexp matching to use Vectors with inline capacity instead of
266         allocating a new ovector buffer every time.
267         
268         ~5% speedup on SunSpider string-unpack-code test, 0.3% on SunSpider overall.
269
270         * runtime/RegExp.cpp:
271         (JSC::RegExp::match):
272         * runtime/RegExp.h:
273         * runtime/RegExpConstructor.cpp:
274         (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
275         (JSC::RegExpConstructorPrivate::lastOvector):
276         (JSC::RegExpConstructorPrivate::tempOvector):
277         (JSC::RegExpConstructorPrivate::changeLastOvector):
278         (JSC::RegExpConstructor::performMatch):
279         (JSC::RegExpMatchesArray::RegExpMatchesArray):
280         (JSC::RegExpMatchesArray::fillArrayInstance):
281         (JSC::RegExpConstructor::getBackref):
282         (JSC::RegExpConstructor::getLastParen):
283         (JSC::RegExpConstructor::getLeftContext):
284         (JSC::RegExpConstructor::getRightContext):
285         * runtime/StringPrototype.cpp:
286         (JSC::stringProtoFuncSplit):
287
288 2009-06-30  Kwang Yul Seo  <skyul@company100.net>
289
290         Reviewed by Eric Seidel.
291
292         Override operator new/delete with const std::nothrow_t& as the second
293         argument.
294         https://bugs.webkit.org/show_bug.cgi?id=26792
295
296         On Windows CE, operator new/delete, new[]/delete[] with const
297         std::nothrow_t& must be overrided because some standard template
298         libraries use these operators.
299
300         The problem occurs when memory allocated by new(size_t s, const
301         std::nothrow_t&) is freed by delete(void* p). This causes the umatched
302         malloc/free problem.
303
304         The patch overrides all new, delete, new[] and delete[] to use
305         fastMaloc and fastFree consistently.
306
307         * wtf/FastMalloc.h:
308         (throw):
309
310 2009-06-30  Gabor Loki  <loki@inf.u-szeged.hu>
311
312         Reviewed by Sam Weinig.
313
314         <https://bugs.webkit.org/show_bug.cgi?id=24986>
315
316         Remove unnecessary references to AssemblerBuffer.
317
318         * interpreter/Interpreter.cpp:
319         * interpreter/Interpreter.h:
320
321 2009-06-29  David Levin  <levin@chromium.org>
322
323         Reviewed by Oliver Hunt.
324
325         Still seeing occasional leaks from UString::sharedBuffer code
326         https://bugs.webkit.org/show_bug.cgi?id=26420
327
328         The problem is that the pointer to the memory allocation isn't visible
329         by "leaks" due to the lower bits being used as flags.  The fix is to
330         make the pointer visible in memory (in debug only). The downside of
331         this fix that the memory allocated by sharedBuffer will still look like
332         a leak in non-debug builds when any flags are set.
333
334         * wtf/PtrAndFlags.h:
335         (WTF::PtrAndFlags::set):
336
337 2009-06-29  Sam Weinig  <sam@webkit.org>
338
339         Reviewed by Mark Rowe.
340
341         Remove more unused scons support.
342
343         * SConstruct: Removed.
344
345 2009-06-29  Oliver Hunt  <oliver@apple.com>
346
347         Reviewed by Gavin Barraclough.
348
349         <rdar://problem/7016214> JSON.parse fails to parse valid JSON with most Unicode characters
350         <https://bugs.webkit.org/show_bug.cgi?id=26802>
351
352         In the original JSON.parse patch unicode was handled correctly, however in some last
353         minute "clean up" I oversimplified isSafeStringCharacter.  This patch corrects this bug.
354
355         * runtime/LiteralParser.cpp:
356         (JSC::isSafeStringCharacter):
357         (JSC::LiteralParser::Lexer::lexString):
358
359 2009-06-26  Oliver Hunt  <oliver@apple.com>
360
361         Reviewed by Dan Bernstein.
362
363         <rdar://problem/7009684> REGRESSION(r45039): Crashes inside JSEvent::put on PowerPC (26746)
364         <https://bugs.webkit.org/show_bug.cgi?id=26746>
365
366         Fix for r45039 incorrectly uncached a get_by_id by converting it to put_by_id.  Clearly this
367         is less than correct.  This patch corrects that error.
368
369         * interpreter/Interpreter.cpp:
370         (JSC::Interpreter::tryCacheGetByID):
371
372 2009-06-26  Eric Seidel  <eric@webkit.org>
373
374         No review, only rolling out r45259.
375
376         Roll out r45259 after crash appeared on the bots:
377         plugins/undefined-property-crash.html
378         ASSERTION FAILED: s <= HeapConstants<heapType>::cellSize
379         (leopard-intel-debug-tests/build/JavaScriptCore/runtime/Collector.cpp:278
380         void* JSC::Heap::heapAllocate(size_t) [with JSC::HeapType heapType = PrimaryHeap])
381
382         * runtime/DateInstance.cpp:
383         * runtime/Identifier.cpp:
384         * runtime/Lookup.h:
385         * runtime/RegExpConstructor.cpp:
386         * runtime/RegExpObject.h:
387         * runtime/ScopeChain.h:
388         * runtime/UString.h:
389
390 2009-06-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
391
392         Reviewed by Simon Hausmann.
393
394         Add support for QDataStream operators to Vector.
395
396         * wtf/Vector.h:
397         (WTF::operator<<):
398         (WTF::operator>>):
399
400 2009-06-24  Sam Weinig  <sam@webkit.org>
401
402         Reviewed by Gavin Barraclough.
403
404         Make the opcode sampler work once again.
405
406         * jit/JIT.h:
407         (JSC::JIT::compileGetByIdProto):
408         (JSC::JIT::compileGetByIdSelfList):
409         (JSC::JIT::compileGetByIdProtoList):
410         (JSC::JIT::compileGetByIdChainList):
411         (JSC::JIT::compileGetByIdChain):
412         (JSC::JIT::compilePutByIdTransition):
413         (JSC::JIT::compileCTIMachineTrampolines):
414         (JSC::JIT::compilePatchGetArrayLength):
415         * jit/JITStubCall.h:
416         (JSC::JITStubCall::call):
417
418 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
419
420         Reviewed by Maciej Stachowiak.
421
422         Extend FastAllocBase.h with 'using WTF::FastAllocBase' to avoid
423         unnecessary WTF:: usings.
424         Remove existing unnecessary WTF:: usings.
425
426         * interpreter/Interpreter.h:
427         * profiler/CallIdentifier.h:
428         * runtime/ScopeChain.h:
429         * wtf/FastAllocBase.h:
430
431 2009-06-24  David Levin  <levin@chromium.org>
432
433         Fix all builds.
434
435         * bytecode/CodeBlock.h:
436         * bytecompiler/BytecodeGenerator.h:
437         * interpreter/Register.h:
438
439 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
440
441         Reviewed by Maciej Stachowiak.
442         
443         https://bugs.webkit.org/show_bug.cgi?id=26677
444
445         Inherits CodeBlock class from FastAllocBase because it
446         has been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.h:217.
447
448         * bytecode/CodeBlock.h:
449
450 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
451
452         Reviewed by Maciej Stachowiak.
453         
454         https://bugs.webkit.org/show_bug.cgi?id=26676
455
456         Inherits BytecodeGenerator class from FastAllocBase because it has been
457         instantiated by 'new' in JavaScriptCore/parser/Nodes.cpp:1892.
458
459         * bytecompiler/BytecodeGenerator.h:
460
461 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
462
463         Reviewed by Maciej Stachowiak.
464         
465         https://bugs.webkit.org/show_bug.cgi?id=26675
466
467         Inherits Register class from FastAllocBase because it has been
468         instantiated by 'new' in JavaScriptCore/runtime/JSVariableObject.h:149.
469
470         * interpreter/Register.h:
471
472 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
473
474         Reviewed by Darin Adler.
475         
476         https://bugs.webkit.org/show_bug.cgi?id=26674
477
478         Inherits HashMap class from FastAllocBase because it has been
479         instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:458.
480
481         * wtf/HashMap.h:
482
483 2009-06-24  Oliver Hunt  <oliver@apple.com>
484
485         Reviewed by Darin Adler.
486
487         <rdar://problem/6940519> REGRESSION (Safari 4 Public Beta - TOT): google.com/adplanner shows blank page instead of site details in "basic research'
488
489         The problem was caused by the page returned with a function using a
490         var declaration list containing around ~3000 variables.  The solution
491         to this is to flatten the comma expression representation and make
492         codegen comma expressions and initializer lists iterative rather than
493         recursive.
494
495         * parser/Grammar.y:
496         * parser/NodeConstructors.h:
497         (JSC::CommaNode::CommaNode):
498         * parser/Nodes.cpp:
499         (JSC::CommaNode::emitBytecode):
500         * parser/Nodes.h:
501         (JSC::ExpressionNode::isCommaNode):
502         (JSC::CommaNode::isCommaNode):
503         (JSC::CommaNode::append):
504
505 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
506
507         Reviewed by Maciej Stachowiak.
508
509         https://bugs.webkit.org/show_bug.cgi?id=26645
510
511         Inherits ScopeChainNode class from FastAllocBase because it has been
512         instantiated by 'new' in JavaScriptCore/runtime/ScopeChain.h:95.
513
514         * wtf/RefPtr.h:
515
516 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
517
518         Reviewed by Darin Adler.
519
520         https://bugs.webkit.org/show_bug.cgi?id=26648
521
522         Inherits Deque class from FastAllocBase because it has been
523         instantiated by 'new' with DEFINE_STATIC_LOCAL macro in 
524         JavaScriptCore/wtf/MainThread.cpp:62.
525
526         * wtf/Deque.h:
527
528 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
529
530         Reviewed by Darin Adler.
531
532         https://bugs.webkit.org/show_bug.cgi?id=26644
533
534         Inherits RefPtr class from FastAllocBase because it has been
535         instantiated by 'new' in JavaScriptCore/runtime/StructureChain.cpp:41.
536
537         * wtf/RefPtr.h:
538
539 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
540
541         Reviewed by Darin Adler.
542
543         Inherits HashSet class from FastAllocBase, because it has been
544         instantiated by 'new' in JavaScriptCore/runtime/Collector.h:116.
545
546         * wtf/HashSet.h:
547
548 2009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
549
550         Reviewed by Darin Adler.
551
552         Inherits Vector class from FastAllocBase because it has been
553         instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:633.
554
555         * wtf/Vector.h:
556
557 2009-06-24  Norbert Leser  <norbert.leser@nokia.com>
558
559         Reviewed by Maciej Stachoviak.
560
561         The BytecodeGenerator objects were instantiated on stack, which takes up ~38kB per instance
562         (each instance includes copy of JSC::CodeBlock with large SymbolTable, etc.).
563         Specifically, since there is nested invocation (e.g., GlobalCode --> FunctionCode),
564         the stack overflows immediately on Symbian hardware (max. 80 kB).
565         Proposed change allocates generator objects on heap.
566         Performance impact (if any) should be negligible and change is proposed as general fix,
567         rather than ifdef'd for SYMBIAN.
568
569         * parser/Nodes.cpp:
570         (JSC::ProgramNode::generateBytecode):
571         (JSC::EvalNode::generateBytecode):
572         (JSC::EvalNode::bytecodeForExceptionInfoReparse):
573         (JSC::FunctionBodyNode::generateBytecode):
574         (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):
575
576 2009-06-23  Oliver Hunt  <oliver@apple.com>
577
578         Reviewed by Gavin Barraclough.
579
580         <rdar://problem/6992806> REGRESSION: Enumeration can skip new properties in cases of prototypes that have more than 64 (26593)
581         <https://bugs.webkit.org/show_bug.cgi?id=26593>
582
583         Do not attempt to cache structure chains if they contain a dictionary at any level.
584
585         * interpreter/Interpreter.cpp:
586         (JSC::Interpreter::tryCachePutByID):
587         (JSC::Interpreter::tryCacheGetByID):
588         * jit/JITStubs.cpp:
589         (JSC::JITThunks::tryCachePutByID):
590         * runtime/Structure.cpp:
591         (JSC::Structure::getEnumerablePropertyNames):
592         (JSC::Structure::addPropertyTransition):
593         * runtime/StructureChain.cpp:
594         (JSC::StructureChain::isCacheable):
595         * runtime/StructureChain.h:
596
597 2009-06-23  Yong Li  <yong.li@torchmobile.com>
598
599         Reviewed by George Staikos.
600
601         https://bugs.webkit.org/show_bug.cgi?id=26654
602         Add the proper export define for the JavaScriptCore API when building for WINCE.
603
604         * API/JSBase.h:
605
606 2009-06-23  Joe Mason  <joe.mason@torchmobile.com>
607
608         Reviewed by Adam Treat.
609
610         Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
611
612         https://bugs.webkit.org/show_bug.cgi?id=26611
613         Implement currentThreadStackBase on WINCE by adding a global,
614         g_stackBase, which must be set to the address of a local variable
615         by the caller before calling any WebKit function that invokes JSC.
616
617         * runtime/Collector.cpp:
618         (JSC::isPageWritable):
619         (JSC::getStackBase):
620           Starts at the top of the stack and returns the entire range of
621           consecutive writable pages as an estimate of the actual stack.
622           This will be much bigger than the actual stack range, so some
623           dead objects can't be collected, but it guarantees live objects
624           aren't collected prematurely.
625
626         (JSC::currentThreadStackBase):
627           On WinCE, returns g_stackBase if set or call getStackBase as a
628           fallback if not.
629
630 2009-06-23  Oliver Hunt  <oliver@apple.com>
631
632         Reviewed by Alexey Proskuryakov.
633
634         Fix stupid performance problem in the LiteralParser
635
636         The LiteralParser was making a new UString in order to use
637         toDouble, however UString's toDouble allows a much wider range
638         of numberic strings than the LiteralParser accepts, and requires
639         an additional heap allocation or two for the construciton of the
640         UString.  To rectify this we just call WTF::dtoa directly using
641         a stack allocated buffer to hold the validated numeric literal.
642
643         * runtime/LiteralParser.cpp:
644         (JSC::LiteralParser::Lexer::lexNumber):
645         (JSC::LiteralParser::parse):
646         * runtime/LiteralParser.h:
647
648 2009-06-22  Oliver Hunt  <oliver@apple.com>
649
650         Reviewed by Alexey Proskuryakov.
651
652         Bug 26640: JSON.stringify needs to special case Boolean objects
653         <https://bugs.webkit.org/show_bug.cgi?id=26640>
654
655         Add special case handling of the Boolean object so we match current
656         ES5 errata.
657
658         * runtime/JSONObject.cpp:
659         (JSC::unwrapBoxedPrimitive): renamed from unwrapNumberOrString
660         (JSC::gap):
661         (JSC::Stringifier::appendStringifiedValue):
662
663 2009-06-22  Oliver Hunt  <oliver@apple.com>
664
665         Reviewed by Darin Adler.
666
667         Bug 26591: Support revivers in JSON.parse
668         <https://bugs.webkit.org/show_bug.cgi?id=26591>
669
670         Add reviver support to JSON.parse.  This completes the JSON object.
671
672         * runtime/JSONObject.cpp:
673         (JSC::Walker::Walker):
674         (JSC::Walker::callReviver):
675         (JSC::Walker::walk):
676         (JSC::JSONProtoFuncParse):
677
678 2009-06-21  Oliver Hunt  <oliver@apple.com>
679
680         Reviewed by Darin Adler.
681
682         Bug 26592: Support standard toJSON functions
683         <https://bugs.webkit.org/show_bug.cgi?id=26592>
684
685         Add support for the standard Date.toJSON function.
686
687         * runtime/DatePrototype.cpp:
688         (JSC::dateProtoFuncToJSON):
689
690 2009-06-21  Oliver Hunt  <oliver@apple.com>
691
692         Reviewed by Sam Weinig.
693
694         Bug 26594: JSC needs to support Date.toISOString
695         <https://bugs.webkit.org/show_bug.cgi?id=26594>
696
697         Add support for Date.toISOString.
698
699         * runtime/DatePrototype.cpp:
700         (JSC::dateProtoFuncToISOString):
701
702 2009-06-21  Oliver Hunt  <oliver@apple.com>
703
704         Reviewed by NOBODY (Build fix).
705
706         Remove dead code.
707
708         * runtime/LiteralParser.cpp:
709         (JSC::LiteralParser::parse):
710
711 2009-06-21  Oliver Hunt  <oliver@apple.com>
712
713         Reviewed by Darin Adler and Cameron Zwarich.
714
715         Bug 26587: Support JSON.parse
716         <https://bugs.webkit.org/show_bug.cgi?id=26587>
717
718         Extend the LiteralParser to support the full strict JSON
719         grammar, fix a few places where the grammar was incorrectly
720         lenient.   Doesn't yet support the JSON.parse reviver function
721         but that does not block the JSON.parse functionality itself.
722
723         * interpreter/Interpreter.cpp:
724         (JSC::Interpreter::callEval):
725         * runtime/JSGlobalObjectFunctions.cpp:
726         (JSC::globalFuncEval):
727         * runtime/JSONObject.cpp:
728         (JSC::JSONProtoFuncParse):
729         * runtime/LiteralParser.cpp:
730         (JSC::LiteralParser::Lexer::lex):
731         (JSC::isSafeStringCharacter):
732         (JSC::LiteralParser::Lexer::lexString):
733         (JSC::LiteralParser::parse):
734         * runtime/LiteralParser.h:
735         (JSC::LiteralParser::LiteralParser):
736         (JSC::LiteralParser::tryJSONParse):
737         (JSC::LiteralParser::):
738         (JSC::LiteralParser::Lexer::Lexer):
739
740 2009-06-21  David Levin  <levin@chromium.org>
741
742         Reviewed by NOBODY (speculative build fix for windows).
743
744         Simply removed some whitespace form this file to make windows build wtf and
745         hopefully copy the new MessageQueque.h so that WebCore picks it up.
746
747         * wtf/Assertions.cpp:
748
749 2009-06-21  Drew Wilson  <atwilson@google.com>
750
751         Reviewed by David Levin.
752
753         <https://bugs.webkit.org/show_bug.cgi?id=25043>
754         Added support for multi-threaded MessagePorts.
755
756         * wtf/MessageQueue.h:
757         (WTF::::appendAndCheckEmpty):
758             Added API to test whether the queue was empty before adding an element.
759   
760 2009-06-20  David D. Kilzer  <ddkilzer@webkit.org>
761
762         Fix namespace comment in SegmentedVector.h
763
764         * wtf/SegmentedVector.h: Updated namespace comment to reflect
765         new namespace after r44897.
766
767 2009-06-20  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
768
769         Bug 24986: ARM JIT port
770         <https://bugs.webkit.org/show_bug.cgi?id=24986>
771
772         Reviewed by Oliver Hunt.
773
774         An Iterator added for SegmentedVector. Currently
775         only the pre ++ operator is supported.
776
777         * wtf/SegmentedVector.h:
778         (WTF::SegmentedVectorIterator::~SegmentedVectorIterator):
779         (WTF::SegmentedVectorIterator::operator*):
780         (WTF::SegmentedVectorIterator::operator->):
781         (WTF::SegmentedVectorIterator::operator++):
782         (WTF::SegmentedVectorIterator::operator==):
783         (WTF::SegmentedVectorIterator::operator!=):
784         (WTF::SegmentedVectorIterator::operator=):
785         (WTF::SegmentedVectorIterator::SegmentedVectorIterator):
786         (WTF::SegmentedVector::alloc):
787         (WTF::SegmentedVector::begin):
788         (WTF::SegmentedVector::end):
789
790 2009-06-20  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
791
792         Bug 24986: ARM JIT port
793         <https://bugs.webkit.org/show_bug.cgi?id=24986>
794
795         Reviewed by Oliver Hunt.
796
797         Move SegmentedVector to /wtf subdirectory
798         and change "namespace JSC" to "namespace WTF"
799
800         Additional build file updates by David Kilzer.
801
802         * GNUmakefile.am: Updated path to SegmentedVector.h.
803         * JavaScriptCore.order: Updated SegmentedVector namespace from
804         JSC to WTF in mangled C++ method name.
805         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
806         Removed reference to bytecompiler\SegmentedVector.h.
807         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added reference to
808         wtf\SegmentedVector.h.
809         * JavaScriptCore.xcodeproj/project.pbxproj: Moved
810         SegmentedVector.h definition from bytecompiler subdirectory to
811         wtf subdirectory.
812         * bytecompiler/BytecodeGenerator.h: Updated #include path to
813         SegmentedVector.h and prepended WTF:: namespace to its use.
814         * parser/Lexer.h: Ditto.
815         * wtf/SegmentedVector.h: Renamed from JavaScriptCore/bytecompiler/SegmentedVector.h.
816         (WTF::SegmentedVector::SegmentedVector):
817         (WTF::SegmentedVector::~SegmentedVector):
818         (WTF::SegmentedVector::size):
819         (WTF::SegmentedVector::at):
820         (WTF::SegmentedVector::operator[]):
821         (WTF::SegmentedVector::last):
822         (WTF::SegmentedVector::append):
823         (WTF::SegmentedVector::removeLast):
824         (WTF::SegmentedVector::grow):
825         (WTF::SegmentedVector::clear):
826         (WTF::SegmentedVector::deleteAllSegments):
827         (WTF::SegmentedVector::segmentExistsFor):
828         (WTF::SegmentedVector::segmentFor):
829         (WTF::SegmentedVector::subscriptFor):
830         (WTF::SegmentedVector::ensureSegmentsFor):
831         (WTF::SegmentedVector::ensureSegment):
832
833 2009-06-19  Gavin Barraclough  <barraclough@apple.com>
834
835         Reviewed by NOBODY (build fix take 2 - rename FIELD_OFFSET to something that doesn't conflict with winnt.h).
836
837         * jit/JIT.cpp:
838         (JSC::JIT::privateCompile):
839         (JSC::JIT::privateCompileCTIMachineTrampolines):
840         (JSC::JIT::emitGetVariableObjectRegister):
841         (JSC::JIT::emitPutVariableObjectRegister):
842         * jit/JIT.h:
843         * jit/JITArithmetic.cpp:
844         (JSC::JIT::emit_op_rshift):
845         (JSC::JIT::emitSlow_op_jnless):
846         (JSC::JIT::emitSlow_op_jnlesseq):
847         (JSC::JIT::compileBinaryArithOp):
848         * jit/JITCall.cpp:
849         (JSC::JIT::compileOpCallInitializeCallFrame):
850         (JSC::JIT::compileOpCall):
851         * jit/JITInlineMethods.h:
852         (JSC::JIT::restoreArgumentReference):
853         (JSC::JIT::checkStructure):
854         * jit/JITOpcodes.cpp:
855         (JSC::JIT::emit_op_instanceof):
856         (JSC::JIT::emit_op_get_scoped_var):
857         (JSC::JIT::emit_op_put_scoped_var):
858         (JSC::JIT::emit_op_construct_verify):
859         (JSC::JIT::emit_op_resolve_global):
860         (JSC::JIT::emit_op_jeq_null):
861         (JSC::JIT::emit_op_jneq_null):
862         (JSC::JIT::emit_op_to_jsnumber):
863         (JSC::JIT::emit_op_catch):
864         (JSC::JIT::emit_op_eq_null):
865         (JSC::JIT::emit_op_neq_null):
866         (JSC::JIT::emit_op_convert_this):
867         (JSC::JIT::emit_op_profile_will_call):
868         (JSC::JIT::emit_op_profile_did_call):
869         (JSC::JIT::emitSlow_op_get_by_val):
870         * jit/JITPropertyAccess.cpp:
871         (JSC::JIT::emit_op_get_by_val):
872         (JSC::JIT::emit_op_put_by_val):
873         (JSC::JIT::emit_op_method_check):
874         (JSC::JIT::compileGetByIdHotPath):
875         (JSC::JIT::emit_op_put_by_id):
876         (JSC::JIT::compilePutDirectOffset):
877         (JSC::JIT::compileGetDirectOffset):
878         (JSC::JIT::privateCompilePutByIdTransition):
879         (JSC::JIT::privateCompilePatchGetArrayLength):
880         * jit/JITStubs.cpp:
881         (JSC::JITThunks::JITThunks):
882
883 2009-06-19  Gavin Barraclough  <barraclough@apple.com>
884
885         Reviewed by NOBODY (Windows build fix).
886
887         * jit/JIT.h:
888         * jit/JITInlineMethods.h:
889
890 2009-06-19  Gabor Loki  <loki@inf.u-szeged.hu>
891
892         Reviewed by Gavin Barraclough.
893
894         Reorganize ARM architecture specific macros.
895         Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7).
896
897         Bug 24986: ARM JIT port
898         <https://bugs.webkit.org/show_bug.cgi?id=24986>
899
900         * assembler/ARMv7Assembler.h:
901         * assembler/AbstractMacroAssembler.h:
902         (JSC::AbstractMacroAssembler::Imm32::Imm32):
903         * assembler/MacroAssembler.h:
904         * assembler/MacroAssemblerCodeRef.h:
905         (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
906         * jit/ExecutableAllocator.h:
907         (JSC::ExecutableAllocator::cacheFlush):
908         * jit/JIT.h:
909         * jit/JITInlineMethods.h:
910         (JSC::JIT::restoreArgumentReferenceForTrampoline):
911         * jit/JITStubs.cpp:
912         * jit/JITStubs.h:
913         * wtf/Platform.h:
914         * yarr/RegexJIT.cpp:
915         (JSC::Yarr::RegexGenerator::generateEnter):
916         (JSC::Yarr::RegexGenerator::generateReturn):
917
918 2009-06-19  Gavin Barraclough  <barraclough@apple.com>
919
920         Reviewed by Oliver Hunt.
921
922         Fix armv7 JIT build issues.
923
924         Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it now contains non POD types),
925         and the FIELD_OFFSET macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT macros.
926
927         * Replace offsetofs with FIELD_OFFSETs (safe on C++ objects).
928         * Move COMPILE_ASSERTs defending layout of JITStackFrame structure on armv7 into JITThunks constructor.
929
930         * jit/JIT.cpp:
931         * jit/JIT.h:
932         * jit/JITInlineMethods.h:
933         (JSC::JIT::restoreArgumentReference):
934         * jit/JITOpcodes.cpp:
935         (JSC::JIT::emit_op_catch):
936         * jit/JITStubs.cpp:
937         (JSC::JITThunks::JITThunks):
938
939 2009-06-19  Adam Treat  <adam.treat@torchmobile.com>
940
941         Blind attempt at build fix.
942
943         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
944         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
945
946 2009-06-19  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
947
948         Reviewed by Oliver Hunt.
949
950         Inherits CallIdentifier struct from FastAllocBase because it has been
951         instantiated by 'new' in JavaScriptCore/profiler/CallIdentifier.h:86.
952
953         * wtf/HashCountedSet.h:
954
955 2009-06-19  Adam Treat  <adam.treat@torchmobile.com>
956
957         Reviewed by Oliver Hunt.
958
959         https://bugs.webkit.org/show_bug.cgi?id=26540
960         Modify the test shell to add a new function 'checkSyntax' that will
961         only parse the source instead of executing it. In this way we can test
962         pure parsing performance against some of the larger scripts in the wild.
963
964         * jsc.cpp:
965         (GlobalObject::GlobalObject):
966         (functionCheckSyntax):
967
968 2009-06-19  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
969
970         Reviewed by Darin Adler.
971         
972         Inherits HashCountedSet class from FastAllocBase because it has been
973         instantiated by 'new' in JavaScriptCore/runtime/Collector.cpp:1095.
974
975         * wtf/HashCountedSet.h:
976
977 2009-06-19  Yong Li  <yong.li@torchmobile.com>
978
979         Reviewed by George Staikos.
980
981         https://bugs.webkit.org/show_bug.cgi?id=26558
982         Declare these symbols extern for WINCE as they are provided by libce.
983
984         * runtime/DateConstructor.cpp:
985         * runtime/DatePrototype.cpp:
986         (JSC::formatLocaleDate):
987
988 2009-06-19  Oliver Hunt  <oliver@apple.com>
989
990         Reviewed by Maciej Stachowiak.
991
992         <rdar://problem/6988973> ScopeChain leak in interpreter builds
993
994         Move the Scopechain destruction code in JSFunction outside of the ENABLE(JIT)
995         path.
996
997         * runtime/JSFunction.cpp:
998         (JSC::JSFunction::~JSFunction):
999         * wtf/Platform.h:
1000
1001 2009-06-19  Yong Li  <yong.li@torchmobile.com>
1002
1003         Reviewed by George Staikos.
1004
1005         https://bugs.webkit.org/show_bug.cgi?id=26543
1006         Windows CE uses 'GetLastError' instead of 'errno.'
1007
1008         * interpreter/RegisterFile.h:
1009         (JSC::RegisterFile::RegisterFile):
1010         (JSC::RegisterFile::grow):
1011
1012 2009-06-19  David Levin  <levin@chromium.org>
1013
1014         Reviewed by NOBODY (Windows build fix).
1015
1016         Add export for Windows corresponding to OSX export done in r44844.
1017         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1018         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1019
1020 2009-06-18  Oliver Hunt  <oliver@apple.com>
1021
1022         Reviewed by Gavin "Viceroy of Venezuela" Barraclough.
1023
1024         Bug 26532: Native functions do not correctly unlink from optimised callsites when they're collected
1025         <https://bugs.webkit.org/show_bug.cgi?id=26532> <rdar://problem/6625385>
1026
1027         We need to make sure that each native function instance correctly unlinks any references to it
1028         when it is collected.  Allowing this to happen required a few changes:
1029             * Every native function needs a codeblock to track the link information
1030             * To have this codeblock, every function now also needs its own functionbodynode
1031               so we no longer get to have a single shared instance.
1032             * Identifying a host function is now done by looking for CodeBlock::codeType() == NativeCode
1033
1034         * JavaScriptCore.exp:
1035         * bytecode/CodeBlock.cpp:
1036         (JSC::CodeBlock::CodeBlock):
1037            Constructor for NativeCode CodeBlock
1038         (JSC::CodeBlock::derefStructures):
1039         (JSC::CodeBlock::refStructures):
1040         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
1041         (JSC::CodeBlock::handlerForBytecodeOffset):
1042         (JSC::CodeBlock::lineNumberForBytecodeOffset):
1043         (JSC::CodeBlock::expressionRangeForBytecodeOffset):
1044         (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
1045         (JSC::CodeBlock::functionRegisterForBytecodeOffset):
1046         (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
1047         (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
1048         (JSC::CodeBlock::setJITCode):
1049            Add assertions to ensure we don't try and use NativeCode CodeBlocks as
1050            a normal codeblock.
1051
1052         * bytecode/CodeBlock.h:
1053         (JSC::):
1054         (JSC::CodeBlock::source):
1055         (JSC::CodeBlock::sourceOffset):
1056         (JSC::CodeBlock::evalCodeCache):
1057         (JSC::CodeBlock::createRareDataIfNecessary):
1058           More assertions.
1059
1060         * jit/JIT.cpp:
1061         (JSC::JIT::privateCompileCTIMachineTrampolines):
1062         (JSC::JIT::linkCall):
1063           Update logic to allow native function caching
1064
1065         * jit/JITStubs.cpp:
1066         * parser/Nodes.cpp:
1067         (JSC::FunctionBodyNode::createNativeThunk):
1068         (JSC::FunctionBodyNode::isHostFunction):
1069         * parser/Nodes.h:
1070         * runtime/JSFunction.cpp:
1071         (JSC::JSFunction::JSFunction):
1072         (JSC::JSFunction::~JSFunction):
1073         (JSC::JSFunction::mark):
1074         * runtime/JSGlobalData.cpp:
1075         (JSC::JSGlobalData::~JSGlobalData):
1076         * runtime/JSGlobalData.h:
1077
1078 2009-06-18  Gavin Barraclough  <barraclough@apple.com>
1079
1080         Reviewed by NOBODY (Windows build fix).
1081
1082         * wtf/DateMath.cpp:
1083         (WTF::calculateUTCOffset):
1084
1085 2009-06-18  Gavin Barraclough  <barraclough@apple.com>
1086
1087         Reviewed by Geoff Garen.
1088
1089         Timezone calculation incorrect in Venezuela.
1090
1091         https://bugs.webkit.org/show_bug.cgi?id=26531
1092         <rdar://problem/6646169> Time is incorrectly reported to JavaScript in both Safari 3 and Firefox 3
1093
1094         The problem is that we're calculating the timezone relative to 01/01/2000,
1095         but the VET timezone changed from -4 hours to -4:30 hours on 12/09/2007.
1096         According to the spec, section 15.9.1.9 states "the time since the beginning
1097         of the year", presumably meaning the *current* year.  Change the calculation
1098         to be based on whatever the current year is, rather than a canned date.
1099
1100         No performance impact.
1101
1102         * wtf/DateMath.cpp:
1103         (WTF::calculateUTCOffset):
1104
1105 2009-06-18  Gavin Barraclough  <barraclough@apple.com>
1106
1107         Rubber Stamped by Mark Rowe (originally reviewed by Sam Weinig).
1108
1109         (Reintroducing patch added in r44492, and reverted in r44796.)
1110
1111         Change the implementation of op_throw so the stub function always modifies its
1112         return address - if it doesn't find a 'catch' it will switch to a trampoline
1113         to force a return from JIT execution.  This saves memory, by avoiding the need
1114         for a unique return for every op_throw.
1115
1116         * jit/JITOpcodes.cpp:
1117         (JSC::JIT::emit_op_throw):
1118             JITStubs::cti_op_throw now always changes its return address,
1119             remove return code generated after the stub call (this is now
1120             handled by ctiOpThrowNotCaught).
1121         * jit/JITStubs.cpp:
1122         (JSC::):
1123             Add ctiOpThrowNotCaught definitions.
1124         (JSC::JITStubs::DEFINE_STUB_FUNCTION):
1125             Change cti_op_throw to always change its return address.
1126         * jit/JITStubs.h:
1127             Add ctiOpThrowNotCaught declaration.
1128
1129 2009-06-18  Kevin McCullough  <kmccullough@apple.com>
1130
1131         Reviewed by Oliver Hunt.
1132
1133         <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
1134
1135         - Exposed functions now needed by WebCore.
1136
1137         * JavaScriptCore.exp:
1138
1139 2009-06-17  Darin Adler  <darin@apple.com>
1140
1141         Reviewed by Oliver Hunt.
1142
1143         Bug 26429: Make JSON.stringify non-recursive so it can handle objects
1144         of arbitrary complexity
1145         https://bugs.webkit.org/show_bug.cgi?id=26429
1146
1147         For marking I decided not to use gcProtect, because this is inside the engine
1148         so it's easy enough to just do marking. And that darned gcProtect does locking!
1149         Oliver tried to convince me to used MarkedArgumentBuffer, but the constructor
1150         for that class says "FIXME: Remove all clients of this API, then remove this API."
1151
1152         * runtime/Collector.cpp:
1153         (JSC::Heap::collect): Add a call to JSONObject::markStringifiers.
1154
1155         * runtime/CommonIdentifiers.cpp:
1156         (JSC::CommonIdentifiers::CommonIdentifiers): Added emptyIdentifier.
1157         * runtime/CommonIdentifiers.h: Ditto.
1158
1159         * runtime/JSGlobalData.cpp:
1160         (JSC::JSGlobalData::JSGlobalData): Initialize firstStringifierToMark to 0.
1161         * runtime/JSGlobalData.h: Added firstStringifierToMark.
1162
1163         * runtime/JSONObject.cpp: Cut down the includes to the needed ones only.
1164         (JSC::unwrapNumberOrString): Added. Helper for unwrapping number and string
1165         objects to get their number and string values.
1166         (JSC::ReplacerPropertyName::ReplacerPropertyName): Added. The class is used
1167         to wrap an identifier or integer so we don't have to do any work unless we
1168         actually call a replacer.
1169         (JSC::ReplacerPropertyName::value): Added.
1170         (JSC::gap): Added. Helper function for the Stringifier constructor.
1171         (JSC::PropertyNameForFunctionCall::PropertyNameForFunctionCall): Added.
1172         The class is used to wrap an identifier or integer so we don't have to
1173         allocate a number or string until we actually call toJSON or a replacer.
1174         (JSC::PropertyNameForFunctionCall::asJSValue): Added.
1175         (JSC::Stringifier::Stringifier): Updated and moved out of the class
1176         definition. Added code to hook this into a singly linked list for marking.
1177         (JSC::Stringifier::~Stringifier): Remove from the singly linked list.
1178         (JSC::Stringifier::mark): Mark all the objects in the holder stacks.
1179         (JSC::Stringifier::stringify): Updated.
1180         (JSC::Stringifier::appendQuotedString): Tweaked and streamlined a bit.
1181         (JSC::Stringifier::toJSON): Renamed from toJSONValue.
1182         (JSC::Stringifier::appendStringifiedValue): Renamed from stringify.
1183         Added code to use the m_holderStack to do non-recursive stringify of
1184         objects and arrays. This code also uses the timeout checker since in
1185         pathological cases it could be slow even without calling into the
1186         JavaScript virtual machine.
1187         (JSC::Stringifier::willIndent): Added.
1188         (JSC::Stringifier::indent): Added.
1189         (JSC::Stringifier::unindent): Added.
1190         (JSC::Stringifier::startNewLine): Added.
1191         (JSC::Stringifier::Holder::Holder): Added.
1192         (JSC::Stringifier::Holder::appendNextProperty): Added. This is the
1193         function that handles the format of arrays and objects.
1194         (JSC::JSONObject::getOwnPropertySlot): Moved this down to the bottom
1195         of the file so the JSONObject class is not interleaved with the
1196         Stringifier class.
1197         (JSC::JSONObject::markStringifiers): Added. Calls mark.
1198         (JSC::JSONProtoFuncStringify): Streamlined the code here. The code
1199         to compute the gap string is now a separate function.
1200
1201         * runtime/JSONObject.h: Made everything private. Added markStringifiers.
1202
1203 2009-06-17  Oliver Hunt  <oliver@apple.com>
1204
1205         Reviewed by Gavin Barraclough.
1206
1207         <rdar://problem/6974140> REGRESSION(r43849): Crash in cti_op_call_NotJSFunction when getting directions on maps.google.com
1208
1209         Roll out r43849 as it appears that we cannot rely on the address of
1210         an objects property storage being constant even if the structure is
1211         unchanged.
1212
1213         * jit/JIT.h:
1214         * jit/JITPropertyAccess.cpp:
1215         (JSC::JIT::compileGetDirectOffset):
1216         (JSC::JIT::privateCompileGetByIdProto):
1217         (JSC::JIT::privateCompileGetByIdProtoList):
1218         (JSC::JIT::privateCompileGetByIdChainList):
1219         (JSC::JIT::privateCompileGetByIdChain):
1220
1221 2009-06-17  Gavin Barraclough  <barraclough@apple.com>
1222
1223         Rubber Stamped by Mark Rowe.
1224
1225         Fully revert r44492 & r44748 while we fix a bug they cause on internal builds <rdar://problem/6955963>.
1226
1227         * jit/JITOpcodes.cpp:
1228         (JSC::JIT::emit_op_throw):
1229         * jit/JITStubs.cpp:
1230         (JSC::):
1231         (JSC::JITStubs::DEFINE_STUB_FUNCTION):
1232         * jit/JITStubs.h:
1233
1234 2009-06-17  Gavin Barraclough  <barraclough@apple.com>
1235
1236         Reviewed by Mark Rowe.
1237
1238         <rdar://problem/6947426> sunspider math-cordic.js exhibits different intermediate results running 32-bit vs. 64-bit
1239
1240         On 64-bit, NaN-encoded values must be detagged before they can be used in rshift.
1241
1242         No performance impact.
1243
1244         * jit/JITArithmetic.cpp:
1245         (JSC::JIT::emit_op_rshift):
1246
1247 2009-06-17  Adam Treat  <adam.treat@torchmobile.com>
1248
1249         Reviewed by George Staikos.
1250
1251         https://bugs.webkit.org/show_bug.cgi?id=23155
1252         Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
1253
1254         * jsc.cpp:
1255         (main):
1256
1257 2009-06-17  George Staikos  <george.staikos@torchmobile.com>
1258
1259         Reviewed by Adam Treat.
1260
1261         https://bugs.webkit.org/show_bug.cgi?id=23155
1262         Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
1263
1264         * config.h:
1265         * jsc.cpp:
1266         * wtf/Assertions.cpp:
1267         * wtf/Assertions.h:
1268         * wtf/CurrentTime.cpp:
1269         (WTF::lowResUTCTime):
1270         * wtf/DateMath.cpp:
1271         (WTF::getLocalTime):
1272         * wtf/MathExtras.h:
1273         * wtf/Platform.h:
1274         * wtf/StringExtras.h:
1275         * wtf/Threading.h:
1276         * wtf/win/MainThreadWin.cpp:
1277
1278 2009-06-17  Gavin Barraclough  <barraclough@apple.com>
1279
1280         Reviewed by Oliver Hunt.
1281
1282         <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com
1283
1284         Remove PropertySlot::putValue - PropertySlots should only be used for getting,
1285         not putting.  Rename JSGlobalObject::getOwnPropertySlot to hasOwnPropertyForWrite,
1286         which is what it really was being used to ask, and remove some other getOwnPropertySlot
1287         & getOwnPropertySlotForWrite methods, which were unused and likely to lead to confusion.
1288
1289         * runtime/JSGlobalObject.h:
1290         (JSC::JSGlobalObject::hasOwnPropertyForWrite):
1291         * runtime/JSObject.h:
1292         * runtime/JSStaticScopeObject.cpp:
1293         * runtime/JSStaticScopeObject.h:
1294         * runtime/PropertySlot.h:
1295
1296 2009-06-16  Gavin Barraclough  <barraclough@apple.com>
1297
1298         Reviewed by Oliver hunt.
1299
1300         Temporarily partially disable r44492, since this is causing some problems on internal builds.
1301
1302         * jit/JITOpcodes.cpp:
1303         (JSC::JIT::emit_op_throw):
1304         * jit/JITStubs.cpp:
1305         (JSC::JITStubs::DEFINE_STUB_FUNCTION):
1306
1307 2009-06-16  Sam Weinig  <sam@webkit.org>
1308
1309         Fix windows build.
1310
1311         * jit/JIT.cpp:
1312         (JSC::JIT::JIT):
1313
1314 2009-06-16  Sam Weinig  <sam@webkit.org>
1315
1316         Reviewed by Oliver Hunt.
1317
1318         Initialize m_bytecodeIndex to -1 in JIT, and correctly initialize
1319         it for each type of stub using the return address to find the correct
1320         offset.
1321
1322         * jit/JIT.cpp:
1323         (JSC::JIT::JIT):
1324         * jit/JIT.h:
1325         (JSC::JIT::compileGetByIdProto):
1326         (JSC::JIT::compileGetByIdSelfList):
1327         (JSC::JIT::compileGetByIdProtoList):
1328         (JSC::JIT::compileGetByIdChainList):
1329         (JSC::JIT::compileGetByIdChain):
1330         (JSC::JIT::compilePutByIdTransition):
1331         (JSC::JIT::compileCTIMachineTrampolines):
1332         (JSC::JIT::compilePatchGetArrayLength):
1333         * jit/JITStubCall.h:
1334         (JSC::JITStubCall::call):
1335
1336 == Rolled over to ChangeLog-2009-06-16 ==