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