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