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