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