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