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