Reviewed by John.
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2005-04-22  Darin Adler  <darin@apple.com>
2
3         Reviewed by John.
4
5         - fixed <rdar://problem/4090046> JavaScript throw statement causes parse error when no semicolon is present
6
7         * kjs/grammar.y: Added an additional rule for throw like the ones we have for all the other semicolon rules.
8         Not sure why we missed this one earlier.
9
10         * kjs/grammar.cpp: Regenerated.
11
12 2005-04-20  Darin Adler  <darin@apple.com>
13
14         Reviewed by Maciej.
15
16         - speedups, total 12% on JavaScript iBench
17
18         I ran the benchmark under Shark and followed its advice a lot, mainly.
19
20         * kjs/collector.cpp:
21         (KJS::Collector::allocate): Take out special case for 0; costing speed but unexercised.
22         Use numLiveObjectsAtLastCollect instead of numAllocationsSinceLastCollect so we don't
23         have to bump it each time we call allocate. Put numLiveObjects into a local variable to
24         cut down on global variable accesses. Make "next" cell pointer be a byte offset rather
25         than a pointer so we don't need a special case for NULL. Allow freeList to point to some
26         bogus item when the entire block is full rather than going out of our way to make it
27         point to NULL.
28         (KJS::Collector::markProtectedObjects): Get table size and pointer into locals outside
29         the loop to avoid re-loading them over and over again.
30         (KJS::Collector::collect): Put numLiveObjects into a local variable to cut down on global
31         variable accesses. Make "next" cell pointer be a byte offset as above. Put numLiveObjects
32         into a local variable to cut down on global variable accesses. Set numLiveObjectsAtLastCollect
33         rather than numAllocationsSinceLastCollect.
34         (KJS::Collector::numReferencedObjects): Get table size and pointer into locals outside
35         the loop to avoid re-loading them over and over again.
36         (KJS::Collector::rootObjectClasses): Ditto.
37
38         * kjs/internal.h: Make Value be a friend of NumberImp so it can construct number objects
39         directly, avoiding the conversion from Number to Value.
40
41         * kjs/internal.cpp: (StringImp::toObject): Don't use Object::dynamicCast, because we know
42         the thing is an object and we don't want to do all the extra work; just cast directly.
43
44         * kjs/list.cpp: (KJS::List::List): Construct valueRefCount in a way that avoids the need for
45         a branch -- in the hot case this just meant avoiding checking a variable we just set to false.
46
47         * kjs/lookup.cpp: (keysMatch): Marked this inline.
48
49         * kjs/nodes.cpp: Disabled KJS_BREAKPOINT, to avoid calling hitStatement all the time.
50         (BooleanNode::evaluate): Make a Value directly, rather than making a Boolean which is converted
51         into a Value.
52         (NumberNode::evaluate): Ditto.
53         (StringNode::evaluate): Ditto.
54         (ArrayNode::evaluate): Ditto.
55         (FunctionCallNode::evaluate): Use new inline baseIfMutable to avoid unnecessary getBase function.
56         Also just use a pointer for func, rather than an Object.
57         (PostfixNode::evaluate): Change code so that it doesn't make an excess Number, and so that it
58         passes a "known to be integer" boolean in, often avoiding a conversion from floating point to
59         integer and back.
60         (DeleteNode::evaluate): Make a Value directly.
61         (TypeOfNode::evaluate): Use new inline baseIfMutable and make Value directly.
62         (PrefixNode::evaluate): Change code so that it doesn't make an excess Number, and so that it
63         passes a "known to be integer" boolean in, often avoiding a conversion from floating point to
64         integer and back.
65         (UnaryPlusNode::evaluate): Make a Value directly.
66         (NegateNode::evaluate): Change code so that it doesn't make an excess Number, and so that it
67         passes a "known to be integer" boolean in, often avoiding a conversion from floating point to
68         integer and back.
69         (BitwiseNotNode::evaluate): Make a Value directly.
70         (LogicalNotNode::evaluate): Ditto.
71         (ShiftNode::evaluate): Don't convert to a double before making a Value.
72         (RelationalNode::evaluate): Make a Value directly.
73         (EqualNode::evaluate): Ditto.
74         (BitOperNode::evaluate): Ditto.
75         (AssignNode::evaluate): Make a Value directly. Change code so that it passes a "known to be integer"
76         boolean in, often avoiding a conversion from floating point to integer and back.
77         (VarDeclNode::evaluate): Make a Value directly.
78         (ForNode::execute): Remove unused local variable.
79
80         * kjs/operations.h:
81         (KJS::isNaN): Inlined.
82         (KJS::isInf): Ditto.
83         (KJS::isPosInf): Ditto.
84         (KJS::isNegInf): Ditto.
85
86         * kjs/operations.cpp: Change isNaN, isInf, isPosInf, and isNegInf to be inlines.
87         (KJS::equal): Rewrite to avoid creating values and recursing back into the function.
88         (KJS::relation): Rearranged code so that we don't need explicit isNaN checks.
89         (KJS::add): Changed code to make Value directly, and so that it passes a "known to be integer"
90         boolean in, often avoiding a conversion from floating point to integer and back.
91         (KJS::mult): Ditto.
92
93         * kjs/property_map.cpp:
94         (KJS::PropertyMap::~PropertyMap): Get size and entries pointer outside loop to avoid
95         re-getting them inside the loop.
96         (KJS::PropertyMap::clear): Ditto. Clear value pointer in addition to key, so we can just
97         look at the value pointer in the mark function.
98         (KJS::PropertyMap::get): Get sizeMask and entries pointer outside loop to avoid
99         re-getting them inside the loop.
100         (KJS::PropertyMap::put): Ditto.
101         (KJS::PropertyMap::insert): Ditto.
102         (KJS::PropertyMap::remove): Ditto.
103         (KJS::PropertyMap::mark): Get size and entries pointer outside loop to avoid
104         re-getting them inside the loop. Don't bother checking key for 0, since we already have
105         to check value for 0. (Also had to change clear() to set value to 0.)
106         (KJS::PropertyMap::addEnumerablesToReferenceList): Get size and entries pointer outside
107         loop to avoid re-getting them inside the loop.
108         (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): Ditto.
109         (KJS::PropertyMap::save): Ditto.
110
111         - other changes
112
113         * kjs/protected_values.h: Remove unneeded class name qualifiers.
114
115         * kjs/reference.h:
116         (KJS::Reference::baseIfMutable): New inline function: replaces isMutable().
117         (KJS::Reference::Reference): Inlined.
118         * kjs/reference.cpp:
119         (KJS::Reference::getValue): Rewrite to not use getBase.
120         (KJS::Reference::putValue): Ditto.
121         (KJS::Reference::deleteValue): Dittol
122
123         * kjs/simple_number.h:
124         (KJS::SimpleNumber::integerFits): Added. For use when the parameter is known to be integral.
125
126         * kjs/string_object.cpp: (StringProtoFuncImp::call): Create the number without first converting
127         to double in various cases that involve integers.
128
129         * kjs/ustring.h:
130         (KJS::UString::attach): Inlined.
131         (KJS::UString::release): Inlined.
132         * kjs/ustring.cpp:
133         (KJS::UString::find): Get first character outside the loop instead of re-fetching it each time.
134
135         * kjs/value.cpp:
136         (Value::Value): Added overloads for all the various specific types of values, so you don't have
137         to convert from, say, Number to Value, just to create one.
138         (Number::Number): Added an overload that takes a boolean to indicate the number is already
139         known to be an integer.
140
141         * kjs/value.h: Added more Value constructors, added a version of toNumber that returns
142         a boolean to indicate if the number is known to be an integer (because it was a "simple number").
143         (KJS::ValueImp::marked): Inlined.
144         (KJS::ValueImp::dispatchType): Inlined.
145         (KJS::ValueImp::dispatchToPrimitive): Inlined.
146         (KJS::ValueImp::dispatchToBoolean): Inlined.
147         (KJS::ValueImp::dispatchToNumber): Inlined.
148         (KJS::ValueImp::dispatchToString): Inlined.
149         (KJS::ValueImp::dispatchToUInt32): Inlined.
150
151 2005-04-14  Maciej Stachowiak  <mjs@apple.com>
152
153         - make fast_malloc.h a private header, not project
154
155         * JavaScriptCore.pbproj/project.pbxproj:
156
157 2005-04-12  Maciej Stachowiak  <mjs@apple.com>
158
159         Reviewed by Richard.
160
161         <rdar://problem/4089734> JavaScript iBench can be sped up ~10% with custom allocator
162
163         - use custom single-threaded malloc for all non-GC JavaScriptCore
164         allocations, for a 9.1% speedup on JavaScript iBench
165         
166         * JavaScriptCore.pbproj/project.pbxproj:
167         * kjs/collector.cpp:
168         (KJS::Collector::allocate): Use dlmalloc to allocate the collector blocks.
169         (KJS::Collector::collect): And dlfree to free it.
170         * kjs/fast_malloc.cpp: Added, just the standard dlmalloc here.
171         * kjs/fast_malloc.h: Added. Declarations for the functions. Also added a handy
172         macro to give a class custom operator new/delete
173         * kjs/identifier.cpp:
174         (KJS::Identifier::add): Use dlmalloc/dlfree.
175         * kjs/nodes.h: make nodes KJS_FAST_ALLOCATED.
176         * kjs/property_map.cpp:
177         (KJS::PropertyMap::~PropertyMap): Use dlmalloc/dlfree.
178         (KJS::PropertyMap::rehash): ditto
179         * kjs/scope_chain.h:
180         * kjs/ustring.cpp:
181         (KJS::UString::Rep::createCopying): New named constructor that copies a passed-in
182         buffer, to hide allocation details from webcore.
183         (KJS::UString::UString): use createCopying when appropriate.
184         (KJS::UString::Rep::destroy): Use dlmalloc/dlfree.
185         (KJS::UString::expandedSize): likewise
186         (KJS::UString::expandCapacity): likewise
187         (KJS::UString::expandPreCapacity): likewise
188         (KJS::UString::spliceSubstringsWithSeparators): likewise
189         (KJS::UString::append): likewise
190         (KJS::UString::operator=): likewise
191         (KJS::UString::detach): likewise
192         * kjs/ustring.h: make UString and UString::Rep KJS_FAST_ALLOCATED.
193
194 2005-04-11  Maciej Stachowiak  <mjs@apple.com>
195
196         Reviewed by John.
197
198         <rdar://problem/4086819> Avoid using protect count hash table so much for 5.6% JS iBench speedup
199
200         - Avoid using protected values hash for the two most common cases
201         - Bump up ListImp high water mark, new testing shows 508 ListImps are
202         created during JS iBench.
203
204         Net result is a 5.6% speedup on JavaScript iBench
205         
206         * kjs/collector.cpp:
207         (KJS::Collector::collect): mark protected lists as appropriate.
208         * kjs/context.h:
209         * kjs/list.cpp:
210         (KJS::ListImp::markValues): Moved implementation from List::markValues
211         (KJS::List::markProtectedLists): Implemented - scan pool and overflow
212         list.
213         (KJS::allocateListImp): link lists outside the pool into a separate
214         doubly linked list to be able to mark protected lists
215         (KJS::deallocateListImp): do the corresponding delinking
216         (KJS::List::derefValues): do nothing in conservative GC mode
217         (KJS::List::refValues): do nothing in conservative GC mode
218         (KJS::List::markValues): call ListImp version
219         (KJS::List::append):
220         * kjs/list.h:
221
222 === Safari-412 ===
223
224 === Safari-411 ===
225
226 === Safari-410 ===
227
228 === Safari-409 ===
229
230 === Safari-408 ===
231
232 === Safari-407 ===
233
234 2005-03-16  Jens Alfke  <jens@apple.com>
235
236         Reviewed by Kevin.
237
238         Fix for <rdar://problem/4025212> "REGRESSION (163-164): search not performed correctly; united.com"
239         JavaScript unescape("") was returning a messed-up String object that appeared identical to an empty string, but would in some cases act as 'null' when passed to native functions, in this case the Option() constructor.
240         In the implementation of unescape, the UString holding the result was not initialized to "", so it started out as a null string. If nothing was appended to it, it remained null, resulting in a JavaScript String object with some bad behaviors (namely, converting it to a DOMStringImpl results in a NULL pointer.)
241         Darin says this regression occurred when we replaced our own implementation of unescape() with code from KJS.
242
243         * kjs/function.cpp:
244         (KJS::GlobalFuncImp::call):
245
246 2005-03-15  Richard Williamson   <rjw@apple.com>
247
248         Fixed <rdar://problem/4053276> WebScripting protocol in WebKit cannot convert Boolean in Javascript to BOOL in Objective-C
249
250         Added JavaScript boolean to type that can be converted to
251         ObjC scalar parameters.
252
253         Reviewed by Ken Kocienda.
254
255         * bindings/objc/objc_utility.mm:
256         (KJS::Bindings::convertValueToObjcValue):
257
258 === Safari-406 ===
259
260 === Safari-405 ===
261
262 === Safari-403 ===
263
264 === Safari-402 ===
265
266 === Safari-401 ===
267
268 === Safari-400 ===
269
270 === Safari-188 ===
271
272 2005-02-21  Darin Adler  <darin@apple.com>
273
274         * kjs/date_object.cpp: (timetUsingCF): Fixed indenting.
275
276 2005-02-17  Richard Williamson   <rjw@apple.com>
277
278         Fixed <rdar://problem/4003251> Safari crashed at www.icelandair.com in LiveConnect code converting a Java object to a string
279
280         Added nil check.
281
282         Reviewed by John Sullivan.
283
284         * bindings/jni/jni_runtime.cpp:
285         (JavaField::valueFromInstance):
286
287 === Safari-187 ===
288
289 2005-02-11  Richard Williamson   <rjw@apple.com>
290
291         Fixed <rdar://problem/3985118> DOM objects not being marshaled on JS->native calls
292
293         Re-factored how 'native' wrappers for JS objects are created.  The interpreter now
294         creates these wrappers.  The WebCore subclass of the interpreter now overrides
295         createLanguageInstanceForValue() and creates a DOM ObjC wrapper for DOM objects.
296
297         Reviewed by Ken.
298
299         * bindings/c/c_utility.cpp:
300         (convertValueToNPVariant):
301         * bindings/jni/jni_instance.cpp:
302         (JavaInstance::invokeMethod):
303         * bindings/jni/jni_objc.mm:
304         (KJS::Bindings::dispatchJNICall):
305         * bindings/jni/jni_runtime.cpp:
306         (JavaField::valueFromInstance):
307         (JavaArray::valueAt):
308         * bindings/objc/WebScriptObject.mm:
309         (-[WebScriptObject _setExecutionContext:KJS::Bindings::]):
310         (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]):
311         * bindings/objc/WebScriptObjectPrivate.h:
312         * bindings/objc/objc_utility.h:
313         * bindings/objc/objc_utility.mm:
314         (KJS::Bindings::convertObjcValueToValue):
315         (KJS::Bindings::createObjcInstanceForValue):
316         * bindings/runtime.cpp:
317         (Instance::createBindingForLanguageInstance):
318         (Instance::createRuntimeObject):
319         (Instance::createLanguageInstanceForValue):
320         * bindings/runtime.h:
321         * kjs/interpreter.cpp:
322         (Interpreter::createLanguageInstanceForValue):
323         * kjs/interpreter.h:
324
325 === Safari-186 ===
326
327 2005-02-10  Darin Adler  <darin@apple.com>
328
329         "Reviewed" by Richard (he told me the file was obsolete).
330
331         - got rid of an obsolete file
332
333         * bindings/npsap.h: Removed.
334
335 === Safari-185 ===
336
337 === Safari-183 ===
338
339 2005-02-03  Richard Williamson   <rjw@apple.com>
340
341         Fixed <rdar://problem/3972905> CrashTracer: ...36 crashes at com.apple.WebCore: khtml::CSSStyleSelector::applyDeclarations + 120
342
343         Revert to old (and correct) behavior of returning runtime object
344         when passed as a parameter, rather than it's corresponding DOM
345         object.
346
347         Reviewed by Chris.
348
349         * bindings/objc/WebScriptObject.mm:
350         (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]):
351
352 === Safari-182 ===
353
354 2005-01-28  Richard Williamson   <rjw@apple.com>
355
356         Fixed <rdar://problem/3980389> JavaScript bindings access incorrect runtime object
357
358         Only use special 'back door' property to get the runtime object if thisObj isn't
359         already a runtime object.
360
361         <gratuitous> Cleaned up a couple of strcmp on ClassInfo name.  Used == on
362         ClassInfo pointer instead.
363
364         Reviewed by Chris.
365
366         * bindings/c/c_utility.cpp:
367         (convertValueToNPVariant):
368         * bindings/objc/WebScriptObject.mm:
369         (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]):
370         * bindings/runtime_method.cpp:
371         (RuntimeMethodImp::call):
372
373 === Safari-181 ===
374
375 2005-01-26  Richard Williamson   <rjw@apple.com>
376
377         Fixed <rdar://problem/3972522> (179-180) 40% slowdown on iBench JavaScript test
378
379         I added a member variable to ObjectImp.  This changed it's size and consequently
380         hampered the optimizations built into the garbage collector.  Objects no longer
381         fit within the allocators cell size, and thus allocation fell back to a slower
382         allocator.
383
384         As a result of this fix I also dramatically cleaned up how runtime objects are
385         accessed.  The path mostly *removes* code.
386         
387         Reviewed by Chris.
388
389         * bindings/runtime_method.cpp:
390         (RuntimeMethodImp::call):
391         * bindings/runtime_object.cpp:
392         (RuntimeObjectImp::get):
393         (RuntimeObjectImp::put):
394         (RuntimeObjectImp::canPut):
395         (RuntimeObjectImp::hasProperty):
396         (RuntimeObjectImp::defaultValue):
397         * bindings/runtime_object.h:
398         * kjs/object.cpp:
399         (KJS::ObjectImp::ObjectImp):
400         * kjs/object.h:
401
402 2005-01-20  Darin Adler  <darin@apple.com>
403
404         Reviewed by me, changes by Han Ming Ong.
405
406         - <rdar://problem/3964302> SWB: A few files need to be updated to be compilable under GCC 4.0
407
408         * bindings/objc/WebScriptObjectPrivate.h: Make members public.
409         * kjs/lookup.h: Change "value.h" to "object.h" because we need KJS::Object to compile a template.
410
411 2005-01-20  Richard Williamson   <rjw@apple.com>
412
413         Fixed <rdar://problem/3964634> undefined property value from binding seems to evaluate to true in an if statement
414
415         The comprehensive fix for this problem requires new API, as described in 3965326.  However,
416         given that we can't add new API at this point, the 'ObjcFallbackObjectImp' will behave
417         like and Undefined object if  invokeUndefinedMethodFromWebScript:withArguments: isn't
418         implemented on the bound object.
419
420         Reviewed by Chris.
421
422         * bindings/objc/objc_runtime.h:
423         * bindings/objc/objc_runtime.mm:
424         (ObjcFallbackObjectImp::type):
425         (ObjcFallbackObjectImp::implementsCall):
426         (ObjcFallbackObjectImp::toBoolean):
427         * bindings/testbindings.mm:
428         (+[MyFirstInterface isSelectorExcludedFromWebScript:]):
429         (+[MyFirstInterface isKeyExcludedFromWebScript:]):
430
431 === Safari-180 ===
432
433 2005-01-19  Richard Williamson   <rjw@apple.com>
434
435         Fixed <rdar://problem/3853676> Browser Crash when accessing CCWeb Progress Page - KJS::Bindings::convertValueToJValue
436
437         Fixed the following problems with LiveConnect that are demonstrated by the application
438         described in 3853676.
439
440         1.  If a nil object is passed in an array from Java to JavaScript we will crash.
441         2.  We sometimes will incorrectly attempt to access a generic JavaScript as a Java runtime object wrapper.
442         3.  We will sometimes fail to find the correct static method ID.
443
444         Reviewed by Maciej.
445
446         * bindings/jni/jni_jsobject.cpp:
447         (JSObject::convertJObjectToValue):
448         (JSObject::listFromJArray):
449         * bindings/jni/jni_runtime.cpp:
450         (JavaField::valueFromInstance):
451         (JavaField::setValueToInstance):
452         * bindings/jni/jni_utility.cpp:
453         (KJS::Bindings::getMethodID):
454         (KJS::Bindings::convertValueToJValue):
455         * bindings/runtime_array.h:
456
457 2005-01-18  Richard Williamson   <rjw@apple.com>
458
459         Fixed several issues all arising from analysis of plugin detection code at ifilm.com:
460
461         Fixed <rdar://problem/3958592> can't script plug-ins if plug-in is invoked with <object> element instead of <embed>
462         Fixed <rdar://problem/3958597> <object> elements with IDs do not show up as named properties of the document
463         Fixed <rdar://problem/3960973> DOM objects for plugin elements are not accessible
464         Fixed <rdar://problem/3958601> need an additional class ID in WebCore for the Real plug-in
465
466         We now support accessing scriptable plugin objects that are specified with <applet>, <embed>, or <object>
467         tags.  Also, if any of these elements are named they can be accessed from the document or window objects.
468         Finally, DOM methods are properties will be forwarded appropriately for the plugin's root scriptable object.
469
470         Reviewed by Chris.
471
472         * bindings/objc/objc_instance.h:
473         * bindings/objc/objc_instance.mm:
474         (ObjcInstance::supportsSetValueOfUndefinedField):
475         * bindings/runtime.h:
476         (KJS::Bindings::Instance::supportsSetValueOfUndefinedField):
477         * bindings/runtime_object.cpp:
478         (RuntimeObjectImp::RuntimeObjectImp):
479         (RuntimeObjectImp::get):
480         (RuntimeObjectImp::put):
481         (RuntimeObjectImp::canPut):
482         (RuntimeObjectImp::hasProperty):
483         (RuntimeObjectImp::defaultValue):
484         * bindings/runtime_object.h:
485         (KJS::RuntimeObjectImp::fallbackObject):
486         * kjs/object.cpp:
487         (KJS::ObjectImp::ObjectImp):
488         * kjs/object.h:
489         (KJS::ObjectImp::forwardingScriptMessage):
490         (KJS::ObjectImp::setForwardingScriptMessage):
491
492 2005-01-18  Richard Williamson   <rjw@apple.com>
493
494         Back out a change that was incorrectly committed yesterday.
495
496         Reviewed by Chris.
497
498         * bindings/objc/objc_utility.mm:
499         (KJS::Bindings::convertValueToObjcValue):
500
501 2005-01-17  Richard Williamson   <rjw@apple.com>
502
503         Fixed <rdar://problem/3753030> Need to ensure same origin for plugin binding invocations (origin security rules)
504
505         Keep track of originating execution context and target execution
506         context for native JS object wrappers, and perform appropriate
507         security checks.
508
509         Reviewed by David Harrison.
510
511         * bindings/NP_jsobject.cpp:
512         (_isSafeScript):
513         (_NPN_CreateScriptObject):
514         (_NPN_Invoke):
515         (_NPN_Evaluate):
516         (_NPN_GetProperty):
517         (_NPN_SetProperty):
518         (_NPN_RemoveProperty):
519         (_NPN_HasProperty):
520         (_NPN_HasMethod):
521         (_NPN_SetException):
522         * bindings/NP_jsobject.h:
523         * bindings/c/c_instance.cpp:
524         (CInstance::CInstance):
525         (CInstance::stringValue):
526         * bindings/c/c_instance.h:
527         * bindings/c/c_utility.cpp:
528         (convertValueToNPVariant):
529         * bindings/jni/jni_instance.cpp:
530         (JavaInstance::JavaInstance):
531         (JavaInstance::valueOf):
532         * bindings/jni/jni_instance.h:
533         * bindings/objc/WebScriptObject.mm:
534         (-[WebScriptObject _initializeWithObjectImp:KJS::originExecutionContext:Bindings::executionContext:Bindings::]):
535         (-[WebScriptObject _initWithObjectImp:KJS::originExecutionContext:Bindings::executionContext:Bindings::]):
536         (-[WebScriptObject KJS::Bindings::]):
537         (-[WebScriptObject _setOriginExecutionContext:KJS::Bindings::]):
538         (-[WebScriptObject _isSafeScript]):
539         (-[WebScriptObject callWebScriptMethod:withArguments:]):
540         (-[WebScriptObject evaluateWebScript:]):
541         (-[WebScriptObject setValue:forKey:]):
542         (-[WebScriptObject valueForKey:]):
543         (-[WebScriptObject removeWebScriptKey:]):
544         (-[WebScriptObject stringRepresentation]):
545         (-[WebScriptObject webScriptValueAtIndex:]):
546         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
547         (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]):
548         * bindings/objc/WebScriptObjectPrivate.h:
549         * bindings/objc/objc_instance.h:
550         * bindings/objc/objc_runtime.mm:
551         (convertValueToObjcObject):
552         * bindings/objc/objc_utility.mm:
553         (KJS::Bindings::convertValueToObjcValue):
554         * bindings/runtime.cpp:
555         (Instance::Instance):
556         (Instance::operator=):
557         * bindings/runtime.h:
558         (KJS::Bindings::Instance::Instance):
559         (KJS::Bindings::Instance::setExecutionContext):
560         (KJS::Bindings::Instance::executionContext):
561         * bindings/runtime_root.cpp:
562         (RootObject::setInterpreter):
563         * bindings/runtime_root.h:
564         * kjs/interpreter.h:
565         (KJS::Interpreter::isGlobalObject):
566         (KJS::Interpreter::interpreterForGlobalObject):
567         (KJS::Interpreter::isSafeScript):
568
569 === Safari-179 ===
570
571 2005-01-13  Vicki Murley <vicki@apple.com>
572
573         Reviewed by Adele.
574
575         - fix <rdar://problem/3946836> Safari about box lists 2004 instead of 2005
576  
577         * JavaScriptCore.pbproj/project.pbxproj: bump "2004" to "2005"
578
579 2005-01-12  Richard Williamson   <rjw@apple.com>
580
581         Avoid additional work on dealloc by adding early out to
582         removeNativeReference().  (This will save time on dealloc
583         for all ObjC DOM objects.)
584
585         Reviewed by Darin.
586
587         * bindings/runtime_root.cpp:
588         (KJS::Bindings::removeNativeReference):
589
590 2005-01-12  Richard Williamson   <rjw@apple.com>
591
592         Fixed <rdar://problem/3923356> REGRESSION: Java/JavaScript security checks working incorrectly
593
594         We were always returning the first "root" object for all runtime
595         objects.  Changed 0 in loop to i, the index.
596
597         Reviewed by David Harrison.
598
599         * bindings/runtime_root.cpp:
600         (KJS::Bindings::rootForImp):
601
602 2005-01-11  Richard Williamson   <rjw@apple.com>
603
604         Fixed <rdar://problem/3887930> Must use new Java plug-in API to get/set fields so exception handling works (fixes many LiveConnect crashes)
605
606         Use the new dispatching API to invoke JNI, rather than calling JNI
607         directly.
608
609         Reviewed by David Harrison.
610
611         * bindings/jni/jni_instance.cpp:
612         (JavaInstance::invokeMethod):
613         * bindings/jni/jni_runtime.cpp:
614         (JavaField::dispatchValueFromInstance):
615         (JavaField::valueFromInstance):
616         (JavaField::dispatchSetValueToInstance):
617         (JavaField::setValueToInstance):
618         * bindings/jni/jni_runtime.h:
619         * bindings/jni/jni_utility.cpp:
620         (KJS::Bindings::convertValueToJValue):
621
622 === Safari-178 ===
623
624 === Safari-177 ===
625
626 === Safari-176 ===
627
628 2004-12-17  Maciej Stachowiak  <mjs@apple.com>
629
630         Reviewed by Kevin.
631
632         <rdar://problem/3926869> Opening caches window after running PLT causes crash
633         
634         * kjs/protected_values.cpp:
635         (KJS::ProtectedValues::getProtectCount): Don't include simple numbers in
636         the protected value table.
637         (KJS::ProtectedValues::increaseProtectCount): Ditto.
638         (KJS::ProtectedValues::decreaseProtectCount): Ditto.
639
640 2004-12-16  Darin Adler  <darin@apple.com>
641
642         Reviewed by Maciej.
643
644         - fixed <rdar://problem/3920764> Unimplemented String methods toLocaleLowerCase and toLocaleUpperCase
645
646         * kjs/string_object.h: Added toLocaleLowerCase and toLocaleUpperCase.
647         * kjs/string_object.cpp: (StringProtoFuncImp::call): Made locale versions be synonmyms for the
648         non-locale-specific versions.
649         * kjs/string_object.lut.h: Regenerated.
650
651 2004-12-14  Richard Williamson   <rjw@apple.com>
652
653         Pass URL of plugin view when call into JNI.
654
655         Reviewed by Chris.
656
657         * bindings/jni/jni_objc.mm:
658         (KJS::Bindings::dispatchJNICall):
659
660 2004-12-13  Richard Williamson   <rjw@apple.com>
661
662         Fixed <rdar://problem/3827799> repro. crash with IBM Rational ClearCase Web under Safari (Java/LiveConnect-related)
663
664         Add support for calling static Java methods from JavaScript.
665
666         Reviewed by Maciej.
667
668         * bindings/jni/jni_instance.cpp:
669         (JavaInstance::invokeMethod):
670         * bindings/jni/jni_runtime.cpp:
671         (JavaMethod::JavaMethod):
672         * bindings/jni/jni_runtime.h:
673         (KJS::Bindings::JavaMethod::isStatic):
674         * bindings/jni/jni_utility.cpp:
675         (callJNIStaticMethod):
676         (KJS::Bindings::callJNIBooleanMethod):
677         (KJS::Bindings::callJNIStaticBooleanMethod):
678         * bindings/jni/jni_utility.h:
679
680 2004-12-13  Richard Williamson   <rjw@apple.com>
681
682         Fixed <rdar://problem/3887767> LiveConnect doesn't propagate Java exceptions back to JavaScript (prevents security suite from running)
683
684         Reviewed by John.
685
686         * bindings/jni/jni_instance.cpp:
687         (JavaInstance::invokeMethod):
688         * bindings/jni/jni_objc.mm:
689         (KJS::Bindings::dispatchJNICall):
690         * bindings/jni/jni_runtime.h:
691         * bindings/jni/jni_utility.h:
692
693 === Safari-175 ===
694
695 2004-12-07  Maciej Stachowiak  <mjs@apple.com>
696
697         Reviewed by Darin.
698
699         <rdar://problem/3908017> REGRESSION (172-173): assertion in ObjectImp::construct trying to create JS error (24hourfitness.com)
700
701         The fix was to implement copy constructor and assignment operator,
702         the ones that worked on the base class did not replace the
703         defaults apparently!
704         
705         * kjs/protect.h:
706         (KJS::ProtectedValue::ProtectedValue):
707         (KJS::ProtectedValue::operator=):
708         (KJS::ProtectedObject::ProtectedObject):
709         (KJS::ProtectedObject::operator=):
710         
711         Also fixed a bug in the GC test mode that compares the results of
712         the old collector and the new collector.
713
714         * kjs/value.cpp:
715         (ValueImp::mark):
716
717 === Safari-173 ===
718
719 2004-11-23  Richard Williamson   <rjw@apple.com>
720
721         Fixed <rdar://problem/3890385> field and method cache incorrectly capped (c bindings)
722
723         Reviewed by Ken.
724
725         * bindings/c/c_class.cpp:
726         (CClass::_commonInit):
727
728 2004-11-21  Maciej Stachowiak  <mjs@apple.com>
729
730         Reviewed by Ken.
731
732         <rdar://problem/3889696> Enable conservative garbage collection for JavaScript
733         
734         * kjs/collector.cpp:
735         (KJS::Collector::Thread::Thread):
736         (KJS::destroyRegisteredThread):
737         (KJS::initializeRegisteredThreadKey):
738         (KJS::Collector::registerThread):
739         (KJS::Collector::markStackObjectsConservatively):
740         (KJS::Collector::markCurrentThreadConservatively):
741         (KJS::Collector::markOtherThreadConservatively):
742         * kjs/collector.h:
743         * kjs/internal.cpp:
744         (lockInterpreter):
745         * kjs/value.h:
746
747 === Safari-172 ===
748
749 2004-11-15  Richard Williamson   <rjw@apple.com>
750
751         Fixed <rdar://problem/3880561> Default string value of ObjC object in JS should be [obj description].
752
753         Reviewed by Hyatt.
754
755         * bindings/objc/objc_instance.mm:
756         (ObjcInstance::stringValue):
757         * bindings/objc/objc_utility.h:
758         * bindings/objc/objc_utility.mm:
759         (KJS::Bindings::convertNSStringToString):
760         (KJS::Bindings::convertObjcValueToValue):
761
762 === Safari-171 ===
763
764 2004-11-09  Chris Blumenberg  <cblu@apple.com>
765
766         Fixed: <rdar://problem/3872724> soft link against JavaVM to save ~2MB RSHRD
767
768         Reviewed by rjw.
769
770         * ChangeLog:
771         * JavaScriptCore.pbproj/project.pbxproj: don't link against JavaVM
772         * bindings/softlinking.c: Added.
773         (loadFramework): new
774         (getFunctionPointer): new
775         (JNI_GetCreatedJavaVMs): load JavaVM if not already loaded, get _JNI_GetCreatedJavaVMs symbol if we don't already have it, call JNI_GetCreatedJavaVMs
776
777 === Safari-170 ===
778
779 2004-11-04  Darin Adler  <darin@apple.com>
780
781         Reviewed by Ken.
782
783         - fixed <rdar://problem/3865365> since -[WebScriptObject dealloc] does not call [super dealloc], the build will fail due to a warning
784         - fixed behavior so that [[WebScriptObject alloc] initWithCoder:] doesn't leak WebUndefined instances
785           and incidentally so that [[WebScriptObject alloc] init] returns the single shared instance rather
786           than allocating a new one
787
788         * bindings/objc/WebScriptObject.mm: Removed some stray semicolons.
789         (+[WebUndefined allocWithZone:]): Made this the common bottleneck that returns the single instance
790         of WebUndefined, since it's the single method that normally allocates new instances. Calls super to
791         actually allocate only the very first time it's called.
792         (-[WebUndefined initWithCoder:]): Simplified to just return self (no reason to re-lookup the single
793         shared instance since there can be only one).
794         (-[WebUndefined copyWithZone:]): Ditto.
795         (-[WebUndefined retain]): Ditto.
796         (-[WebUndefined retainCount]): Use UINT_MAX constant here (matches usage in NSObject.m for retain count
797         of class).
798         (-[WebUndefined autorelease]): Simplified to just return self (see above).
799         (-[WebUndefined copy]): No need to override this since it just turns around and calls copyWithZone:.
800         (-[WebUndefined dealloc]): Added an assertion since this method should never be called. Also added
801         a call to [super dealloc] after return; to make the new -Wdealloc-check compiler happy (fixing the
802         bug mentioned above).
803         (+[WebUndefined undefined]): Reimplemented; calls allocWithZone:NULL to get to the shared instance.
804         No need to call init, since that's a no-op for this class.
805
806 2004-11-03  David Harrison  <harrison@apple.com>
807
808         Reviewed by Darin.
809         
810         Eliminate the use of a marker file to determine how to build.
811
812         * .cvsignore:
813         * Makefile.am:
814
815 2004-11-01  Richard Williamson   <rjw@apple.com>
816
817         Fixed <rdar://problem/3861469> Latest Real player crashes Safari on some sites.
818
819         Reviewed by Ken.
820
821         * bindings/c/c_instance.cpp:
822         (CInstance::invokeMethod):
823         (CInstance::invokeDefaultMethod):
824         Initialize out parameters to void type.
825
826         * bindings/c/c_runtime.cpp:
827         (CField::valueFromInstance):
828         (CField::setValueToInstance):
829         Initialize out parameters to void type.
830         Also added additional checks to protect against classes that 
831         don't implement all functions.
832
833 2004-11-01  Richard Williamson   <rjw@apple.com>
834
835         Fixed <rdar://problem/3861257> WebUndefined should be returned for undefined values
836
837         Reviewed by John.
838
839         * ChangeLog:
840         * bindings/objc/WebScriptObject.mm:
841         (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
842         Added additional conversion Undefined -> WebUndefined.
843         * bindings/objc/objc_utility.mm:
844         (KJS::Bindings::convertObjcValueToValue):
845         Added additional conversion WebUndefined -> Undefined.
846
847 2004-11-01  Darin Adler  <darin@apple.com>
848
849         - fixed <rdar://problem/3855573> Remove reference to "WebScriptMethods" from WebScriptObject.h comments
850
851         * bindings/objc/WebScriptObject.h: Removed unneeded #ifdef protection for multiple includes (since
852         this is an Objective-C header and we use #import for those). Fixed comments as requested in the bug
853         report to match the contents of the file.
854
855 === Safari-169 ===
856
857 === Safari-168 ===
858
859 2004-10-22  Ken Kocienda  <kocienda@apple.com>
860
861         Reviewed by me
862
863         * JavaScriptCore.pbproj/project.pbxproj:  
864         Add GCC_ENABLE_OBJC_GC and GCC_FAST_OBJC_DISPATCH flags.
865
866 === Safari-167 ===
867
868 2004-10-13  Richard Williamson   <rjw@apple.com>
869
870         Moved boolean checks prior to NSNumber checks.  booleans are
871         NSNumbers.
872
873         Follow on to <rdar://problem/3821515> binding layer needs to convert NSNumber-bools to js type boolean not number.
874
875         Reviewed by John.
876
877         * bindings/objc/objc_utility.mm:
878         (KJS::Bindings::convertObjcValueToValue):
879
880 2004-10-12  Richard Williamson   <rjw@apple.com>
881
882         Fixed access to DOM object via WebScriptObject API.
883         The execution context for DOM objects wasn't being found.       
884         <rdar://problem/3831372> The valueForKey method for @"offsetLeft" on a paragraph element causes a crash.
885
886         Reviewed by Chris.
887
888         * bindings/objc/WebScriptObject.mm:
889         (_didExecute):
890         (-[WebScriptObject KJS::Bindings::]):
891         (-[WebScriptObject callWebScriptMethod:withArguments:]):
892         (-[WebScriptObject evaluateWebScript:]):
893         (-[WebScriptObject setValue:forKey:]):
894         (-[WebScriptObject valueForKey:]):
895         (-[WebScriptObject stringRepresentation]):
896         * bindings/objc/WebScriptObjectPrivate.h:
897
898 2004-10-09  Darin Adler  <darin@apple.com>
899
900         Reviewed by Kevin.
901
902         - fixed <rdar://problem/3804661> REGRESSION: JavaScriptCore framework now has two init routines
903
904         * bindings/NP_jsobject.cpp: Fixed unnecessarily-complex globals set up that was
905         creating an init routine.
906
907         * kjs/ustring.cpp: Changed around the UString::Rep::empty construction to not
908         require a global constructor that creates an init routine.
909
910 2004-10-09  Darin Adler  <darin@apple.com>
911
912         Reviewed by Kevin.
913
914         - fixed <rdar://problem/3822618> REGRESSION (164-165): expedia.com's popup help doesn't work
915
916         * kjs/reference.cpp: (Reference::putValue): Change so that references not found in any object
917         work with the window object of the page the function is in, not the page of the caller. This
918         is what all other browsers do. This code was hidden before by the "everything is defined on
919         window object" hack in WebCore.
920
921 2004-10-07  Richard Williamson   <rjw@apple.com>
922
923         Added simple JavaScript call tracing.  Very useful for
924         debugging complex pages.
925
926         Tracing is only available in development builds and is
927         enabled by:
928
929         (gdb) set traceJavaScript = 1
930
931         or programatically
932
933         setTraceJavaScript(true)
934
935         Function, args, and return values are printed to console.  Very
936         verbose.
937
938         Reviewed by Ken.
939
940         * kjs/function_object.cpp:
941         (FunctionProtoFuncImp::call):
942         * kjs/object.cpp:
943         (KJS::Object::call):
944
945 === Safari-166 ===
946
947 2004-10-05  Richard Williamson   <rjw@apple.com>
948
949         Fixed <rdar://problem/3819234> NPN_SetException (and throwException:) isn't implemented
950
951         Reviewed by Chris.
952
953         * bindings/NP_jsobject.cpp:
954         (_NPN_SetException):
955         * bindings/npruntime.cpp:
956         (_NPN_SetExceptionWithUTF8):
957         * bindings/objc/WebScriptObject.mm:
958         (+[WebScriptObject throwException:]):
959         * kjs/internal.h:
960         (KJS::InterpreterImp::context):
961
962 2004-10-05  Richard Williamson   <rjw@apple.com>
963
964         Fixed <rdar://problem/3821515> binding layer needs to convert NSNumber-bools to js type boolean not number
965
966         Reviewed by Ken.
967
968         * bindings/objc/objc_utility.mm:
969         (KJS::Bindings::convertObjcValueToValue):
970
971 2004-10-04  Darin Adler  <darin@apple.com>
972
973         Reviewed by Ken.
974
975         - rolled in a fix the KDE folks did for the operations that generate HTML fragments
976
977         * kjs/string_object.cpp: (StringProtoFuncImp::call): Added quote marks to generated HTML.
978
979         - rolled out an old workaround we don't need any more
980
981         * JavaScriptCore.pbproj/project.pbxproj: Remove -Wno-long-double because the <math.h> issue that
982         required it is no longer there.
983
984 2004-09-30  Richard Williamson  <rjw@apple.com>
985
986         Fixed <rdar://problem/3821215> NPN hasMethod and hasProperty functions should take NPObjects, not NPClass
987
988         Reviewed by Chris.
989
990         * bindings/NP_jsobject.cpp:
991         (_NPN_GetProperty):
992         (_NPN_HasProperty):
993         (_NPN_HasMethod):
994         * bindings/c/c_class.cpp:
995         (CClass::methodsNamed):
996         (CClass::fieldNamed):
997         * bindings/c/c_class.h:
998         * bindings/c/c_instance.cpp:
999         (CInstance::invokeMethod):
1000         * bindings/jni/jni_class.cpp:
1001         (JavaClass::methodsNamed):
1002         * bindings/jni/jni_class.h:
1003         * bindings/npruntime.h:
1004         * bindings/objc/objc_class.h:
1005         * bindings/objc/objc_class.mm:
1006         (ObjcClass::methodsNamed):
1007         * bindings/runtime.h:
1008         * bindings/runtime_object.cpp:
1009         (RuntimeObjectImp::get):
1010         (RuntimeObjectImp::hasProperty):
1011
1012 2004-09-29  Chris Blumenberg  <cblu@apple.com>
1013
1014         Prepended underscores to NPN methods so that when the QT plug-in loads these symbols, it uses the non-underscore versions in WebKit. Without this, the QT plug-in was failing to load when launching Safari from the command-line.
1015
1016         Reviewed by rjw.
1017
1018         * JavaScriptCore.pbproj/project.pbxproj:
1019         * bindings/NP_jsobject.cpp:
1020         (_NPN_CreateScriptObject):
1021         (_NPN_InvokeDefault):
1022         (_NPN_Invoke):
1023         (_NPN_Evaluate):
1024         (_NPN_GetProperty):
1025         (_NPN_SetProperty):
1026         (_NPN_RemoveProperty):
1027         (_NPN_HasProperty):
1028         (_NPN_HasMethod):
1029         * bindings/c/c_class.cpp:
1030         (CClass::methodsNamed):
1031         (CClass::fieldNamed):
1032         * bindings/c/c_instance.cpp:
1033         (CInstance::CInstance):
1034         (CInstance::~CInstance):
1035         (CInstance::operator=):
1036         (CInstance::invokeMethod):
1037         (CInstance::invokeDefaultMethod):
1038         * bindings/c/c_runtime.cpp:
1039         * bindings/c/c_runtime.h:
1040         (KJS::Bindings::CField::name):
1041         (KJS::Bindings::CMethod::name):
1042         * bindings/npruntime.cpp:
1043         (_NPN_GetStringIdentifier):
1044         (_NPN_GetStringIdentifiers):
1045         (_NPN_GetIntIdentifier):
1046         (_NPN_IdentifierIsString):
1047         (_NPN_UTF8FromIdentifier):
1048         (_NPN_IntFromIdentifier):
1049         (NPN_InitializeVariantWithObject):
1050         (_NPN_ReleaseVariantValue):
1051         (_NPN_CreateObject):
1052         (_NPN_RetainObject):
1053         (_NPN_ReleaseObject):
1054         (_NPN_SetExceptionWithUTF8):
1055         (_NPN_SetException):
1056
1057 2004-09-26  Darin Adler  <darin@apple.com>
1058
1059         * kjs/string_object.cpp: (StringProtoFuncImp::call): Remove strange use of high() and
1060         low() to get Unicode value of character, and just use unicode().
1061
1062 2004-09-26  Darin Adler  <darin@apple.com>
1063
1064         - refine charAt/charCodeAt fix slightly
1065
1066         * kjs/string_object.cpp: (StringProtoFuncImp::call): Treat undefined the same was as an
1067         omitted parameter, as we do everywhere else, and as other browsers do here.
1068
1069 2004-09-26  Darin Adler  <darin@apple.com>
1070
1071         Reviewed by Kevin.
1072
1073         - fixed <rdar://problem/3816097> REGRESSION: mailblocks, and presumably many other pages, failing because variable not found
1074
1075         * kjs/internal.cpp: (InterpreterImp::evaluate): Process variable declarations before executing
1076         the program. We were doing this properly for functions, but not entire programs.
1077
1078         - fixed <rdar://problem/3814706> REGRESSION: text fields in mailblocks wizards do not accept keystrokes due to use of charCodeAt()
1079
1080         * kjs/string_object.cpp: (StringProtoFuncImp::call): Changed the implementation of charAt
1081         and charCodeAt to treat a missing parameter as an index of 0, rather than an invalid index.
1082
1083         * tests/mozilla/expected.html: Update for two tests that now pass with these changes.
1084
1085 === Safari-165 ===
1086
1087 === Safari-164 ===
1088
1089 2004-09-14  Richard Williamson   <rjw@apple.com>
1090
1091         1.  Add class parameter to object allocation function.  This is somewhat redundant, given that
1092         the allocation function is in the class function vector, but people wanted to use the same
1093         allocation function for different classes.
1094         
1095         2.  Renamed NPN_Class to NPN_Invoke to match the name in the function vector.
1096         
1097         3.  Add support for a default function on an object.  This is a feature that ActiveX supports,
1098         and will allow JavaScript code to be written that will look exactly the same for both ActiveX
1099         plugins and Netscape or WebKit plugins.  There are implementations included for the 'C' and
1100         'Objective-C' bindings.
1101         
1102         There bugs are covered by
1103         
1104         <rdar://problem/3776343> Support for default functions in the JavaScript bindings
1105         <rdar://problem/3779186> NPN_Call needs to be renamed to NPN_Invoke
1106         <rdar://problem/3674754> Need to implement latest npruntime.h
1107
1108         Reviewed by John.
1109
1110         * bindings/NP_jsobject.cpp:
1111         (jsAllocate):
1112         (NPN_InvokeDefault):
1113         (NPN_Invoke):
1114         * bindings/c/c_class.cpp:
1115         * bindings/c/c_instance.cpp:
1116         (CInstance::CInstance):
1117         (CInstance::operator=):
1118         (CInstance::invokeMethod):
1119         (CInstance::invokeDefaultMethod):
1120         * bindings/c/c_instance.h:
1121         * bindings/c/c_runtime.cpp:
1122         * bindings/c/c_runtime.h:
1123         * bindings/jni/jni_instance.cpp:
1124         (JavaInstance::invokeDefaultMethod):
1125         * bindings/jni/jni_instance.h:
1126         * bindings/npruntime.cpp:
1127         (NPN_CreateObject):
1128         * bindings/npruntime.h:
1129         * bindings/objc/WebScriptObject.h:
1130         * bindings/objc/objc_class.mm:
1131         (ObjcClass::fallbackObject):
1132         * bindings/objc/objc_instance.h:
1133         * bindings/objc/objc_instance.mm:
1134         (ObjcInstance::invokeDefaultMethod):
1135         * bindings/objc/objc_runtime.h:
1136         * bindings/objc/objc_runtime.mm:
1137         (ObjcFallbackObjectImp::ObjcFallbackObjectImp):
1138         (ObjcFallbackObjectImp::get):
1139         (ObjcFallbackObjectImp::put):
1140         (ObjcFallbackObjectImp::canPut):
1141         (ObjcFallbackObjectImp::implementsCall):
1142         (ObjcFallbackObjectImp::call):
1143         (ObjcFallbackObjectImp::hasProperty):
1144         (ObjcFallbackObjectImp::deleteProperty):
1145         (ObjcFallbackObjectImp::defaultValue):
1146         * bindings/runtime.h:
1147         (KJS::Bindings::Class::fallbackObject):
1148         (KJS::Bindings::Instance::getValueOfUndefinedField):
1149         (KJS::Bindings::Instance::setValueOfUndefinedField):
1150         (KJS::Bindings::Instance::valueOf):
1151         * bindings/runtime_object.cpp:
1152         (RuntimeObjectImp::implementsCall):
1153         (RuntimeObjectImp::call):
1154         * bindings/runtime_object.h:
1155
1156 2004-09-13  Maciej Stachowiak  <mjs@apple.com>
1157
1158         Reviewed by Darin.
1159
1160         <rdar://problem/3794735> Gmail- sending a very long message with Safari is so slow it seems like a hang
1161         
1162         * kjs/string_object.cpp:
1163         (StringProtoFuncImp::call): Replaced implementation of replace()
1164         method with function below...
1165         (replace): In order to avoid excessive allocation and copying,
1166         figure out the ranges of the original string and replacement
1167         strings to be assembled, instead of constantly creating new
1168         strings at each substitution. The old behavior is basically O(N^2)
1169         for a global replace on a pattern that matches many places in the
1170         string.
1171         (regExpIsGlobal): Helper function for the above.
1172         (expandSourceRanges): ditto
1173         (pushSourceRange): ditto
1174         (expandReplacements): ditto
1175         (pushReplacement): ditto
1176         * kjs/ustring.cpp:
1177         (KJS::UString::spliceSubstringsWithSeparators): New method that
1178         pieces together substring ranges of this string together with
1179         specified separators, all at one go.
1180         * kjs/ustring.h:
1181         (KJS::UString::Range::Range): Added new helper class to represent
1182         substring choices.
1183
1184 2004-09-14  Maciej Stachowiak  <mjs@apple.com>
1185
1186         Reviewed by Darin.
1187
1188         - fixed <rdar://problem/3800315> encode-URI-test layout test is failing
1189         
1190         * kjs/function.cpp:
1191         (KJS::GlobalFuncImp::call): Make sure to escape null
1192         characters. This is a bug in the new code that made part of the
1193         test fail.
1194
1195 2004-09-13  Darin Adler  <darin@apple.com>
1196
1197         Reviewed by Kevin and Maciej.
1198
1199         - new function to support fix for DIG bug in WebCore
1200
1201         * kjs/scope_chain.h: Added new push function that pushes another entire scope chain.
1202         * kjs/scope_chain.cpp: (KJS::ScopeChain::push): Ditto.
1203
1204 2004-09-12  Darin Adler  <darin@apple.com>
1205
1206         * tests/mozilla/expected.html: Updated test results for 3 more tests that pass with the new version
1207         of escape and unescape.
1208
1209 2004-09-12  Darin Adler  <darin@apple.com>
1210
1211         Reviewed by Maciej.
1212
1213         - fixed <rdar://problem/3798209> any non-ASCII characters are garbled in the result of toLocaleString
1214
1215         * kjs/date_object.cpp:
1216         (formatLocaleDate): Replaced two old functions that used LongDateTime with this one new function that
1217         uses CFDateFormatter.
1218         (DateProtoFuncImp::call): Call the new formatLocaleDate instead of both formatLocaleDate and formatLocaleTime.
1219
1220 2004-09-09  Maciej Stachowiak  <mjs@apple.com>
1221
1222         Reviewed by Richard.
1223
1224         <rdar://problem/3493140> REGRESSION (85-100): cedille displays %-escaped in JavaScript message at hotmail.com
1225
1226         * kjs/function.cpp:
1227         (KJS::GlobalFuncImp::call): Replace our escape() and unescape() implementations with
1228         ones from KDE KJS, which have the proper latin-1 behavior to match Win IE.
1229         * kjs/lexer.cpp:
1230         (Lexer::isHexDigit): Made static and non-const.
1231         * kjs/lexer.h:
1232
1233 === Safari-163 ===
1234
1235 2004-09-06  Darin Adler  <darin@apple.com>
1236
1237         * JavaScriptCore.pbproj/project.pbxproj: Bump MACOSX_DEPLOYMENT_TARGET to 10.3.
1238
1239 === Safari-162 ===
1240
1241 2004-09-01  Richard Williamson   <rjw@apple.com>
1242
1243         Add pid to exception messages (to help debug dashboard clients).
1244
1245         Reviewed by Chris.
1246
1247         * kjs/interpreter.cpp:
1248         (Interpreter::evaluate):
1249
1250 === Safari-161 ===
1251
1252 2004-08-20  Richard Williamson   <rjw@apple.com>
1253
1254         Implemented new JNI abstraction.  We no longer invoke Java methods
1255         directly with JNI, rather we call into the plugin.  This allows the
1256         plugin to dispatch the call to the appropriate VM thread.  This
1257         change should (will?) fix a whole class of threading related problems with
1258         the Java VM.
1259
1260         Reviewed by Hyatt.
1261
1262         * JavaScriptCore.pbproj/project.pbxproj:
1263         * bindings/c/c_instance.h:
1264         (KJS::Bindings::CInstance::setExecutionContext):
1265         (KJS::Bindings::CInstance::executionContext):
1266         * bindings/jni/jni_instance.cpp:
1267         (JavaInstance::JavaInstance):
1268         (JavaInstance::invokeMethod):
1269         (JavaInstance::setExecutionContext):
1270         (JavaInstance::executionContext):
1271         * bindings/jni/jni_instance.h:
1272         * bindings/jni/jni_jsobject.cpp:
1273         (JSObject::convertJObjectToValue):
1274         * bindings/jni/jni_runtime.cpp:
1275         (JavaField::JavaField):
1276         (JavaArray::convertJObjectToArray):
1277         (JavaField::valueFromInstance):
1278         (JavaArray::JavaArray):
1279         (JavaArray::valueAt):
1280         * bindings/jni/jni_runtime.h:
1281         (KJS::Bindings::JavaArray::operator=):
1282         (KJS::Bindings::JavaArray::executionContext):
1283         * bindings/jni/jni_utility.h:
1284         * bindings/objc/objc_instance.h:
1285         (KJS::Bindings::ObjcInstance::setExecutionContext):
1286         (KJS::Bindings::ObjcInstance::executionContext):
1287         * bindings/runtime.cpp:
1288         (Instance::createBindingForLanguageInstance):
1289         * bindings/runtime.h:
1290         * bindings/runtime_root.h:
1291         (KJS::Bindings::RootObject::nativeHandle):
1292
1293 === Safari-158 ===
1294
1295 2004-08-19  Vicki Murley  <vicki@apple.com>
1296
1297         Reviewed by John.
1298
1299         * kjs/property_map.cpp:
1300         (KJS::PropertyMap::put): initialize deletedElementIndex to zero, to make the compiler happy
1301
1302 2004-08-17  Darin Adler  <darin@apple.com>
1303
1304         Reviewed by Adele.
1305
1306         - fixed <rdar://problem/3746676> SAP WebDynpro app hangs inside JavaScript property map hash table code (deleted sentinel problem)
1307
1308         * kjs/property_map.h: Added some private functions.
1309         * kjs/property_map.cpp:
1310         (KJS::PropertyMap::clear): Set sentinelCount to 0.
1311         (KJS::PropertyMap::put): Complete search for the element before choosing to use the deleted-element sentinel.
1312         Also keep sentinel count up to date when we destroy a sentinel by overwriting with a new added element.
1313         (KJS::PropertyMap::expand): Added. Calls rehash with a size 2x the old size, or 16.
1314         (KJS::PropertyMap::rehash): Added. Refactored the rehash code into a separate function.
1315         (KJS::PropertyMap::remove): Add one to sentinelCount, and rehash if 1/4 or more of the elements are
1316         deleted-element sentinels.
1317         (KJS::PropertyMap::checkConsistency): Check the sentinelCount.
1318
1319 2004-08-16  Maciej Stachowiak  <mjs@apple.com>
1320
1321         Code change by Eric Albert, reviewd by me.
1322
1323         <rdar://problem/3571960> washingtonpost.com claims I don't have cookies enabled and won't let me read articles
1324
1325         * kjs/date_object.cpp:
1326         (timetUsingCF): Clamp time to LONG_MAX (getting rid of time_t
1327         entirely would be even better, but is not required to fix this bug.
1328
1329 === Safari-157 ===
1330
1331 2004-08-16  Richard Williamson   <rjw@apple.com>
1332
1333         Fixed <rdar://problem/3581092> cash in KJS::Bindings::JSObject::eval at tcvetantcvetkov.com
1334
1335         Adds bullet proofing to protect against evaluation of bogus JS in all the flavors of bindings (Java, C, and ObjC).
1336
1337         Reviewed by Chris.
1338
1339         * bindings/NP_jsobject.cpp:
1340         (NPN_Evaluate):
1341         * bindings/jni/jni_jsobject.cpp:
1342         (JSObject::eval):
1343         * bindings/objc/WebScriptObject.mm:
1344         (-[WebScriptObject evaluateWebScript:]):
1345
1346 2004-08-15  Richard Williamson   <rjw@apple.com>
1347
1348         More updates to np headers.  Implemented new NPN functions.
1349
1350         Reviewed by Darin.
1351
1352         * bindings/NP_jsobject.cpp:
1353         (NPN_HasProperty):
1354         (NPN_HasMethod):
1355         * bindings/npapi.h:
1356         * bindings/npruntime.h:
1357
1358 2004-08-13  Darin Adler  <darin@apple.com>
1359
1360         - fix build so we can compile again
1361
1362         * bindings/npapi.h: Added. Richard forgot to check this in. The one I'm checking in here
1363         is good enough so that we can compile, but it's only a stopgap measure, because I think
1364         Richard has a newer one he wants to check in.
1365
1366 2004-08-12  Richard Williamson   <rjw@apple.com>
1367
1368         Bring npruntime.h and friends closer to compliance with
1369         latest spec.
1370
1371         Reviewed by Maciej.
1372
1373         * JavaScriptCore.pbproj/project.pbxproj:
1374         * bindings/NP_jsobject.cpp:
1375         (jsAllocate):
1376         (_NPN_CreateScriptObject):
1377         (NPN_Call):
1378         (NPN_Evaluate):
1379         (NPN_GetProperty):
1380         (NPN_SetProperty):
1381         (NPN_RemoveProperty):
1382         * bindings/NP_jsobject.h:
1383         * bindings/c/c_instance.cpp:
1384         (CInstance::invokeMethod):
1385         * bindings/c/c_utility.cpp:
1386         (convertNPVariantToValue):
1387         * bindings/npruntime.cpp:
1388         (NPN_IdentifierIsString):
1389         (NPN_VariantIsVoid):
1390         (NPN_VariantIsNull):
1391         (NPN_VariantIsUndefined):
1392         (NPN_VariantIsBool):
1393         (NPN_VariantIsInt32):
1394         (NPN_VariantIsDouble):
1395         (NPN_VariantIsString):
1396         (NPN_VariantIsObject):
1397         (NPN_VariantToBool):
1398         (NPN_VariantToString):
1399         (NPN_VariantToInt32):
1400         (NPN_VariantToDouble):
1401         (NPN_VariantToObject):
1402         (NPN_InitializeVariantAsVoid):
1403         (NPN_InitializeVariantAsNull):
1404         (NPN_InitializeVariantAsUndefined):
1405         (NPN_InitializeVariantWithBool):
1406         (NPN_InitializeVariantWithInt32):
1407         (NPN_InitializeVariantWithDouble):
1408         (NPN_InitializeVariantWithString):
1409         (NPN_InitializeVariantWithStringCopy):
1410         (NPN_InitializeVariantWithObject):
1411         (NPN_InitializeVariantWithVariant):
1412         (NPN_ReleaseVariantValue):
1413         (NPN_CreateObject):
1414         * bindings/npruntime.h:
1415         (_NPString::):
1416         (_NPString::_NPVariant::):
1417         * bindings/npruntime_priv.h: Added.
1418
1419 2004-08-12  Darin Adler  <darin@apple.com>
1420
1421         Reviewed by Adele.
1422
1423         - fixed 3 problems with parse functions that I just wrote, fixing 3 more Mozilla JavaScript tests
1424
1425         * kjs/function.cpp:
1426         (KJS::parseDigit): Fix typo, 'Z' instead of 'z', that prevented lowercase hex digits from working.
1427         (KJS::parseInt): Add octal support. Specification says it's optional, but I guess not.
1428         (KJS::parseFloat): Fix check for "0x" in parseFloat to return 0 rather than NaN. Also add code
1429         to skip leading "+" or "-".
1430
1431 === Safari-156 ===
1432
1433 2004-08-12  Darin Adler  <darin@apple.com>
1434
1435         Reviewed by Ken.
1436
1437         - fixed 43 Mozilla JavaScript tests
1438
1439         * kjs/date_object.h: Change parseDate and timeClip to take and return doubles.
1440         * kjs/date_object.cpp:
1441         (DateObjectImp::construct): Change to use a timeClip function that takes and returns a double rather
1442         than constructing a number object to pass to it.
1443         (DateObjectFuncImp::call): Change to use a parseDate function that returns a double.
1444         (KJS::parseDate): Change to return a double instead of creating the Number object here.
1445         (KJS::timeClip): Implement this as specified in the language standard.
1446
1447         * kjs/error_object.cpp: (NativeErrorImp::NativeErrorImp): Set the DontDelete, ReadOnly, and DontEnum
1448         flags on the prototype property.
1449
1450         * kjs/function.cpp:
1451         (KJS::FunctionImp::get): Return null rather than undefined for arguments when the function is not
1452         currently in scope.
1453         (KJS::isStrWhiteSpace): Added. Matches specification for StrWhiteSpace. Could move it to some utility
1454         file later.
1455         (KJS::parseDigit): Added. Helper function for parseInt.
1456         (KJS::parseInt): Added. Integer parser that puts result in a double so we're not limited to what
1457         strtoll can handle. Also matches standard more closely.
1458         (KJS::parseFloat): Added. Handles "0x" properly and passes flag to make empty string turn into NaN
1459         instead of 0.
1460         (KJS::GlobalFuncImp::call): Use the new parseInt and parseFloat.
1461
1462         * kjs/function_object.cpp: (FunctionPrototypeImp::FunctionPrototypeImp): Add a length property.
1463
1464         * kjs/lexer.h: Added error flag and sawError() function for detecting errors.
1465         * kjs/lexer.cpp:
1466         (Lexer::setCode): Clear error state.
1467         (Lexer::lex): Set error state if the lexer encounters an error
1468
1469         * kjs/internal.cpp:
1470         (NumberImp::toString): Roll in change from KDE version to special case 0 so we handle -0 correctly.
1471         (Parser::parse): Use new lexer error method so those errors are treated like parser errors.
1472
1473         * kjs/math_object.cpp: (MathFuncImp::call): Change min and max to treat -0 as less than +0.
1474         Change round to round values between -0.5 and -0 to -0 instead of +0.
1475
1476         * kjs/nodes.h: Add evaluateReference function to GroupNode.
1477         * kjs/nodes.cpp: (GroupNode::evaluateReference): Pass references through groups (parenthesized
1478         expressions) properly so that expressions like "delete (x.y)" work. Before, the parentheses
1479         would change x.y into a value that can't be deleted as a side effect.
1480
1481         * kjs/string_object.cpp: Change parameter count for indexOf and lastIndexOf from 2 to 1 to match
1482         the specification.
1483
1484         * kjs/testkjs.cpp: Rolled in changes from KDE to add a "quit" function to the test tool and
1485         get rid of the fixed size limit for code.
1486
1487         * kjs/ustring.cpp: (KJS::UString::substr): Added optimized case for substr(0, length) so it just
1488         returns the string without creating a new Rep, since I'm using substr in a place where it will
1489         often be passed a 0.
1490
1491         * tests/mozilla/ecma/String/15.5.4.11-1.js: Fixed one wrong entry in the Unicode table I added to
1492         the other day that was making a couple tests fail.
1493         * tests/mozilla/ecma/String/15.5.4.12-1.js: Ditto.
1494         * tests/mozilla/ecma/String/15.5.4.12-2.js: Ditto.
1495         * tests/mozilla/ecma/String/15.5.4.12-3.js: Ditto.
1496         * tests/mozilla/ecma/String/15.5.4.12-4.js: Ditto.
1497         * tests/mozilla/ecma/String/15.5.4.12-5.js: Ditto.
1498
1499         * kjs/string_object.lut.h: Regenerated.
1500
1501 2004-08-11  Darin Adler  <darin@apple.com>
1502
1503         - fixed a tiny problem with the UTF-16 PCRE check-in
1504
1505         * pcre/maketables.c: (pcre_maketables): Fix mistake in table-generating code that sometimes caused
1506         the ctype_meta flag to get set in items that should not have it.
1507
1508         * pcre/chartables.c: Regenerated.
1509
1510 2004-08-10  Richard Williamson   <rjw@apple.com>
1511
1512         Fixed <rdar://problem/3674747> Need to implement invokeUndefinedMethodFromWebScript:withArguments:
1513
1514         The following WebScripting methods are now supported on bound
1515         objects:
1516
1517         - (id)invokeUndefinedMethodFromWebScript:(NSString *)name withArguments:(NSArray *)args;
1518         - (void)setValue:(id)value forUndefinedKey:(NSString *)key
1519         - (id)valueForUndefinedKey:(NSString *)key
1520
1521         Reviewed by Chris.
1522
1523         * bindings/c/c_class.cpp:
1524         (CClass::fieldNamed):
1525         * bindings/c/c_class.h:
1526         * bindings/jni/jni_class.cpp:
1527         (JavaClass::fieldNamed):
1528         * bindings/jni/jni_class.h:
1529         * bindings/objc/objc_class.h:
1530         (KJS::Bindings::ObjcClass::isa):
1531         * bindings/objc/objc_class.mm:
1532         (ObjcClass::methodsNamed):
1533         (ObjcClass::fieldNamed):
1534         (ObjcClass::fallbackObject):
1535         * bindings/objc/objc_instance.h:
1536         * bindings/objc/objc_instance.mm:
1537         (ObjcInstance::invokeMethod):
1538         (ObjcInstance::setValueOfField):
1539         (ObjcInstance::setValueOfUndefinedField):
1540         (ObjcInstance::getValueOfField):
1541         (ObjcInstance::getValueOfUndefinedField):
1542         * bindings/objc/objc_runtime.h:
1543         (KJS::Bindings::ObjcField::~ObjcField):
1544         (KJS::Bindings::ObjcField::ObjcField):
1545         (KJS::Bindings::ObjcField::operator=):
1546         (KJS::Bindings::FallbackObjectImp::classInfo):
1547         * bindings/objc/objc_runtime.mm:
1548         (ObjcField::ObjcField):
1549         (ObjcField::name):
1550         (ObjcField::type):
1551         (ObjcField::valueFromInstance):
1552         (ObjcField::setValueToInstance):
1553         (FallbackObjectImp::FallbackObjectImp):
1554         (FallbackObjectImp::get):
1555         (FallbackObjectImp::put):
1556         (FallbackObjectImp::canPut):
1557         (FallbackObjectImp::implementsCall):
1558         (FallbackObjectImp::call):
1559         (FallbackObjectImp::hasProperty):
1560         (FallbackObjectImp::deleteProperty):
1561         (FallbackObjectImp::defaultValue):
1562         * bindings/runtime.h:
1563         (KJS::Bindings::Class::fallbackObject):
1564         (KJS::Bindings::Instance::getValueOfUndefinedField):
1565         (KJS::Bindings::Instance::setValueOfUndefinedField):
1566         * bindings/runtime_object.cpp:
1567         (RuntimeObjectImp::get):
1568         (RuntimeObjectImp::put):
1569         (RuntimeObjectImp::canPut):
1570         (RuntimeObjectImp::hasProperty):
1571         * bindings/testbindings.mm:
1572         (-[MyFirstInterface valueForUndefinedKey:]):
1573         (-[MyFirstInterface setValue:forUndefinedKey:]):
1574
1575 2004-08-10  Darin Adler  <darin@apple.com>
1576
1577         Reviewed by Dave.
1578
1579         - switch PCRE to do UTF-16 directly instead of converting to/from UTF-8 for speed
1580
1581         * pcre/pcre.h: Added PCRE_UTF16 switch, set to 1. Added pcre_char typedef, which is char
1582         or uint16_t depending on the mode, and used appropriate in the 7 public functions
1583         that need to use it.
1584         * pcre/pcre.c: Add UTF-16 support to all functions.
1585         * pcre/study.c: Ditto.
1586
1587         * pcre/internal.h: Added ichar typedef, which is unsigned char or uint16_t depending on
1588         the mode. Changed declarations to use symbolic constants and typedefs so we size
1589         things to ichar when needed.
1590
1591         * pcre/maketables.c: (pcre_maketables): Change code to make tables that are
1592         sized to 16-bit characters instead of 8-bit.
1593
1594         * pcre/get.c:
1595         (pcre_copy_substring): Use pcre_char instead of char.
1596         (pcre_get_substring_list): Ditto.
1597         (pcre_free_substring_list): Ditto.
1598         (pcre_get_substring): Ditto.
1599         (pcre_free_substring): Ditto.
1600
1601         * pcre/dftables.c: (main): Used a bit more const, and use ICHAR sizes instead
1602         of hard-coding 8-bit table sizes.
1603
1604         * pcre/chartables.c: Regenerated.
1605
1606         * kjs/ustring.h: Remove functions that convert UTF-16 to/from UTF-8 offsets.
1607         * kjs/ustring.cpp: Change the shared empty string to have a unicode pointer that
1608         is not null. The null string still has a null pointer. This prevents us from
1609         passing a null through to the regular expression engine (which results in a null
1610         error even when the string length is 0).
1611
1612         * kjs/regexp.cpp:
1613         (KJS::RegExp::RegExp): Null-terminate the pattern and pass it.
1614         (KJS::RegExp::match): Use the 16-bit string directly, no need to convert to UTF-8.
1615
1616 2004-08-09  Darin Adler  <darin@apple.com>
1617
1618         Reviewed by Maciej.
1619
1620         - fixed 28 Mozilla JavaScript tests
1621
1622         * kjs/array_object.cpp: (ArrayProtoFuncImp::call): Check for undefined rather than
1623         checking the number of arguments for the join method.
1624
1625         * kjs/lexer.cpp: (Lexer::lex): Parse hexadecimal and octal constants in doubles rather
1626         than integers, so we aren't limited to 32 bits.
1627
1628         * kjs/math_object.cpp: (MathFuncImp::call): Get rid of many unneeded special cases in
1629         the implementation of the pow operation. Also simplied a case that was handling positive
1630         and negative infinity separately.
1631
1632         * kjs/nodes.cpp: (ShiftNode::evaluate): Keep the result of shifts in a double instead of
1633         putting them in a long, so that unsigned shift will work properly.
1634
1635         * kjs/number_object.cpp: Add the DontDelete and ReadOnly flags to the numeric constants.
1636
1637         * kjs/operations.cpp:
1638         (KJS::isPosInf): Added an implementation inside APPLE_CHANGES that does not depend on the
1639         sign of isinf; our isinf function returns +1 even for negative infinity.
1640         (KJS::isNegInf): And again.
1641         (KJS::relation): Put in a nice simple implementation of comparison inside APPLE_CHANGES.
1642         Our floating point already handles the various infinity cases correctly.
1643
1644         * kjs/regexp_object.cpp:
1645         (RegExpProtoFuncImp::call): Add missing return before Null() in Exec method.
1646         (RegExpObjectImp::arrayOfMatches): Put undefined rather than an empty string into the
1647         array in cases where we did not match.
1648         (RegExpObjectImp::construct): Set the DontDelete, ReadOnly, and DontEnum flags for
1649         "global", "ignoreCase", "multiline", and "source".
1650
1651         * kjs/string_object.cpp: (StringProtoFuncImp::call): For the match method, turn a null
1652         string into undefined rather than an empty string. For the slice method, handle an
1653         undefined parameter for the limit properly as decribed in the specification, and add
1654         the limit to one case that didn't have the limit at all. For the methods that generate
1655         HTML strings, use lowercase tags instead of uppercase.
1656
1657         * kjs/ustring.cpp:
1658         (KJS::UChar::toLower): Use u_tolower from the ICU library.
1659         (KJS::UChar::toUpper): Use u_toupper from the ICU library.
1660         (KJS::UString::append): Fix some math that caused a buffer overflow.
1661         (KJS::convertUTF16OffsetsToUTF8Offsets): Ignore negative numbers (-1 is used as a special
1662         flag) rather than converting them all to 0.
1663         (KJS::convertUTF8OffsetsToUTF16Offsets): Ditto.
1664
1665         * tests/mozilla/jsDriver.pl: Fixed the relative links to point to our actual test files.
1666
1667         * tests/mozilla/ecma/String/15.5.4.11-1.js: Fixed the Unicode table in this test to match
1668         the Unicode specification in a few cases where it was wrong before.
1669         * tests/mozilla/ecma/String/15.5.4.11-2.js: Ditto.
1670         * tests/mozilla/ecma/String/15.5.4.11-3.js: Ditto.
1671         * tests/mozilla/ecma/String/15.5.4.11-5.js: Ditto.
1672         * tests/mozilla/ecma/String/15.5.4.11-6.js: Ditto.
1673         * tests/mozilla/ecma/String/15.5.4.12-1.js: Ditto.
1674         * tests/mozilla/ecma/String/15.5.4.12-2.js: Ditto.
1675         * tests/mozilla/ecma/String/15.5.4.12-3.js: Ditto.
1676         * tests/mozilla/ecma/String/15.5.4.12-4.js: Ditto.
1677         * tests/mozilla/ecma/String/15.5.4.12-5.js: Ditto.
1678
1679         * JavaScriptCore.pbproj/project.pbxproj: Link to libicu.
1680
1681         * kjs/number_object.lut.h: Regenerated.
1682
1683 2004-08-09  Darin Adler  <darin@apple.com>
1684
1685         Reviewed by Maciej.
1686
1687         - fixed <rdar://problem/3753467> REGRESSION (137-138): reproducible buffer overrun in UString manipulation code
1688
1689         * kjs/ustring.cpp: (KJS::UString::append): Fix incorrect size computation. Without it
1690         we get a buffer overflow.
1691
1692 === Safari-155 ===
1693
1694 2004-08-05  Richard Williamson   <rjw@apple.com>
1695
1696         Fixed part of 3674747.  The QT guys need this for feature freeze.
1697
1698         This patch implements support for the
1699
1700         - (id)invokeUndefinedMethodFromWebScript:(NSString *)name withArguments:(NSArray *)args
1701
1702         method of objects bound to JavaScript.
1703
1704         Reviewed by John.
1705
1706         * ChangeLog:
1707         * bindings/objc/objc_class.mm:
1708         (ObjcClass::methodsNamed):
1709         (ObjcClass::fieldNamed):
1710         * bindings/objc/objc_instance.mm:
1711         (ObjcInstance::invokeMethod):
1712         * bindings/objc/objc_runtime.h:
1713         (KJS::Bindings::ObjcMethod::~ObjcMethod):
1714         (KJS::Bindings::ObjcMethod::isFallbackMethod):
1715         (KJS::Bindings::ObjcMethod::javaScriptName):
1716         * bindings/objc/objc_runtime.mm:
1717         (ObjcMethod::ObjcMethod):
1718         (ObjcMethod::getMethodSignature):
1719         (ObjcMethod::setJavaScriptName):
1720         * bindings/testbindings.mm:
1721
1722 2004-08-04  Vicki Murley  <vicki@apple.com>
1723
1724         Reviewed by mjs.
1725  
1726         - fix <rdar://problem/3649789> SAP WebGUI has problems loading first page because of parse error        
1727
1728         * kjs/lexer.cpp:
1729         (Lexer::lex): if the current character is a '\' and the next character is a line terminator,
1730         go to the next line and continue parsing the string (instead of failing).  This matches 
1731         behavior in Mac IE and Mozilla.
1732
1733 2004-08-03  Kevin Decker  <kdecker@apple.com>
1734
1735         Reviewed by Darin.
1736
1737         Rolled in changes from the latest KJS sources that support additional 
1738         Number.prototype functions. 
1739
1740         Specifically this patch covers the follow parts of the ECMA 3 spec:
1741         15.7.4.5, 15.7.4.6, and 15.7.4.7 
1742         
1743         Fixes:
1744         <rdar://problem/3663716> missing Number.toFixed (and toPrecision, toExponential)
1745         <rdar://problem/3749492> missing Number.toPrecision prototype implementation
1746         <rdar://problem/3749591> missing Number.toExponential prototype implementation
1747
1748         * kjs/identifier.h: Added toFixed, toPrecision, and toExponential to the
1749         list of supported identifiers (a macro).
1750         * kjs/number_object.cpp: Implemented support for toFixed(), toPrecision(),
1751         and toExponential(). 
1752         (NumberPrototypeImp::NumberPrototypeImp):
1753         (NumberProtoFuncImp::call):
1754         * kjs/number_object.h: Added property names for toFixed, toPrecision,
1755         and toExponential. 
1756         (KJS::NumberProtoFuncImp::):
1757         * tests/mozilla/expected.html: Update results.
1758
1759 2004-08-03  Darin Adler  <darin@apple.com>
1760
1761         Reviewed by Ken.
1762
1763         - added support for copying RegExp objects so 7 more Mozilla regexp tests pass
1764
1765         * kjs/regexp_object.cpp: (RegExpObjectImp::construct): Check for case where
1766         we are supposed to just copy the regular expression object, and do so.
1767         Also tighten up arguments check to handle case where an actual "undefined"
1768         is passed rather than just omitting an argument.
1769
1770         * tests/mozilla/expected.html: Update results.
1771
1772 2004-08-02  Darin Adler  <darin@apple.com>
1773
1774         * tests/mozilla/.cvsignore: Added.
1775         * tests/mozilla/expected.html: Update results.
1776
1777 2004-08-02  Darin Adler  <darin@apple.com>
1778
1779         Reviewed by Ken.
1780
1781         - fixed RegExp.toString so 3 more Mozilla regexp tests pass
1782
1783         * kjs/regexp_object.cpp: (RegExpProtoFuncImp::call):
1784         Append the flags here so more tests paseed.
1785
1786 2004-08-02  Darin Adler  <darin@apple.com>
1787
1788         Reviewed by Ken.
1789
1790         - fixed a couple things making 5 Mozilla regexp tests pass
1791
1792         * kjs/regexp_object.cpp: (RegExpProtoFuncImp::call): Implement toString
1793         for the prototype.
1794         (RegExpObjectImp::construct): Fix bug where the string "undefined" would
1795         be used as the flags string when no parameter was passed.
1796
1797         * kjs/regexp_object.h: (KJS::RegExpPrototypeImp::classInfo):
1798         Added a class info object for RegExp prototype so it can return
1799         a string instead of raising an exception when converting to a string.
1800
1801         * tests/mozilla/expected.html: Update results.
1802
1803 2004-08-02  Darin Adler  <darin@apple.com>
1804
1805         Reviewed by Kevin.
1806
1807         - fix crashes in mozilla tests due to mishandling NaN
1808
1809         * kjs/array_object.cpp: (ArrayProtoFuncImp::call): Rerranged range checks after
1810         calls to toInteger so that NaN will get turned into something that fits in an integer.
1811         These were the ones John already fixed, but his fix used isnan and the new fix is
1812         more efficient.
1813
1814         * kjs/number_object.cpp: (NumberProtoFuncImp::call): Rearranged radix range checks
1815         after a call to toInteger to handle NaN properly. Also removed separate check
1816         for undefined that's not needed.
1817
1818         * kjs/string_object.cpp: (StringProtoFuncImp::call): More of the same kinds of changes
1819         as in the above two files, but for a lot more functions. Also changed one place with
1820         an explicit check for undefined to instead just check isNaN.
1821
1822         * tests/mozilla/run-mozilla-tests: Changed to invoke jst using $SYMROOTS for people
1823         like me who don't keep $SYMROOTS in their $PATH.
1824
1825 === Safari-154 ===
1826
1827 === Safari-153 ===
1828
1829 2004-07-26  Kevin Decker  <kdecker@apple.com>
1830
1831         Changes done by Darin, reviewed by Kevin.
1832
1833         - changed testkjs to build in Xcode rather than from Makefile
1834
1835         * .cvsignore: Removed obsolete files from this list.
1836         * Makefile.am: Removed code to build testkjs; we do this in Xcode now.
1837         Changed to build target "All" rather than default target. This makes us
1838         build the testkjs test tool.
1839         * dummy.cpp: Removed.
1840         * kjs/.cvsignore: Removed obsolete files from this list, including
1841         the testkjs tool, which is now built in the symroots directory.
1842         * kjs/testkjs.cpp: Added copyright notice that was missing, since we have
1843         changed this file. Also this has the nice side effect of causing the tool
1844         to be rebuilt in the new location even if there are no other changes in
1845         your tree when you check this out.
1846         * tests/mozilla/run-mozilla-tests: Invoke perl explicitly so this works
1847         without setting the execute bit on jsDriver.pl.
1848
1849 2004-07-22  Kevin Decker  <kdecker@apple.com>
1850
1851         Reviewed by Darin
1852         
1853         Fixed <rdar://problem/3682340> (error console does not include source urls or line numbers of event exceptions). 
1854
1855         * kjs/function_object.cpp:
1856         (FunctionObjectImp::construct):
1857         * kjs/function_object.h:
1858         * kjs/object.cpp:
1859         (KJS::ObjectImp::construct):
1860         * kjs/object.h:
1861         (KJS::Object::construct):
1862
1863 2004-07-21  Darin Adler  <darin@apple.com>
1864
1865         * bindings/npruntime.h: Fixed typo.
1866
1867 2004-07-19  John Sullivan  <sullivan@apple.com>
1868
1869         Reviewed by Maciej.
1870         
1871         - bulletproofed array.slice() against NAN arguments. Harri noticed this
1872         vulnerability in my patch for 3714644
1873
1874         * kjs/array_object.cpp:
1875         (ArrayProtoFuncImp::call):
1876         handle NAN parameters passed to slice() by clamping to 0 and length.
1877
1878 2004-07-19  Richard Williamson   <rjw@apple.com>
1879
1880         Fixed 3733349.  Prevent Java applet callbacks into JavaScript after applet
1881         has been destroyed.
1882
1883         Reviewed by John.
1884
1885         * bindings/jni/jni_jsobject.cpp:
1886         (JSObject::invoke):
1887         (JSObject::JSObject):
1888
1889 2004-07-16  John Sullivan  <sullivan@apple.com>
1890
1891         Reviewed by Maciej.
1892         
1893         - fixed <rdar://problem/3714644> REGRESSION (125.8-146): bugzilla submit link 
1894         hangs browser with javascript
1895
1896         * kjs/array_object.cpp:
1897         (ArrayProtoFuncImp::call):
1898         Check for undefined type for args[0] the same way we were already checking
1899         for args[1]. In this case, args was zero-length, but we were treating
1900         args[0] like an integer anyway. Resulted in some code looping from a NAN
1901         value to 4, taking approximately forever.
1902
1903         * JavaScriptCore.pbproj/project.pbxproj:
1904         version wars
1905         
1906 === Safari-152 ===
1907
1908 2004-07-14  Maciej Stachowiak  <mjs@apple.com>
1909
1910         Reviewed by John.
1911
1912         <rdar://problem/3711474>: (REGRESSION (125-146): JavaScript 'toString(16)' is broken)
1913         <rdar://problem/3644873>: (REGRESSION (125-140u): secondary list doesn't fill in at Southwest.com)
1914
1915         * kjs/number_object.cpp:
1916         (NumberProtoFuncImp::call): Initialize radix from dradix, not from itself!
1917
1918 2004-07-13  Kevin Decker  <kdecker@apple.com>
1919
1920         Reviewed by kocienda.
1921
1922         - made testkjs and JavaScriptCore a subtarget of 'All'
1923         - testkjs now builds in $SYMROOTS
1924
1925         * JavaScriptCore.pbproj/project.pbxproj:
1926
1927 === Safari-151 ===
1928
1929 2004-06-24  Chris Blumenberg  <cblu@apple.com>
1930
1931         Ignore .mode1 files in JavaScriptCore.pbproj
1932
1933         Reviewed by kocienda.
1934
1935         * JavaScriptCore.pbproj/.cvsignore:
1936
1937 2004-06-23  Richard Williamson   <rjw@apple.com>
1938
1939         Implemented changes for latest npruntime.h.
1940         
1941         Reviewed by Chris.
1942
1943         * JavaScriptCore.pbproj/project.pbxproj:
1944         * bindings/NP_jsobject.cpp:
1945         (listFromVariantArgs):
1946         (identiferFromNPIdentifier):
1947         (_NPN_CreateScriptObject):
1948         (NPN_Call):
1949         (NPN_Evaluate):
1950         (NPN_GetProperty):
1951         (NPN_SetProperty):
1952         (NPN_RemoveProperty):
1953         * bindings/NP_jsobject.h:
1954         * bindings/c/c_class.cpp:
1955         (CClass::methodsNamed):
1956         (CClass::fieldNamed):
1957         * bindings/c/c_instance.cpp:
1958         (CInstance::invokeMethod):
1959         * bindings/c/c_utility.cpp:
1960         (convertNPVariantToValue):
1961         * bindings/c/c_utility.h:
1962         * bindings/npruntime.cpp:
1963         (stringIdentifierEqual):
1964         (stringIdentifierHash):
1965         (getStringIdentifierDictionary):
1966         (intIdentifierEqual):
1967         (intIdentifierHash):
1968         (getIntIdentifierDictionary):
1969         (NPN_GetStringIdentifier):
1970         (NPN_GetStringIdentifiers):
1971         (NPN_GetIntIdentifier):
1972         (NPN_IdentifierIsString):
1973         (NPN_UTF8FromIdentifier):
1974         (NPN_VariantToInt32):
1975         (NPN_VariantToDouble):
1976         (NPN_SetException):
1977         * bindings/npruntime.h:
1978         * bindings/objc/WebScriptObject.mm:
1979         (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
1980         * bindings/runtime_object.cpp:
1981         (RuntimeObjectImp::~RuntimeObjectImp):
1982         * bindings/runtime_root.cpp:
1983         (KJS::Bindings::rootForInterpreter):
1984         * bindings/testbindings.cpp:
1985         (initializeIdentifiers):
1986         (logMessage):
1987         (setDoubleValue):
1988         (setIntValue):
1989         (setBooleanValue):
1990
1991 === JavaScriptCore-146.1 ===
1992
1993 2004-06-16  Richard Williamson   <rjw@apple.com>
1994
1995         Fixed <rdar://problem/3702287> Crash returning nil from bound ObjC
1996
1997         This turned out to be a show stopper for Dashboard.  Accessing a nil
1998         ObjC property from JS caused a crash.  Similar to the problem
1999         3696112 fixed below.
2000         
2001         Reviewed by Trey.
2002
2003         * bindings/objc/objc_runtime.mm:
2004         (KJS::Bindings::ObjcField::valueFromInstance):
2005
2006 === Safari-146 ===
2007
2008 2004-06-16  Richard Williamson   <rjw@apple.com>
2009
2010         Fixed <rdar://problem/3696112>: nil from an Objective-C class seems to get wrapped as a JavaScript proxy that will not print.
2011
2012         This turned out to be a show stopper for Dashboard.  We now
2013         return Undefined() when nil is returned from a ObjC method
2014         that returns an object type.
2015         
2016         Reviewed by Maciej.
2017
2018         * bindings/objc/objc_utility.mm:
2019         (KJS::Bindings::convertObjcValueToValue):
2020
2021 === Safari-145 ===
2022
2023 2004-06-15  Richard Williamson   <rjw@apple.com>
2024
2025         Fixed <rdar://problem/3695875>: Objective-C instances that are exported to JavaScript are too promiscuous
2026
2027         No longer need to check respondsToSelector: for
2028         isSelectorExcludedFromWebScript: and isKeyExcludedFromWebScript:
2029         because these now have a default implementation on NSObject.
2030
2031         Reviewed by Trey.
2032
2033         * bindings/objc/objc_class.mm:
2034         (ObjcClass::methodsNamed):
2035         (ObjcClass::fieldNamed):
2036
2037 2004-06-14  Darin Adler  <darin@apple.com>
2038
2039         Reviewed by Maciej.
2040
2041         - fixed some things for GC that Patrick missed, or that happened after the branch
2042
2043         * bindings/objc/WebScriptObject.mm:
2044         (-[WebScriptObject dealloc]): Moved removeNativeReference call here from private object.
2045         (-[WebScriptObject finalize]): Added.
2046
2047         - added some missing nil checks
2048
2049         * bindings/objc/objc_instance.mm:
2050         (ObjcInstance::ObjcInstance): Check for nil.
2051         (ObjcInstance::~ObjcInstance): Check for nil.
2052         (ObjcInstance::operator=): Check for nil.
2053
2054 2004-06-14  Darin Adler  <darin@apple.com>
2055
2056         Reviewed by me, code changes by Patrick Beard.
2057
2058         - fixed <rdar://problem/3671507>: (WebKit should adopt GC changes and compile with GC enabled)
2059
2060         * bindings/objc/objc_instance.mm:
2061         (ObjcInstance::ObjcInstance): Use CFRetain instead of retain.
2062         (ObjcInstance::~ObjcInstance): Use CFRelease instead of release.
2063         (ObjcInstance::operator=): More of the same.
2064         (ObjcInstance::end): Use [pool drain] if compiling on Tiger.
2065
2066         * bindings/objc/objc_runtime.mm:
2067         (ObjcArray::ObjcArray): Use CFRetain instead of retain.
2068         (ObjcArray::~ObjcArray): Use CFRelease instead of release.
2069         (ObjcArray::operator=): More of the same.
2070
2071         * bindings/testbindings.mm: Fixed incorrect license.
2072         (main): Use [pool drain] if compiling on Tiger.
2073
2074 === Safari-144 ===
2075
2076 2004-06-10  Kevin Decker  <kdecker@apple.com>
2077
2078         Reviewed by John.
2079
2080         * kjs/lexer.cpp: 
2081         (Lexer::setCode):
2082             - fixed <rdar://problem/3682398>: (error console line numbers are offset by 1)
2083         * kjs/lexer.h:
2084         (KJS::Lexer::lineNo):
2085             - fixed <rdar://problem/3682398>: (error console line numbers are offset by 1)
2086
2087 === JavaScriptCore-143.2 ===
2088
2089 2004-06-07  Darin Adler  <darin@apple.com>
2090
2091         - fixed <rdar://problem/3682489>: (JavaScriptGlue no longer compiles because Interpreter::evaluate parameters changed)
2092
2093         * kjs/interpreter.h: Added an overload to make JavaScriptGlue compile.
2094         * kjs/interpreter.cpp: (KJS::Interpreter::evaluate): Implemented the overload.
2095
2096 === JavaScriptCore-143.1 ===
2097
2098 2004-06-04  Kevin Decker  <kdecker@apple.com>
2099
2100         Reviewed by Darin
2101         
2102         - fixed <rdar://problem/3680594>
2103
2104         * kjs/object.cpp:
2105         (KJS::Error::create):
2106
2107 === Safari-143 ===
2108
2109 2004-06-04  Darin Adler  <darin@apple.com>
2110
2111         * kjs/testkjs.cpp: (main): Fix build breakage by adding URL and line number parameters.
2112
2113 2004-06-04  Kevin Decker  <kdecker@apple.com>
2114
2115         Reviewed by Dave.
2116
2117         - ObjC bindings do not (yet) pass along sourceurl or line numbers
2118         - we don't have a way as of yet to accomidate line numbers and urls for dynamic javascript
2119         - changed the wording of an error message
2120         - the lexer, parser, and interpreter have been made "sourceURL aware"
2121         - stored the url into Error
2122          
2123         * bindings/NP_jsobject.cpp:
2124         (NPN_Evaluate):
2125         * bindings/jni/jni_jsobject.cpp:
2126         (JSObject::eval):
2127         * bindings/objc/WebScriptObject.mm:
2128         (-[WebScriptObject evaluateWebScript:]):
2129         * kjs/function.cpp:
2130         (GlobalFuncImp::call):
2131         * kjs/function_object.cpp:
2132         (FunctionObjectImp::construct):
2133         * kjs/internal.cpp:
2134         (Parser::parse):
2135         (InterpreterImp::checkSyntax):
2136         (InterpreterImp::evaluate):
2137         * kjs/internal.h:
2138         * kjs/interpreter.cpp:
2139         (Interpreter::evaluate):
2140         * kjs/interpreter.h:
2141         * kjs/lexer.cpp:
2142         (Lexer::setCode):
2143         * kjs/lexer.h:
2144         (KJS::Lexer::sourceURL):
2145         * kjs/nodes.cpp:
2146         (Node::Node):
2147         (Node::throwError):
2148         (FunctionCallNode::evaluate):
2149         * kjs/nodes.h:
2150         * kjs/object.cpp:
2151         (KJS::Error::create):
2152         * kjs/object.h:
2153
2154 2004-06-04  Richard Williamson   <rjw@apple.com>
2155
2156         Fixed crash when attempting to access properties on nil
2157         object.
2158         
2159         Reviewed by John.
2160
2161         * bindings/objc/objc_instance.mm:
2162         (ObjcInstance::getClass):
2163         * bindings/runtime_object.cpp:
2164         (RuntimeObjectImp::get):
2165         * bindings/testM.js:
2166         * bindings/testbindings.mm:
2167         (-[MyFirstInterface getString]):
2168
2169 2004-05-27  Kevin Decker  <kdecker@apple.com>
2170
2171         Reviewed by Ken.
2172
2173         -revised generated error message content
2174         
2175         * kjs/error_object.cpp:
2176         (ErrorProtoFuncImp::call):
2177         * kjs/internal.cpp:
2178         (Parser::parse):
2179         * kjs/object.cpp:
2180         (KJS::Error::create):
2181
2182 === Safari-142 ===
2183
2184 2004-05-27  Richard Williamson   <rjw@apple.com>
2185
2186         Renamed WebScriptMethods to WebScripting based on feedback from Nancy.
2187
2188         Reviewed by Chris.
2189
2190         * bindings/objc/WebScriptObject.h:
2191
2192 2004-05-27  Darin Adler  <darin@apple.com>
2193
2194         Reviewed by Maciej.
2195
2196         - moved to new symlink technique for embedding frameworks
2197
2198         * JavaScriptCore.pbproj/project.pbxproj: Get rid of embed-frameworks build step
2199         because we don't need it any more.
2200
2201 2004-05-24  Richard Williamson   <rjw@apple.com>
2202
2203         Changed RuntimeArrayImp to inherit from ArrayInstanceImp and
2204         fixed ClassInfo to correctly reflect inheritance.  This is required
2205         because of the runtime checks in JSC for arrays, i.e. in
2206         the Function objects apply method.
2207
2208         Reviewed by Ken.
2209
2210         * bindings/jni/jni_runtime.cpp:
2211         (JavaArray::convertJObjectToArray):
2212         * bindings/objc/objc_utility.mm:
2213         (KJS::Bindings::convertObjcValueToValue):
2214         * bindings/runtime_array.cpp:
2215         (RuntimeArrayImp::RuntimeArrayImp):
2216         * bindings/runtime_array.h:
2217         * bindings/testM.js: Added.
2218         * bindings/testbindings.mm:
2219         (+[MyFirstInterface webScriptNameForSelector:]):
2220         (-[MyFirstInterface logMessages:]):
2221         (-[MyFirstInterface logMessage:prefix:]):
2222         (-[MyFirstInterface callJSObject::]):
2223
2224 2004-05-22  Darin Adler  <darin@apple.com>
2225
2226         Reviewed by Maciej.
2227
2228         - fixed <rdar://problem/3664260>: (JS needs to listen to timezone change notifications)
2229
2230         * kjs/date_object.cpp: (CopyLocalTimeZone): As per Chris Kane and Jordan Hubbard, use <notify.h>
2231         with a hardcoded string of "com.apple.system.timezone", and do CFTimeZoneResetSystem since
2232         CoreFoundation doesn't do this itself. Turns out this affects the default time zone as long as
2233         it hasn't been set explicitly.
2234
2235 === Safari-141 ===
2236
2237 2004-05-20  Richard Williamson   <rjw@apple.com>
2238
2239         Implemented WebScriptObject/DOM wrapper voodoo.  DOM wrappers
2240         can now be referenced like any other WebScriptObject, meaning
2241         you can do JS operations on them.
2242
2243         All added implementation of finalizeForWebScript.
2244
2245         Reviewed by Ken.
2246
2247         * bindings/objc/WebScriptObject.h:
2248         * bindings/objc/WebScriptObject.mm:
2249         (-[WebScriptObject _initializeWithObjectImp:KJS::root:Bindings::]):
2250         (-[WebScriptObject _initWithObjectImp:KJS::root:Bindings::]):
2251         (-[WebScriptObject KJS::]):
2252         (-[WebScriptObject dealloc]):
2253         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2254         (-[WebScriptObject evaluateWebScript:]):
2255         (-[WebScriptObject setValue:forKey:]):
2256         (-[WebScriptObject valueForKey:]):
2257         (-[WebScriptObject stringRepresentation]):
2258         * bindings/objc/WebScriptObjectPrivate.h:
2259         * bindings/objc/objc_instance.mm:
2260         (ObjcInstance::~ObjcInstance):
2261
2262 2004-05-19  Richard Williamson   <rjw@apple.com>
2263
2264         Removed extraneous tabs that were added (by XCode?).
2265
2266         * bindings/objc/WebScriptObject.h:
2267
2268 2004-05-19  Darin Adler  <darin@apple.com>
2269
2270         - fixed headers with licenses mangled by Xcode auto-indenting
2271
2272         * bindings/jni/jni_jsobject.cpp:
2273         * bindings/jni/jni_jsobject.h:
2274         * bindings/runtime_array.h:
2275         * bindings/runtime_root.cpp:
2276         * bindings/runtime_root.h:
2277
2278 2004-05-18  Richard Williamson   <rjw@apple.com>
2279
2280         Added exception logging.  Also check for exception and
2281         set results as appropriate.
2282
2283         Reviewed by Maciej (partially reviewed).
2284
2285         * bindings/objc/WebScriptObject.mm:
2286         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2287         (-[WebScriptObject evaluateWebScript:]):
2288         (-[WebScriptObject setValue:forKey:]):
2289         (-[WebScriptObject valueForKey:]):
2290
2291 2004-05-18  Richard Williamson   <rjw@apple.com>
2292
2293         Finsished implementing support for windowScriptObject.
2294         Had to make WebScriptObjectPrivate.h accessible from
2295         WebCore.
2296
2297         Reviewed by Maciej.
2298
2299         * JavaScriptCore.pbproj/project.pbxproj:
2300         * bindings/objc/WebScriptObjectPrivate.h:
2301
2302 2004-05-18  Richard Williamson   <rjw@apple.com>
2303
2304         Use KVC to set/get values instead of directly accessing
2305         ivars.
2306
2307         Reviewed by Maciej.
2308
2309         * bindings/objc/WebScriptObject.mm:
2310         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2311         (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
2312         * bindings/objc/objc_runtime.mm:
2313         (ObjcField::valueFromInstance):
2314         (convertValueToObjcObject):
2315         (ObjcField::setValueToInstance):
2316
2317 2004-05-17  Richard Williamson   <rjw@apple.com>
2318
2319         Implemented new API for WebScriptObject.
2320
2321         Fixed <rdar://problem/3657145>: (objc to javascript method calls do not cause updates.)
2322         Fixed <rdar://problem/3654887>: (Update to JSC to refer to new JSObject LiveConnect object)  (w/ help from Vicki)
2323
2324         Reviewed by Hyatt.
2325
2326         * JavaScriptCore.pbproj/project.pbxproj:
2327         * bindings/c/c_instance.cpp:
2328         (CInstance::invokeMethod):
2329         * bindings/jni/jni_instance.cpp:
2330         (JavaInstance::invokeMethod):
2331         * bindings/jni/jni_jsobject.cpp:
2332         (JSObject::convertValueToJObject):
2333         * bindings/jni/jni_utility.cpp:
2334         (KJS::Bindings::getJNIField):
2335         * bindings/objc/WebScriptObject.mm:
2336         (_didExecute):
2337         (-[WebScriptObject _initWithObjectImp:KJS::root:Bindings::]):
2338         (-[WebScriptObject KJS::]):
2339         (-[WebScriptObject dealloc]):
2340         (+[WebScriptObject throwException:]):
2341         (listFromNSArray):
2342         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2343         (-[WebScriptObject evaluateWebScript:]):
2344         (-[WebScriptObject setValue:forKey:]):
2345         (-[WebScriptObject valueForKey:]):
2346         (-[WebScriptObject stringRepresentation]):
2347         (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
2348         (+[WebUndefined undefined]):
2349         (-[WebUndefined initWithCoder:]):
2350         (-[WebUndefined encodeWithCoder:]):
2351         (-[WebUndefined copyWithZone:]):
2352         (-[WebUndefined retain]):
2353         (-[WebUndefined release]):
2354         (-[WebUndefined retainCount]):
2355         (-[WebUndefined autorelease]):
2356         (-[WebUndefined dealloc]):
2357         (-[WebUndefined copy]):
2358         (-[WebUndefined replacementObjectForPortCoder:]):
2359         * bindings/objc/WebScriptObjectPrivate.h: Added.
2360         * bindings/objc/objc_class.mm:
2361         (ObjcClass::methodsNamed):
2362         (ObjcClass::fieldNamed):
2363         * bindings/objc/objc_instance.mm:
2364         (ObjcInstance::invokeMethod):
2365         * bindings/objc/objc_jsobject.h:
2366         * bindings/objc/objc_jsobject.mm:
2367         * bindings/objc/objc_runtime.mm:
2368         (ObjcField::valueFromInstance):
2369         * bindings/objc/objc_utility.mm:
2370         (KJS::Bindings::JSMethodNameToObjCMethodName):
2371         (KJS::Bindings::convertValueToObjcValue):
2372         (KJS::Bindings::convertObjcValueToValue):
2373         * bindings/runtime.cpp:
2374         (Instance::setDidExecuteFunction):
2375         (Instance::didExecuteFunction):
2376         (Instance::setValueOfField):
2377         * bindings/runtime.h:
2378         * bindings/testbindings.mm:
2379         (+[MyFirstInterface webScriptNameForSelector:]):
2380         (-[MyFirstInterface callJSObject::]):
2381
2382 2004-05-14  Vicki Murley  <vicki@apple.com>
2383
2384         Reviewed by mjs.
2385  
2386         <rdar://problem/3642427>: framework marketing number should be 2.0 for DoubleBarrel release
2387
2388         * JavaScriptCore.pbproj/project.pbxproj: change CFBundleShortVersionString to 2.0
2389
2390 === Safari-140 ===
2391
2392 2004-05-13  Richard Williamson   <rjw@apple.com>
2393
2394         Fixed indentation.
2395
2396         Reviewed by Chris.
2397
2398         * ChangeLog:
2399         * bindings/objc/WebScriptObject.h:
2400
2401 2004-05-13  Richard Williamson   <rjw@apple.com>
2402
2403         Approved API changes.  Currently unimplemented.
2404
2405         Reviewed by Chris.
2406
2407         * ChangeLog:
2408         * JavaScriptCore.pbproj/project.pbxproj:
2409         * bindings/objc/WebScriptObject.h: Added.
2410         * bindings/objc/WebScriptObject.mm: Added.
2411         (+[WebScriptObject throwException:]):
2412         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2413         (-[WebScriptObject evaluateWebScript:]):
2414         (-[WebScriptObject stringRepresentation]):
2415         (+[WebUndefined undefined]):
2416         (-[WebUndefined initWithCoder:]):
2417         (-[WebUndefined encodeWithCoder:]):
2418         (-[WebUndefined copyWithZone:]):
2419
2420 2004-05-07  Vicki Murley  <vicki@apple.com>
2421
2422         Reviewed by darin.
2423
2424         Turn off GC since it uses ppc only instructions (which breaks 
2425         the B&I build).   
2426     
2427         * kjs/value.h: set USE_CONSERVATIVE_GC to 0
2428
2429 === Safari-139 ===
2430
2431 2004-05-07  Maciej Stachowiak  <mjs@apple.com>
2432
2433         Reviewed by Darin.
2434
2435         - add -funroll-loops=16 compiler option for approx .5% speedup on
2436         HTML iBench and .5-1% speedup on JS iBench.
2437         
2438         * JavaScriptCore.pbproj/project.pbxproj:
2439
2440 2004-04-25  Maciej Stachowiak  <mjs@apple.com>
2441
2442         Reviewed by Darin.
2443
2444         Enable full conservative GC mode in addition to test mode. When
2445         conservative GC is enabled, we now get an 11% speed improvement on
2446         the iBench. Also fix some spots I missed before.
2447
2448         Specific noteworth changes:
2449         
2450         * kjs/collector.cpp:
2451         (KJS::Collector::markStackObjectsConservatively): Check possible
2452         cell pointers for 8-byte aligment and verify they are not 0.
2453
2454         * kjs/protected_values.cpp:
2455         (KJS::ProtectedValues::increaseProtectCount): Move null-tolerance from here...
2456         (KJS::ProtectedValues::decreaseProtectCount): ...and here...
2457         * kjs/protect.h:
2458         (KJS::gcProtectNullTolerant): ...to here...
2459         (KJS::gcUnprotectNullTolerant): ...and here, because not all callers need the null
2460         tolerance, and doing the check is expensive.
2461
2462         * kjs/protected_values.cpp:
2463         (KJS::ProtectedValues::computeHash): Replace hash function with a much faster one
2464         that is still very good.
2465
2466         * kjs/protect.h:
2467         (KJS::gcProtect):
2468         (KJS::gcUnprotect):
2469         (KJS::ProtectedValue::ProtectedValue):
2470         (KJS::ProtectedValue::~ProtectedValue):
2471         (KJS::ProtectedValue::operator=):
2472         (KJS::ProtectedObject::ProtectedObject):
2473         (KJS::ProtectedObject::~ProtectedObject):
2474         (KJS::ProtectedObject::operator=):
2475         (KJS::ProtectedReference::ProtectedReference):
2476         (KJS::ProtectedReference::~ProtectedReference):
2477         (KJS::ProtectedReference::operator=):
2478         * kjs/protected_values.cpp:
2479         (KJS::ProtectedValues::getProtectCount):
2480         (KJS::ProtectedValues::increaseProtectCount):
2481         (KJS::ProtectedValues::decreaseProtectCount):
2482         (KJS::ProtectedValues::computeHash):
2483         * bindings/runtime_root.cpp:
2484         (KJS::Bindings::addNativeReference):
2485         (KJS::Bindings::removeNativeReference):
2486         (RootObject::removeAllNativeReferences):
2487         * bindings/runtime_root.h:
2488         (KJS::Bindings::RootObject::~RootObject):
2489         (KJS::Bindings::RootObject::setRootObjectImp):
2490         * kjs/collector.cpp:
2491         (KJS::Collector::allocate):
2492         (KJS::Collector::collect):
2493         * kjs/collector.h:
2494         * kjs/internal.cpp:
2495         (NumberImp::create):
2496         (InterpreterImp::globalInit):
2497         (InterpreterImp::globalClear):
2498         (InterpreterImp::mark):
2499         * kjs/list.cpp:
2500         (KJS::List::derefValues):
2501         (KJS::List::refValues):
2502         (KJS::List::append):
2503         * kjs/object.cpp:
2504         (KJS::ObjectImp::setInternalValue):
2505         (KJS::ObjectImp::putDirect):
2506         * kjs/value.cpp:
2507         (ValueImp::mark):
2508         (ValueImp::marked):
2509         * kjs/value.h:
2510         (KJS::ValueImp::ValueImp):
2511         (KJS::ValueImp::~ValueImp):
2512         (KJS::ValueImp::):
2513         (KJS::Value::Value):
2514         (KJS::Value::~Value):
2515         (KJS::Value::operator=):
2516
2517 2004-04-30  Richard Williamson   <rjw@apple.com>
2518
2519         Asking an NSInvocation for it's return value when return type
2520         is void throws an exception.  Added check for void return types
2521         to avoid this exception.
2522
2523         Reviewed by Ken.
2524
2525         * bindings/objc/objc_instance.mm:
2526         (ObjcInstance::invokeMethod):
2527
2528 2004-04-29  Richard Williamson   <rjw@apple.com>
2529
2530         Fixed several bad problems with the ObjC bindings.  In particular, conversion
2531         to/from JavaScriptObject (soon to be WebScriptObject) was completely broken.
2532
2533         Reviewed by Chris.
2534
2535         * bindings/objc/objc_jsobject.h:
2536         * bindings/objc/objc_jsobject.mm:
2537         (-[JavaScriptObject initWithObjectImp:KJS::root:Bindings::]):
2538         (-[JavaScriptObject KJS::]):
2539         (+[JavaScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
2540         (-[JavaScriptObject call:arguments:]):
2541         (-[JavaScriptObject evaluate:]):
2542         (-[JavaScriptObject getMember:]):
2543         (-[JavaScriptObject getSlot:]):
2544         * bindings/objc/objc_runtime.mm:
2545         (ObjcField::valueFromInstance):
2546         (ObjcField::setValueToInstance):
2547         * bindings/objc/objc_utility.mm:
2548         (KJS::Bindings::convertValueToObjcValue):
2549         (KJS::Bindings::convertObjcValueToValue):
2550         * bindings/runtime.h:
2551         * bindings/runtime_root.cpp:
2552         (KJS::Bindings::rootForInterpreter):
2553         (KJS::Bindings::addNativeReference):
2554         (KJS::Bindings::removeNativeReference):
2555         * bindings/runtime_root.h:
2556         * bindings/testbindings.mm:
2557         (-[MyFirstInterface logMessage:]):
2558         (-[MyFirstInterface setJSObject:]):
2559         (-[MyFirstInterface callJSObject::]):
2560
2561 2004-04-24  Darin Adler  <darin@apple.com>
2562
2563         Reviewed by Dave.
2564
2565         * kjs/ustring.cpp: (KJS::UString::append): Fix one case that was allocating a buffer
2566         that is 2x too big.
2567
2568 2004-04-23  Maciej Stachowiak  <mjs@apple.com>
2569
2570         Reviewed by Darin.
2571
2572         Implementation of conservative GC, based partly on code from
2573         Darin. It's turned off for now, so it shouldn't have any effect on
2574         the normal build.
2575         
2576         * JavaScriptCore.pbproj/project.pbxproj:
2577         * kjs/collector.cpp:
2578         (KJS::Collector::markStackObjectsConservatively):
2579         (KJS::Collector::markProtectedObjects):
2580         (KJS::Collector::collect):
2581         * kjs/collector.h:
2582         * kjs/protect.h:
2583         (KJS::gcProtect):
2584         (KJS::gcUnprotect):
2585         * kjs/protected_values.cpp: Added.
2586         (KJS::ProtectedValues::getProtectCount):
2587         (KJS::ProtectedValues::increaseProtectCount):
2588         (KJS::ProtectedValues::insert):
2589         (KJS::ProtectedValues::decreaseProtectCount):
2590         (KJS::ProtectedValues::expand):
2591         (KJS::ProtectedValues::shrink):
2592         (KJS::ProtectedValues::rehash):
2593         (KJS::ProtectedValues::computeHash):
2594         * kjs/protected_values.h: Added.
2595         * kjs/value.cpp:
2596         (ValueImp::useConservativeMark):
2597         (ValueImp::mark):
2598         (ValueImp::marked):
2599         * kjs/value.h:
2600         (KJS::ValueImp::):
2601
2602 === Safari-138 ===
2603
2604 2004-04-22  Richard Williamson   <rjw@apple.com>
2605
2606         Fixed build snafu (re-declaration of NPBool in npruntime.h and
2607         npapi.h).
2608
2609         * bindings/npruntime.h:
2610
2611 2004-04-22  Richard Williamson   <rjw@apple.com>
2612
2613         Updated plugin binding API to reflect latest revision from
2614         working group.
2615         
2616         Biggest change is the introduction of NPVariant used to represent
2617         value types.  NPVariant replaces the use of NPObject for the
2618         exchange of values between scripting environment and native code.
2619
2620         Reviewed by John.
2621
2622         * JavaScriptCore.pbproj/project.pbxproj:
2623         * bindings/NP_jsobject.cpp:
2624         (identiferFromNPIdentifier):
2625         (NPN_Call):
2626         (NPN_Evaluate):
2627         (NPN_GetProperty):
2628         (NPN_SetProperty):
2629         (NPN_ToString):
2630         (NPN_GetPropertyAtIndex):
2631         (NPN_SetPropertyAtIndex):
2632         * bindings/c/c_class.cpp:
2633         (CClass::methodsNamed):
2634         (CClass::fieldNamed):
2635         * bindings/c/c_instance.cpp:
2636         (CInstance::invokeMethod):
2637         (CInstance::defaultValue):
2638         * bindings/c/c_runtime.cpp:
2639         (CField::valueFromInstance):
2640         (CField::setValueToInstance):
2641         * bindings/c/c_utility.cpp:
2642         (convertNPStringToUTF16):
2643         (convertUTF8ToUTF16):
2644         (coerceValueToNPVariantStringType):
2645         (convertValueToNPVariant):
2646         (convertNPVariantToValue):
2647         * bindings/c/c_utility.h:
2648         * bindings/npruntime.cpp:
2649         (NPN_GetIdentifier):
2650         (NPN_GetIdentifiers):
2651         (NPN_UTF8FromIdentifier):
2652         (NPN_VariantIsVoid):
2653         (NPN_VariantIsNull):
2654         (NPN_VariantIsUndefined):
2655         (NPN_VariantIsBool):
2656         (NPN_VariantIsInt32):
2657         (NPN_VariantIsDouble):
2658         (NPN_VariantIsString):
2659         (NPN_VariantIsObject):
2660         (NPN_VariantToBool):
2661         (NPN_VariantToString):
2662         (NPN_VariantToInt32):
2663         (NPN_VariantToDouble):
2664         (NPN_VariantToObject):
2665         (NPN_InitializeVariantAsVoid):
2666         (NPN_InitializeVariantAsNull):
2667         (NPN_InitializeVariantAsUndefined):
2668         (NPN_InitializeVariantWithBool):
2669         (NPN_InitializeVariantWithInt32):
2670         (NPN_InitializeVariantWithDouble):
2671         (NPN_InitializeVariantWithString):
2672         (NPN_InitializeVariantWithStringCopy):
2673         (NPN_InitializeVariantWithObject):
2674         (NPN_InitializeVariantWithVariant):
2675         (NPN_ReleaseVariantValue):
2676         (NPN_CreateObject):
2677         (NPN_RetainObject):
2678         (NPN_ReleaseObject):
2679         (NPN_IsKindOfClass):
2680         (NPN_SetExceptionWithUTF8):
2681         (NPN_SetException):
2682         * bindings/npruntime.h:
2683         (_NPString::):
2684         (_NPString::_NPVariant::):
2685         * bindings/testbindings.cpp:
2686         (logMessage):
2687         (setDoubleValue):
2688         (setIntValue):
2689         (setStringValue):
2690         (setBooleanValue):
2691         (getDoubleValue):
2692         (getIntValue):
2693         (getStringValue):
2694         (getBooleanValue):
2695         (myGetProperty):
2696         (mySetProperty):
2697         (myInvoke):
2698         (myAllocate):
2699
2700 2004-04-22  Darin Adler  <darin@apple.com>
2701
2702         Reviewed by Maciej.
2703
2704         - fixed <rdar://problem/3627473>: "REGRESSION (125-137): memory trasher in UString::append, causing many different crashes"
2705
2706         * kjs/ustring.cpp:
2707         (KJS::UString::expandCapacity): Fix sizeof(UChar *) that should be sizeof(UChar).
2708         Was resulting in a buffer 2x the needed size.
2709         (KJS::UString::expandPreCapacity): Ditto.
2710         (KJS::UString::append): Fix malloc that is missing a sizeof(UChar).
2711
2712 2004-04-21  Maciej Stachowiak  <mjs@apple.com>
2713
2714         Reviewed by Darin.
2715
2716         Preliminary change for conservative GC. Create "protected"
2717         subclasses to GC-protect objects when on heap, since we will soon
2718         remove the built-in refcounting of the normal wrapper classes. Use
2719         them where needed.
2720         
2721         * JavaScriptCore.pbproj/project.pbxproj:
2722         * kjs/context.h:
2723         * kjs/internal.h:
2724         (KJS::InterpreterImp::globalObject):
2725         * kjs/interpreter.h:
2726         * kjs/property_map.cpp:
2727         * kjs/reference.h:
2728         * kjs/reference_list.cpp:
2729
2730 2004-04-19  Maciej Stachowiak  <mjs@apple.com>
2731
2732         Reviewed by Dave.
2733
2734         Optimize prepend using the shared substring optimization. Also,
2735         limit the applicability of shared append and shared prepend. If
2736         you overdo it, it does more harm than good, because you create a
2737         bunch of strings that are disqualified from future shared
2738         append/prepend, for not much immediate savings in allocate/copy
2739         expense.
2740         
2741         * kjs/ustring.cpp:
2742         (KJS::):
2743         (KJS::UString::Rep::create):
2744         (KJS::UString::expandedSize):
2745         (KJS::UString::usedPreCapacity):
2746         (KJS::UString::expandCapacity):
2747         (KJS::UString::expandPreCapacity):
2748         (KJS::UString::UString):
2749         (KJS::UString::append):
2750         (KJS::UString::operator=):
2751         * kjs/ustring.h:
2752         (KJS::UString::Rep::data):
2753
2754 2004-04-16  Maciej Stachowiak  <mjs@apple.com>
2755         Reviewed by Richard.
2756
2757         No more need for Completion or Reference to privately inherit from
2758         Value, none of the superclass functionality is used.
2759
2760         * kjs/completion.h:
2761         * kjs/reference.h:
2762
2763 === Safari-137 ===
2764
2765 2004-04-16  Richard Williamson   <rjw@apple.com>
2766
2767         Added interpreter lock protection around object creation.
2768
2769         Reviewed by Chris.
2770
2771         * bindings/runtime.cpp:
2772         (Instance::createRuntimeObject):
2773
2774 2004-04-16  Maciej Stachowiak  <mjs@apple.com>
2775
2776         Reviewed by Ken.
2777
2778         Another JavaScript speed improvement: use the mechanism from
2779         string append optimization to make taking a substring fast, again
2780         sharing the buffer.
2781
2782         A further 22% improvement on the 24fun string speed test.
2783         
2784         * kjs/ustring.cpp:
2785         (KJS::):
2786         (KJS::UString::Rep::create):
2787         (KJS::UString::UString):
2788         (KJS::UString::append):
2789         (KJS::UString::operator=):
2790         (KJS::UString::substr):
2791         * kjs/ustring.h:
2792         (KJS::UString::Rep::data):
2793
2794 2004-04-13  Maciej Stachowiak  <mjs@apple.com>
2795
2796         Reviewed by Darin.
2797
2798         - fixed <rdar://problem/3600695>: String manipulation in JavaScript 24fun test is very slow (slow)
2799         - fixed <rdar://problem/3600691>: Table generation test is really slow
2800         - fixed <rdar://problem/3600661>: 24fun date test is really slow
2801
2802         80% speedup on the string test, lesser speedups on the other two.
2803         
2804         Two different optimizations here:
2805
2806         1) Avoid large overhead of scanning strings to see if they are all
2807         ASCII before numeric conversion.
2808         
2809         * kjs/nodes.cpp:
2810         (AssignNode::evaluate): Don't convert to integer until we know for
2811         sure the operation will need it. Attempting to convert strings to
2812         numbers is a waste when they are being appended with +=.
2813
2814         2) Avoid huge cost of appending strings.
2815
2816         This is done by allowing multiple strings to share a buffer but
2817         actually use different ranges of it. The first time a string is
2818         appended to, we start leaving at least 10% extra space in the
2819         buffer, so doing N appends to the same string takes O(log N)
2820         mallocs instead of O(N).
2821         
2822         * kjs/identifier.cpp:
2823         (KJS::Identifier::equal):
2824         (KJS::Identifier::add):
2825         * kjs/ustring.cpp:
2826         (KJS::):
2827         (KJS::UCharReference::operator=):
2828         (KJS::UCharReference::ref):
2829         (KJS::UString::Rep::create):
2830         (KJS::UString::Rep::destroy):
2831         (KJS::UString::expandedSize):
2832         (KJS::UString::usedCapacity):
2833         (KJS::UString::expandCapacity):
2834         (KJS::UString::UString):
2835         (KJS::UString::null):
2836         (KJS::UString::append):
2837         (KJS::UString::operator=):
2838         (KJS::UString::toStrictUInt32):
2839         (KJS::UString::detach):
2840         (KJS::KJS::operator==):
2841         * kjs/ustring.h:
2842         (KJS::UString::Rep::data):
2843         (KJS::UString::Rep::hash):
2844
2845 2004-04-09  Maciej Stachowiak  <mjs@apple.com>
2846
2847         Reviewed by John.
2848
2849         - fix deployment build by avoiding deployment-only warning.
2850
2851         * kjs/scope_chain.cpp:
2852         (KJS::ScopeChain::bottom):
2853
2854 2004-04-09  Maciej Stachowiak  <mjs@apple.com>
2855
2856         Reviewed by John.
2857
2858         Changed things so that newly created objects get a prototype based
2859         on the scope chain of the current function, rather than the
2860         interpreter that started execution. This fixes the following bugs:
2861         
2862         <rdar://problem/3368523>: ARCH: wrong prototype used to create new objects (hang on lookup.atomica.com)
2863         <rdar://problem/3559173>: ARCH: Cannot scan using a HP Jetdirect product (JS object prototypes bind incorrectly)
2864
2865         * JavaScriptCore.pbproj/project.pbxproj:
2866         * kjs/array_object.cpp:
2867         (CompareWithCompareFunctionArguments::CompareWithCompareFunctionArguments):
2868         (ArrayProtoFuncImp::ArrayProtoFuncImp):
2869         (ArrayProtoFuncImp::call):
2870         (ArrayObjectImp::construct):
2871         * kjs/bool_object.cpp:
2872         (BooleanObjectImp::construct):
2873         * kjs/date_object.cpp:
2874         (DateProtoFuncImp::DateProtoFuncImp):
2875         (DateProtoFuncImp::call):
2876         (DateObjectImp::construct):
2877         * kjs/error_object.cpp:
2878         (ErrorObjectImp::construct):
2879         * kjs/function.cpp:
2880         (FunctionImp::FunctionImp):
2881         (FunctionImp::call):
2882         (DeclaredFunctionImp::construct):
2883         (ArgumentsImp::ArgumentsImp):
2884         (GlobalFuncImp::call):
2885         * kjs/function_object.cpp:
2886         (FunctionProtoFuncImp::call):
2887         (FunctionObjectImp::construct):
2888         * kjs/internal.cpp:
2889         (BooleanImp::toObject):
2890         (StringImp::toObject):
2891         (NumberImp::toObject):
2892         (InterpreterImp::InterpreterImp):
2893         (InterpreterImp::clear):
2894         (InterpreterImp::interpreterWithGlobalObject):
2895         * kjs/internal.h:
2896         * kjs/interpreter.cpp:
2897         (ExecState::lexicalInterpreter):
2898         * kjs/interpreter.h:
2899         (KJS::ExecState::dynamicInterpreter):
2900         (KJS::ExecState::interpreter):
2901         * kjs/math_object.cpp:
2902         (MathFuncImp::MathFuncImp):
2903         * kjs/nodes.cpp:
2904         (StatementNode::hitStatement):
2905         (StatementNode::abortStatement):
2906         (RegExpNode::evaluate):
2907         (ElementNode::evaluate):
2908         (ArrayNode::evaluate):
2909         (ObjectLiteralNode::evaluate):
2910         (PropertyValueNode::evaluate):
2911         (FunctionCallNode::evaluate):
2912         (FuncDeclNode::processFuncDecl):
2913         (FuncExprNode::evaluate):
2914         * kjs/number_object.cpp:
2915         (NumberObjectImp::construct):
2916         * kjs/object.cpp:
2917         (KJS::ObjectImp::defaultValue):
2918         (KJS::Error::create):
2919         * kjs/object_object.cpp:
2920         (ObjectObjectImp::construct):
2921         * kjs/reference.cpp:
2922         (Reference::putValue):
2923         * kjs/regexp_object.cpp:
2924         (RegExpProtoFuncImp::call):
2925         (RegExpObjectImp::arrayOfMatches):
2926         (RegExpObjectImp::construct):
2927         * kjs/scope_chain.cpp:
2928         (KJS::ScopeChain::bottom):
2929         * kjs/scope_chain.h:
2930         * kjs/string_object.cpp:
2931         (StringProtoFuncImp::StringProtoFuncImp):
2932         (StringProtoFuncImp::call):
2933         (StringObjectImp::construct):
2934
2935 === Safari-136 ===
2936
2937 === Safari-135 ===
2938
2939 2004-03-31  Richard Williamson   <rjw@apple.com>
2940
2941         Tedious renames based on feedback from plugin-futures list.
2942         NP_ functions are renamed with NPN_ prefix.
2943         Types prefix renamed from NP_ to NP.
2944         NPN_CreateStringWithUTF8 and NPN_SetExceptionWithUTF8 now take a length, optionally -1 if string is null terminated. 
2945         
2946         No review because this was just a renaming patch.
2947
2948         * bindings/NP_jsobject.cpp:
2949         (listFromNPArray):
2950         (jsAllocate):
2951         (identiferFromNPIdentifier):
2952         (NPN_Call):
2953         (NPN_Evaluate):
2954         (NPN_GetProperty):
2955         (NPN_SetProperty):
2956         (NPN_RemoveProperty):
2957         (NPN_ToString):
2958         (NPN_GetPropertyAtIndex):
2959         (NPN_SetPropertyAtIndex):
2960         * bindings/NP_jsobject.h:
2961         * bindings/c/c_class.cpp:
2962         (CClass::_commonInit):
2963         (CClass::classForIsA):
2964         (CClass::CClass):
2965         (CClass::methodsNamed):
2966         (CClass::fieldNamed):
2967         * bindings/c/c_class.h:
2968         * bindings/c/c_instance.cpp:
2969         (CInstance::CInstance):
2970         (CInstance::~CInstance):
2971         (CInstance::operator=):
2972         (CInstance::invokeMethod):
2973         (CInstance::defaultValue):
2974         * bindings/c/c_instance.h:
2975         (KJS::Bindings::CInstance::getObject):
2976         * bindings/c/c_runtime.cpp:
2977         (CField::valueFromInstance):
2978         (CField::setValueToInstance):
2979         * bindings/c/c_runtime.h:
2980         (KJS::Bindings::CField::CField):
2981         (KJS::Bindings::CField::name):
2982         (KJS::Bindings::CMethod::CMethod):
2983         (KJS::Bindings::CMethod::name):
2984         * bindings/c/c_utility.cpp:
2985         (coerceValueToNPString):
2986         (convertValueToNPValueType):
2987         (convertNPValueTypeToValue):
2988         * bindings/c/c_utility.h:
2989         * bindings/npruntime.cpp:
2990         (NPN_IdentifierFromUTF8):
2991         (NPN_IsValidIdentifier):
2992         (NPN_GetIdentifiers):
2993         (NPN_UTF8FromIdentifier):
2994         (NPN_CreateObject):
2995         (NPN_RetainObject):
2996         (NPN_ReleaseObject):
2997         (NPN_IsKindOfClass):
2998         (NPN_SetExceptionWithUTF8):
2999         (NPN_SetException):
3000         (numberAllocate):
3001         (NPN_CreateNumberWithInt):
3002         (NPN_CreateNumberWithFloat):
3003         (NPN_CreateNumberWithDouble):
3004         (NPN_IntFromNumber):
3005         (NPN_FloatFromNumber):
3006         (NPN_DoubleFromNumber):
3007         (stringAllocate):
3008         (NPN_CreateStringWithUTF8):
3009         (NPN_CreateStringWithUTF16):
3010         (NPN_DeallocateUTF8):
3011         (NPN_UTF8FromString):
3012         (NPN_UTF16FromString):
3013         (NPN_StringLength):
3014         (booleanAllocate):
3015         (NPN_CreateBoolean):
3016         (NPN_BoolFromBoolean):
3017         (nullAllocate):
3018         (NPN_GetNull):
3019         (undefinedAllocate):
3020         (NPN_GetUndefined):
3021         (arrayAllocate):
3022         (arrayDeallocate):
3023         (NPN_CreateArray):
3024         (NPN_CreateArrayV):
3025         (NPN_ObjectAtIndex):
3026         * bindings/npruntime.h:
3027         * bindings/runtime.cpp:
3028         (Instance::createBindingForLanguageInstance):
3029         * bindings/testbindings.cpp:
3030         (initializeIdentifiers):
3031         (myHasProperty):
3032         (myHasMethod):
3033         (myGetProperty):
3034         (mySetProperty):
3035         (logMessage):
3036         (setDoubleValue):
3037         (setIntValue):
3038         (setStringValue):
3039         (setBooleanValue):
3040         (getDoubleValue):
3041         (getIntValue):
3042         (getStringValue):
3043         (getBooleanValue):
3044         (myInvoke):
3045         (myAllocate):
3046         (myInvalidate):
3047         (myDeallocate):
3048         (main):
3049
3050 2004-03-31  Richard Williamson   <rjw@apple.com>
3051
3052         Changed references to NP_runtime.h to npruntime.h
3053         
3054         * JavaScriptCore.pbproj/project.pbxproj:
3055         * bindings/NP_jsobject.h:
3056         * bindings/c/c_class.h:
3057         * bindings/c/c_instance.h:
3058         * bindings/c/c_runtime.h:
3059         * bindings/c/c_utility.h:
3060         * bindings/npruntime.cpp:
3061
3062 2004-03-31  Richard Williamson   <rjw@apple.com>
3063
3064         Renamed NP_runtime.h to npruntime.h to match Netscape SDK.
3065
3066         * JavaScriptCore.pbproj/project.pbxproj:
3067         * bindings/NP_jsobject.h:
3068         * bindings/npruntime.cpp:
3069
3070 === Safari-134 ===
3071
3072 2004-03-23  Richard Williamson   <rjw@apple.com>
3073
3074         Added implementation of KJS::Value <-> NP_Object conversion functions.
3075         Augmented test program for 'C' bindings.
3076         Added asserts and parameter checking to all public API.        
3077
3078         Reviewed by Ken.
3079
3080         * JavaScriptCore.pbproj/project.pbxproj:
3081         * bindings/NP_jsobject.cpp:
3082         (NP_ToString):
3083         * bindings/NP_jsobject.h: Added.
3084         * bindings/NP_runtime.cpp:
3085         (NP_IdentifierFromUTF8):
3086         (NP_IsValidIdentifier):
3087         (NP_GetIdentifiers):
3088         (NP_CreateObject):
3089         (NP_RetainObject):
3090         (NP_ReleaseObject):
3091         (NP_IsKindOfClass):
3092         (NP_SetExceptionWithUTF8):
3093         (NP_SetException):
3094         (NP_IntFromNumber):
3095         (NP_FloatFromNumber):
3096         (NP_DoubleFromNumber):
3097         (NP_CreateStringWithUTF8):
3098         (NP_CreateStringWithUTF16):
3099         (NP_DeallocateUTF8):
3100         (NP_UTF8FromString):
3101         (NP_UTF16FromString):
3102         (NP_StringLength):
3103         (NP_BoolFromBoolean):
3104         * bindings/NP_runtime.h:
3105         * bindings/c/c_instance.cpp:
3106         (CInstance::invokeMethod):
3107         * bindings/c/c_utility.cpp:
3108         (coerceValueToNPString):
3109         (convertValueToNPValueType):
3110         (convertNPValueTypeToValue):
3111         * bindings/c/c_utility.h:
3112         * bindings/test.js:
3113         * bindings/testC.js: Added.
3114         * bindings/testbindings.cpp:
3115         (logMessage):
3116         (setDoubleValue):
3117         (setIntValue):
3118         (setStringValue):
3119         (setBooleanValue):
3120         (getDoubleValue):
3121         (getIntValue):
3122         (getStringValue):
3123         (getBooleanValue):
3124         (myInterfaceInvoke):
3125         (myInterfaceAllocate):
3126
3127 === Safari-133 ===
3128
3129 2004-03-19  Darin Adler  <darin@apple.com>
3130
3131         Reviewed by Ken.
3132
3133         - fixed problem with methods like setUTCHour
3134
3135         * kjs/date_object.cpp: (DateProtoFuncImp::call): Fix conversion back to time_t to use the appropriate
3136         GMT vs. local time function based on the utc flag.
3137
3138 2004-03-17  Richard Williamson   <rjw@apple.com>
3139
3140         Added a context parameter to result callbacks use by JavaScriptObject functions.  This was a change requested by Eric Carlson on the QT plugin team.
3141
3142         Reviewed by Ken.
3143
3144         * bindings/NP_jsobject.cpp:
3145         (NP_Call):
3146         (NP_Evaluate):
3147         (NP_GetProperty):
3148         (NP_ToString):
3149         (NP_GetPropertyAtIndex):
3150         * bindings/NP_runtime.h:
3151
3152 2004-03-16  Richard Williamson   <rjw@apple.com>
3153
3154         Fixed 3590169.  Regression (crash) caused by the switch to MethodLists.  Crash when attempting to invoke a method from JavaScript to Java that is not implemented.
3155
3156         Reviewed by John.
3157
3158         * bindings/jni/jni_class.cpp:
3159         (JavaClass::methodsNamed):
3160
3161 2004-03-15  Richard Williamson   <rjw@apple.com>
3162
3163         Fixed 3570854.  Don't attempt to convert Null to strings.  We
3164         were incorrectly converting to "Null".
3165
3166         Actually fixed by Scott Kovatch.
3167
3168         Reviewed by Richard.
3169
3170         * bindings/jni/jni_utility.cpp:
3171         (KJS::Bindings::convertValueToJValue):
3172
3173 === Safari-132 ===
3174
3175 2004-03-11  Richard Williamson   <rjw@apple.com>
3176
3177         Stitched together the NP stuff to our language independent
3178         JavaScript binding stuff.  Very close to being done.
3179         
3180         Added program to test C bindings (and NP stuff).  Just tests
3181         properties.  Will add methods and JavaScript access, etc.
3182
3183         Updated Makefile.am to account for new bindings/c directory.
3184
3185         Change NP_UTF8 from "const char *" to "char" to allow for
3186         declarations like "const NP_UTF8 *" and "NP_UTF8 *".  Ditto
3187         for NP_UTF16.
3188
3189         Added NP_IsValidIdentifier().
3190
3191         Reviewed by Chris.
3192
3193         * JavaScriptCore.pbproj/project.pbxproj:
3194         * Makefile.am:
3195         * bindings/NP_jsobject.cpp:
3196         (identiferFromNPIdentifier):
3197         (NP_Evaluate):
3198         * bindings/NP_runtime.cpp:
3199         (NP_IdentifierFromUTF8):
3200         (NP_IsValidIdentifier):
3201         (NP_GetIdentifiers):
3202         (NP_UTF8FromIdentifier):
3203         (NP_SetExceptionWithUTF8):
3204         (NP_SetException):
3205         (NP_CreateStringWithUTF8):
3206         (NP_CreateStringWithUTF16):
3207         (NP_UTF8FromString):
3208         (NP_UTF16FromString):
3209         * bindings/NP_runtime.h:
3210         * bindings/c/c_class.cpp: Added.
3211         (CClass::_commonDelete):
3212         (CClass::_commonCopy):
3213         (CClass::_commonInit):
3214         (_createClassesByIsAIfNecessary):
3215         (CClass::classForIsA):
3216         (CClass::CClass):
3217         (CClass::name):
3218         (CClass::methodsNamed):
3219         (CClass::fieldNamed):
3220         * bindings/c/c_class.h: Added.
3221         (KJS::Bindings::CClass::~CClass):
3222         (KJS::Bindings::CClass::CClass):
3223         (KJS::Bindings::CClass::operator=):
3224         (KJS::Bindings::CClass::constructorAt):
3225         (KJS::Bindings::CClass::numConstructors):
3226         * bindings/c/c_instance.cpp: Added.
3227         (CInstance::CInstance):
3228         (CInstance::~CInstance):
3229         (CInstance::operator=):
3230         (CInstance::getClass):
3231         (CInstance::begin):
3232         (CInstance::end):
3233         (CInstance::invokeMethod):
3234         (CInstance::defaultValue):
3235         (CInstance::stringValue):
3236         (CInstance::numberValue):
3237         (CInstance::booleanValue):
3238         (CInstance::valueOf):
3239         * bindings/c/c_instance.h: Added.
3240         (KJS::Bindings::CInstance::getObject):
3241         * bindings/c/c_runtime.cpp: Added.
3242         (CField::valueFromInstance):
3243         (CField::setValueToInstance):
3244         * bindings/c/c_runtime.h: Added.
3245         (KJS::Bindings::CField::CField):
3246         (KJS::Bindings::CField::name):
3247         (KJS::Bindings::CField::type):
3248         (KJS::Bindings::CMethod::CMethod):
3249         (KJS::Bindings::CMethod::name):
3250         (KJS::Bindings::CMethod::numParameters):
3251         * bindings/c/c_utility.cpp: Added.
3252         (coerceValueToNPValueType):
3253         (convertValueToNPValueType):
3254         (convertNPValueTypeToValue):
3255         * bindings/c/c_utility.h: Added.
3256         * bindings/make_testbindings:
3257         * bindings/runtime.cpp:
3258         (Instance::createBindingForLanguageInstance):
3259         * bindings/runtime.h:
3260         (KJS::Bindings::Instance::):
3261         * bindings/testbindings.cpp: Added.
3262         (initializeIdentifiers):
3263         (myInterfaceHasProperty):
3264         (myInterfaceHasMethod):
3265         (myInterfaceGetProperty):
3266         (myInterfaceSetProperty):
3267         (myInterfaceInvoke):
3268         (myInterfaceAllocate):
3269         (myInterfaceInvalidate):
3270         (myInterfaceDeallocate):
3271         (GlobalImp::className):
3272         (readJavaScriptFromFile):
3273         (main):
3274
3275 2004-03-10  Richard Williamson   <rjw@apple.com>
3276
3277         Made changes to support new asychronous approach to calls from
3278         plugin to JavaScript
3279
3280         Reviewed by Chris.
3281
3282         * bindings/NP_jsobject.cpp:
3283         (NP_Call):
3284         (NP_Evaluate):
3285         (NP_GetProperty):
3286         (NP_ToString):
3287         (NP_GetPropertyAtIndex):
3288         * bindings/NP_runtime.h:
3289         * bindings/make_testbindings:
3290         * bindings/runtime.cpp:
3291         (Instance::createBindingForLanguageInstance):
3292
3293 2004-03-10  Richard Williamson   <rjw@apple.com>
3294
3295         Updated header to include proposed changes from
3296         plugin-futures list.  Calls from plugin to JavaScript
3297         are now asynchronous.
3298
3299         Reviewed by Chris.
3300
3301         * bindings/NP_runtime.h:
3302
3303 === Safari-131 ===
3304
3305 2004-03-04  Richard Williamson   <rjw@apple.com>
3306
3307         Implementation of NP_JavaScriptObject.  This is the 'C' class
3308         that wraps a JavaScript object.
3309
3310         Reviewed by Chris.
3311
3312         * JavaScriptCore.pbproj/project.pbxproj:
3313         * bindings/NP_jsobject.cpp: Added.
3314         (coerceValueToNPValueType):
3315         (convertValueToNPValueType):
3316         (convertNPValueTypeToValue):
3317         (listFromNPArray):
3318         (jsAllocate):
3319         (jsDeallocate):
3320         (identiferFromNPIdentifier):
3321         (NP_Call):
3322         (NP_Evaluate):
3323         (NP_GetProperty):
3324         (NP_SetProperty):
3325         (NP_RemoveProperty):
3326         (NP_ToString):
3327         (NP_GetPropertyAtIndex):
3328         (NP_SetPropertyAtIndex):
3329         * bindings/NP_runtime.cpp:
3330         (NP_ObjectAtIndex):
3331         * bindings/NP_runtime.h:
3332         * bindings/runtime_object.h:
3333
3334 2004-03-04  Richard Williamson   <rjw@apple.com>
3335
3336         Added NP_Array implementation.  
3337
3338         Changed NP_Boolean to just depend on two static instances, no
3339         space is required for values.
3340
3341         Reviewed by Chris.
3342
3343         * bindings/NP_runtime.cpp:
3344         (NP_CreateBoolean):
3345         (NP_BoolFromBoolean):
3346         (arrayAllocate):
3347         (arrayDeallocate):
3348         (NP_CreateArray):
3349         (NP_CreateArrayV):
3350         (NP_ObjectAtIndex):
3351         * bindings/NP_runtime.h:
3352
3353 2004-03-03  Darin Adler  <darin@apple.com>
3354
3355         Reviewed by Vicki.
3356
3357         * English.lproj/InfoPlist.strings: Removed. No need to localize the version and
3358         copyright string, and that's all that was in here.
3359         * JavaScriptCore.pbproj/project.pbxproj: Removed InfoPlist.strings from build.
3360
3361 2004-03-03  Richard Williamson   <rjw@apple.com>
3362
3363         More 'C' binding implementation.  Fleshed out all the
3364         'primitive' data types.
3365
3366         Reviewed by Chris.
3367
3368         * bindings/NP_runtime.cpp:
3369         (NP_ReleaseObject):
3370         (numberAllocate):
3371         (stringAllocate):
3372         (stringDeallocate):
3373         (NP_CreateStringWithUTF8):
3374         (NP_CreateStringWithUTF16):
3375         (NP_UTF8FromString):
3376         (NP_UTF16FromString):
3377         (NP_StringLength):
3378         (booleanAllocate):
3379         (booleanDeallocate):
3380         (NP_CreateBoolean):
3381         (NP_BoolFromBoolean):
3382         (nullAllocate):
3383         (nullDeallocate):
3384         (NP_GetNull):
3385         (undefinedAllocate):
3386         (undefinedDeallocate):
3387         (NP_GetUndefined):
3388         * bindings/NP_runtime.h:
3389
3390 2004-03-03  Richard Williamson   <rjw@apple.com>
3391
3392         More 'C' binding implementation.
3393
3394         Reviewed by Chris.
3395
3396         * bindings/NP_runtime.cpp:
3397         (identifierEqual):
3398         (identifierHash):
3399         (getIdentifierDictionary):
3400         (NP_IdentifierFromUTF8):
3401         (NP_UTF8FromIdentifier):
3402         (NP_CreateObject):
3403         (NP_ReleaseObject):
3404         (NP_IsKindOfClass):
3405         (numberCreate):
3406         (NP_CreateNumberWithInt):
3407         (NP_CreateNumberWithFloat):
3408         (NP_CreateNumberWithDouble):
3409         (NP_IntFromNumber):
3410         (NP_FloatFromNumber):
3411         (NP_DoubleFromNumber):
3412         * bindings/NP_runtime.h:
3413
3414 2004-03-02  Richard Williamson   <rjw@apple.com>
3415
3416         Removed retain/release from NP_Class.  Classes will not be allowed to implement their
3417         own customer retain/release scheme.
3418
3419         Reviewed by Chris.
3420
3421         * bindings/NP_runtime.cpp:
3422         (NP_RetainObject):
3423         (NP_ReleaseObject):
3424         * bindings/NP_runtime.h:
3425
3426 2004-03-02  Richard Williamson   <rjw@apple.com>
3427
3428         C binding API.  Partial implementation.
3429
3430         Completed ObjectiveC bindings (not based on the C API).  These will re-implemented over the C binding API, but I wanted to get this code in the tree.
3431
3432         Factored root object reference counting scheme.  It is now useful independent
3433         of LiveConnect.
3434
3435         Reviewed by Chris.
3436
3437         * JavaScriptCore.pbproj/project.pbxproj:
3438         * bindings/NP_runtime.cpp: Added.
3439         (NP_IdentifierFromUTF8):
3440         (NP_GetIdentifiers):
3441         (NP_UTF8FromIdentifier):
3442         (NP_CreateObject):
3443         (NP_RetainObject):
3444         (NP_ReleaseObject):
3445         (NP_IsKindOfClass):
3446         (NP_SetException):
3447         (NP_Call):
3448         (NP_Evaluate):
3449         (NP_GetProperty):
3450         (NP_SetProperty):
3451         (NP_RemoveProperty):
3452         (NP_ToString):
3453         (NP_GetPropertyAtIndex):
3454         (NP_SetPropertyAtIndex):
3455         (NP_CreateNumberWithInt):
3456         (NP_CreateNumberWithFloat):
3457         (NP_CreateNumberWithDouble):
3458         (NP_IntFromNumber):
3459         (NP_FloatFromNumber):
3460         (NP_DoubleFromNumber):
3461         (NP_CreateStringWithUTF8):
3462         (NP_CreateStringWithUTF16):
3463         (NP_UTF8FromString):
3464         (NP_UTF16FromString):
3465         (NP_CreateBoolean):
3466         (NP_BoolFromBoolean):
3467         (NP_GetNull):
3468         (NP_GetUndefined):
3469         (NP_CreateArray):
3470         (NP_CreateArrayV):
3471         (NP_ObjectAtIndex):
3472         * bindings/NP_runtime.h: Added.
3473         * bindings/jni/jni_jsobject.cpp:
3474         (JSObject::invoke):
3475         (JSObject::finalize):
3476         (JSObject::createNative):
3477         (JSObject::convertValueToJObject):
3478         * bindings/jni/jni_jsobject.h:
3479         * bindings/objc/objc_jsobject.h:
3480         * bindings/objc/objc_jsobject.mm:
3481         (rootForView):
3482         (windowJavaScriptObject):
3483         (-[JavaScriptObject initWithObjectImp:KJS::root:Bindings::]):
3484         (-[JavaScriptObject dealloc]):
3485         (-[JavaScriptObject _convertValueToObjcValue:KJS::]):
3486         (-[JavaScriptObject call:arguments:]):
3487         (-[JavaScriptObject evaluate:]):
3488         (-[JavaScriptObject getMember:]):
3489         (-[JavaScriptObject setMember:value:]):
3490         (-[JavaScriptObject removeMember:]):
3491         (-[JavaScriptObject toString]):
3492         (-[JavaScriptObject getSlot:]):
3493         (-[JavaScriptObject setSlot:value:]):
3494         * bindings/objc/objc_utility.h:
3495         * bindings/objc/objc_utility.mm:
3496         (KJS::Bindings::convertValueToObjcValue):
3497         * bindings/runtime_root.cpp: Added.
3498         (getReferencesByRootDictionary):
3499         (getReferencesDictionary):
3500         (KJS::Bindings::findReferenceDictionary):
3501         (KJS::Bindings::rootForImp):
3502         (KJS::Bindings::addNativeReference):
3503         (KJS::Bindings::removeNativeReference):
3504         (completedJavaScriptAccess):
3505         (initializeJavaScriptAccessLock):
3506         (lockJavaScriptAccess):
3507         (unlockJavaScriptAccess):
3508         (RootObject::dispatchToJavaScriptThread):
3509         (performJavaScriptAccess):
3510         (RootObject::setFindRootObjectForNativeHandleFunction):
3511         (RootObject::removeAllNativeReferences):
3512         * bindings/runtime_root.h: Added.
3513         (KJS::Bindings::RootObject::RootObject):
3514         (KJS::Bindings::RootObject::~RootObject):
3515         (KJS::Bindings::RootObject::setRootObjectImp):
3516         (KJS::Bindings::RootObject::rootObjectImp):
3517         (KJS::Bindings::RootObject::setInterpreter):
3518         (KJS::Bindings::RootObject::interpreter):
3519         (KJS::Bindings::RootObject::findRootObjectForNativeHandleFunction):
3520         (KJS::Bindings::RootObject::runLoop):
3521         (KJS::Bindings::RootObject::performJavaScriptSource):
3522
3523 === Safari-130 ===
3524
3525 === Safari-129 ===
3526
3527 2004-02-18  Richard Williamson   <rjw@apple.com>
3528
3529         Added NSNumber/Number conversion.
3530
3531         Removed some unnecessary KJS:: namespace specifiers.
3532
3533         Reviewed by Ken.
3534
3535         * bindings/objc/objc_utility.mm:
3536         (KJS::Bindings::convertValueToObjcValue):
3537         (KJS::Bindings::convertObjcValueToValue):
3538         * bindings/runtime_array.h:
3539
3540 2004-02-18  Richard Williamson   <rjw@apple.com>
3541
3542         Added support for export NSArrays.
3543
3544         Updated valueAt() to take an ExecState so we can throw
3545         JS exceptions.
3546
3547         Implemented excludeSelectorFromJavaScript: in ObjcClass.  This allows
3548         ObjectiveC classes to control the visibility of their methods in 
3549         JavaScript.
3550
3551         Reviewed by Ken.
3552
3553         * bindings/jni/jni_runtime.cpp:
3554         (JavaField::valueFromInstance):
3555         (JavaArray::valueAt):
3556         * bindings/jni/jni_runtime.h:
3557         * bindings/objc/objc