ef61ca307beb9371c78aa95c5a2e9e6e226ccc35
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2006-10-25  Kevin McCullough  <KMcCullough@apple.com>
2
3         Reviewed by Steve (rubber stamp).
4
5         - Link against your local build of JavaScriptCore.lib first, this fixes some errors on release builds of testkjs.
6
7         * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:
8
9 2006-10-25  Geoffrey Garen  <ggaren@apple.com>
10
11         Reviewed by Lou.
12         
13         Removed duplicate symbol declaration.
14
15         * JavaScriptCore.xcodeproj/project.pbxproj:
16         * kjs/grammar.y:
17
18 2006-10-24  Steve Falkenburg  <sfalken@apple.com>
19
20         Build config change
21
22         * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:
23
24 2006-10-24  Kevin McCullough  <KMcCullough@apple.com>
25
26         Reviewed by Brady.
27
28         - Fixes a date formatting issue on win.  Specifically strftime cannot handle some ranges of time so we shift time call strftime and then manipulate the returned string, if needed.
29
30         * kjs/date_object.cpp:
31         (KJS::):
32         (KJS::formatLocaleDate):
33         (KJS::DateProtoFunc::callAsFunction):
34
35 2006-10-23  Kevin McCullough  <KMcCullough@apple.com>
36
37         Reviewed by 
38
39        - Build fix
40
41         * JavaScriptCore.xcodeproj/project.pbxproj:
42         * kjs/grammar.y:
43
44 2006-10-23  Kevin McCullough  <KMcCullough@apple.com>
45
46         Reviewed by Maciej.
47
48         - Makes the toTM function an operator.  Was going to piggy back on a patch but the patch needs more work.
49
50         * kjs/DateMath.cpp:
51         (KJS::equivalentYearForDST):
52         * kjs/DateMath.h:
53         (KJS::GregorianDateTime::operator tm):
54         * kjs/date_object.cpp:
55         (KJS::formatTime):
56         (KJS::DateProtoFunc::callAsFunction):
57
58 2006-10-23  Kevin McCullough  <KMcCullough@apple.com>
59
60         Reviewed by Maciej.
61
62        - Fixes two regressions on win.  Both are stack overflows. For one the number of recursions is capped at 100, and for the other, nested parenthesis pairs are not evaluated (since they would evaluate to whatever is in them anyway).
63
64         * kjs/grammar.y:
65         * kjs/object.cpp:
66
67 2006-10-21  Steve Falkenburg  <sfalken@apple.com>
68
69         Reviewed by Adam.
70         
71         Add minimal compatibility with MSVCRT leak checker
72
73         * wtf/FastMalloc.h:
74
75 2006-10-23  Kevin McCullough  <KMcCullough@apple.com>
76
77         Reviewed by Geof.
78
79         - Sets the lowercase range correctly in the test and consolidates a variable to make the test more readable.
80
81        * tests/mozilla/ecma/String/15.5.4.11-2.js:
82
83 2006-10-21  Darin Adler  <darin@apple.com>
84
85         Reviewed by Anders.
86
87         - http://bugs.webkit.org/show_bug.cgi?id=11377
88           swap(Vector, Vector) should be O(1) instead of O(n)
89
90         * wtf/Vector.h:
91         (WTF::VectorBuffer::swap): Added.
92         (WTF::Vector::swap): Added.
93         (WTF::swap): Added overload that takes two Vector objects.
94
95 2006-10-21  Darin Adler  <darin@apple.com>
96
97         Reviewed by Adam.
98
99         - http://bugs.webkit.org/show_bug.cgi?id=11376
100           build scripts should invoke make with "-j" option for multiple processors
101
102         * JavaScriptCore.xcodeproj/project.pbxproj: Pass -j `sysctl -n hw.ncpu` to make.
103
104 2006-10-19  Kevin McCullough  <KMcCullough@apple.com>
105
106         Reviewed by Geof.
107
108         Changed test to make us pass Georgian case changing for Unicode 4.0 and 5.0.  This incorporates changes from the 1.4 revision of the same mozilla test.
109         On Tiger we are still using Unicode 4.0 but on win and Leopard we are using Unicode 5.0, so this test currently allows for either answer.
110
111         * tests/mozilla/ecma/String/15.5.4.11-2.js:
112
113 2006-10-18  Maciej Stachowiak  <mjs@apple.com>
114
115         Reviewed by Geoff.
116         
117         - remove vestiges of KXMLCore name (former name of WTF).
118
119         * wtf/Assertions.h:
120         * wtf/FastMalloc.h:
121         (operator new):
122         (operator delete):
123         (operator new[]):
124         (operator delete[]):
125         * wtf/FastMallocInternal.h:
126         * wtf/Forward.h:
127         * wtf/GetPtr.h:
128         * wtf/HashCountedSet.h:
129         * wtf/HashFunctions.h:
130         * wtf/HashMap.h:
131         * wtf/HashSet.h:
132         * wtf/HashTable.h:
133         * wtf/HashTraits.h:
134         * wtf/ListRefPtr.h:
135         * wtf/MathExtras.h:
136         * wtf/Noncopyable.h:
137         * wtf/OwnArrayPtr.h:
138         * wtf/OwnPtr.h:
139         * wtf/PassRefPtr.h:
140         * wtf/Platform.h:
141         * wtf/RefPtr.h:
142         * wtf/StringExtras.h:
143         (snprintf):
144         * wtf/UnusedParam.h:
145         * wtf/Vector.h:
146         * wtf/VectorTraits.h:
147
148 2006-10-17  Steve Falkenburg  <sfalken@apple.com>
149
150         Reviewed by Maciej.
151         
152         Adjust include paths
153
154         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
155
156 2006-10-17  Kevin McCullough  <KMcCullough@apple.com>
157
158         Reviewed by Darin.
159
160         Fixed a date issue where the UTC offset was not set in win.
161
162         * kjs/DateMath.cpp:
163         (KJS::getDSTOffsetSimple):
164         (KJS::getDSTOffset):
165         (KJS::msToGregorianDateTime):
166         * kjs/DateMath.h:
167         (KJS::):
168         (KJS::GregorianDateTime::GregorianDateTime):
169
170 2006-10-17  Kevin McCullough  <KMcCullough@apple.com>
171
172         Reviewed by Brady.
173
174         Fixes a JavaScriptCore math issue on win.
175
176         * kjs/math_object.cpp:
177         (MathFuncImp::callAsFunction):
178         * wtf/MathExtras.h:
179         (wtf_atan2):
180
181 2006-10-16  Kevin McCullough  <kmccullough@apple.com>
182
183         Reviewed by Geof.
184
185         Removed unecessary global specifiers.
186
187         * kjs/math_object.cpp:
188         (MathFuncImp::callAsFunction):
189
190 2006-10-16  Kevin McCullough  <KMcCullough@apple.com>
191
192         Reviewed by John.
193
194         Fixes a compile order issue for testkjs on win.
195
196         * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:
197
198 2006-10-15  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
199
200         Reviewed by Anders.
201
202         Remove junk (as gcc calls it) after #else clause.
203
204         * wtf/FastMalloc.cpp:
205         (WTF::do_free):
206
207 2006-10-14  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
208
209         Reviewed by Maciej.
210
211         Define KXMLCORE_USE_CURL for platforms that wish to use CURL as
212         networking, and set it for GDK build
213
214         * wtf/Platform.h:
215
216 2006-10-13  Marvin Decker  <marv.decker@gmail.com>
217
218         Reviewed by Kevin McCullough.
219
220         Fixes http://bugs.webkit.org/show_bug.cgi?id=11283
221         Fixes Qt/Linux and Windows build
222
223         * kjs/DateMath.cpp:
224         * kjs/DateMath.h:
225         * kjs/date_object.cpp:
226         (KJS::DateProtoFunc::callAsFunction):
227
228 2006-10-13  Kevin McCullough  <KMcCullough@apple.com>
229
230         Reviewed by Adam, Geoff, Darin.
231
232        Fixed displaying the UTC offset and time zone string, as well as renamed the GregorianDateTime structure and clean up. 
233
234         * ChangeLog:
235         * kjs/DateMath.cpp:
236         (KJS::getUTCOffset):
237         (KJS::getDSTOffsetSimple):
238         (KJS::gregorianDateTimeToMS):
239         (KJS::msToGregorianDateTime):
240         * kjs/DateMath.h:
241         (KJS::GregorianDateTime::GregorianDateTime):
242         (KJS::GregorianDateTime::~GregorianDateTime):
243         (KJS::GregorianDateTime::toTM):
244         * kjs/date_object.cpp:
245         (KJS::gmtoffset):
246         (KJS::formatDate):
247         (KJS::formatDateUTCVariant):
248         (KJS::formatTime):
249         (KJS::fillStructuresUsingTimeArgs):
250         (KJS::fillStructuresUsingDateArgs):
251         (KJS::DateInstance::getTime):
252         (KJS::DateInstance::getUTCTime):
253         (KJS::DateProtoFunc::callAsFunction):
254         (KJS::DateObjectImp::construct):
255         (KJS::DateObjectImp::callAsFunction):
256         (KJS::DateObjectFuncImp::callAsFunction):
257         (KJS::parseDate):
258         * kjs/date_object.h:
259
260 2006-10-13  Kevin McCullough  <KMcCullough@apple.com>
261
262         Reviewed by Adam.
263
264         Gets JavaScripCore tests running on windows.
265
266         * Scripts/run-javascriptcore-tests:
267         * Scripts/webkitdirs.pm:
268
269 2006-10-12  Geoffrey Garen  <ggaren@apple.com>
270
271         Reviewed by Maciej.
272         
273         Removed JSObjectMakeWithPrototype, clarified some comments. We really
274         don't want people to manage their own prototypes, so we don't want an
275         extra function in the API devoted to just that. People can still manage
276         their own prototypes if they really want by using JSObjectSetPrototype.
277
278         * API/JSClassRef.cpp:
279         (OpaqueJSClass::createNoAutomaticPrototype):
280         (OpaqueJSClass::create):
281         * API/JSClassRef.h:
282         * API/JSObjectRef.cpp:
283         (JSClassCreate):
284         (JSObjectMake):
285         * API/JSObjectRef.h:
286         * API/testapi.c:
287         (main):
288         * JavaScriptCore.exp:
289
290 2006-10-12  Kevin McCullough  <KMcCullough@apple.com>
291
292         Reviewed by Adam.
293
294         Build breakage fix
295
296         * kjs/DateMath.cpp:
297         (KJS::msToTM):
298         * kjs/date_object.cpp:
299         (KJS::gmtoffset):
300
301 2006-10-11  Kevin McCullough  <KMcCullough@apple.com>
302
303         Reviewed by Geoff.
304
305         Added our own tm struct to have a consistent set of fields, which lets us display the DST offset and timezone strings correctly.  Also there is some code cleanup.
306
307         * kjs/DateMath.cpp:
308         (KJS::timeToMS):
309         (KJS::getUTCOffset):
310         (KJS::getDSTOffsetSimple):
311         (KJS::dateToMS):
312         (KJS::msToTM):
313         (KJS::tmToKJStm):
314         (KJS::KJStmToTm):
315         * kjs/DateMath.h:
316         * kjs/date_object.cpp: 
317         (KJS::gmtoffset): 
318         (KJS::formatTime): 
319         (KJS::DateProtoFunc::callAsFunction): 
320         (KJS::DateObjectImp::construct):
321         (KJS::DateObjectImp::callAsFunction):
322         (KJS::DateObjectFuncImp::callAsFunction):
323         (KJS::parseDate):
324         * kjs/date_object.h:
325
326 2006-10-09  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
327
328         Reviewed by Geoff.
329
330         Improve gdk build compiler flags (show warning, no rtti and exceptions).
331
332         * jscore.bkl:
333
334 2006-10-06  Kevin McCullough  <KMcCullough@apple.com>
335
336         Reviewed by Brady.
337
338         DST and TimeZones were wrong in some cases, specifically on some of the dates where DST changes.
339
340         * kjs/DateMath.cpp:
341         (KJS::equivalentYearForDST):
342         (KJS::getUTCOffset):
343         (KJS::getDSTOffsetSimple):
344         (KJS::getDSTOffset):
345         (KJS::dateToMseconds):
346         (KJS::msToTM):
347         * kjs/DateMath.h:
348         * kjs/date_object.cpp:
349         (KJS::gmtoffset):
350
351 2006-10-05  Darin Adler  <darin@apple.com>
352
353         Reviewed by Kevin McCullough.
354
355         * wtf/Assertions.cpp: Fix build when _DEBUG is not defined.
356
357 2006-10-04  Kevin McCullough  <KMcCullough@apple.com>
358
359         Reviewed by Adam.
360
361         - Removed an unnecessary assert that was stopping many pages.  tm_gmtoff was not set for UTC time in mozilla but is always set for us.
362
363         * kjs/DateMath.cpp:
364         (KJS::getUTCOffset):
365         (KJS::msToTM):
366         * kjs/date_object.cpp:
367         (KJS::gmtoffset):
368         (KJS::formatTime):
369
370 2006-10-04  Geoffrey Garen  <ggaren@apple.com>
371
372         Patch by Darin and me, reviewed by Maciej.
373
374         Fixed <rdar://problem/4518397> REGRESSION(?): Oft-seen but unrepro crash 
375               in JavaScript garbage collection (KJS::Collector::collect())
376                <rdar://problem/4752492> Crash in KJS::collect
377               
378         The issue here was allocating one garbage-collected object in the midst 
379         of allocating a second garbage-collected object. In such a case, the
380         zeroIfFree word lies.
381
382         * kjs/collector.cpp:
383         (KJS::Collector::allocate):
384         (KJS::Collector::collect):
385
386 2006-10-04  Kevin McCullough  <KMcCullough@apple.com>
387
388         Reviewed by Adam.
389
390         - Layout test fix
391
392         * kjs/DateMath.cpp:
393         (KJS::dateToDayInYear): accept and correctly handle negative months
394
395 2006-10-05  Kevin McCullough  <KMcCullough@apple.com>
396
397        build fix
398
399         * kjs/DateMath.cpp:
400         (KJS::dateToDayInYear):
401
402 2006-10-05  Mark Rowe  <bdash@webkit.org>
403
404         Reviewed by maculloch.
405
406         Gdk build fix.
407
408         * JavaScriptCoreSources.bkl: Add DateMath.cpp to file list.
409
410 2006-10-05  Kevin McCullough  <KMcCullough@apple.com>
411
412         Reviewed by aroben
413
414         - build fix
415
416         * JavaScriptCore.xcodeproj/project.pbxproj:
417
418 2006-10-04  Nikolas Zimmermann  <zimmermann@kde.org>
419
420         Reviewed by Mitz.
421
422         Fix Qt/Linux build by adding DateMath.cpp to compilation.
423
424         * CMakeLists.txt: Also replace tabs with spaces.
425
426 2006-10-04  Kevin McCullough  <KMcCullough@apple.com>
427
428         Reviewed by DethBakin.
429
430         - Apparently the build bot uses an older version of XCode which warns about conversions and the newest version does not.  I hope this fixes the build but I cann't be sure on my system.
431
432         * kjs/DateMath.cpp:
433         (KJS::msToYear):
434         (KJS::dayInYear):
435         (KJS::dateToDayInYear):
436
437 2006-10-05  Darin Adler  <darin@apple.com>
438
439         Reviewed by Adam.
440
441         * wtf/Assertions.cpp: Changed assertion formatting to omit the "======"
442         lines so you can see more assertions in less space. Also improved format
443         of file/line information so it works with more development environments.
444
445 2006-10-04  Kevin McCullough  <KMcCullough@apple.com>
446
447         Reviewed by Tim H.
448
449         - The build machine is more sensitive about automatic conversions.  These fixes exp
450 licitly cast or change the input and return types of functions to avoid conversions.
451
452         * JavaScriptCore.xcodeproj/project.pbxproj:
453         * kjs/DateMath.cpp:
454         (KJS::):
455         (KJS::msToDays):
456         (KJS::msToYear):
457         (KJS::dayInYear):
458         (KJS::monthToDayInYear):
459         (KJS::dateToDayInYear):
460         (KJS::getDSTOffsetSimple):
461         (KJS::getDSTOffset):
462         (KJS::dateToMseconds):
463         (KJS::msToTM):
464
465 2006-10-04  Kevin McCullough  <KMcCullough@apple.com>
466
467         Reviewed by GGaren
468
469         - This is a big makeover for our Date implemenetation.  This solves many platform specific issues, specifically dates before 1970, and simplifies some ugly code.  The purpose of this was to get us to pass many of the JavaScriptCore tests on windows.
470
471         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
472         * JavaScriptCore.xcodeproj/project.pbxproj:
473         * kjs/DateMath.cpp: Added.
474         (KJS::):
475         (KJS::daysInYear):
476         (KJS::daysFrom1970ToYear):
477         (KJS::msFrom1970ToYear):
478         (KJS::msToDays):
479         (KJS::msToYear):
480         (KJS::isLeapYear):
481         (KJS::isInLeapYear):
482         (KJS::dayInYear):
483         (KJS::msToMilliseconds):
484         (KJS::msToWeekDay):
485         (KJS::msToSeconds):
486         (KJS::msToMinutes):
487         (KJS::msToHours):
488         (KJS::msToMonth):
489         (KJS::msToDayInMonth):
490         (KJS::monthToDayInYear):
491         (KJS::timeToMseconds):
492         (KJS::dateToDayInYear):
493         (KJS::equivalentYearForDST):
494         (KJS::getUTCOffset):
495         (KJS::getDSTOffsetSimple):
496         (KJS::getDSTOffset):
497         (KJS::localTimeToUTC):
498         (KJS::UTCToLocalTime):
499         (KJS::dateToMseconds):
500         (KJS::msToTM):
501         (KJS::isDST):
502         * kjs/DateMath.h: Added.
503         (KJS::):
504         * kjs/date_object.cpp:
505         (KJS::gmtoffset):
506         (KJS::formatTime):
507         (KJS::DateInstance::getTime):
508         (KJS::DateInstance::getUTCTime):
509         (KJS::DateProtoFunc::callAsFunction):
510         (KJS::DateObjectImp::construct):
511         (KJS::DateObjectFuncImp::callAsFunction):
512         (KJS::parseDate):
513         * kjs/testkjs.cpp:
514         * os-win32/stdint.h:
515
516 2006-10-02  Nikolas Zimmermann  <zimmermann@kde.org>
517
518         Reviewed/landed by Adam.
519
520         Build testkjs on Qt/Linux.
521
522         * CMakeLists.txt:
523
524 2006-10-02  Nikolas Zimmermann  <zimmermann@kde.org>
525
526         Reviewed by eseidel.  Landed by eseidel.
527
528         Fix win32 build, which has no inttypes.h
529
530         * wtf/Assertions.h:
531
532 2006-10-02  Nikolas Zimmermann <zimmermann@kde.org>
533
534         Reviewed by eseidel & mjs.  Landed by eseidel.
535
536         Fix Qt/Linux build with older gcc 3.3.4.
537         http://bugs.webkit.org/show_bug.cgi?id=11116
538  
539         * kjs/lookup.h: Move cacheGlobalObject into KJS namespace.
540         (KJS::cacheGlobalObject): Also remove GCC_ROOT_NS_HACK.
541         * wtf/Assertions.h: Include inttypes.h for uintptr_t.
542
543 2006-09-28  Steve Falkenburg  <sfalken@apple.com>
544
545         Reviewed by Maciej.
546         
547         Use $(ConfigSuffix) set via vsprops files to add _debug
548         to end of debug filenames.
549
550         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
551         * JavaScriptCore.vcproj/debug.vsprops: Added.
552         * JavaScriptCore.vcproj/dftables/dftables.vcproj:
553         * JavaScriptCore.vcproj/release.vsprops: Added.
554         * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:
555
556 2006-09-28  Darin Adler  <darin@apple.com>
557
558         Reviewed by Alice.
559
560         - support for change that should fix <rdar://problem/4733044>
561           REGRESSION: XML iBench shows 10% perf. regression (copying
562           strings while decoding)
563
564         * wtf/Vector.h: Changed VectorBuffer so that the general case
565         contains an instance of the 0 case, since deriving from it
566         was violating the Liskov Substitution Principle.
567         (WTF::VectorBuffer::releaseBuffer): Added. Releases the buffer so it can
568         be adopted by another data structure that uses the FastMalloc.h allocator.
569         Returns 0 if the internal buffer was being used.
570         (WTF::Vector::releaseBuffer): Added. Releases the buffer as above or creates
571         a new one in the case where the internal buffer was being used.
572
573 2006-09-28  Maciej Stachowiak  <mjs@apple.com>
574
575         Reviewed by Geoff.
576         
577         - change garbage collection to happen at increments proportional to number of live objects, not always
578         every 1000 allocations
579
580         * kjs/collector.cpp:
581         (KJS::Collector::allocate):
582
583 2006-09-28  Maciej Stachowiak  <mjs@apple.com>
584
585         Reviewed by Mitz.
586
587         - fixed REGRESSION (r16606): javascriptCore Crash on website load
588         
589         Plus style fixes.
590         
591             - fixed some possible off-by-one bugs
592             - use indexing, not iterators, for Vectors
593             - store Vector by pointer instead of by value to avoid blowing out FunctionImp size
594         
595         * kjs/function.cpp:
596         (KJS::FunctionImp::addParameter):
597         (KJS::FunctionImp::parameterString):
598         (KJS::FunctionImp::processParameters):
599         (KJS::FunctionImp::lengthGetter):
600         (KJS::FunctionImp::getParameterName):
601         * kjs/function.h:
602
603 2006-09-27  Steve Falkenburg  <sfalken@apple.com>
604
605         Reviewed by Maciej.
606         
607         More build tweaks
608
609         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
610         * JavaScriptCore.vcproj/JavaScriptCore/dstroot-to-sdk.cmd: Removed.
611
612 2006-09-27  John Sullivan  <sullivan@apple.com>
613
614         * kjs/function.cpp:
615         (KJS::FunctionImp::getParameterName):
616         removed assertion that displeased gcc 4.0.1 (build 5420):
617         ASSERT(static_cast<size_t>(index) == index);
618
619 2006-09-27  Kevin McCullough  <KMcCullough@apple.com>
620
621         Reviewed by GGaren.
622
623         Cleanup of previous fix which was to address Radar: 4752492
624
625         * kjs/function.cpp:
626         (KJS::FunctionImp::addParameter):
627         (KJS::FunctionImp::parameterString):
628         (KJS::FunctionImp::processParameters):
629         (KJS::FunctionImp::lengthGetter):
630         (KJS::FunctionImp::getParameterName):
631         * kjs/function.h:
632
633 2006-09-27  Kevin McCullough  <KMcCullough@apple.com>
634
635         Reviewed by Adele.
636
637         Fixes a GC stack overflow crash.
638         The change is to move from a linked list implementation of Parameters to a Vector.
639         The problem with the linked list is that each one creates it's own stack frame when being destroyed and in extreme cases this caused the stack to overflow. 
640
641         * kjs/function.cpp:
642         (KJS::Parameter::Parameter):
643         (KJS::FunctionImp::addParameter):
644         (KJS::FunctionImp::parameterString):
645         (KJS::FunctionImp::processParameters):
646         (KJS::FunctionImp::lengthGetter):
647         (KJS::FunctionImp::getParameterName):
648         * kjs/function.h:
649
650 2006-09-27  Steve Falkenburg  <sfalken@apple.com>
651
652         Fix last path fix.
653
654         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
655
656 2006-09-27  Steve Falkenburg  <sfalken@apple.com>
657
658         Set path before build.
659
660         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
661
662 2006-09-27  Sean Gies  <seangies@apple.com>
663
664         Reviewed by Adam Roben.
665
666         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Debug config should link to debug runtime.
667         * JavaScriptCore.vcproj/dftables/dftables.vcproj: Debug config should link to debug runtime.
668
669 2006-09-27  Don Melton  <gramps@apple.com>
670
671         Reviewed by Adam Roben.
672
673         Changed line ending from DOS to UNIX format so it doesn't die running
674         on my machine. ;)
675
676         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
677
678 2006-09-23  Alexey Proskuryakov  <ap@nypop.com>
679
680         Reviewed by Maciej.
681
682         http://bugs.webkit.org/show_bug.cgi?id=10183
683         REGRESSION: obfuscated JS decoding breaks because of soft hyphen removal
684         (Fanfiction.net author pages not listing stories)
685
686         Rolled out the fix for bug 4139.
687
688         * kjs/lexer.cpp:
689         (Lexer::setCode):
690         (Lexer::shift):
691         * tests/mozilla/ecma/Array/15.4.5.1-1.js:
692         * tests/mozilla/expected.html:
693
694 2006-09-22  Steve Falkenburg  <sfalken@apple.com>
695
696         Build fix.
697
698         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
699
700 2006-09-22  Darin Adler  <darin@apple.com>
701
702         Reviewed by Alice.
703
704         * wtf/Vector.h: Add an append that takes a pointer and length.
705         Generalize the existing Vector append to work on vectors with
706         any value for inlineCapacity. Change the append algorithm so
707         it doesn't check capacity each time through the loop.
708
709 2006-09-22  Steve Falkenburg  <sfalken@apple.com>
710
711         Fix release build.
712
713         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
714
715 2006-09-21  Geoffrey Garen  <ggaren@apple.com>
716
717         Reviewed by Maciej.
718
719         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
720         Updated to include the right path.
721         * wtf/FastMalloc.h: #include Platform.h, since we use Platform macros.
722
723 === Safari-521.27 ===
724
725 2006-09-20  Anders Carlsson  <acarlsson@apple.com>
726
727         Reviewed by Dave Hyatt.
728
729         * wtf/MathExtras.h:
730         Get rid of lrint.
731
732 2006-09-20  Sean Gies  <seangies@apple.com>
733
734         Reviewed by Steve Falkenburg.
735
736         * wtf/Assertions.cpp: Debug messages should go into debugger console.
737
738 2006-09-20  David Hyatt  <hyatt@apple.com>
739
740         Add an implementation of lrint for Win32.
741
742         Reviewed by anders
743
744         * wtf/MathExtras.h:
745         (lrint):
746
747 2006-09-15  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
748
749         Reviewed by Adam.
750
751         http://bugs.webkit.org/show_bug.cgi?id=10864
752         Bug 10864: Linux\GDK build fixes
753
754         * JavaScriptCoreSources.bkl:
755         * jscore.bkl:
756
757 2006-09-15  Adam Roben  <aroben@apple.com>
758
759         Windows build fix.
760
761         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
762
763 2006-09-15  Anders Carlsson  <acarlsson@apple.com>
764
765         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
766         Fix the release build.
767
768 2006-09-15  Anders Carlsson  <acarlsson@apple.com>
769
770         Reviewed by Steve.
771
772         Add JavaScriptCore API to the build.
773         * API/JSBase.cpp:
774         * API/JSCallbackConstructor.cpp:
775         * API/JSCallbackFunction.cpp:
776         * API/JSCallbackObject.cpp:
777         * API/JSClassRef.cpp:
778         * API/JSContextRef.cpp:
779         * API/JSObjectRef.cpp:
780         * API/JSStringRef.cpp:
781         * API/JSValueRef.cpp:
782         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
783         * os-win32/stdbool.h: Added.
784
785 2006-09-12  Steve Falkenburg  <sfalken@apple.com>
786
787         Reviewed by Ada.
788         
789         Build tweaks (doing JavaScriptCore now since it doesn't have
790         dependencies).
791
792         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
793         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
794         * JavaScriptCore.vcproj/JavaScriptCore/dstroot-to-sdk.cmd: Added.
795         * JavaScriptCore.vcproj/dftables/dftables.vcproj:
796         * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:
797
798 2006-09-11  Brady Eidson  <beidson@apple.com>
799
800         Build fix - I think Tim's last checkin wasn't tested on Tiger, possibly.  I simply
801         commented out the undefined constants until he can have a chance to make the right call
802
803         * bindings/objc/objc_utility.mm:
804         (KJS::Bindings::objcValueTypeForType): Commented out undefined symbols
805
806 2006-09-11  Timothy Hatcher  <timothy@apple.com>
807
808         Reviewed by Tim O. and Darin.
809
810         Add support for more method signatures affecting ObjC methods called from JavaScript:
811         - Added unsigned types and long long.
812         - Allow methods that use const, oneway, bycopy and byref type modifiers.
813
814         * bindings/objc/objc_instance.mm:
815         (ObjcInstance::invokeMethod):
816         * bindings/objc/objc_utility.h:
817         (KJS::Bindings::):
818         * bindings/objc/objc_utility.mm:
819         (KJS::Bindings::convertValueToObjcValue):
820         (KJS::Bindings::convertObjcValueToValue):
821         (KJS::Bindings::objcValueTypeForType):
822
823 2006-09-05  Timothy Hatcher  <timothy@apple.com>
824
825         Reviewed by Tim O.
826
827         <rdar://problem/4715840> SEL is not char*
828
829         * bindings/objc/objc_class.mm:
830         (KJS::Bindings::ObjcClass::methodsNamed): use sel_getName instead of a char* cast.
831         * bindings/objc/objc_runtime.mm:
832         (ObjcFallbackObjectImp::callAsFunction): ditto
833
834 2006-09-03  Alexey Proskuryakov  <ap@nypop.com>
835
836         Reviewed by Tim H.
837
838         http://bugs.webkit.org/show_bug.cgi?id=10693
839         Convert JavaScript arrays to AppleScript lists
840
841         * JavaScriptCore.exp: Export ArrayInstance::info and ArrayInstance::getItem().
842         * kjs/array_instance.h:
843         * kjs/array_object.cpp:
844         (ArrayInstance::getItem): Added a method to access array items from C++.
845
846 2006-09-02  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
847
848         Reviewed by Tim H.
849
850         Bug 10454: Unix bakefile fixes
851         http://bugs.webkit.org/show_bug.cgi?id=10454
852
853         * JavaScriptCoreSources.bkl:
854
855 2006-09-01  Nikolas Zimmermann  <zimmermann@kde.org>
856
857         Reviewed by hyatt.  Landed by eseidel.
858
859         Fix build on Linux.
860
861         * pcre/CMakeLists.txt: Add wtf/ include.
862
863 2006-09-01  Nikolas Zimmermann  <zimmermann@kde.org>
864
865         Reviewed and landed by ap.
866
867         Fix build on Linux (C89 without gcc extensions enabled).
868
869         * pcre/pcre_internal.h: Use C style comments.
870         * wtf/Assertions.h: Use C style comments.
871         * wtf/Platform.h: Use C style comments.
872
873 2006-09-01  Steve Falkenburg  <sfalken@apple.com>
874
875         Fix build.
876
877         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
878         * JavaScriptCore.vcproj/dftables/dftables.vcproj:
879
880 2006-08-31  Anders Carlsson  <acarlsson@apple.com>
881
882         Reviewed by Darin.
883         
884         Add new portability functions to MathExtras.h and add StringExtras.h which is for
885         string portability functions.
886         
887         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
888         * bindings/c/c_instance.cpp:
889         * kjs/date_object.cpp:
890         * wtf/MathExtras.h:
891         (copysign):
892         (isfinite):
893         * wtf/StringExtras.h: Added.
894         (snprintf):
895         (strncasecmp):
896
897 2006-08-31  Anders Carlsson  <acarlsson@apple.com>
898
899         Reviewed by Tim H.
900         
901         Fix Windows build.
902         
903         * JavaScriptCore.vcproj/dftables/dftables.vcproj:
904         * pcre/pcre_internal.h:
905
906 2006-08-31  Timothy Hatcher  <timothy@apple.com>
907
908         Reviewed by Geoff.
909
910         Band-aid fix for PCRE to compile for ppc64 and x86_64 now that
911         we use -Wshorten-64-to-32. Adds an INT_CAST macro that ASSERTs
912         the value <= INT_MAX.
913
914         I filed <rdar://problem/4712064> to track the need to verify
915         PCRE's 64-bit compliance.
916
917         * pcre/pcre_compile.c:
918         (complete_callout):
919         (compile_branch):
920         (compile_regex):
921         (pcre_compile2):
922         * pcre/pcre_exec.c:
923         (match):
924         (pcre_exec):
925         * pcre/pcre_get.c:
926         (pcre_get_substring_list):
927         * pcre/pcre_internal.h:
928         * pcre/pcre_tables.c:
929         * pcre/pcre_try_flipped.c:
930         (_pcre_try_flipped):
931
932 2006-08-30  Darin Adler  <darin@apple.com>
933
934         Reviewed by Tim Hatcher.
935
936         - add WTF::getPtr, a function template that makes it possible to write
937           generic code that gets a raw pointer out of any of our pointer types
938
939         * JavaScriptCore.xcodeproj/project.pbxproj:
940         * wtf/GetPtr.h: Added.
941         * wtf/ListRefPtr.h: (WTF::getPtr): Added.
942         * wtf/OwnArrayPtr.h: (WTF::getPtr): Added.
943         * wtf/OwnPtr.h: (WTF::getPtr): Added.
944         * wtf/PassRefPtr.h: (WTF::getPtr): Added.
945         * wtf/RefPtr.h: (WTF::getPtr): Added.
946
947 2006-08-29  waylonis  <waylonis@google.com>
948
949         Reviewed, tweaked by ggaren.
950
951         - Added storage and accessor functions for ExecState as a fix for
952           http://bugs.webkit.org/show_bug.cgi?id=10114
953         
954         * kjs/ExecState.cpp:
955         (KJS::ExecState::ExecState):
956         * kjs/ExecState.h:
957         * kjs/context.h:
958         (KJS::Context::setExecState):
959         (KJS::Context::execState):
960
961 2006-08-30  Nikolas Zimmermann  <zimmermann@kde.org>
962
963         Reviewed by Tim H.
964
965         Commit KDE related tweaks, to be able to
966         differentiate between a Qt-only or a KDE build.
967
968         * CMakeLists.txt: Install wtf-unity library.
969         * wtf/Platform.h: Add define for the KDE platform.
970
971 2006-08-28  Darin Adler  <darin@apple.com>
972
973         Reviewed by Geoff.
974
975         * kjs/list.h: Use explicit in constructor (as appropriate).
976
977 2006-08-24  Nikolas Zimmermann  <zimmermann@kde.org>
978
979         Reviewed, tweaked and landed by ap
980
981         http://bugs.webkit.org/show_bug.cgi?id=10467
982         WebKit should have Qt platform support (Part II)
983
984         * CMakeLists.txt: Adjust to Anders' build fixes.
985         * wtf/Platform.h: Fix define for the Qt platform (we don't use/need Cairo.)
986
987 2006-08-23  David Hyatt  <hyatt@apple.com>
988
989         Fix Platform.h to include #defines for graphics features.
990
991         Reviewed by darin
992
993         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
994         * wtf/Platform.h:
995
996 2006-08-23  Anders Carlsson  <acarlsson@apple.com>
997
998         Reviewed by Darin.
999
1000         Make the bindings compile without CoreFoundation.
1001         
1002         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1003         * bindings/c/c_instance.cpp:
1004         * bindings/c/c_utility.cpp:
1005         (KJS::Bindings::convertUTF8ToUTF16):
1006         * bindings/npapi.h:
1007         * bindings/runtime.cpp:
1008         (KJS::Bindings::Instance::createBindingForLanguageInstance):
1009         (KJS::Bindings::Instance::createLanguageInstanceForValue):
1010         * bindings/runtime_root.cpp:
1011         * bindings/runtime_root.h:
1012         * kjs/interpreter.cpp:
1013         (KJS::Interpreter::createLanguageInstanceForValue):
1014         * kjs/interpreter.h:
1015
1016 2006-08-22  Anders Carlsson  <acarlsson@apple.com>
1017
1018         Reviewed by Darin.
1019
1020         Move the npruntime code over to using HashMap and the runtime_root code over to using 
1021         HashMap and HashCountedSet.
1022         
1023         * bindings/NP_jsobject.cpp:
1024         * bindings/c/c_utility.cpp:
1025         (KJS::Bindings::identifierFromNPIdentifier):
1026         * bindings/c/c_utility.h:
1027         * bindings/jni/jni_jsobject.cpp:
1028         (JavaJSObject::invoke):
1029         * bindings/npruntime.cpp:
1030         (getStringIdentifierMap):
1031         (getIntIdentifierMap):
1032         (_NPN_GetStringIdentifier):
1033         (_NPN_GetIntIdentifier):
1034         * bindings/runtime_root.cpp:
1035         (getReferencesByRootMap):
1036         (getReferencesSet):
1037         (KJS::Bindings::findReferenceSet):
1038         (KJS::Bindings::rootForImp):
1039         (KJS::Bindings::rootForInterpreter):
1040         (KJS::Bindings::addNativeReference):
1041         (KJS::Bindings::removeNativeReference):
1042         (RootObject::removeAllNativeReferences):
1043         * bindings/runtime_root.h:
1044
1045 2006-08-22  Anders Carlsson  <acarlsson@apple.com>
1046
1047         Reviewed by Geoff.
1048         
1049         Switch over the NPAPI and Java bindings to using HashMaps instead of dictionaries.
1050         
1051         * JavaScriptCore.xcodeproj/project.pbxproj:
1052         * bindings/c/c_class.cpp:
1053         (KJS::Bindings::CClass::CClass):
1054         (KJS::Bindings::CClass::~CClass):
1055         (KJS::Bindings::CClass::classForIsA):
1056         (KJS::Bindings::CClass::methodsNamed):
1057         (KJS::Bindings::CClass::fieldNamed):
1058         * bindings/c/c_class.h:
1059         * bindings/jni/jni_class.cpp:
1060         (JavaClass::JavaClass):
1061         (JavaClass::~JavaClass):
1062         (JavaClass::methodsNamed):
1063         (JavaClass::fieldNamed):
1064         * bindings/jni/jni_class.h:
1065         * bindings/objc/objc_class.h:
1066         * bindings/objc/objc_class.mm:
1067         (KJS::Bindings::deleteMethod):
1068         (KJS::Bindings::deleteField):
1069         (KJS::Bindings::):
1070         (KJS::Bindings::ObjcClass::methodsNamed):
1071         (KJS::Bindings::ObjcClass::fieldNamed):
1072         * bindings/runtime.cpp:
1073         * bindings/runtime.h:
1074         * bindings/runtime_object.cpp:
1075         (RuntimeObjectImp::fieldGetter):
1076         (RuntimeObjectImp::getOwnPropertySlot):
1077         (RuntimeObjectImp::put):
1078         (RuntimeObjectImp::canPut):
1079
1080 2006-08-21  Vladimir Olexa  <vladimir.olexa@gmail.com>
1081
1082         Reviewed by Darin.
1083
1084         http://bugs.webkit.org/show_bug.cgi?id=6252
1085         JavaScript 1.6 Array.lastIndexOf
1086
1087         Test: fast/js/array-lastIndexOf.html
1088
1089         * kjs/array_object.cpp:
1090         (ArrayProtoFunc::callAsFunction): Added a LastIndexOf case.
1091         * kjs/array_object.h:
1092         (KJS::ArrayProtoFunc::): Added LastIndexOf to enum.
1093         * tests/mozilla/expected.html: Two more tests now pass.
1094
1095 2006-08-20  Nikolas Zimmermann  <zimmermann@kde.org>
1096
1097         Reviewed by Maciej. Landed by rwlbuis.
1098
1099         Fixes parts of: http://bugs.webkit.org/show_bug.cgi?id=10463
1100         WebKit should have Qt platform support
1101
1102         Removing obsolete QConstString/QString constructors in kjs code.
1103
1104         * kjs/identifier.h:
1105         * kjs/ustring.h:
1106
1107 2006-08-17  Nikolas Zimmermann  <zimmermann@kde.org>
1108
1109         Reviewed by Maciej. Landed by rwlbuis.
1110
1111         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10463
1112         WTF Changes needed for Qt platform code.
1113
1114         * wtf/Platform.h:
1115         * wtf/unicode/UnicodeDecomposition.h: Added.
1116         (WTF::Unicode::):
1117         * wtf/unicode/UnicodeDirection.h: Added.
1118         (WTF::Unicode::):
1119         * wtf/unicode/qt4/UnicodeQt4.cpp: Added.
1120         (WTF::Unicode::direction):
1121         (WTF::Unicode::category):
1122         (WTF::Unicode::decomposition):
1123         * wtf/unicode/qt4/UnicodeQt4.h:
1124         (WTF::Unicode::toLower):
1125         (WTF::Unicode::toUpper):
1126         (WTF::Unicode::isPrintableChar):
1127         (WTF::Unicode::isSpace):
1128         (WTF::Unicode::isPunct):
1129         (WTF::Unicode::isDigit):
1130         (WTF::Unicode::mirroredChar):
1131         (WTF::Unicode::compare):
1132
1133 2006-08-17  Nikolas Zimmermann  <zimmermann@kde.org>
1134
1135         Reviewed by Eric. Landed by rwlbuis.
1136
1137         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10464
1138         Offer a cmake build system for Qt platform.
1139
1140         * CMakeLists.txt: Added.
1141         * pcre/CMakeLists.txt: Added.
1142
1143 2006-08-17  Anders Carlsson  <acarlsson@apple.com>
1144
1145         Reviewed by Maciej.
1146
1147         * bindings/npapi.h:
1148         Fix ifdef.
1149
1150 2006-08-15  Steve Falkenburg  <sfalken@apple.com>
1151
1152         Reviewed by mjs.
1153         
1154         Build fix.
1155
1156         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1157         * wtf/Assertions.h:
1158
1159 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
1160
1161         Reviewed by Tim H.
1162
1163         Build fix:  DWARF and -gfull are incompatible with symbol separation.
1164
1165         * JavaScriptCore.xcodeproj/project.pbxproj:
1166
1167 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
1168
1169         Reviewed by Tim H.
1170
1171         http://bugs.webkit.org/show_bug.cgi?id=10394
1172         Bug 10394: WebKit Release and Production configurations should enable dead code stripping
1173
1174         * JavaScriptCore.xcodeproj/project.pbxproj:
1175
1176 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
1177
1178         Reviewed by Tim H.
1179
1180         http://bugs.webkit.org/show_bug.cgi?id=10384
1181         Bug 10384: Switch to DWARF for Release configuration
1182
1183         * JavaScriptCore.xcodeproj/project.pbxproj:
1184
1185 2006-08-13  Maks Orlovich  <maksim@kde.org>
1186
1187         Reviewed (and tweaked a little) by Maciej.
1188         
1189         - shrank the size of JSObject by 8 bytes and made the corresponding reduction to the cell size, resulting
1190         in a 1.2% speed improvement on JS iBench (and probably overall memory savings).
1191
1192         This was done by removing _scope and _internalValue data members
1193         from JSObject and moving them only to the subclasses that actually
1194         make use of them.
1195         
1196         * kjs/object.cpp: 
1197         (KJS::JSObject::mark): No need to mark scope or internal value here.
1198         * kjs/object.h:
1199         (KJS::JSObject::JSObject): Don't initialize them.
1200         * kjs/JSWrapperObject.cpp: Added. New base class for object types that
1201         wrap primitive values (Number, String, Boolean, Date).
1202         (KJS::JSWrapperObject::mark): 
1203         * kjs/JSWrapperObject.h: Added.
1204         (KJS::JSWrapperObject::JSWrapperObject):
1205         (KJS::JSWrapperObject::internalValue):
1206         (KJS::JSWrapperObject::setInternalValue):
1207         * kjs/array_object.cpp:
1208         (ArrayPrototype::ArrayPrototype): Don't set useless internal value.
1209         * kjs/bool_object.cpp:
1210         (BooleanInstance::BooleanInstance): Inherit from JSWrapperObject.
1211         (BooleanProtoFunc::callAsFunction): Fixed to account for fact that not all
1212         JSObjects have an internal value.
1213         (BooleanObjectImp::construct): ditto.
1214         * kjs/bool_object.h:
1215         * kjs/collector.cpp: Lowered cell size to 48.
1216         (KJS::Collector::allocate): meaningless whitespace change
1217         * kjs/date_object.cpp:
1218         (KJS::DateInstance::DateInstance): Inherit from JSWrapperObject.
1219         (KJS::DateProtoFunc::callAsFunction): adjusted for move of internalValue
1220         (KJS::DateObjectImp::construct): ditto
1221         * kjs/date_object.h:
1222         * kjs/error_object.cpp:
1223         (ErrorPrototype::ErrorPrototype): don't set internal value
1224         * kjs/function.cpp: move _scope and related handling here
1225         (KJS::FunctionImp::mark): mark scope
1226         * kjs/function.h:
1227         (KJS::FunctionImp::scope): moved here from JSObject
1228         (KJS::FunctionImp::setScope): ditto
1229         * kjs/number_object.cpp:
1230         (NumberInstance::NumberInstance): inherit from JSWrapperObject
1231         (NumberProtoFunc::callAsFunction): adjusted
1232         (NumberObjectImp::construct): adjusted
1233         * kjs/number_object.h: shring RegExp-related objects a little
1234         * kjs/regexp_object.cpp:
1235         (RegExpPrototype::RegExpPrototype): Adjust for size tweaks
1236         (RegExpObjectImp::RegExpObjectImp): ditto
1237         * kjs/regexp_object.h:
1238         * kjs/string_object.cpp:
1239         (StringInstance::StringInstance): inherit from JSWrapperObject
1240         (StringProtoFunc::callAsFunction): adjusted
1241         * kjs/string_object.h:
1242         * JavaScriptCore.exp: Exported new methods as needed.
1243         * JavaScriptCore.xcodeproj/project.pbxproj: Added new files to build.
1244
1245 2006-08-04  Brady Eidson  <beidson@apple.com>
1246
1247         Reviewed by Geoff's rubber stamp
1248
1249         Fix a build break on Intel hardware causes by adapting stricter
1250         compiler warnings (-Wshorten-64-to-32)
1251
1252         * API/testapi.c:
1253         (assertEqualsAsNumber): manually cast some doubles to floats
1254         (main): ditto
1255
1256 2006-08-04  Sam Weinig  <sam.weinig@gmail.com>
1257
1258         Reviewed by Darin.
1259
1260         - patch for http://bugs.webkit.org/show_bug.cgi?id=10192
1261           Make WebCore (and friends) compile with -Wshorten-64-to-32
1262
1263           * Adds -Wshorten-64-to-32 flag to Xcode project.
1264           * Adds explicit casts where OK.
1265
1266         * API/JSNodeList.c:
1267         (JSNodeList_item):
1268         (JSNodeList_getProperty):
1269         * JavaScriptCore.xcodeproj/project.pbxproj:
1270
1271 2006-08-04  Adam Roben  <aroben@apple.com>
1272
1273         Reviewed by Anders.
1274
1275         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Convert
1276         spaces to tabs
1277
1278 2006-08-03  Sam Weinig  <sam.weinig@gmail.com>
1279
1280         Reviewed by Darin.
1281
1282         - patch for http://bugs.webkit.org/show_bug.cgi?id=10176
1283           Make WebCore compile with -Wundef
1284
1285           * Adds -Wundef flag to Xcode project
1286           * Converts #ifs to #ifdef and #ifndefs where needed.
1287           * Added #define YYMAXDEPTH 10000 in kjs/grammar.y
1288             to fix a warning from within Bison.
1289
1290         * JavaScriptCore.xcodeproj/project.pbxproj:
1291         * bindings/jni/jni_jsobject.cpp:
1292         (JavaJSObject::getSlot):
1293         (JavaJSObject::setSlot):
1294         * bindings/npapi.h:
1295         * bindings/objc/objc_class.mm:
1296         (KJS::Bindings::ObjcClass::methodsNamed):
1297         (KJS::Bindings::ObjcClass::fieldNamed):
1298         * bindings/objc/objc_instance.mm:
1299         (ObjcInstance::invokeMethod):
1300         * bindings/objc/objc_runtime.mm:
1301         (ObjcMethod::getMethodSignature):
1302         (ObjcField::name):
1303         (ObjcField::type):
1304         * kjs/grammar.y:
1305         * kjs/identifier.h:
1306
1307 2006-08-03  Anders Carlsson  <acarlsson@apple.com>
1308
1309         Reviewed by John Sullivan.
1310
1311        * wtf/HashSet.h:
1312         (WTF::::operator):
1313         Return *this in operator=
1314
1315 2006-08-03  Adam Roben  <aroben@apple.com>
1316
1317         Reviewed by Anders.
1318
1319         - Fixed Windows build
1320
1321         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1322         * wtf/MathExtras.h: Implement inline versions of these functions
1323         (nextafter):
1324         (nextafterf):
1325
1326 2006-08-02  Adam Roben  <aroben@apple.com>
1327
1328         Reviewed by Darin.
1329
1330         - Fixed build
1331
1332         * kjs/date_object.cpp:
1333         (KJS::formatTime):
1334
1335 2006-07-29  Darin Adler  <darin@apple.com>
1336
1337         - Removed tabs from these source files that still had them.
1338           We don't use them; that way source files look fine in editors
1339           that have tabs set to 8 spaces or to 4 spaces.
1340         - Removed allow-tabs Subversion property from the files too.
1341
1342         * bindings/NP_jsobject.cpp:
1343         * bindings/c/c_utility.cpp:
1344         * bindings/jni/jni_runtime.cpp:
1345         * bindings/jni/jni_utility.cpp:
1346         * bindings/objc/objc_utility.mm:
1347         * bindings/runtime.cpp:
1348         * bindings/runtime_method.cpp:
1349         * bindings/testbindings.cpp:
1350         * bindings/testbindings.mm:
1351         * kjs/date_object.cpp:
1352         * kjs/function.cpp:
1353         * kjs/list.cpp:
1354         * kjs/nodes.cpp:
1355         * kjs/nodes.h:
1356         * kjs/string_object.cpp:
1357         * kjs/ustring.cpp:
1358
1359 2006-07-29  Darin Adler  <darin@apple.com>
1360
1361         * tests/mozilla/expected.html: Update test results now that regress-185165.js
1362         is succeeding. I suspect Anders fix for bug 4620655 is the reason.
1363
1364 2006-07-29  Sam Weinig  <sam.weinig@gmail.com>
1365
1366         Reviewed by Darin.
1367
1368         - patch for http://bugs.webkit.org/show_bug.cgi?id=10080
1369           Adopt pedantic changes from the Unity project to improve 
1370           cross-compiler compatibility
1371
1372           Changes include:
1373           * Removing trailing semicolon from namespace braces.
1374           * Removing trailing comma from last enum declaration.
1375           * Updating to match style guidelines.
1376           * Adding missing newline to the end of the file.
1377           * Turning on gcc warning for missing newline at the end of a source file
1378             (GCC_WARN_ABOUT_MISSING_NEWLINE in Xcode, -Wnewline in gcc).
1379           * Alphabetical sorting of Xcode source list files. 
1380           * Replace use of non-portable variable-size array with Vector.
1381           * Use C-style comments instead of C++ comments in files that might
1382             be included by either C or C++ files.
1383
1384         * API/JSCallbackConstructor.cpp:
1385         (KJS::JSCallbackConstructor::construct):
1386         * API/JSCallbackFunction.cpp:
1387         (KJS::JSCallbackFunction::callAsFunction):
1388         * API/JSCallbackObject.cpp:
1389         (KJS::JSCallbackObject::construct):
1390         (KJS::JSCallbackObject::callAsFunction):
1391         * JavaScriptCore.xcodeproj/project.pbxproj:
1392         * JavaScriptCorePrefix.h:
1393         * bindings/jni/jni_class.cpp:
1394         (JavaClass::fieldNamed):
1395         * bindings/jni/jni_class.h:
1396         * bindings/jni/jni_instance.cpp:
1397         (JavaInstance::JavaInstance):
1398         (JavaInstance::valueOf):
1399         * bindings/jni/jni_objc.mm:
1400         (KJS::Bindings::dispatchJNICall):
1401         * bindings/jni/jni_runtime.cpp:
1402         (JavaParameter::JavaParameter):
1403         (JavaArray::JavaArray):
1404         * bindings/jni/jni_runtime.h:
1405         * bindings/jni/jni_utility.h:
1406         * bindings/objc/objc_instance.h:
1407         * bindings/runtime_array.h:
1408         * kjs/collector.h:
1409         * kjs/config.h:
1410         * kjs/ustring.cpp:
1411         * wtf/Platform.h:
1412
1413 2006-07-29  Mike Emmel  <mike.emmel@gmail.com>
1414
1415         Reviewed by Darin.
1416
1417         - fixes for Linux build
1418
1419         * JavaScriptCoreSources.bkl: Added new files to build, kjs/PropertyNameArray.cpp
1420         and kjs/testkjs.cpp, and removed old files.
1421
1422 2006-07-24  Dan Waylonis  <waylonis@google.com>
1423
1424         Reviewed and tweaked a bit by Darin.
1425
1426         - fix http://bugs.webkit.org/show_bug.cgi?id=9902
1427           jsNull and NSNull not properly converted between JS and ObjC
1428
1429         * bindings/objc/objc_utility.mm: (KJS::Bindings::convertObjcValueToValue):
1430         Added case for converting NSNull to jsNull.
1431
1432 2006-07-24  Rob Buis  <buis@kde.org>
1433
1434         Reviewed by Darin.
1435
1436         http://bugs.webkit.org/show_bug.cgi?id=4258
1437         Date().toString() only includes GMT offset, not timezone string
1438
1439         Use the info in tm_zone to append timezone abbreviation
1440         to Date().toString().
1441
1442         * kjs/date_object.cpp:
1443         (KJS::formatTime):
1444
1445 2006-07-24  Rob Buis  <buis@kde.org>
1446
1447         Reviewed by Darin.
1448
1449         http://bugs.webkit.org/show_bug.cgi?id=5257
1450         setYear() does not match FireFox/IE behavior
1451
1452         Make sure the right values end up in tm_year.
1453
1454         * kjs/date_object.cpp:
1455         (KJS::formatTime):
1456
1457 2006-07-23  Mark Rowe  <opendarwin.org@bdash.net.nz>
1458
1459         Reviewed by Maciej.
1460
1461         Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
1462         http://bugs.webkit.org/show_bug.cgi?id=9686
1463
1464         JavaScriptCore portion of the fix.
1465
1466         * JavaScriptCore.exp: Update symbol for change in argument type.
1467         * kjs/debugger.cpp:
1468         (Debugger::detach): Clear map of recent exceptions.
1469         (Debugger::hasHandledException): Track the most recent exception
1470         thrown by an interpreter.
1471         (Debugger::exception): Change exception argument to a JSValue.
1472         * kjs/debugger.h:
1473         * kjs/nodes.cpp:
1474         (Node::debugExceptionIfNeeded): Notify the debugger of an exception
1475         if it hasn't seen it before.
1476         (ThrowNode::execute): Notify the debugger that an exception is being thrown.
1477         * kjs/nodes.h:
1478
1479     2006-07-23  Geoffrey Garen  <ggaren@apple.com>
1480
1481         Patch by Eric Albert, reviewed by Darin and me.
1482         
1483         - Fixed <rdar://problem/4645931> JavaScriptCore stack-scanning code 
1484         crashes (Collector::markStackObjectsConservatively)
1485         
1486         * bindings/jni/jni_jsobject.cpp: On 64bit systems, jint is a long, not an
1487         int.
1488         (JavaJSObject::getSlot):
1489         (JavaJSObject::setSlot):
1490         * kjs/collector.cpp:
1491         (KJS::Collector::markCurrentThreadConservatively): Use a pointer instead of
1492         an int as 'dummy,' because on LP64 systems, an int is not pointer-aligned,
1493         and we want to scan the stack for pointers.
1494         * JavaScriptCore.xcodeproj/project.pbxproj: After a tense cease-fire, the 
1495         XCode war has started up again!
1496
1497 === Safari-521.20 ===
1498
1499 2006-07-21  Geoffrey Garen  <ggaren@apple.com>
1500
1501         Reviewed by Darin.
1502
1503         <rdar://problem/4507265> REGRESSION: overlays don't work on HousingMaps.com (Google Maps-based site)
1504
1505         - Added support for strings that masquerade as undefined. Currently used
1506         by WebCore to implement undetectable style.filter.
1507         
1508         The name is a little long, but it's only used in one line of code, so I
1509         thought clarity should win over brevity.
1510
1511         * JavaScriptCore.exp:
1512         * JavaScriptCore.xcodeproj/project.pbxproj:
1513         * kjs/object.h:
1514         * kjs/string_object.h:
1515         (KJS::StringInstanceThatMasqueradesAsUndefined::StringInstanceThatMasqueradesAsUndefined):
1516         (KJS::StringInstanceThatMasqueradesAsUndefined::masqueradeAsUndefined):
1517         (KJS::StringInstanceThatMasqueradesAsUndefined::toBoolean):
1518
1519 === Safari-521.19 ===
1520
1521 2006-07-20  Steve Falkenburg  <sfalken@apple.com>
1522
1523         Fix the build
1524
1525         * kjs/function.cpp:
1526         (KJS::escapeStringForPrettyPrinting):
1527
1528 2006-07-19  Anders Carlsson  <acarlsson@apple.com>
1529
1530         Reviewed by Darin.
1531
1532         <rdar://problem/4620655> REGRESSION(10.4.7-10.5): preview button for a blogger.com post doesn't work
1533         
1534         * kjs/nodes2string.cpp:
1535         (StringNode::streamTo):
1536         Return the escaped string.
1537         
1538         (RegExpNode::streamTo):
1539         Use the correct syntax.
1540         
1541         * kjs/function.cpp:
1542         (KJS::escapeStringForPrettyPrinting):
1543         * kjs/function.h:
1544         Add escape function which escapes a string for pretty-printing so it can be parsed again.
1545         
1546         * wtf/unicode/icu/UnicodeIcu.h:
1547         (WTF::Unicode::isPrintableChar):
1548         New function.
1549
1550 2006-07-18  Maciej Stachowiak  <mjs@apple.com>
1551
1552         Reviewed by Adele Peterson.
1553         
1554         <rdar://problem/4589530> REGRESSION: null character in JS string causes parse error (works in Tiger and in other browsers)
1555
1556         * kjs/lexer.cpp:
1557         (Lexer::shift):
1558         (Lexer::lex):
1559         (Lexer::record16):
1560         (Lexer::scanRegExp):
1561         * kjs/lexer.h:
1562
1563 2006-07-18  Tim Omernick  <timo@apple.com>
1564
1565         Reviewed by Tim Hatcher.
1566
1567         Removed a misleading comment; we recently added support for the NPNVPluginElementNPObject
1568         variable.
1569
1570         * bindings/npapi.h:
1571
1572 === Safari-521.18 ===
1573
1574 2006-07-18  Timothy Hatcher  <timothy@apple.com>
1575
1576         Made the following headers public:
1577
1578         * JavaScriptCore.h
1579         * JSBase.h
1580         * JSContextRef.h
1581         * JSObjectRef.h
1582         * JSStringRef.h
1583         * JSValueRef.h
1584
1585         * JavaScriptCore.xcodeproj/project.pbxproj:
1586
1587 2006-07-17  Geoffrey Garen  <ggaren@apple.com>
1588
1589         Reviewed by Maciej.
1590         
1591         - Added automatic prototype creation for classes.
1592         
1593         A class stores a weak reference to a prototype, which is cleared when
1594         the prototype is garbage collected, to avoid a reference cycle.
1595         
1596         We now have an attributes field in JSClassDefinition, that currently is
1597         used only to override automatic prototype creation when you want to manage your
1598         own prototypes, but can be extended in the future for other nefarious purposes.
1599         
1600         Similarly, we have JSObjectMake and JSObjectMakeWithPrototype, the latter
1601         allowing you to manage your own prototypes.
1602         
1603         JSObjectMakeConstructor is more interesting now, able to make a constructor
1604         on your behalf if you just give it a class.
1605         
1606         - Removed bogus old code from minidom.js.
1607         
1608         - Tweaked the headerdocs.
1609         
1610         - Added more GC testing, which caught some leaks, and tested more funny 
1611         edge cases in lookup, which caught a lookup bug. Removed some testing 
1612         we used to do with MyObject because it was redundant with the new, cool 
1613         stuff.
1614         
1615         While fixing the lookup bug I retracted this change:
1616         
1617             "If a static setProperty callback returns 'false', to indicate that the
1618             property was not set, we no longer forward the set request up the class
1619             chain, because that's almost certainly not what the programmer expected."
1620
1621         Returning false when setting a static property is a little silly, but you can see
1622         it being useful when shadowing a base class's static properties, and, regardless
1623         of usefullness, this is the defined behavior of the setProperty callback.
1624         
1625         - Plus a little ASCII art, for the kids.
1626
1627 2006-07-17  Timothy Hatcher  <timothy@apple.com>
1628
1629         Reviewed by Maciej.
1630
1631         <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit
1632
1633         Moves WebScriptObject and WebUndefined up to WebCore.
1634         This change does create an upwards-dependancy on WebScriptObject existing
1635         in the loaded process, but this code path in JavaScriptCore does not get used
1636         unless it is through WebKit/WebCore. Moving all of the binding code out of
1637         JavaScriptCore might make sense in the future.
1638
1639         * JavaScriptCore.exp:
1640         * JavaScriptCore.xcodeproj/project.pbxproj:
1641         * bindings/objc/WebScriptObject.h: Replaced.
1642         * bindings/objc/WebScriptObject.mm: Removed.
1643         * bindings/objc/WebScriptObjectPrivate.h: Removed.
1644         * bindings/objc/objc_class.h:
1645         * bindings/objc/objc_instance.h:
1646         * bindings/objc/objc_instance.mm:
1647         (ObjcInstance::~ObjcInstance):
1648         * bindings/objc/objc_runtime.h:
1649         * bindings/objc/objc_runtime.mm:
1650         (convertValueToObjcObject):
1651         * bindings/objc/objc_utility.mm:
1652         (KJS::Bindings::convertValueToObjcValue):
1653         (KJS::Bindings::convertObjcValueToValue):
1654         (KJS::Bindings::createObjcInstanceForValue):
1655
1656 2006-07-17  Darin Adler  <darin@apple.com>
1657
1658         * API/JSBase.h: Fix comment formatting where things used to be lined up but
1659         are now ragged. Got rid of spaces that attempted to line things up.
1660         * API/JSObjectRef.h: Ditto. Also add missing periods for a couple of comments.
1661
1662 2006-07-17  Geoffrey Garen  <ggaren@apple.com>
1663
1664         Reviewed by Maciej.
1665         
1666         - Removed the exception parameter from the initialize callback and, by extension,
1667         JSObjectMake. We have never had a need for exceptions when iniitializing,
1668         so the parameter seemed likely to "get in the way." 
1669         
1670         Also, an exception in JavaScript is thrown in response to input -- 
1671         "invalid URL", "index not a number", etc., so it's the job of the 
1672         constructor function, not the initialize method, to throw.
1673         
1674         If initialize *really* wants to throw, it can communicate the throw to
1675         the constructor through the constructed object's private data (e.g., set
1676         it to NULL, signaling to the consntructor that initialization failed.)
1677         
1678         - Added JSObjectMakeWithData, which enables a constructor to set private
1679         data on an object *before* it has been initialized. That way, the initialize
1680         methods can properly operate on the data. 
1681
1682         * API/JSNode.c: Moved ref into the initialize method, for better encapsulation,
1683         now that it's possible.
1684         * API/JSNodeList.c: ditto
1685         * API/minidom.c:
1686         (main): Do more aggressive garbage collection to test ref/deref and 
1687         initialize/finalize.
1688         * API/minidom.js: store childNodes in a temporary so it doesn't get re-created
1689         like a thousand times. This makes debugging ref/deref easier
1690
1691 2006-07-17  Geoffrey Garen  <ggaren@apple.com>
1692
1693         Reviewed by Maciej.
1694         
1695         - Changed the initialize callback to run from least derived class (parent
1696         class) to most derived class. This enables C++ style initialization,
1697         and derived class overriding of member data.
1698         
1699         - Added excpetion propopgation to JSObjectMake, to support initialize
1700         exceptions, and generally round out our policy of making function
1701         signatures as long as possible.
1702
1703         * API/JSCallbackObject.h: Use ExecState instead of ContextRef, cuz we're
1704         in C++ land now.
1705
1706 2006-07-17  Geoffrey Garen  <ggaren@apple.com>
1707
1708         Reviewed by Maciej.
1709         
1710         - Changed JSObjectMakeConstructor to JSObjectMakeConstructorWithCallback,
1711         to match JSObjectMakeFunctionWithCallback.
1712         
1713         - Added prototype parameter, so the generated constructor
1714         automatically works with hasInstance / instanceof
1715         
1716         - Moved hasInstance implementation from InternalFunctionImp to JSObject
1717         so that subclasses can inherit it without inheriting function-related baggage.
1718         More refactoring here would be good, but this seems like a good short-term
1719         solution.
1720
1721         (KJS::JSCallbackFunction::implementsHasInstance): override and return false,
1722         because callback functions aren't constructors.
1723
1724 2006-07-17  Maciej Stachowiak  <mjs@apple.com>
1725
1726         Reviewed by Geoff.
1727         
1728         - add a JSContextRef parameter to all JSValueRef, JSObjectRef, and JSContextRef operations;
1729         except JSObject{Get,Set}PrivateData which can be assumed to be simple pure accessors.
1730         
1731         Also renamed the parameter "context" to "ctx" because it makes the code read better with this pervasive
1732         but usually uninteresting parameter.
1733
1734         * API/JSBase.cpp:
1735         (JSEvaluateScript):
1736         (JSCheckScriptSyntax):
1737         (JSGarbageCollect):
1738         * API/JSBase.h:
1739         * API/JSCallbackObject.cpp:
1740         (KJS::JSCallbackObject::JSCallbackObject):
1741         (KJS::JSCallbackObject::init):
1742         (KJS::JSCallbackObject::getOwnPropertySlot):
1743         (KJS::JSCallbackObject::put):
1744         (KJS::JSCallbackObject::deleteProperty):
1745         (KJS::JSCallbackObject::toNumber):
1746         (KJS::JSCallbackObject::toString):
1747         * API/JSContextRef.cpp:
1748         (JSGlobalContextCreate):
1749         (JSGlobalContextRetain):
1750         (JSGlobalContextRelease):
1751         (JSContextGetGlobalObject):
1752         * API/JSContextRef.h:
1753         * API/JSNode.c:
1754         (JSNodePrototype_appendChild):
1755         (JSNodePrototype_removeChild):
1756         (JSNodePrototype_replaceChild):
1757         (JSNode_getNodeType):
1758         (JSNode_getFirstChild):
1759         (JSNode_prototype):
1760         * API/JSNodeList.c:
1761         (JSNodeListPrototype_item):
1762         (JSNodeList_length):
1763         (JSNodeList_getProperty):
1764         (JSNodeList_prototype):
1765         * API/JSObjectRef.cpp:
1766         (JSObjectMake):
1767         (JSObjectMakeFunctionWithCallback):
1768         (JSObjectMakeConstructor):
1769         (JSObjectMakeFunction):
1770         (JSObjectGetPrototype):
1771         (JSObjectSetPrototype):
1772         (JSObjectHasProperty):
1773         (JSObjectGetProperty):
1774         (JSObjectSetProperty):
1775         (JSObjectGetPropertyAtIndex):
1776         (JSObjectSetPropertyAtIndex):
1777         (JSObjectDeleteProperty):
1778         (JSObjectIsFunction):
1779         (JSObjectCallAsFunction):
1780         (JSObjectIsConstructor):
1781         (JSObjectCallAsConstructor):
1782         (JSObjectCopyPropertyNames):
1783         * API/JSObjectRef.h:
1784         * API/JSStringRef.cpp:
1785         * API/JSValueRef.cpp:
1786         (JSValueGetType):
1787         (JSValueIsUndefined):
1788         (JSValueIsNull):
1789         (JSValueIsBoolean):
1790         (JSValueIsNumber):
1791         (JSValueIsString):
1792         (JSValueIsObject):
1793         (JSValueIsObjectOfClass):
1794         (JSValueIsEqual):
1795         (JSValueIsStrictEqual):
1796         (JSValueIsInstanceOfConstructor):
1797         (JSValueMakeUndefined):
1798         (JSValueMakeNull):
1799         (JSValueMakeBoolean):
1800         (JSValueMakeNumber):
1801         (JSValueMakeString):
1802         (JSValueToBoolean):
1803         (JSValueToNumber):
1804         (JSValueToStringCopy):
1805         (JSValueToObject):
1806         (JSValueProtect):
1807         (JSValueUnprotect):
1808         * API/JSValueRef.h:
1809         * API/minidom.c:
1810         (print):
1811         * API/testapi.c:
1812         (MyObject_getProperty):
1813         (MyObject_deleteProperty):
1814         (MyObject_callAsFunction):
1815         (MyObject_callAsConstructor):
1816         (MyObject_convertToType):
1817         (print_callAsFunction):
1818         (main):
1819
1820 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
1821
1822         Approved by Maciej, RS by Beth.
1823         
1824         JSObjectMakeFunction -> JSObjectMakeFunctionWithCallback
1825         JSObjectMakeFunctionWithBody -> JSObjectMakeFunction
1826         
1827         because the latter is more common, and more fundamental, than the former.
1828
1829         * API/APICast.h:
1830         (toJS):
1831         * API/JSBase.h:
1832         * API/JSCallbackObject.cpp:
1833         (KJS::JSCallbackObject::getOwnPropertySlot):
1834         (KJS::JSCallbackObject::put):
1835         (KJS::JSCallbackObject::deleteProperty):
1836         (KJS::JSCallbackObject::getPropertyNames):
1837         (KJS::JSCallbackObject::staticValueGetter):
1838         (KJS::JSCallbackObject::staticFunctionGetter):
1839         * API/JSClassRef.cpp:
1840         (OpaqueJSClass::OpaqueJSClass):
1841         (OpaqueJSClass::~OpaqueJSClass):
1842         * API/JSClassRef.h:
1843         * API/JSObjectRef.cpp:
1844         (JSClassCreate):
1845         (JSObjectMakeFunctionWithCallback):
1846         (JSObjectMakeFunction):
1847         (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
1848         (JSObjectCopyPropertyNames):
1849         * API/JSObjectRef.h:
1850         * API/minidom.c:
1851         (main):
1852         * API/testapi.c:
1853         (main):
1854         * ChangeLog:
1855         * JavaScriptCore.exp:
1856
1857 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
1858
1859         Laughed at by Beth.
1860         
1861         Replace __JS with OpaqueJS because the former, while used by CF, is
1862         a prefix that's triply-reserved by the compiler. (_* is reserved in global 
1863         names, _[A-Z] is reserved in all names, and __ is reserved in all names 
1864         in C++.)
1865         
1866         Opaque is an alternative used by other Mac OS X framewokrs.
1867
1868         * API/APICast.h:
1869         (toJS):
1870         * API/JSBase.h:
1871         * API/JSCallbackObject.cpp:
1872         (KJS::JSCallbackObject::getOwnPropertySlot):
1873         (KJS::JSCallbackObject::put):
1874         (KJS::JSCallbackObject::deleteProperty):
1875         (KJS::JSCallbackObject::getPropertyNames):
1876         (KJS::JSCallbackObject::staticValueGetter):
1877         (KJS::JSCallbackObject::staticFunctionGetter):
1878         * API/JSClassRef.cpp:
1879         (OpaqueJSClass::OpaqueJSClass):
1880         (OpaqueJSClass::~OpaqueJSClass):
1881         * API/JSClassRef.h:
1882         * API/JSObjectRef.cpp:
1883         (JSClassCreate):
1884         (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
1885         (JSObjectCopyPropertyNames):
1886
1887 2006-07-16  Darin Adler  <darin@apple.com>
1888
1889         - try to fix Windows build
1890
1891         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1892         Added some recently added files, removed some recently removed.
1893
1894 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
1895
1896         Reviewed by Maciej.
1897         
1898         - Change getProperty* to return undefined, rather than NULL, for missing
1899         properties, since that's what the spec says. Also added exception out
1900         parameters to the *Index functions, because they can call through to the
1901         regular functions, which can throw for custom objects.
1902
1903         * API/JSObjectRef.cpp:
1904         (JSObjectGetProperty):
1905         (JSObjectGetPropertyAtIndex):
1906         (JSObjectSetPropertyAtIndex):
1907         * API/JSObjectRef.h:
1908         * API/testapi.c:
1909         (main):
1910
1911 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
1912
1913         Reviewed by Maciej.
1914         
1915         - Properly document and handle NULL callbacks for static properties. We
1916         throw an exception in any case other than a ReadOnly property with a NULL
1917         setProperty callback, because a NULL callback almost certainly indicates 
1918         a programming error. Also throw an exception if hasProperty returns true
1919         for a property that getProperty can't get.
1920         
1921         - If a static setProperty callback returns 'false', to indicate that the
1922         property was not set, we no longer forward the set request up the class
1923         chain, because that's almost certainly not what the programmer expected.
1924
1925         * API/JSCallbackObject.cpp:
1926         (KJS::JSCallbackObject::getOwnPropertySlot):
1927         (KJS::JSCallbackObject::put):
1928         (KJS::JSCallbackObject::staticValueGetter):
1929         (KJS::JSCallbackObject::staticFunctionGetter):
1930         (KJS::JSCallbackObject::callbackGetter):
1931         * API/JSObjectRef.h:
1932         * API/minidom.js:
1933         * API/testapi.c:
1934         (MyObject_hasProperty):
1935         * API/testapi.js:
1936
1937 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
1938
1939         Reviewed by Maciej.
1940         
1941         - Added names to functions.
1942         
1943         - Removed GetPrivate/SetPrivate from callbackFunctions and callbackConstructors.
1944         The private data idiom is that a JS object stores its native implementation
1945         as private data. For functions and constructors, the native implementation is nothing
1946         more than the callback they already store, so supporting private data, too,
1947         confuses the idiom. If you *really* want, you can still create a custom 
1948         function with private data.
1949
1950         * API/JSCallbackConstructor.cpp:
1951         * API/JSCallbackConstructor.h:
1952         * API/JSCallbackFunction.cpp:
1953         (KJS::JSCallbackFunction::JSCallbackFunction):
1954         * API/JSCallbackFunction.h:
1955         * API/JSCallbackObject.cpp:
1956         (KJS::JSCallbackObject::staticFunctionGetter):
1957         * API/JSObjectRef.cpp:
1958         (JSObjectMakeFunction):
1959         (JSObjectMakeFunctionWithBody):
1960         (JSObjectGetPrivate):
1961         (JSObjectSetPrivate):
1962         * API/JSObjectRef.h:
1963         * API/minidom.c:
1964         (main):
1965         * API/testapi.c:
1966         (main):
1967
1968 2006-07-15  Maciej Stachowiak  <mjs@apple.com>
1969
1970         Reviewed by Darin.
1971         
1972         - switch property lists to be vector+set of Identifiers instead of list of References
1973         
1974         This has the following benefits:
1975         
1976         - no duplicates in property lists
1977         - simplifies API calls
1978         - probably more efficient, since linked list is gone
1979         - entirely removed Reference, ReferenceList and ProtectedReference types from the API
1980
1981         * kjs/PropertyNameArray.cpp: Added.
1982         (KJS::PropertyNameArray::add): Check set, if not already there, add to
1983         vector.
1984         * kjs/PropertyNameArray.h: Added.
1985         (KJS::PropertyNameArray::PropertyNameArray): Newly added type, combines
1986         a set and a vector to make a unique but ordered list of identifiers.
1987         (KJS::PropertyNameArray::begin): ditto
1988         (KJS::PropertyNameArray::end): ditto
1989         (KJS::PropertyNameArray::size): ditto
1990         (KJS::PropertyNameArray::operator[]): ditto
1991         * kjs/array_instance.h:
1992         * kjs/array_object.cpp:
1993         (ArrayInstance::getPropertyNames): renamed from getPropertyList, updated
1994         for PropertyNameArray
1995         (ArrayInstance::setLength): updated for PropertyNameArray
1996         (ArrayInstance::pushUndefinedObjectsToEnd): ditto
1997         * kjs/nodes.cpp:
1998         (ForInNode::execute): updated for PropertyNameArray
1999         * kjs/nodes.h:
2000         * kjs/object.cpp:
2001         (KJS::JSObject::getPropertyNames): renamed from getPropertyList, updated
2002         for PropertyNameArray
2003         * kjs/object.h:
2004         * kjs/property_map.cpp:
2005         (KJS::PropertyMap::getEnumerablePropertyNames): updated for PropertyNameArray
2006         (KJS::PropertyMap::getSparseArrayPropertyNames): ditto
2007         * kjs/property_map.h:
2008         * kjs/protected_reference.h: Removed.
2009         * kjs/reference.cpp: Removed.
2010         * kjs/reference.h: Removed.
2011         * kjs/reference_list.cpp: Removed.
2012         * kjs/reference_list.h: Removed.
2013         * kjs/scope_chain.cpp:
2014         (KJS::ScopeChain::print): Use PropertyNamesArray instead of ReferenceList.
2015         * kjs/string_object.cpp:
2016         (StringInstance::getPropertyNames): Updated for new approach.
2017         * kjs/string_object.h:
2018         * kjs/ustring.h:
2019         * API/APICast.h:
2020         (toJS): Added overload for PropertyNameAccumulatorRef / PropertyNameArray*
2021         (toRef): ditto
2022         * API/JSBase.h:
2023         * API/JSCallbackObject.cpp:
2024         (KJS::JSCallbackObject::getPropertyNames): Fixed for new API.
2025         * API/JSCallbackObject.h:
2026         * API/JSObjectRef.cpp:
2027         (__JSPropertyNameArray::__JSPropertyNameArray): Type used for a publicly vended
2028         JSPropertyNameArrayRef.
2029         (JSObjectCopyPropertyNames): New API call - renamed / refactored from 
2030         JSObjectCreatePropertyList
2031         (JSPropertyNameArrayRetain): new retain call for JSPropertyNameArray.
2032         (JSPropertyNameArrayRelease): new release call for - " -.
2033         (JSPropertyNameArrayGetCount): Instead of having to use a stateful enumerator you
2034         can now get the count and items in any order.
2035         (JSPropertyNameArrayGetNameAtIndex): See above.
2036         (JSPropertyNameAccumulatorAddName): What you add properties to is now an opaque 
2037         accumulator object.
2038         * API/JSObjectRef.h: Prototyped new functions, removed old ones
2039         * JavaScriptCore.exp: Updated exported symbols.
2040         * JavaScriptCore.xcodeproj/project.pbxproj: Added new files, removed old.
2041         * API/testapi.c:
2042         (MyObject_getPropertyNames): Renamed / fixed callback to fit new paradigm.
2043         (main): Updated for new API.
2044
2045 2006-07-15  Darin Adler  <darin@apple.com>
2046
2047         - oops, missed a few more arrays that had to be const
2048
2049         * API/JSNode.c:
2050         (JSNodePrototype_appendChild): Added const.
2051         (JSNodePrototype_removeChild): Ditto.
2052         (JSNodePrototype_replaceChild): Ditto.
2053         (JSNode_construct): Ditto.
2054         * API/JSNodeList.c:
2055         (JSNodeListPrototype_item): Ditto.
2056         * API/JSObjectRef.cpp:
2057         (JSObjectMakeFunctionWithBody): Ditto.
2058         (JSObjectCallAsFunction): Ditto.
2059         (JSObjectCallAsConstructor): Ditto.
2060         * API/minidom.c:
2061         (print): Ditto.
2062         * API/testapi.c:
2063         (MyObject_callAsFunction): Ditto.
2064         (MyObject_callAsConstructor): Ditto.
2065         (print_callAsFunction): Ditto.
2066         (myConstructor_callAsConstructor): Ditto.
2067
2068 2006-07-15  Darin Adler  <darin@apple.com>
2069
2070         Reviewed by Maciej.
2071
2072         * API/JSNode.h: Made an array parameter const.
2073         * API/JSObjectRef.h: Made array parameters const. Fixed a comment.
2074
2075 2006-07-15  Geoffrey Garen  <ggaren@apple.com>
2076
2077         Reviewed by Maciej.
2078         
2079         - JSObjectMakeFunctionWithBody includes a function name and named parameters now.
2080
2081         * API/JSObjectRef.cpp:
2082         (JSObjectMakeFunctionWithBody):
2083         * API/JSObjectRef.h:
2084         * API/testapi.c:
2085         (assertEqualsAsUTF8String): More informative failure reporting.
2086         (main): Test more function cases.
2087
2088 2006-07-15  Geoffrey Garen  <ggaren@apple.com>
2089
2090         Reviewed by Maciej.
2091
2092         - Moved the arguments passed to JSClassCreate into a single structure,
2093         called JSClassDefinition. This will enable easier structure 
2094         migration/versioning in the future, if necessary.
2095         
2096         - Added support for class names.
2097         
2098         - kJSClassDefinitionNull replaces kJSObjectCallbacksNone.
2099         
2100         - JSClass is becoming a fairly complex struct, so I migrated all of its
2101         implementation other than reference counting to the sruct.
2102         
2103         - Also moved JSClass* functions in the API to JSObjectRef.cpp, since they're
2104         declared in JSObjectRef.h
2105         
2106         - Also added some more informative explanation to the class structure doc.
2107         
2108 2006-07-15  Darin Adler  <darin@apple.com>
2109
2110         Reviewed by Geoff.
2111
2112         - fix http://bugs.webkit.org/show_bug.cgi?id=8395
2113           <rdar://problem/4613467>
2114           REGRESSION: RegEx seems broken for hex escaped non breaking space
2115
2116         Test: fast/js/regexp-extended-characters-more.html
2117
2118         * pcre/pcre_exec.c:
2119         (match): Got rid of utf16Length local variable to guarantee there's no
2120         extra stack usage in recursive calls. Fixed two places in the PCRE_UTF16
2121         code that were using the length variable, which is the UTF-8 length of
2122         a character in the pattern, to move in the UTF-16 subject string. Instead
2123         they hardcode lengths of 1 and 2 since the code already handles BMP
2124         characters and surrogate pairs separately. Also fixed some DPRINTF so
2125         I could compile with DEBUG on.
2126         (pcre_exec): Changed a place that was checking for multibyte characters
2127         in the subject string to use ISMIDCHAR. Instead it was using hardcoded
2128         logic that was right for UTF-8 but wrong for UTF-16.
2129
2130         * pcre/pcre_compile.c: (pcre_compile2): Fixed a DPRINTF so I could compile
2131         with DEBUG on.
2132
2133 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
2134
2135         RS by Maciej.
2136         
2137         Global replace in the API of argc/argv with argumentCount/arguments.
2138
2139 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
2140
2141         Reviewed by Maciej.
2142         
2143         - Finalized exception handling in the API.
2144         
2145         setProperty can throw because it throws for built-in arrays. getProperty
2146         and deleteProperty can throw because setProperty can throw and we want
2147         to be consistent, and also because they seem like "actions." callAsFunction,
2148         callAsConstructor, and hasInstance can throw, because they caan throw for
2149         all built-ins.
2150         
2151         toBoolean can't throw because it's defined that way in the spec.
2152         
2153         - Documented that toBoolean and toObject can't be overridden by custom 
2154         objects because they're defined that way in the spec.
2155
2156 === Safari-521.17 ===
2157
2158 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
2159
2160         Reviewed by Maciej.
2161         
2162         - Implemented ref-counting of JSContexts by splitting into two datatypes:
2163         JSGlobalContext, which you can create/retain/release, and JSContext, which
2164         you can't.
2165         
2166         Internally, you retain a JSGlobalContext/ExecState by retaining its
2167         interpreter, which, in the case of a global ExecState, owns it.
2168         
2169         - Also made ~Interpreter() protected to catch places where Interpreter
2170         is manually deleted. (Can't make it private because some crazy fool
2171         decided it would be a good idea to subclass Interpreter in other frameworks.
2172         I pity da fool.)
2173
2174         * API/APICast.h: 
2175         (toJS): Added cast for new JSGlobalContext
2176         * API/JSStringRef.h: Changed vague "you must" language to more specific
2177         (but, ultimately, equally vague) "behavior is undefined if you don't" 
2178         language.
2179         (KJS::Interpreter::Interpreter): Factored more common initialization into
2180         init()
2181         * kjs/interpreter.h:
2182         (KJS::Interpreter::ref): new
2183         (KJS::Interpreter::deref): new
2184         (KJS::Interpreter::refCount): new
2185         * kjs/testkjs.cpp: 
2186         (doIt): Ref-count the interpreter.
2187
2188 2006-07-14  Maciej Stachowiak  <mjs@apple.com>
2189
2190         Reviewed by Geoff.
2191         
2192         - removed bool return value from JSObjectSetProperty, since it is inefficient and
2193         also doesn't work quite right
2194         - added JSObjectGetPropertyAtIndex and JSObjectSetPropertyAtIndex
2195
2196         * API/JSObjectRef.cpp:
2197         (JSObjectSetProperty): Removed return value and canPut stuff.
2198         (JSObjectGetPropertyAtIndex): Added.
2199         (JSObjectSetPropertyAtIndex): Added.
2200         * API/JSObjectRef.h: Prototyped and documented new functions.
2201
2202 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
2203
2204         Reviewed by Beth.
2205         
2206         Moved JSCheckScriptSyntax, JSEvaluateScript, and JSGarbageCollect into
2207         JSBase.h/.cpp. They don't belong in the value-specific or context-specific 
2208         files because they're not part of the value or context implementations.
2209
2210         * API/JSBase.h:
2211         * API/JSContextRef.cpp:
2212         (JSContextGetGlobalObject):
2213         * API/JSContextRef.h:
2214         * API/JSValueRef.cpp:
2215         (JSValueUnprotect):
2216         * API/JSValueRef.h:
2217         * JavaScriptCore.xcodeproj/project.pbxproj:
2218
2219 2006-07-13  Timothy Hatcher  <timothy@apple.com>
2220
2221         Reviewed by Maciej.
2222
2223         Moved JavaScriptCore to be a public framework.
2224
2225         * JavaScriptCore.xcodeproj/project.pbxproj:
2226
2227 2006-07-13  Mark Rowe  <opendarwin.org@bdash.net.nz>
2228
2229         Reviewed by Geoffrey.
2230
2231         http://bugs.webkit.org/show_bug.cgi?id=9742
2232         Bug 9742: REGRESSION: WebKit hangs when loading <http://www.vtbook.com>
2233
2234         * kjs/value.h:
2235         (KJS::JSValue::getUInt32): Only types tagged as numeric can be converted to UInt32.
2236
2237 2006-07-13  Geoffrey Garen  <ggaren@apple.com>
2238
2239         Pleasing to Maciej.
2240         
2241         - Renamed JSEvaluate -> JSEvaluateScript, JSCheckSyntax -> JSCheckScriptSyntax
2242         - Added exception out parameters to JSValueTo* and JSValueIsEqual because
2243         they can throw
2244         - Removed JSObjectGetDescription because it's useless and vague, and 
2245         JSValueToString/JSValueIsObjectOfClass do a better job, anyway
2246         - Clarified comments about "IsFunction/Constructor" to indicate that they
2247         are true of all functions/constructors, not just those created by JSObjectMake*
2248
2249 2006-07-12  Geoffrey Garen  <ggaren@apple.com>
2250
2251         RS by Beth.
2252         
2253         Finished previously approved JSInternalString -> JSString conversion 
2254         by renaming the files.
2255
2256         * API/JSCallbackObject.cpp:
2257         * API/JSInternalStringRef.cpp: Removed.
2258         * API/JSInternalStringRef.h: Removed.
2259         * API/JSStringRef.cpp: Added.
2260         * API/JSStringRef.h: Added.
2261         * API/JavaScriptCore.h:
2262         * JavaScriptCore.xcodeproj/project.pbxproj:
2263
2264 2006-07-12  Geoffrey Garen  <ggaren@apple.com>
2265
2266         Reviewed by Maciej.
2267         
2268         - Removed context and exception parameters from JSObjectGetPropertyEnumerator,
2269         removing the spurious use of ExecState inside JavaScriptCore that made
2270         us think this was necessary in the first place.
2271
2272         (StringInstance::getPropertyList): Use getString instead of toString because
2273         we know we're dealing with a string -- we put it there in the first place.
2274         While we're at it, store the string's size instead of retrieving it each time 
2275         through the loop, to avoid the unnecessary killing of puppies.
2276         * kjs/string_object.h:
2277
2278 2006-07-12  Maciej Stachowiak  <mjs@apple.com>
2279
2280         Reviewed by Geoff.
2281         
2282         - add handling of hasInstance callback for API objects
2283
2284         * API/JSCallbackObject.cpp:
2285         (KJS::JSCallbackObject::implementsHasInstance): Check if callback is present.
2286         (KJS::JSCallbackObject::hasInstance): Invoke appropriate callback.
2287         * API/JSCallbackObject.h:
2288         * API/JSClassRef.cpp:
2289         * API/JSObjectRef.h:
2290         * API/testapi.c:
2291         (MyObject_hasInstance): Test case; should match what construct would do.
2292         * API/testapi.js:
2293
2294 2006-07-11  Geoffrey Garen  <ggaren@apple.com>
2295
2296         Reviewed by Maciej.
2297         
2298         - Implemented a vast number of renames and comment clarifications 
2299         suggested during API review.
2300         
2301         JSInternalString -> JSString
2302         JS*Make -> JSValueMake*, JSObjectMake*
2303         JSTypeCode -> JSType
2304         JSValueIsInstanceOf -> JSValueIsInstanceOfConstructor (reads strangely well in client code)
2305         JSGC*Protect -> JSValue*Protect
2306         JS*Callback -> JSObject*Callback
2307         JSGetPropertyListCallback -> JSObjectAddPropertiesToListCallback
2308         JSPropertyEnumeratorGetNext -> JSPropertyEnumeratorGetNextName
2309         JSString* -> 
2310             JSStringCreateWithUTF8CString, JSStringGetUTF8CString,
2311             JSStringGetMaximumUTF8CStringSize JSStringIsEqualToUTF8CString, 
2312             JSStringCreateWithCFString, JSStringCopyCFString, JSStringCreateWithCharacters.
2313         
2314         - Changed functions taking a JSValue out arg and returning a bool indicating
2315         whether it was set to simply return a JSValue or NULL.
2316         
2317         - Removed JSStringGetCharacters because it's more documentation than code,
2318         and it's just a glorified memcpy built on existing API functionality.
2319         
2320         - Moved standard library includes into the headers that actually require them.
2321         
2322         - Standardized use of the phrase "Create Rule."
2323         
2324         - Removed JSLock from make functions that don't allocate.
2325         
2326         - Added exception handling to JSValueToBoolean, since we now allow
2327         callback objects to throw exceptions upon converting to boolean.
2328         
2329         - Renamed JSGCCollect to JSGarbageCollect.
2330
2331 2006-07-10  Geoffrey Garen  <ggaren@apple.com>
2332
2333         Reviewed by Darin.
2334         
2335         - Changed public header includes to the <JavaScriptCore/ style.
2336         - Changed instances of 'buffer' to 'string' since we decided on
2337         JSInternalString instead of JSStringBuffer.
2338
2339         * API/JSContextRef.h:
2340         * API/JSInternalStringRef.cpp:
2341         (JSStringMake):
2342         (JSInternalStringRetain):
2343         (JSInternalStringRelease):
2344         (JSValueCopyStringValue):
2345         (JSInternalStringGetLength):
2346         (JSInternalStringGetCharactersPtr):
2347         (JSInternalStringGetCharacters):
2348         (JSInternalStringGetMaxLengthUTF8):
2349         (JSInternalStringGetCharactersUTF8):
2350         (CFStringCreateWithJSInternalString):
2351         * API/JSInternalStringRef.h:
2352         * API/JSNode.c:
2353         (JSNodePrototype_appendChild):
2354         (JSNode_getNodeType):
2355         * API/JSObjectRef.cpp:
2356         (JSObjectCallAsConstructor):
2357         * API/JSValueRef.h:
2358         * API/JavaScriptCore.h:
2359         * API/minidom.c:
2360         (main):
2361         (print):
2362         * API/testapi.c:
2363         (MyObject_getPropertyList):
2364         (myConstructor_callAsConstructor):
2365         (main): I noticed that we were prematurely releasing some string buffers,
2366         so I moved their release calls to the end of main(). I got rid of 'Buf' in *Buf
2367         (sometimes changing to 'IString', when necessary to differentiate a variable) 
2368         to match the buffer->string change.
2369
2370 === Safari-521.16 ===
2371
2372 2006-07-10  Darin Adler  <darin@apple.com>
2373
2374         * kjs/value.cpp: (KJS::JSValue::toInt32Inline): Added inline keyword one more place.
2375         Just in case.
2376
2377 2006-07-10  Darin Adler  <darin@apple.com>
2378
2379         - fix the release build
2380
2381         * kjs/value.h:
2382         * kjs/value.cpp:
2383         (KJS::JSValue::toInt32Inline): Move the code here to an inline.
2384         (KJS::JSValue::toInt32): Call the inline from both overloaded toInt32 functions.
2385
2386 2006-07-10  David Kilzer  <ddkilzer@kilzer.net>
2387
2388         Reviewed by Darin.
2389
2390         - fix http://bugs.webkit.org/show_bug.cgi?id=9179
2391           Implement select.options.add() method
2392
2393         * JavaScriptCore.exp: Added overloaded KJS::JSValue::toInt32() method.
2394         * JavaScriptCore.xcodeproj/project.pbxproj: Altered attributes metadata for
2395         kjs/value.h to make it available as a forwarded header.
2396         * kjs/lookup.h:
2397         (KJS::lookupPut): Extracted a lookupPut() method from the existing lookupPut() method.
2398         The new method returns a boolean value if no entry is found in the lookup table.
2399         * kjs/value.cpp:
2400         (KJS::JSValue::toInt32): Overloaded toInt32() method with boolean "Ok" argument.
2401         * kjs/value.h: Ditto.
2402
2403 2006-07-10  Geoffrey Garen  <ggaren@apple.com>
2404
2405         No review necessary. Removed bogus file I accidentally checked in before.
2406
2407         * API/JSInternalSringRef.h: Removed.
2408
2409 2006-07-10  Geoffrey Garen  <ggaren@apple.com>
2410
2411         Reviewed by Darin.
2412         
2413         Added exception out parameter to API object callbacks, removed semi-bogus
2414         JSContext(.*)Exception functions.
2415         
2416         To make these calls syntactically simple, I added an exceptionSlot()
2417         method to the ExecState class, which provides a JSValue** slot in which to 
2418         store a JSValue* exception.
2419
2420         * API/APICast.h:
2421         (toRef):
2422         * API/JSCallbackConstructor.cpp:
2423         (KJS::JSCallbackConstructor::construct):
2424         * API/JSCallbackFunction.cpp:
2425         (KJS::JSCallbackFunction::callAsFunction):
2426         * API/JSCallbackObject.cpp:
2427         (KJS::JSCallbackObject::init):
2428         (KJS::JSCallbackObject::getOwnPropertySlot):
2429         (KJS::JSCallbackObject::put):
2430         (KJS::JSCallbackObject::deleteProperty):
2431         (KJS::JSCallbackObject::construct):
2432         (KJS::JSCallbackObject::callAsFunction):
2433         (KJS::JSCallbackObject::getPropertyList):
2434         (KJS::JSCallbackObject::toBoolean):
2435         (KJS::JSCallbackObject::toNumber):
2436         (KJS::JSCallbackObject::toString):
2437         (KJS::JSCallbackObject::staticValueGetter):
2438         (KJS::JSCallbackObject::callbackGetter):
2439         * API/JSContextRef.cpp:
2440         (JSCheckSyntax):
2441         * API/JSContextRef.h:
2442         * API/JSNode.c:
2443         (JSNodePrototype_appendChild):
2444         (JSNodePrototype_removeChild):
2445         (JSNodePrototype_replaceChild):
2446         (JSNode_getNodeType):
2447         (JSNode_getChildNodes):
2448         (JSNode_getFirstChild):
2449         (JSNode_construct):
2450         * API/JSNode.h:
2451         * API/JSNodeList.c:
2452         (JSNodeListPrototype_item):
2453         (JSNodeList_length):
2454         (JSNodeList_getProperty):
2455         * API/JSObjectRef.h:
2456         * API/minidom.c:
2457         (print):
2458         * API/testapi.c:
2459         (MyObject_initialize):
2460         (MyObject_hasProperty):
2461         (MyObject_getProperty):
2462         (MyObject_setProperty):
2463         (MyObject_deleteProperty):
2464         (MyObject_getPropertyList):
2465         (MyObject_callAsFunction):
2466         (MyObject_callAsConstructor):
2467         (MyObject_convertToType):
2468         (print_callAsFunction):
2469         (myConstructor_callAsConstructor):
2470         (main):
2471         * JavaScriptCore.exp:
2472         * kjs/ExecState.h:
2473         (KJS::ExecState::exceptionHandle):
2474
2475 2006-07-10  Geoffrey Garen  <ggaren@apple.com>
2476
2477         Reviewed by Darin.
2478
2479         Improved type safety by implementing opaque JSValue/JSObject typing through 
2480         abuse of 'const', not void*. Also fixed an alarming number of bugs
2481         exposed by this new type safety.
2482         
2483         I made one design change in JavaScriptCore, which is that the JSObject
2484         constructor should take a JSValue* as its prototype argument, not a JSObject*,
2485         since we allow the prototype to be any JSValue*, including jsNull(), for
2486         example.
2487         
2488         * API/APICast.h:
2489         (toJS):
2490         * API/JSBase.h:
2491         * API/JSCallbackConstructor.cpp:
2492         (KJS::JSCallbackConstructor::construct):
2493         * API/JSCallbackFunction.cpp:
2494         (KJS::JSCallbackFunction::callAsFunction):
2495         * API/JSCallbackObject.cpp:
2496         (KJS::JSCallbackObject::JSCallbackObject):
2497         (KJS::JSCallbackObject::getOwnPropertySlot):
2498         (KJS::JSCallbackObject::put):
2499         (KJS::JSCallbackObject::construct):
2500         (KJS::JSCallbackObject::callAsFunction):
2501         (KJS::JSCallbackObject::staticFunctionGetter):
2502         * API/JSCallbackObject.h:
2503         * API/JSContextRef.cpp:
2504         (JSEvaluate):
2505         * API/JSNode.c:
2506         (JSNodePrototype_appendChild):
2507         (JSNodePrototype_removeChild):
2508         (JSNodePrototype_replaceChild):
2509         * API/JSObjectRef.cpp:
2510         (JSObjectMake):
2511         (JSFunctionMakeWithBody):
2512         (JSObjectGetProperty):
2513         (JSObjectCallAsFunction):
2514         (JSObjectCallAsConstructor):
2515         * API/JSObjectRef.h:
2516         * API/testapi.c:
2517         (main):
2518         * ChangeLog:
2519         * kjs/object.h:
2520         (KJS::JSObject::JSObject):
2521
2522 2006-07-10  Geoffrey Garen  <ggaren@apple.com>
2523
2524         Approved by Maciej, Darin.
2525         
2526         Renamed JSStringBufferRef to JSInternalStringRef. "Internal string" means the 
2527         JavaScript engine's internal string representation, which is the most 
2528         low-level and efficient representation to use when interfacing with JavaScript.
2529
2530         * API/APICast.h:
2531         (toJS):
2532         (toRef):
2533         * API/JSBase.h:
2534         * API/JSCallbackObject.cpp:
2535         (KJS::JSCallbackObject::getOwnPropertySlot):
2536         (KJS::JSCallbackObject::put):
2537         (KJS::JSCallbackObject::deleteProperty):
2538         (KJS::JSCallbackObject::staticValueGetter):
2539         (KJS::JSCallbackObject::callbackGetter):
2540         * API/JSContextRef.cpp:
2541         (JSEvaluate):
2542         (JSCheckSyntax):
2543         * API/JSContextRef.h:
2544         * API/JSInternalStringRef.cpp: Added.
2545         (JSStringMake):
2546         (JSInternalStringCreate):
2547         (JSInternalStringCreateUTF8):
2548         (JSInternalStringRetain):
2549         (JSInternalStringRelease):
2550         (JSValueCopyStringValue):
2551         (JSInternalStringGetLength):
2552         (JSInternalStringGetCharactersPtr):
2553         (JSInternalStringGetCharacters):
2554         (JSInternalStringGetMaxLengthUTF8):
2555         (JSInternalStringGetCharactersUTF8):
2556         (JSInternalStringIsEqual):
2557         (JSInternalStringIsEqualUTF8):
2558         (JSInternalStringCreateCF):
2559         (CFStringCreateWithJSInternalString):
2560         * API/JSInternalStringRef.h: Added.
2561         * API/JSNode.c:
2562         (JSNodePrototype_appendChild):
2563         (JSNode_getNodeType):
2564         (JSNode_getChildNodes):
2565         (JSNode_getFirstChild):
2566         * API/JSNodeList.c:
2567         (JSNodeList_length):
2568         (JSNodeList_getProperty):
2569         * API/JSObjectRef.cpp:
2570         (JSFunctionMakeWithBody):
2571         (JSObjectGetDescription):
2572         (JSObjectHasProperty):
2573         (JSObjectGetProperty):
2574         (JSObjectSetProperty):
2575         (JSObjectDeleteProperty):
2576         (JSPropertyEnumeratorGetNext):
2577         (JSPropertyListAdd):
2578         * API/JSObjectRef.h:
2579         * API/JSStringBufferRef.cpp: Removed.
2580         * API/JSStringBufferRef.h: Removed.
2581         * API/JSValueRef.h:
2582         * API/JavaScriptCore.h:
2583         * API/minidom.c:
2584         (main):
2585         (print):
2586         * API/testapi.c:
2587         (assertEqualsAsUTF8String):
2588         (assertEqualsAsCharactersPtr):
2589         (assertEqualsAsCharacters):
2590         (MyObject_hasProperty):
2591         (MyObject_getProperty):
2592         (MyObject_setProperty):
2593         (MyObject_deleteProperty):
2594         (MyObject_getPropertyList):
2595         (print_callAsFunction):
2596         (myConstructor_callAsConstructor):
2597         (main):
2598         * JavaScriptCore.exp:
2599         * JavaScriptCore.xcodeproj/project.pbxproj:
2600
2601 2006-07-08  Tim Omernick  <timo@apple.com>
2602
2603         Reviewed by Maciej.
2604
2605         Added an OpenGL drawing model to the Netscape Plug-in API.
2606
2607         * bindings/npapi.h:
2608
2609 2006-07-08  Timothy Hatcher  <timothy@apple.com>
2610
2611         Reviewed by Maciej.
2612
2613         Moved KJS_GetCreatedJavaVMs to jni_utility.cpp.
2614         Switched KJS_GetCreatedJavaVMs over to use dlopen and dlsym
2615         now that NSAddImage, NSLookupSymbolInImage and NSAddressOfSymbol
2616         are deprecated in Leopard.
2617
2618         * JavaScriptCore.exp:
2619         * JavaScriptCore.xcodeproj/project.pbxproj:
2620         * bindings/jni/jni_utility.cpp:
2621         (KJS::Bindings::KJS_GetCreatedJavaVMs):
2622         * bindings/softlinking.c: Removed.
2623         * bindings/softlinking.h: Removed.
2624
2625 2006-07-08  Geoffrey Garen  <ggaren@apple.com>
2626
2627         Reviewed by Anders.
2628         
2629         - Make JSObjectGetProperty return a JSValue or NULL, like JSEvaluate does.
2630
2631         * API/JSObjectRef.cpp:
2632         (JSObjectGetProperty):
2633         * API/JSObjectRef.h:
2634         * API/testapi.c:
2635         (main):
2636
2637 2006-07-08  Geoffrey Garen  <ggaren@apple.com>
2638
2639         Style change -- no review necessary.
2640         
2641         Use 0 instead of NULL in API .cpp files, to match our style guidelines.
2642
2643         * API/JSContextRef.cpp:
2644         (JSEvaluate):
2645         * API/JSObjectRef.cpp:
2646         (JSFunctionMakeWithBody):
2647         (JSObjectCallAsFunction):
2648         (JSObjectCallAsConstructor):
2649         * API/JSValueRef.cpp:
2650         (JSValueToObject):
2651
2652 2006-07-08  Geoffrey Garen  <ggaren@apple.com>
2653
2654         Reviewed by TimO.
2655
2656         - Added ability to pass NULL for thisObject when calling JSObjectCallAsFunction,
2657         to match JSEvaluate.
2658         
2659         * API/JSObjectRef.cpp:
2660         (JSObjectCallAsFunction):
2661         * API/JSObjectRef.h:
2662         * API/testapi.c:
2663         (main):
2664
2665 === Safari-521.15 ===
2666
2667 2006-07-07  Geoffrey Garen  <ggaren@apple.com>
2668
2669         Reviewed by Maciej.
2670         
2671         - Standardized which functions take a JSContext as an argument. The rule is:
2672         if you might execute JavaScript, you take a JSContext, otherwise you don't.
2673         
2674         The FIXME in JSObjectRef.h requires refactoring some parts of Interpreter,
2675         but not API changes, so I'm putting it off until later.
2676
2677         * API/JSCallbackObject.cpp:
2678         (KJS::JSCallbackObject::JSCallbackObject):
2679         (KJS::JSCallbackObject::init):
2680         * API/JSCallbackObject.h:
2681         * API/JSContextRef.cpp:
2682         (JSContextCreate):
2683         * API/JSContextRef.h:
2684         * API/JSObjectRef.cpp:
2685         (JSObjectMake):
2686         (JSPropertyEnumeratorGetNext):
2687         * API/JSObjectRef.h:
2688         * API/testapi.c:
2689         (MyObject_initialize):
2690         (main):
2691         * JavaScriptCore.exp:
2692         * kjs/array_object.cpp:
2693         (ArrayInstance::setLength):
2694         (ArrayInstance::pushUndefinedObjectsToEnd):
2695         * kjs/nodes.cpp:
2696         (ForInNode::execute):
2697         * kjs/reference.cpp:
2698         (KJS::Reference::getPropertyName):
2699         (KJS::Reference::getValue):
2700         * kjs/reference.h:
2701         * kjs/scope_chain.cpp:
2702         (KJS::ScopeChain::print):
2703
2704 2006-07-06  Geoffrey Garen  <ggaren@apple.com>
2705
2706         Reviewed by Maciej.
2707         
2708         More API action.
2709         
2710         - Headerdoc finished
2711
2712         Semantic Changes:
2713         - Added a JSContextRef argument to many functions, because you need a 
2714         JSContextRef for doing virtually anything. I expect to add this argument
2715         to even more functions in a future patch.
2716         
2717         - Removed the globalObjectPrototype argument to JSContextCreate because
2718         you can't create an object until you have a context, so it's impossible
2719         to pass a prototype object to JSContextCreate. That's OK because (1) there's
2720         no reason to give the global object a prototype and (2) if you really want
2721         to, you can just use a separate call to JSObjectSetPrototype.
2722         
2723         - Removed the JSClassRef argument to JSClassCreate because it was unnecessary,
2724         and you need to be able to make the global object's class before you've
2725         created a JSContext.
2726         
2727         - Added an optional exception parameter to JSFunctionMakeWithBody because anything
2728         less would be uncivilized.
2729         
2730         - Made the return value parameter to JSObjectGetProperty optional to match
2731         all other return value parameters in the API.
2732         
2733         - Made JSObjectSetPrivate/JSObjectGetPrivate work on JSCallbackFunctions
2734         and JSCallbackConstructors. You could use an abstract base class or strategic
2735         placement of m_privateData in the class structure to implement this, but 
2736         the former seemed like overkill, and the latter seemed too dangerous.
2737         
2738         - Fixed a bug where JSPropertyEnumeratorGetNext would skip the first property.
2739
2740         Cosmetic Changes:
2741         - Reversed the logic of the JSChar #ifdef to avoid confusing headerdoc
2742         
2743         - Removed function names from @function declarations because headeroc
2744         can parse them automatically, and I wanted to rule out manual mismatch.
2745
2746         - Changed Error::create to take a const UString& instead of a UString*
2747         because it was looking at me funny.
2748         
2749         - Renamed JSStringBufferCreateWithCFString to JSStringBufferCreateCF
2750         because the latter is more concise and it matches JSStringBufferCreateUTF8.
2751         
2752         * API/JSCallbackObject.cpp:
2753         (KJS::JSCallbackObject::getOwnPropertySlot):
2754         (KJS::JSCallbackObject::put):
2755         (KJS::JSCallbackObject::deleteProperty):
2756         (KJS::JSCallbackObject::getPropertyList):
2757         (KJS::JSCallbackObject::toBoolean):
2758         (KJS::JSCallbackObject::toNumber):
2759         (KJS::JSCallbackObject::toString):
2760         * API/JSClassRef.cpp:
2761         (JSClassCreate):
2762         * API/JSContextRef.cpp:
2763         (JSContextCreate):
2764         (JSContextSetException):
2765         * API/JSContextRef.h:
2766         * API/JSNode.c:
2767         (JSNodePrototype_class):
2768         (JSNode_class):
2769         * API/JSNodeList.c:
2770         (JSNodeListPrototype_class):
2771         (JSNodeList_class):
2772         * API/JSObjectRef.cpp:
2773         (JSObjectGetProperty):
2774         (JSObjectGetPrivate):
2775         (JSObjectSetPrivate):
2776         (JSObjectCallAsFunction):
2777         (JSObjectCallAsConstructor):
2778         (JSPropertyEnumeratorGetNext):
2779         * API/JSObjectRef.h:
2780         * API/JSStringBufferRef.cpp:
2781         (JSStringBufferCreateCF):
2782         * API/JSStringBufferRef.h:
2783         * API/JSValueRef.cpp:
2784         (JSValueIsInstanceOf):
2785         * API/JSValueRef.h:
2786         * API/minidom.c:
2787         (main):
2788         * API/minidom.js:
2789         * API/testapi.c:
2790         (MyObject_hasProperty):
2791         (MyObject_setProperty):
2792         (MyObject_deleteProperty):
2793         (MyObject_getPropertyList):
2794         (MyObject_convertToType):
2795         (MyObject_class):
2796         (main):
2797         * JavaScriptCore.exp:
2798
2799 2006-07-07  Geoffrey Garen  <ggaren@apple.com>
2800
2801         Reviewed by John.
2802         
2803         - Fixed a few crashes resulting from NULL parameters to JSClassCreate.
2804
2805         * API/JSClassRef.cpp:
2806         (JSClassCreate):
2807         (JSClassRelease):
2808         * API/testapi.c: Added test for NULL parameters.
2809         (main):
2810
2811 2006-07-07  Geoffrey Garen  <ggaren@apple.com>
2812
2813         Reviewed by John, mocked by Darin.
2814         
2815         - Changed JSEvaluate to take a JSObjectRef instead of a JSValueRef as
2816         "this," since "this" must be an object.
2817
2818         * API/JSContextRef.cpp:
2819         (JSEvaluate):
2820         * API/JSContextRef.h:
2821
2822 2006-07-07  Geoffrey Garen  <ggaren@apple.com>
2823
2824         Reviewed by John.
2825         
2826         - More headerdoc
2827
2828         * API/JSBase.h:
2829         * JavaScriptCore.xcodeproj/project.pbxproj:
2830
2831 2006-07-05  Geoffrey Garen  <ggaren@apple.com>
2832
2833         RS by Beth.
2834         
2835         Renamed JSCharBufferRef, which was universally unpopular, to JSStringBufferRef,
2836         which, hopefully, will be less unpopular.
2837
2838         * API/APICast.h:
2839         (toJS):
2840         (toRef):
2841         * API/JSBase.h:
2842         * API/JSCallbackObject.cpp:
2843         (KJS::JSCallbackObject::getOwnPropertySlot):
2844         (KJS::JSCallbackObject::put):
2845         (KJS::JSCallbackObject::deleteProperty):
2846         (KJS::JSCallbackObject::staticValueGetter):
2847         (KJS::JSCallbackObject::callbackGetter):
2848         * API/JSCharBufferRef.cpp: Removed.
2849         * API/JSCharBufferRef.h: Removed.
2850         * API/JSContextRef.cpp:
2851         (JSEvaluate):
2852         (JSCheckSyntax):
2853         * API/JSContextRef.h:
2854         * API/JSNode.c:
2855         (JSNodePrototype_appendChild):
2856         (JSNode_getNodeType):
2857         (JSNode_getChildNodes):
2858         (JSNode_getFirstChild):
2859         * API/JSNodeList.c:
2860         (JSNodeList_length):
2861         (JSNodeList_getProperty):
2862         * API/JSObjectRef.cpp:
2863         (JSFunctionMakeWithBody):
2864         (JSObjectGetDescription):
2865         (JSObjectHasProperty):
2866         (JSObjectGetProperty):
2867         (JSObjectSetProperty):
2868         (JSObjectDeleteProperty):
2869         (JSPropertyEnumeratorGetNext):
2870         (JSPropertyListAdd):
2871         * API/JSObjectRef.h:
2872         * API/JSStringBufferRef.cpp: Added.
2873         (JSStringMake):
2874         (JSStringBufferCreate):
2875         (JSStringBufferCreateUTF8):
2876         (JSStringBufferRetain):
2877         (JSStringBufferRelease):
2878         (JSValueCopyStringValue):
2879         (JSStringBufferGetLength):
2880         (JSStringBufferGetCharactersPtr):
2881         (JSStringBufferGetCharacters):
2882         (JSStringBufferGetMaxLengthUTF8):
2883         (JSStringBufferGetCharactersUTF8):
2884         (JSStringBufferIsEqual):
2885         (JSStringBufferIsEqualUTF8):
2886         (JSStringBufferCreateWithCFString):
2887         (CFStringCreateWithJSStringBuffer):
2888         * API/JSStringBufferRef.h: Added.
2889         * API/JSValueRef.h:
2890         * API/JavaScriptCore.h:
2891         * API/minidom.c:
2892         (main):
2893         (print):
2894         * API/testapi.c:
2895         (assertEqualsAsUTF8String):
2896         (assertEqualsAsCharactersPtr):
2897         (assertEqualsAsCharacters):
2898         (MyObject_hasProperty):
2899         (MyObject_getProperty):
2900         (MyObject_setProperty):
2901         (MyObject_deleteProperty):
2902         (MyObject_getPropertyList):
2903         (print_callAsFunction):
2904         (myConstructor_callAsConstructor):
2905         (main):
2906         * JavaScriptCore.exp:
2907         * JavaScriptCore.xcodeproj/project.pbxproj:
2908
2909 2006-07-05  Geoffrey Garen  <ggaren@apple.com>
2910
2911         RS by Beth.
2912         
2913         Moved some code around for more logical file separation.
2914
2915         * API/JSBase.h:
2916         * API/JSContextRef.h:
2917         * API/JSObjectRef.cpp:
2918         * API/JSValueRef.cpp:
2919         (JSValueToObject):
2920         * API/JSValueRef.h:
2921
2922 2006-07-03  Geoffrey Garen  <ggaren@apple.com>
2923
2924         Reviewed by Maciej.
2925         
2926         Implemented JSFunctionMakeWithBody, which parses a script as a function body
2927         in the global scope, and returns the resulting anonymous function.
2928         
2929         I also removed private data from JSCallbackFunction. It never worked,
2930         since JSCallbackFunction doesn't inherit from JSCallbackObject.
2931
2932         * API/JSCallbackConstructor.cpp: Removed.
2933         * API/JSCallbackConstructor.h: Removed.
2934         * API/JSCallbackFunction.cpp:
2935         (KJS::JSCallbackFunction::JSCallbackFunction):
2936         (KJS::JSCallbackFunction::implementsConstruct):
2937         (KJS::JSCallbackFunction::construct):
2938         (KJS::JSCallbackFunction::implementsCall):
2939         (KJS::JSCallbackFunction::callAsFunction):
2940         * API/JSCallbackFunction.h:
2941         * API/JSCallbackObject.cpp:
2942         (KJS::JSCallbackObject::staticFunctionGetter):
2943         * API/JSObjectRef.cpp:
2944         (JSFunctionMake):
2945         (JSFunctionMakeWithCallbacks):
2946         * API/JSObjectRef.h:
2947         * API/JSValueRef.h:
2948         * API/minidom.c:
2949         (main):
2950         * API/testapi.c:
2951         (main):
2952         * JavaScriptCore.exp: Programmatically added all symbols exported by
2953         API object files, and sorted results
2954         * JavaScriptCore.xcodeproj/project.pbxproj:
2955
2956 2006-07-03  Geoffrey Garen  <ggaren@apple.com>
2957
2958         Reviewed by Maciej.
2959
2960         - Return syntax error in JSCheckSyntax through a JSValueRef* exception
2961         argument
2962         
2963         * API/JSBase.h:
2964         * API/JSContextRef.cpp:
2965         (JSCheckSyntax):
2966         * API/testapi.c:
2967         (main):
2968         * JavaScriptCore.exp:
2969         * kjs/interpreter.cpp:
2970         (KJS::Interpreter::checkSyntax):
2971         * kjs/interpreter.h:
2972
2973 2006-07-04  Darin Adler  <darin@apple.com>
2974
2975         - fixed build
2976
2977         * wtf/MathExtras.h: Oops. Added missing #endif.
2978
2979 2006-07-04  Bjoern Graf  <bjoern.graf@gmail.com>
2980
2981         Reviewed by Maciej.
2982         Tweaked a bit by Darin.
2983
2984         - http://bugs.webkit.org/show_bug.cgi?id=9678
2985           work around MSVCRT's fmod function returning NaN for fmod(x, infinity) instead of x
2986
2987         * wtf/MathExtras.h: Added include of <float.h>.
2988         (isinf): Fix to return false for NAN.
2989         (wtf_fmod): Added. An inline that works around the bug.
2990
2991         * kjs/nodes.cpp:
2992         * kjs/number_object.cpp:
2993         * kjs/operations.cpp:
2994         * kjs/value.cpp:
2995         Added includes of MathExtras.h to all files using fmod.
2996
2997         * JavaScriptCore.xcodeproj/project.pbxproj: Let Xcode 2.3 have its way with
2998         the project.
2999
3000 2006-07-01  Geoffrey Garen  <ggaren@apple.com>
3001
3002         Reviewed by Darin.
3003         
3004         - Refined value conversions in the API:
3005             - failed toNumber returns NaN
3006             - failed toObject returns NULL
3007             - failed toString returns empty string
3008         
3009         - Refined excpetion handling in the API:
3010             - failed value conversions do not throw exceptions
3011             - uncaught exceptions in JSEvaluate, JSObjectCallAsFunction, and 
3012               JSObjectCallAsConstructor are returned through a JSValueRef* exception
3013               argument
3014             - removed JSContextHasException, because JSContextGetException does
3015               the same job
3016             
3017         * API/JSBase.h:
3018         * API/JSCharBufferRef.cpp:
3019         (JSValueCopyStringValue):
3020         * API/JSContextRef.cpp:
3021         (JSEvaluate):
3022         * API/JSContextRef.h:
3023         * API/JSNodeList.c: Added test code demonstrating how you would use
3024         toNumber, and why you probably don't need toUInt32, etc.
3025         (JSNodeListPrototype_item):
3026         (JSNodeList_getProperty):
3027         * API/JSObjectRef.cpp:
3028         (JSValueToObject):
3029         (JSObjectCallAsFunction):
3030         (JSObjectCallAsConstructor):
3031         * API/JSObjectRef.h:
3032         * API/JSValueRef.cpp:
3033         (JSValueToNumber):
3034         * API/JSValueRef.h:
3035         * API/minidom.c:
3036         (main):
3037         * API/testapi.c:
3038         (main): Added tests for new rules, and call to JSGCProtect to fix Intel 
3039         crash
3040         * JavaScriptCore.exp:
3041
3042 2006-07-03  Darin Adler  <darin@apple.com>
3043
3044         - Rolled out HashMap implementation of NPRuntime, at least temporarily.
3045
3046         Fixes hang in the bindings section of layout tests seen on the
3047         buildbot.
3048
3049         This code was using HashMap<const char*, PrivateIdentifier*>.
3050         But that hashes based on pointer identity, not string value.
3051         The default hash for any pointer type is to hash based on the pointer.
3052         And WTF doesn't currently have a string hash for char*.
3053         We'll need to fix that before re-landing this patch.
3054
3055         (Formatting was also incorrect -- extra spaces in parentheses.)
3056
3057         * bindings/npruntime.cpp: Rolled out last change.
3058
3059 2006-07-02  Justin Haygood  <jhaygood@spsu.edu>
3060
3061         Reviewed, tweaked, landed by ggaren.
3062
3063         - Port NPRuntime from CFDictionary to HashMap.
3064
3065         * bindings/npruntime.cpp:
3066         (getStringIdentifierDictionary):
3067         (getIntIdentifierDictionary):
3068         (_NPN_GetStringIdentifier):
3069         (_NPN_GetIntIdentifier):
3070         * bindings/npruntime.h:
3071
3072 2006-07-01  Geoffrey Garen  <ggaren@apple.com>
3073
3074         Reviewed by Adele.
3075         
3076         - Fixed <rdar://problem/4611197> REGRESSION: Liveconnect with Java test 
3077         fails at http://www-sor.inria.fr/~dedieu/notes/liveconnect/simple_example.html
3078
3079         * JavaScriptCore.exp: Export symbols used by liveconnect
3080
3081 2006-06-29  Geoffrey Garen  <ggaren@apple.com>
3082
3083         Reviewed by Maciej.
3084         
3085         - Phase 2 in the JS API.
3086         
3087         - Added support for specifying static tables of values -- this should
3088         obviate the need for using complicated callbacks for most lookups.
3089         
3090         -  API objects are now created with classes (JSClassRef) -- in order to support
3091         static values, and in order to prevent API objects from storing their
3092         data inline, and thus falling into the oversized (read: slow and prone to
3093         giving Maciej the frowny face) heap.
3094         
3095         - Added two specialized JSObject subclasses -- JSCallbackFunction and JSCallbackConstructor -- 
3096         to allow JSFunctionMake and JSConstructorMake to continue to work with
3097         the new class model. Another solution to this problem would be to create
3098         a custom class object for each function and constructor you make. This
3099         solution is more code but also more efficient.
3100         
3101         - Substantially beefed up the minidom example to demonstrate and test a
3102         lot of these techniques. Its output is still pretty haphazard, though.
3103         
3104         - Gave the <kjs/ preface to some includes -- I'm told this matters to
3105         building on some versions of Linux.
3106         
3107         - Implemented JSValueIsInstanceOf and JSValueIsObjectOfClass
3108         
3109         - Removed GetDescription callback. Something in the class datastructure
3110         should take care of this.
3111
3112         * API/JSBase.h:
3113         * API/JSCallbackConstructor.cpp: Added.
3114         (KJS::):
3115         (KJS::JSCallbackConstructor::JSCallbackConstructor):
3116         (KJS::JSCallbackConstructor::implementsConstruct):
3117         (KJS::JSCallbackConstructor::construct):
3118         (KJS::JSCallbackConstructor::setPrivate):
3119         (KJS::JSCallbackConstructor::getPrivate):
3120         * API/JSCallbackConstructor.h: Added.
3121         (KJS::JSCallbackConstructor::classInfo):
3122         * API/JSCallbackFunction.cpp: Added.
3123         (KJS::):
3124         (KJS::JSCallbackFunction::JSCallbackFunction):
3125         (KJS::JSCallbackFunction::implementsCall):
3126         (KJS::JSCallbackFunction::callAsFunction):
3127         (KJS::JSCallbackFunction::setPrivate):
3128         (KJS::JSCallbackFunction::getPrivate):
3129         * API/JSCallbackFunction.h: Added.
3130         (KJS::JSCallbackFunction::classInfo):
3131         * API/JSCallbackObject.cpp:
3132         (KJS::):
3133         (KJS::JSCallbackObject::JSCallbackObject):
3134         (KJS::JSCallbackObject::init):
3135         (KJS::JSCallbackObject::~JSCallbackObject):
3136         (KJS::JSCallbackObject::className):
3137         (KJS::JSCallbackObject::getOwnPropertySlot):
3138         (KJS::JSCallbackObject::put):
3139         (KJS::JSCallbackObject::deleteProperty):
3140         (KJS::JSCallbackObject::implementsConstruct):
3141         (KJS::JSCallbackObject::construct):
3142         (KJS::JSCallbackObject::implementsCall):
3143         (KJS::JSCallbackObject::callAsFunction):
3144         (KJS::JSCallbackObject::getPropertyList):
3145         (KJS::JSCallbackObject::toBoolean):
3146         (KJS::JSCallbackObject::toNumber):
3147         (KJS::JSCallbackObject::toString):
3148         (KJS::JSCallbackObject::inherits):
3149         (KJS::JSCallbackObject::staticValueGetter):
3150         (KJS::JSCallbackObject::staticFunctionGetter):
3151         (KJS::JSCallbackObject::callbackGetter):
3152         * API/JSCallbackObject.h:
3153         * API/JSCharBufferRef.cpp:
3154         * API/JSClassRef.cpp: Added.
3155         (JSClassCreate):
3156         (JSClassRetain):
3157         (JSClassRelease):
3158         * API/JSClassRef.h: Added.
3159         (StaticValueEntry::StaticValueEntry):
3160         (StaticFunctionEntry::StaticFunctionEntry):
3161         (__JSClass::__JSClass):
3162         * API/JSContextRef.cpp:
3163         (JSContextCreate):
3164         (JSEvaluate):
3165         * API/JSContextRef.h:
3166         * API/JSNode.c: Added.
3167         (JSNodePrototype_appendChild):
3168         (JSNodePrototype_removeChild):
3169         (JSNodePrototype_replaceChild):
3170         (JSNodePrototype_class):
3171         (JSNode_getNodeType):
3172         (JSNode_getChildNodes):
3173         (JSNode_getFirstChild):
3174         (JSNode_finalize):
3175         (JSNode_class):
3176         (JSNode_prototype):
3177         (JSNode_new):
3178         (JSNode_construct):
3179         * API/JSNode.h: Added.
3180         * API/JSNodeList.c: Added.
3181         (JSNodeListPrototype_item):
3182         (JSNodeListPrototype_class):
3183         (JSNodeList_length):
3184         (JSNodeList_getProperty):
3185         (JSNodeList_finalize):
3186         (JSNodeList_class):
3187         (JSNodeList_prototype):
3188         (JSNodeList_new):
3189         * API/JSNodeList.h: Added.
3190         * API/JSObjectRef.cpp:
3191         (JSObjectMake):
3192         (JSFunctionMake):
3193         (JSConstructorMake):
3194         (__JSPropertyEnumerator::__JSPropertyEnumerator):
3195         (JSObjectCreatePropertyEnumerator):
3196         (JSPropertyEnumeratorGetNext):
3197         (JSPropertyEnumeratorRetain):
3198         (JSPropertyEnumeratorRelease):
3199         * API/JSObjectRef.h:
3200         (__JSObjectCallbacks::):
3201         * API/JSValueRef.cpp:
3202         (JSValueIsObjectOfClass):
3203         (JSValueIsInstanceOf):
3204         * API/JSValueRef.h:
3205         * API/Node.c: Added.
3206         (Node_new):
3207         (Node_appendChild):
3208         (Node_removeChild):
3209         (Node_replaceChild):
3210         (Node_ref):
3211         (Node_deref):
3212         * API/Node.h: Added.
3213         * API/NodeList.c: Added.
3214         (NodeList_new):
3215         (NodeList_length):
3216         (NodeList_item):
3217         (NodeList_ref):
3218         (NodeList_deref):
3219         * API/NodeList.h: Added.
3220         * API/minidom.c:
3221         (main):
3222         (print):
3223         (createStringWithContentsOfFile):
3224         * API/minidom.js:
3225         * API/testapi.c:
3226         (assertEqualsAsCharacters):
3227         (MyObject_getProperty):
3228         (MyObject_class):
3229         (myConstructor_callAsConstructor):
3230         (main):
3231         * API/testapi.js:
3232         * JavaScriptCore.xcodeproj/project.pbxproj:
3233
3234 2006-06-26  Kevin Ollivier  <kevino@theolliviers.com>
3235         
3236         Reviewed and tweaked by Darin.
3237
3238         - Compile fixes for wx port / gcc 4.0.2
3239
3240         * kjs/array_object.cpp:
3241         Added missing headers. 
3242
3243         * kjs/ExecState.h:
3244         gcc needs class prototypes before defining those classes as friend classes
3245
3246 2006-06-30  Mike Emmel  <mike.emmel@gmail.com>
3247
3248         Reviewed by Darin.
3249
3250         Compilation fixes for Linux/Gdk.
3251
3252         * JavaScriptCore/kjs/interpreter.cpp: added include of signal.h
3253         * JavaScriptCore/kjs/ExecState.h: added missing class declaration 
3254         * JavaScriptCore/kjs/ExecState.cpp: case wrong on include of context.h 
3255         * JavaScriptCore/JavaScriptCoreSources.bkl: added Context.cpp and ExecState.cpp
3256
3257 === Safari-521.14 ===
3258
3259 2006-06-29  Maciej Stachowiak  <mjs@apple.com>
3260
3261         Reviewed by Geoff.
3262         
3263         - add headerdoc comments to some of the new JS API headers
3264
3265         * API/JSBase.h:
3266         * API/JSValueRef.h:
3267
3268 2006-06-28  Timothy Hatcher  <timothy@apple.com>
3269
3270         Prefer the Stabs debugging symbols format until DWARF bugs are fixed.
3271
3272         * JavaScriptCore.xcodeproj/project.pbxproj:
3273
3274 2006-06-27  Timothy Hatcher  <timothy@apple.com>
3275
3276         Reviewed by Tim O.
3277
3278         <rdar://problem/4448350> Deprecated ObjC language API used in JavaScriptCore, WebCore, WebKit and WebBrowser
3279
3280         Switch to the new ObjC 2 API, ifdefed the old code around OBJC_API_VERSION so it still works on Tiger.
3281         Removed the use of the old stringWithCString, switched to the new Tiger version that accepts an encoding.
3282         Lots of code style cleanup.
3283
3284         * JavaScriptCore.xcodeproj/project.pbxproj:
3285         * bindings/objc/objc_class.h:
3286         * bindings/objc/objc_class.mm:
3287         (KJS::Bindings::ObjcClass::~ObjcClass):
3288         (KJS::Bindings::_createClassesByIsAIfNecessary):
3289         (KJS::Bindings::ObjcClass::classForIsA):
3290         (KJS::Bindings::ObjcClass::name):
3291         (KJS::Bindings::ObjcClass::methodsNamed):
3292         (KJS::Bindings::ObjcClass::fieldNamed):
3293         (KJS::Bindings::ObjcClass::fallbackObject):
3294         * bindings/objc/objc_header.h:
3295         * bindings/objc/objc_instance.h:
3296         * bindings/objc/objc_instance.mm:
3297         (ObjcInstance::ObjcInstance):
3298         (ObjcInstance::~ObjcInstance):
3299         (ObjcInstance::operator=):
3300         (ObjcInstance::begin):
3301         (ObjcInstance::end):
3302         (ObjcInstance::getClass):
3303         (ObjcInstance::invokeMethod):
3304         (ObjcInstance::invokeDefaultMethod):
3305         (ObjcInstance::setValueOfField):
3306         (ObjcInstance::supportsSetValueOfUndefinedField):
3307         (ObjcInstance::setValueOfUndefinedField):
3308         (ObjcInstance::getValueOfField):
3309         (ObjcInstance::getValueOfUndefinedField):
3310         (ObjcInstance::defaultValue):
3311         (ObjcInstance::stringValue):
3312         (ObjcInstance::numberValue):
3313         (ObjcInstance::booleanValue):
3314         (ObjcInstance::valueOf):
3315         * bindings/objc/objc_runtime.h:
3316         * bindings/objc/objc_runtime.mm:
3317         (ObjcMethod::ObjcMethod):
3318         (ObjcMethod::name):
3319         (ObjcMethod::getMethodSignature):
3320         (ObjcMethod::setJavaScriptName):
3321         (ObjcField::name):
3322         (ObjcField::type):
3323         (ObjcField::valueFromInstance):
3324         (convertValueToObjcObject):
3325         (ObjcField::setValueToInstance):
3326         (ObjcArray::operator=):
3327         (ObjcArray::setValueAt):
3328         (ObjcArray::valueAt):
3329         (ObjcFallbackObjectImp::ObjcFallbackObjectImp):
3330         (ObjcFallbackObjectImp::callAsFunction):
3331         (ObjcFallbackObjectImp::defaultValue):
3332
3333 2006-06-28  Anders Carlsson  <acarlsson@apple.com>
3334
3335         Reviewed by Geoff.
3336
3337         http://bugs.webkit.org/show_bug.cgi?id=8636
3338         REGRESSION: JavaScript access to Java applet causes hang (_webViewURL not implemented)
3339
3340         * bindings/jni/jni_objc.mm:
3341         (KJS::Bindings::dispatchJNICall):
3342         Just pass nil as the calling URL. This will cause the Java plugin to use the URL of the page
3343         containing the applet (which is what we used to do).
3344
3345 2006-06-27  Timothy Hatcher  <timothy@apple.com>
3346
3347         Reviewed by Darin.
3348
3349         <rdar://problem/4406785> Add an export file to TOT JavaScriptCore like the Safari-2-0-branch
3350
3351         * JavaScriptCore.exp: Added.
3352         * JavaScriptCore.xcodeproj/project.pbxproj:
3353
3354 2006-06-25  Geoffrey Garen  <ggaren@apple.com>
3355
3356         Reviewed by Adele.
3357         
3358         - Added JSConstructorMake to match JSFunctionMake, along with test code.
3359         
3360         [ I checked in the ChangeLog before without the actual files. ]
3361
3362         * API/JSObjectRef.cpp:
3363         (JSConstructorMake):
3364         * API/JSObjectRef.h:
3365         * API/testapi.c:
3366         (myConstructor_callAsConstructor):
3367         (main):
3368         * API/testapi.js:
3369         * ChangeLog:
3370         * JavaScriptCore.xcodeproj/project.pbxproj: Moved testapi.c to the testapi
3371         target -- this was an oversight in my earlier check-in.
3372
3373 2006-06-25  Timothy Hatcher  <timothy@apple.com>
3374
3375         Reviewed by Darin.
3376
3377         Bug 9574: Drosera should show inline scripts within the original HTML
3378         http://bugs.webkit.org/show_bug.cgi?id=9574
3379
3380         Pass the starting line number and error message to the debugger.
3381
3382         * kjs/debugger.cpp:
3383         (Debugger::sourceParsed):
3384         * kjs/debugger.h:
3385         * kjs/function.cpp:
3386         (KJS::GlobalFuncImp::callAsFunction):
3387         * kjs/function_object.cpp:
3388         (FunctionObjectImp::construct):
3389         * kjs/interpreter.cpp:
3390         (KJS::Interpreter::evaluate):
3391
3392 2006-06-24  Alexey Proskuryakov  <ap@nypop.com>
3393
3394         Rubber-stamped by Eric.
3395
3396         Add a -h (do not follow symlinks) option to ln in derived sources build script (without it,
3397         a symlink was created inside the source directory on second build).
3398
3399         * JavaScriptCore.xcodeproj/project.pbxproj:
3400
3401 2006-06-24  David Kilzer  <ddkilzer@kilzer.net>
3402
3403         Reviewed by Timothy.
3404
3405         * Info.plist: Fixed copyright to include 2003-2006.
3406
3407 2006-06-24  Alexey Proskuryakov  <ap@nypop.com>
3408
3409         Reviewed by Darin.
3410
3411         - http://bugs.webkit.org/show_bug.cgi?id=9418
3412         WebKit will not build when Space exists in path
3413
3414         * JavaScriptCore.xcodeproj/project.pbxproj: Enclose search paths in quotes; create symlinks to 
3415         avoid passing paths with spaces to make.
3416
3417 2006-06-23  Timothy Hatcher  <timothy@apple.com>
3418
3419         Reviewed by Darin.
3420
3421         Adding more operator[] overloads for long and short types.
3422
3423         * wtf/Vector.h:
3424         (WTF::Vector::operator[]):
3425
3426 === JavaScriptCore-521.13 ===
3427
3428 2006-06-22  Alexey Proskuryakov  <ap@nypop.com>
3429
3430         Build fix.
3431
3432         - http://bugs.webkit.org/show_bug.cgi?id=9539
3433         Another case error preventing build
3434
3435         * API/JSObjectRef.cpp: Changed "identifier.h" to "Identifier.h"
3436         
3437 2006-06-22  David Kilzer  <ddkilzer@kilzer.net>
3438
3439         Build fix.
3440
3441         http://bugs.webkit.org/show_bug.cgi?id=9539
3442         Another case error preventing build
3443
3444         * API/APICast.h: Changed "UString.h" to "ustring.h".
3445
3446 2006-06-21  Geoffrey Garen  <ggaren@apple.com>
3447
3448         Fixed release build, fixed accidental infinite recursion due to
3449         last minute global replace gone awry.
3450         
3451         * API/APICast.h:
3452         (toRef):
3453         * API/testapi.c:
3454         (assertEqualsAsBoolean):
3455         (assertEqualsAsNumber):
3456         (assertEqualsAsUTF8String):
3457         (assertEqualsAsCharactersPtr):
3458         * JavaScriptCore.xcodeproj/project.pbxproj:
3459
3460 2006-06-21  Geoffrey Garen  <ggaren@apple.com>
3461
3462         Reviewed by Anders.
3463         
3464         - First cut at C API to JavaScript. Includes a unit test, 'testapi.c', 
3465         and the outline of a test app, 'minidom.c'.
3466         
3467         Includes one change to JSC internals: Rename propList to getPropertyList and have it
3468         take its target property list by reference so that subclasses can
3469         add properties to the list before calling through to their superclasses.
3470         
3471         Also, I just ran prepare-ChangeLog in about 10 seconds, and I would like
3472         to give a shout-out to that.
3473         
3474         * API/APICast.h: Added.
3475         (toJS):
3476         (toRef):
3477         * API/JSBase.h: Added.
3478         * API/JSCallbackObject.cpp: Added.
3479         (KJS::):
3480         (KJS::JSCallbackObject::JSCallbackObject):
3481         (KJS::JSCallbackObject::~JSCallbackObject):
3482         (KJS::JSCallbackObject::className):
3483         (KJS::JSCallbackObject::getOwnPropertySlot):
3484         (KJS::JSCallbackObject::put):
3485         (KJS::JSCallbackObject::deleteProperty):
3486         (KJS::JSCallbackObject::implementsConstruct):
3487         (KJS::JSCallbackObject::construct):
3488         (KJS::JSCallbackObject::implementsCall):
3489         (KJS::JSCallbackObject::callAsFunction):
3490         (KJS::JSCallbackObject::getPropertyList):
3491         (KJS::JSCallbackObject::toBoolean):
3492         (KJS::JSCallbackObject::toNumber):
3493         (KJS::JSCallbackObject::toString):
3494         (KJS::JSCallbackObject::setPrivate):
3495         (KJS::JSCallbackObject::getPrivate):
3496         (KJS::JSCallbackObject::cachedValueGetter):
3497         (KJS::JSCallbackObject::callbackGetter):
3498         * API/JSCallbackObject.h: Added.
3499         (KJS::JSCallbackObject::classInfo):
3500         * API/JSCharBufferRef.cpp: Added.
3501         (JSStringMake):
3502         (JSCharBufferCreate):
3503         (JSCharBufferCreateUTF8):
3504         (JSCharBufferRetain):
3505         (JSCharBufferRelease):
3506         (JSValueCopyStringValue):
3507         (JSCharBufferGetLength):
3508         (JSCharBufferGetCharactersPtr):
3509         (JSCharBufferGetCharacters):
3510         (JSCharBufferGetMaxLengthUTF8):
3511         (JSCharBufferGetCharactersUTF8):
3512         (JSCharBufferIsEqual):
3513         (JSCharBufferIsEqualUTF8):
3514         (JSCharBufferCreateWithCFString):
3515         (CFStringCreateWithJSCharBuffer):
3516         * API/JSCharBufferRef.h: Added.
3517         * API/JSContextRef.cpp: Added.
3518         (JSContextCreate):
3519         (JSContextDestroy):
3520         (JSContextGetGlobalObject):
3521         (JSEvaluate):
3522         (JSCheckSyntax):
3523         (JSContextHasException):
3524         (JSContextGetException):
3525         (JSContextClearException):
3526         (JSContextSetException):
3527         * API/JSContextRef.h: Added.
3528         * API/JSObjectRef.cpp: Added.
3529         (JSValueToObject):
3530         (JSObjectMake):
3531         (JSFunctionMake):
3532         (JSObjectGetDescription):
3533         (JSObjectGetPrototype):
3534         (JSObjectSetPrototype):
3535         (JSObjectHasProperty):
3536         (JSObjectGetProperty):
3537         (JSObjectSetProperty):
3538         (JSObjectDeleteProperty):
3539         (JSObjectGetPrivate):
3540         (JSObjectSetPrivate):
3541         (JSObjectIsFunction):
3542         (JSObjectCallAsFunction):
3543         (JSObjectIsConstructor):
3544         (JSObjectCallAsConstructor):
3545         (__JSPropertyListEnumerator::__JSPropertyListEnumerator):
3546         (JSObjectCreatePropertyEnumerator):
3547         (JSPropertyEnumeratorGetNext):
3548         (JSPropertyEnumeratorRetain):
3549         (JSPropertyEnumeratorRelease):
3550         (JSPropertyListAdd):
3551         * API/JSObjectRef.h: Added.
3552         * API/JSValueRef.cpp: Added.
3553         (JSValueGetType):
3554         (JSValueIsUndefined):
3555         (JSValueIsNull):
3556         (JSValueIsBoolean):
3557         (JSValueIsNumber):
3558         (JSValueIsString):
3559         (JSValueIsObject):
3560         (JSValueIsEqual):
3561         (JSValueIsStrictEqual):
3562         (JSUndefinedMake):
3563         (JSNullMake):
3564         (JSBooleanMake):
3565         (JSNumberMake):
3566         (JSValueToBoolean):
3567         (JSValueToNumber):
3568         (JSGCProtect):
3569         (JSGCUnprotect):
3570         (JSGCCollect):
3571         * API/JSValueRef.h: Added.
3572         * API/JavaScriptCore.h: Added.
3573         * API/minidom.c: Added.
3574         (main):
3575         * API/minidom.html: Added.
3576         * API/minidom.js: Added.
3577         * API/testapi.c: Added.
3578         (assertEqualsAsBoolean):
3579         (assertEqualsAsNumber):
3580         (assertEqualsAsUTF8String):
3581         (assertEqualsAsCharactersPtr):
3582         (assertEqualsAsCharacters):
3583         (MyObject_initialize):
3584         (MyObject_copyDescription):
3585         (MyObject_hasProperty):
3586         (MyObject_getProperty):
3587         (MyObject_setProperty):
3588         (MyObject_deleteProperty):
3589         (MyObject_getPropertyList):
3590         (MyObject_callAsFunction):
3591         (MyObject_callAsConstructor):
3592         (MyObject_convertToType):
3593         (MyObject_finalize):
3594         (print_callAsFunction):
3595         (main):
3596         (createStringWithContentsOfFile):
3597         * API/testapi.js: Added.
3598         * ChangeLog:
3599         * JavaScriptCore.xcodeproj/project.pbxproj:
3600         * bindings/npruntime_impl.h:
3601         * kjs/array_instance.h:
3602         * kjs/array_object.cpp:
3603         (ArrayInstance::getPropertyList):
3604         * kjs/interpreter.cpp:
3605         (KJS::Interpreter::evaluate):
3606         * kjs/nodes.cpp:
3607         (ForInNode::execute):
3608         * kjs/object.cpp:
3609         (KJS::JSObject::put):
3610         (KJS::JSObject::canPut):
3611         (KJS::JSObject::deleteProperty):
3612         (KJS::JSObject::propertyIsEnumerable):
3613         (KJS::JSObject::getPropertyAttributes):
3614         (KJS::JSObject::getPropertyList):
3615         * kjs/object.h:
3616         * kjs/property_map.cpp:
3617         (KJS::PropertyMap::get):
3618         * kjs/property_map.h:
3619         * kjs/scope_chain.cpp:
3620         (KJS::ScopeChain::print):
3621         * kjs/string_object.cpp:
3622         (StringInstance::getPropertyList):
3623         * kjs/string_object.h:
3624         * kjs/ustring.h:
3625         (KJS::UString::Rep::ref):
3626
3627 2006-06-20  Timothy Hatcher  <timothy@apple.com>
3628
3629         Reviewed by Geoff.
3630
3631         Make sure we clear the exception before returning so
3632         that future calls will not fail because of an earlier
3633         exception state. Assert on entry that the WebScriptObject
3634         is working with an ExecState that dose not have an exception. 
3635         Document that evaluateWebScript and callWebScriptMethod return
3636         WebUndefined when an exception is thrown.
3637
3638         * bindings/objc/WebScriptObject.h:
3639         * bindings/objc/WebScriptObject.mm:
3640         (-[WebScriptObject callWebScriptMethod:withArguments:]):
3641         (-[WebScriptObject evaluateWebScript:]):
3642         (-[WebScriptObject setValue:forKey:]):
3643         (-[WebScriptObject valueForKey:]):
3644         (-[WebScriptObject removeWebScriptKey:]):
3645         (-[WebScriptObject webScriptValueAtIndex:]):
3646         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
3647
3648 2006-06-19  Anders Carlsson  <acarlsson@apple.com>
3649
3650         Reviewed by John.
3651
3652         * kjs/interpreter.cpp:
3653         (KJS::TimeoutChecker::pauseTimeoutCheck):
3654         (KJS::TimeoutChecker::resumeTimeoutCheck):
3655         Fix argument order in setitimer calls.
3656
3657 2006-06-18  Anders Carlsson  <acarlsson@apple.com>
3658
3659         Reviewed by Geoff.
3660
3661         * kjs/interpreter.cpp:
3662         (KJS::TimeoutChecker::pauseTimeoutCheck):
3663         Do nothing if the timeout check hasn't been started.
3664         
3665         (KJS::TimeoutChecker::resumeTimeoutCheck):
3666         Do nothing if the timeout check hasn't been started.
3667         Use the right signal handler when unblocking.
3668         
3669         (KJS::Interpreter::handleTimeout):
3670         pause/resume the timeout check around the call to
3671         shouldInterruptScript().
3672         
3673 2006-06-16  Ben Goodger <beng@google.com>
3674         
3675         Reviewed by Maciej
3676
3677         http://bugs.webkit.org/show_bug.cgi?id=9491
3678         Windows build breaks in interpreter.cpp 
3679
3680         * kjs/interpreter.cpp
3681         (KJS::TimeoutChecker::pauseTimeoutCheck):
3682         (KJS::TimeoutChecker::resumeTimeoutCheck):
3683         Make sure to only assert equality with s_executingInterpreter when it 
3684         is being used (i.e. when HAVE(SYS_TIME_H) == true)
3685
3686 2006-06-17  David Kilzer  <ddkilzer@kilzer.net>
3687
3688         Reviewed by darin.
3689
3690         http://bugs.webkit.org/show_bug.cgi?id=9477
3691         REGRESSION: fast/dom/replaceChild.html crashes on WebKit ToT in debug build
3692
3693         * kjs/function.cpp:
3694         (KJS::FunctionImp::callAsFunction): Refetch the debugger after executing the function
3695         in case the WebFrame it was running in has since been destroyed.
3696
3697 2006-06-17  David Kilzer  <ddkilzer@kilzer.net>
3698
3699         Reviewed by ggaren.
3700
3701         http://bugs.webkit.org/show_bug.cgi?id=9476
3702         REGRESSION: Reproducible crash after closing window after viewing
3703         css2.1/t0803-c5501-imrgn-t-00-b-ag.html
3704
3705         * kjs/debugger.cpp:
3706         (Debugger::detach): Call setDebugger(0) for all interpreters removed from
3707         the 'attached to a debugger' list.
3708
3709 2006-06-17  Anders Carlsson  <acarlsson@apple.com>
3710
3711         Reviewed by Maciej and Geoff.
3712
3713         http://bugs.webkit.org/show_bug.cgi?id=7080
3714         Provide some way to stop a JavaScript infinite loop
3715         
3716         * kjs/completion.h:
3717         (KJS::):
3718         Add Interrupted completion type.
3719         
3720         * kjs/function.cpp:
3721         (KJS::FunctionImp::callAsFunction):
3722         (KJS::GlobalFuncImp::callAsFunction):
3723         Only set the exception on the new ExecState if the current one has had one.
3724         
3725         * kjs/interpreter.cpp:
3726         (KJS::TimeoutChecker::startTimeoutCheck):
3727         (KJS::TimeoutChecker::stopTimeoutCheck):
3728         (KJS::TimeoutChecker::alarmHandler):
3729         (KJS::TimeoutChecker::pauseTimeoutCheck):
3730         (KJS::TimeoutChecker::resumeTimeoutCheck):
3731         New TimeoutChecker class which handles setting Interpreter::m_timedOut flag after a given
3732         period of time. This currently only works on Unix platforms where setitimer and signals are used.
3733         
3734         (KJS::Interpreter::Interpreter):
3735         Initialize new member variables.
3736         
3737         (KJS::Interpreter::~Interpreter):
3738         Destroy the timeout checker.
3739         
3740         (KJS::Interpreter::startTimeoutCheck):
3741         (KJS::Interpreter::stopTimeoutCheck):
3742         (KJS::Interpreter::pauseTimeoutCheck):
3743         (KJS::Interpreter::resumeTimeoutCheck):
3744         Call the timeout checker.
3745         
3746         (KJS::Interpreter::handleTimeout):
3747         Called on timeout. Resets the m_timedOut flag and calls shouldInterruptScript.
3748         
3749         * kjs/interpreter.h:
3750         (KJS::Interpreter::setTimeoutTime):
3751         New function for setting the timeout time.
3752         
3753         (KJS::Interpreter::shouldInterruptScript):
3754         New function. The idea is that this should be overridden by subclasses in order to for example
3755         pop up a dialog asking the user if the script should be interrupted.
3756         
3757         (KJS::Interpreter::checkTimeout):
3758         New function which checks the m_timedOut flag and calls handleTimeout if it's set.
3759         
3760         * kjs/nodes.cpp:
3761         (DoWhileNode::execute):
3762         (WhileNode::execute):
3763         (ForNode::execute):
3764         Call Interpreter::checkTimeout after each iteration of the loop.
3765
3766 2006-06-15  Timothy Hatcher  <timothy@apple.com>
3767
3768         Reviewed by Geoff and Darin.
3769         
3770         Prefer the DWARF debugging symbols format for use in Xcode 2.3.
3771
3772         * JavaScriptCore.xcodeproj/project.pbxproj:
3773
3774 2006-06-14  Geoffrey Garen  <ggaren@apple.com>
3775
3776         Reviewed by Beth.
3777         
3778         - fixed http://bugs.webkit.org/show_bug.cgi?id=9438
3779         Someone broke ToT: cannot build
3780
3781         * JavaScriptCore.xcodeproj/project.pbxproj:
3782         * bindings/runtime_root.h: Changed "Interpreter.h" to "interpreter.h"
3783
3784 2006-06-12  Geoffrey Garen  <ggaren@apple.com>
3785
3786         build fix
3787         
3788         * bindings/objc/WebScriptObject.mm:
3789         (+[WebScriptObject throwException:]): Restore assignment I accidentally
3790         deleted in previous commit
3791
3792 2006-06-12  Geoffrey Garen  <ggaren@apple.com>
3793
3794         Reviewed by TimO, Maciej.
3795         
3796         - Merged InterpreterImp code into Interpreter, which implements
3797         all interpreter functionality now. This is part of my continuing quest
3798         to create an external notion of JS "execution context" that is unified and simple --
3799         something to replace the mix of Context, ContextImp, ExecState, Interpreter,
3800         InterpreterImp, and JSRun.
3801         
3802         All tests pass. Leaks test has not regressed from its baseline ~207 leaks
3803         with ~3460 leaked nodes.
3804
3805         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3806         * JavaScriptCore.xcodeproj/project.pbxproj:
3807         * bindings/NP_jsobject.cpp:
3808         * bindings/objc/WebScriptObject.mm:
3809         (+[WebScriptObject throwException:]):
3810         * bindings/runtime_root.cpp:
3811         * bindings/runtime_root.h:
3812         * kjs/Context.cpp:
3813         (KJS::Context::Context):
3814         * kjs/ExecState.cpp: Added.
3815         (KJS::ExecState::lexicalInterpreter):
3816         * kjs/ExecState.h: Added.
3817         (KJS::ExecState::dynamicInterpreter):
3818         * kjs/SavedBuiltins.h: Added.
3819         * kjs/bool_object.cpp:
3820         (BooleanPrototype::BooleanPrototype):
3821         * kjs/collector.cpp:
3822         (KJS::Collector::collect):
3823         (KJS::Collector::numInterpreters):
3824         * kjs/context.h:
3825         * kjs/debugger.cpp:
3826         (Debugger::attach):
3827         (Debugger::detach):
3828         * kjs/function.cpp:
3829         (KJS::FunctionImp::callAsFunction):
3830         (KJS::GlobalFuncImp::callAsFunction):
3831         * kjs/function_object.cpp:
3832         (FunctionObjectImp::construct):
3833         * kjs/internal.cpp:
3834         * kjs/internal.h:
3835         * kjs/interpreter.cpp:
3836         (KJS::interpreterMap):
3837         (KJS::Interpreter::Interpreter):
3838         (KJS::Interpreter::init):
3839         (KJS::Interpreter::~Interpreter):
3840         (KJS::Interpreter::globalObject):
3841         (KJS::Interpreter::initGlobalObject):
3842         (KJS::Interpreter::globalExec):
3843         (KJS::Interpreter::checkSyntax):
3844         (KJS::Interpreter::evaluate):
3845         (KJS::Interpreter::builtinObject):
3846         (KJS::Interpreter::builtinFunction):
3847         (KJS::Interpreter::builtinArray):
3848         (KJS::Interpreter::builtinBoolean):
3849         (KJS::Interpreter::builtinString):
3850         (KJS::Interpreter::builtinNumber):
3851         (KJS::Interpreter::builtinDate):
3852         (KJS::Interpreter::builtinRegExp):
3853         (KJS::Interpreter::builtinError):
3854         (KJS::Interpreter::builtinObjectPrototype):
3855         (KJS::Interpreter::builtinFunctionPrototype):
3856         (KJS::Interpreter::builtinArrayPrototype):
3857         (KJS::Interpreter::builtinBooleanPrototype):
3858         (KJS::Interpreter::builtinStringPrototype):
3859         (KJS::Interpreter::builtinNumberPrototype):
3860         (KJS::Interpreter::builtinDatePrototype):
3861         (KJS::Interpreter::builtinRegExpPrototype):
3862         (KJS::Interpreter::builtinErrorPrototype):
3863         (KJS::Interpreter::builtinEvalError):
3864         (KJS::Interpreter::builtinRangeError):
3865         (KJS::Interpreter::builtinReferenceError):
3866         (KJS::Interpreter::builtinSyntaxError):
3867         (KJS::Interpreter::builtinTypeError):
3868         (KJS::Interpreter::builtinURIError):
3869         (KJS::Interpreter::builtinEvalErrorPrototype):
3870         (KJS::Interpreter::builtinRangeErrorPrototype):
3871         (KJS::Interpreter::builtinReferenceErrorPrototype):
3872         (KJS::Interpreter::builtinSyntaxErrorPrototype):
3873         (KJS::Interpreter::builtinTypeErrorPrototype):
3874         (KJS::Interpreter::builtinURIErrorPrototype):
3875         (KJS::Interpreter::mark):
3876         (KJS::Interpreter::interpreterWithGlobalObject):
3877         (KJS::Interpreter::saveBuiltins):
3878         (KJS::Interpreter::restoreBuiltins):
3879         * kjs/interpreter.h:
3880         (KJS::Interpreter::setCompatMode):
3881         (KJS::Interpreter::compatMode):
3882         (KJS::Interpreter::firstInterpreter):
3883         (KJS::Interpreter::nextInterpreter):
3884         (KJS::Interpreter::prevInterpreter):
3885         (KJS::Interpreter::debugger):
3886         (KJS::Interpreter::setDebugger):
3887         (KJS::Interpreter::setContext):
3888         (KJS::Interpreter::context):
3889         * kjs/nodes.cpp:
3890         (StatementNode::hitStatement):
3891         (RegExpNode::evaluate):
3892         * kjs/protect.h:
3893
3894 2006-06-12  Geoffrey Garen  <ggaren@apple.com>
3895
3896         Reviewed by Maciej.
3897         
3898         - Have *.lut.h files #include lookup.h to eliminate surprising header
3899         include order dependency.
3900
3901         * DerivedSources.make:
3902         * kjs/array_object.cpp:
3903         * kjs/date_object.cpp:
3904         * kjs/date_object.h:
3905         (KJS::DateProtoFunc::):
3906         * kjs/lexer.cpp:
3907         * kjs/math_object.cpp:
3908         * kjs/number_object.cpp:
3909         * kjs/regexp_object.cpp:
3910         * kjs/string_object.cpp:
3911
3912 2006-06-10  Geoffrey Garen  <ggaren@apple.com>
3913
3914         - http://bugs.webkit.org/show_bug.cgi?id=8515
3915         Linux porting compile bug
3916         
3917         Fix by Mike Emmel, Reviewed by Darin.
3918
3919         * JavaScriptCoreSources.bkl:
3920         * jscore.bkl:
3921         * wtf/Platform.h:
3922
3923 2006-06-09  Geoffrey Garen  <ggaren@apple.com>
3924
3925         Build fix -- I think :).
3926
3927         * JavaScriptCore.xcodeproj/project.pbxproj:
3928         * kjs/context.h:
3929
3930 2006-06-09  Geoffrey Garen  <ggaren@apple.com>
3931
3932         Reviewed by Eric (yay!).
3933         
3934         - Removed Context wrapper for ContextImp, renamed ContextImp to Context,
3935         split Context into its own file -- Context.cpp -- renamed _var to m_var,
3936         change ' *' to '* '.
3937
3938         * JavaScriptCore.xcodeproj/project.pbxproj:
3939         * kjs/Context.cpp: Added.
3940         (KJS::Context::Context):
3941         (KJS::Context::~Context):
3942         (KJS::Context::mark):
3943         * kjs/context.h:
3944         (KJS::Context::scopeChain):
3945         (KJS::Context::variableObject):
3946         (KJS::Context::setVariableObject):
3947         (KJS::Context::thisValue):
3948         (KJS::Context::callingContext):
3949         (KJS::Context::activationObject):
3950         (KJS::Context::currentBody):
3951         (KJS::Context::function):
3952         (KJS::Context::arguments):
3953         (KJS::Context::pushScope):
3954         (KJS::Context::seenLabels):
3955         * kjs/function.cpp:
3956         (KJS::FunctionImp::callAsFunction):
3957         (KJS::FunctionImp::processParameters):
3958         (KJS::FunctionImp::argumentsGetter):
3959         (KJS::GlobalFuncImp::callAsFunction):
3960         * kjs/internal.cpp:
3961         (KJS::InterpreterImp::evaluate):
3962         * kjs/internal.h:
3963         (KJS::InterpreterImp::setContext):
3964         (KJS::InterpreterImp::context):
3965         * kjs/interpreter.cpp:
3966         * kjs/interpreter.h:
3967         (KJS::ExecState::context):
3968         (KJS::ExecState::ExecState):
3969         * kjs/nodes.cpp:
3970         (currentSourceId):
3971         (currentSourceURL):
3972         (ThisNode::evaluate):
3973         (ResolveNode::evaluate):
3974         (FunctionCallResolveNode::evaluate):
3975         (PostfixResolveNode::evaluate):
3976         (DeleteResolveNode::evaluate):
3977         (TypeOfResolveNode::evaluate):
3978         (PrefixResolveNode::evaluate):
3979         (AssignResolveNode::evaluate):
3980         (VarDeclNode::evaluate):
3981         (VarDeclNode::processVarDecls):
3982         (DoWhileNode::execute):
3983         (WhileNode::execute):
3984         (ForNode::execute):
3985         (ForInNode::execute):
3986         (ContinueNode::execute):
3987         (BreakNode::execute):
3988         (ReturnNode::execute):
3989         (WithNode::execute):
3990         (SwitchNode::execute):
3991         (LabelNode::execute):
3992         (TryNode::execute):
3993         (FuncDeclNode::processFuncDecl):
3994         (FuncExprNode::evaluate):
3995
3996 2006-06-07  Geoffrey Garen  <ggaren@apple.com>
3997
3998         Removed API directory I prematurely/accidentally added.
3999
4000         * API: Removed.
4001
4002 2006-06-05  Mitz Pettel  <opendarwin.org@mitzpettel.com>
4003
4004         Reviewed and landed by Geoff.
4005
4006         - fix a regression in ecma_3/String/regress-104375.js
4007
4008         * kjs/string_object.cpp:
4009         (substituteBackreferences): If a 2-digit back reference is out of range,
4010         parse it as a 1-digit reference (followed by the other digit). This matches
4011         Firefox's behavior.
4012
4013 2006-06-05  Geoffrey Garen  <ggaren@apple.com>
4014
4015         Reviewed By Maciej.
4016         Darin already reviewed this change on the branch. See <rdar://problem/4317701>.
4017         
4018         - Fixed <rdar://problem/4291345> PCRE overflow in Safari JavaScriptCore
4019
4020         No test case because there's no behavior change.
4021         
4022         * pcre/pcre_compile.c:
4023         (read_repeat_counts): Check for integer overflow / out of bounds
4024
4025 2006-06-05  Geoffrey Garen  <ggaren@apple.com>
4026
4027         Reviewed by aliu.
4028
4029         - Changed CString length from int to size_t. We sould probably do this
4030         for UString, too. (Darin, if you're reading this: Maciej said so.)
4031         
4032         * kjs/function.cpp:
4033         (KJS::encode):
4034         * kjs/ustring.cpp:
4035         (KJS::CString::CString):
4036         (KJS::operator==):
4037         * kjs/ustring.h:
4038         (KJS::CString::size):
4039
4040 2006-06-04  Geoffrey Garen  <ggaren@apple.com>
4041
4042         Reviewed by Maciej.
4043         
4044         - http://bugs.webkit.org/show_bug.cgi?id=9304
4045         Minor cleanup in JavaScriptCore
4046
4047         * kjs/value.h: Removed redundant declarations
4048
4049 2006-06-04  Darin Adler  <darin@apple.com>
4050
4051         Reviewed by Anders.
4052
4053         - changed deleteAllValues so it can work on "const" collections
4054           Deleting the values affects the values, not the pointers in the
4055           collection, so it's legitimate to do it to a const collection,
4056           and a case of that actually came up in the XPath code.
4057
4058         * wtf/HashMap.h:
4059         (WTF::deleteAllPairSeconds): Use const iterators.
4060         (WTF::deleteAllValues): Take const HashMap reference as a parameter.
4061         * wtf/HashSet.h:
4062         (WTF::deleteAllValues): Take const HashSet reference as a parameter,
4063         and use const iterators.
4064         * wtf/Vector.h:
4065         (WTF::deleteAllValues): Take const Vector reference as a parameter.
4066
4067         - added more functions that are present in <math.h> on some platforms,
4068           but not on others; moved here from various files in WebCore
4069
4070         * wtf/MathExtras.h:
4071         (isinf): Added.
4072         (isnan): Added.
4073         (lround): Added.
4074         (lroundf): Tweaked.
4075         (round): Added.
4076         (roundf): Tweaked.
4077         (signbit): Added.
4078
4079 2006-06-02  Mitz Pettel  <opendarwin.org@mitzpettel.com>
4080
4081         Reviewed by ggaren.
4082
4083         - http://bugs.webkit.org/show_bug.cgi?id=9234
4084           Implement $&, $' and $` replacement codes in String.prototype.replace
4085
4086         Test: fast/js/string-replace-3.html
4087
4088         * kjs/string_object.cpp:
4089         (substituteBackreferences): Added support for $& (matched substring),
4090         $` (everything preceding matched substring), $' (everything following
4091         matched substring) and 2-digit back references, and cleaned up a little.
4092
4093 2006-06-02 Adele Peterson  <adele@apple.com>
4094
4095         Reviewed by Darin.
4096
4097         Set incremental linking to no. This seems to fix a build problem I was seeing
4098         where dftables couldn't find a dll. 
4099
4100         * JavaScriptCore.vcproj/dftables/dftables.vcproj:
4101
4102 2006-05-26  Steve Falkenburg  <sfalken@apple.com>
4103
4104         Build fixes/tweaks
4105
4106         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
4107
4108 === JavaScriptCore-521.11 ===
4109
4110 2006-05-24  Geoffrey Garen  <ggaren@apple.com>
4111
4112         Reviewed by mjs.
4113         
4114         - JSC half of fix for <rdar://problem/4557926> TOT REGRESSSION: Crash
4115         occurs when attempting to view image in slideshow mode at
4116         http://d.smugmug.com/gallery/581716 ( KJS::IfNode::execute
4117         (KJS::ExecState*) + 312)
4118
4119         On alternate threads, DOMObjects remain in the
4120         ScriptInterpreter's cache because they're not collected. So, they
4121         need an opportunity to mark their children.
4122         
4123         I'm not particularly happy with this solution because it fails to
4124         resolve many outstanding issues with the DOM object cache. Since none
4125         of those issues is a crasher or a serious compatibility concern,
4126         and since the behavior of other browsers is not much to go on in this
4127         case, I've filed <rdar://problem/4561439> about that, and I'm moving on 
4128         with my life.
4129
4130         * JavaScriptCore.xcodeproj/project.pbxproj:
4131         * kjs/collector.cpp:
4132         (KJS::Collector::collect):
4133         * kjs/internal.cpp:
4134         (KJS::InterpreterImp::mark):
4135         * kjs/internal.h:
4136         * kjs/interpreter.cpp:
4137         (KJS::Interpreter::mark):
4138         * kjs/interpreter.h:
4139
4140 === JavaScriptCore-521.10 ===
4141
4142 2006-05-22  Timothy Hatcher  <timothy@apple.com>
4143
4144         Reviewed by Eric, Kevin and Geoff.
4145
4146         Merge open source build fixes. <rdar://problem/4555500>
4147
4148         * kjs/collector.cpp: look at the rsp register in x86_64 
4149         (KJS::Collector::markOtherThreadConservatively):
4150         * wtf/Platform.h: add x86_64 to the platform list
4151
4152 2006-05-19  Anders Carlsson  <acarlsson@apple.com>
4153
4154         Reviewed by Geoff.
4155
4156         http://bugs.webkit.org/show_bug.cgi?id=8993
4157         Support function declaration in case statements
4158         
4159         * kjs/grammar.y: Get rid of StatementList and use SourceElements instead.
4160         
4161         * kjs/nodes.cpp:
4162         (CaseClauseNode::evalStatements):
4163         (CaseClauseNode::processVarDecls):
4164         (CaseClauseNode::processFuncDecl):
4165         (ClauseListNode::processFuncDecl):
4166         (CaseBlockNode::processFuncDecl):
4167         (SwitchNode::processFuncDecl):
4168         * kjs/nodes.h:
4169         (KJS::CaseClauseNode::CaseClauseNode):
4170         (KJS::ClauseListNode::ClauseListNode):
4171         (KJS::ClauseListNode::getClause):
4172         (KJS::ClauseListNode::getNext):
4173         (KJS::ClauseListNode::releaseNext):
4174         (KJS::SwitchNode::SwitchNode):
4175         Add processFuncDecl for the relevant nodes.        
4176
4177         * kjs/nodes2string.cpp:
4178         (CaseClauseNode::streamTo):
4179         next got renamed to source.
4180
4181 2006-05-17  George Staikos <staikos@kde.org>
4182
4183         Reviewed by Maciej, Alexey, and Eric.
4184
4185         * pcre/pcre_compile.c:
4186         * pcre/pcre_get.c:
4187         * pcre/pcre_exec.c:
4188         * wtf/UnusedParam.h:
4189         Use /**/ in .c files to compile with non-C99 and non-GCC compilers.
4190
4191         * kjs/testkjs.cpp:
4192         Change include to <wtf/HashTraits.h> from "HashTraits.h" to avoid -I
4193
4194         * wtf/unicode/qt4/UnicodeQt4.h:
4195         Use correct parentheses and correct mask for utf-32 support.
4196
4197 2006-05-17  Alexey Proskuryakov  <ap@nypop.com>
4198
4199         Reviewed by Darin.
4200
4201         - fix http://bugs.webkit.org/show_bug.cgi?id=8870
4202         Crash typing in Yahoo auto-complete widget.
4203
4204         Test: fast/js/regexp-stack-overflow.html
4205
4206         * pcre/pcre-config.h: Define NO_RECURSE.
4207
4208 2006-05-16  George Staikos <staikos@kde.org>
4209
4210         Reviewed by Maciej.
4211
4212         Fix some warnings and strict compilation errors.
4213
4214         * kjs/nodes.cpp: 
4215         * kjs/value.cpp: 
4216
4217 2006-05-15  Alexey Proskuryakov  <ap@nypop.com>
4218
4219         * make-generated-sources.sh: Changed to be executable and removed
4220         text in the file generated by "svn diff".
4221
4222 2006-05-15  Geoffrey Garen  <ggaren@apple.com>
4223
4224         Reviewed by Maciej.
4225
4226        &nb