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