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