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