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