2007-01-25 Mark Rowe <mrowe@apple.com>
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2007-01-25  Mark Rowe  <mrowe@apple.com>
2
3         Reviewed by Darin.
4
5         * Info.plist: Update copyright string.
6
7 2007-01-24  Darin Adler  <darin@apple.com>
8
9         Reviewed by Mark Rowe.
10
11         * JavaScriptCore.xcodeproj/project.pbxproj: Changed to /usr/sbin/sysctl
12         so we don't rely on people's paths.
13
14 2007-01-23  Alice Liu  <alice.liu@apple.com>
15
16         release build fix
17
18         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
19         Copy APICasts.h
20
21 2007-01-23  Geoffrey Garen  <ggaren@apple.com>
22
23         build fix
24
25         * API/JSStringRef.h:
26         * JavaScriptCore.xcodeproj/project.pbxproj:
27
28 2007-01-24  Mark Rowe  <mrowe@apple.com>
29
30         Build fix for DumpRenderTree.
31
32         * JavaScriptCore.xcodeproj/project.pbxproj: Make JSStringRefCF.h public so it's copied into built framework.
33
34 2007-01-23  Anders Carlsson  <acarlsson@apple.com>
35
36         Reviewed by Darin.
37
38         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
39         Copy APICasts.h
40
41 2007-01-23  Geoffrey Garen  <ggaren@apple.com>
42
43         Reviewed by Maciej Stachowiak.
44         
45         Fixed <rdar://problem/4885131> Move CFString function declarations from 
46         JSStringRef.h to JSStringRefCF.h
47         
48         Also removed remaining API FIXMEs and changed them into Radars.
49
50         * API/JSClassRef.cpp:
51         (OpaqueJSClass::OpaqueJSClass): Added Radar numbers for UTF8 conversion.
52
53         * API/JSContextRef.cpp:
54         (JSGlobalContextCreate): Replaced FIXME for NULL JSContextRef with Radar number.
55
56         * API/JSObjectRef.h: Removed FIXME, which is unprofessional in a public header.
57
58         * API/JSStringRef.cpp: Moved CF related implementations to JSStringRefCF.cpp.
59         (JSStringCreateWithUTF8CString): Replaced FIXME with Radar number.
60         * API/JSStringRef.h: Moved CF related declarations to JSStringRefCF.h. Added
61         #include of JSStringRefCF.h as a stopgap until clients start #including
62         it as needed by themselves.
63
64         * API/JSStringRefCF.cpp: Added.
65         (JSStringCreateWithCFString):
66         (JSStringCopyCFString): Replaced JSChar cast with UniChar cast, which is 
67         more appropriate for a CF call.
68         * API/JSStringRefCF.h: Added.
69         * JavaScriptCore.xcodeproj/project.pbxproj:
70
71 2007-01-18  Sanjay Madhav  <sanjay12@gmail.com>
72
73         Reviewed by Darin.
74
75         Add JavaScriptCore define to help with tracing of when objects are marked.
76
77         * kjs/object.cpp:
78         (KJS::JSObject::mark):
79
80 2007-01-18  Simon Hausmann  <hausmann@kde.org>
81
82         Reviewed by Zack.
83
84         * JavaScriptCore.pro: Remove generated files on make clean.
85         * pcre/pcre.pri:
86
87 2007-01-16  Alexey Proskuryakov  <ap@webkit.org>
88
89         Reviewed by Maciej.
90
91         http://bugs.webkit.org/show_bug.cgi?id=12268
92         Give object prototypes their own names
93
94         * kjs/lookup.h: Append "Prototype" to ClassName in KJS_IMPLEMENT_PROTOTYPE.
95
96 2007-01-16  Geoffrey Garen  <ggaren@apple.com>
97
98         Reviewed by Darin Adler.
99         
100         Added re-entrency checking to GC allocation and collection. It is an error
101         to allocate or collect from within a collection. We've had at least one 
102         case of each bug in the past.
103         
104         Added a comment to the API header, explaining that API clients must not
105         make this mistake, either.
106         
107         Layout tests and JS tests pass.
108
109         * API/JSObjectRef.h:
110         * kjs/collector.cpp:
111         (KJS::GCLock::GCLock):
112         (KJS::GCLock::~GCLock):
113         (KJS::Collector::allocate):
114         (KJS::Collector::collect):
115
116 2007-01-14  Mark Rowe  <mrowe@apple.com>
117
118         Reviewed by Mitz.
119
120         Minor fixes to JavaScript pretty-printing.
121
122         * JavaScriptCore.exp:
123         * kjs/Parser.cpp:
124         (KJS::Parser::prettyPrint): Return line number and error message if parsing fails.
125         * kjs/Parser.h:
126         * kjs/nodes2string.cpp:
127         (ElementNode::streamTo): Include comma delimiters in array literals.
128         (PropertyNameNode::streamTo): Quote property names in object literals to handle the case when the property name is not a valid identifier.
129         * kjs/testkjs.cpp:
130         (doIt): Print any errors encountered while pretty-printing.
131
132 2007-01-12  Anders Carlsson  <acarlsson@apple.com>
133
134         Reviewed by Darin.
135
136         * wtf/HashTraits.h:
137         Add hash traits for unsigned long and unsigned long long.
138
139 2007-01-12  Geoffrey Garen  <ggaren@apple.com>
140
141         RS by Brady Eidson.
142         
143         Rolling back in r18786 with leaks fixed, and these renames slightly reworked:
144
145         Because they can return 0:
146         rootObjectForImp => findRootObject (overloaded for JSObject* and Interpreter*)
147         rootObjectForInterpreter => findRootObject (ditto)
148         findReferenceSet => findProtectCountSet
149
150 2007-01-11  Geoffrey Garen  <ggaren@apple.com>
151
152         RS by Brady Eidson.
153         
154         Rolling out r18786 because it caused leaks.
155
156 2007-01-11  Geoffrey Garen  <ggaren@apple.com>
157
158         Reviewed by Anders Carlsson.
159
160         Even more cleanup in preparation for fixing <rdar://problem/4608404> 
161         WebScriptObject's _executionContext lack of ownership policy causes 
162         crashes (e.g., in Dashcode)
163         
164         Layout tests pass.
165         
166         Renames:
167             ReferencesSet | ProtectCounts => ProtectCountSet (because it's a typename for a set of GC protect counts)
168             ReferencesByRootMap => RootObjectMap (because RootObjectToProtectCountSetMap would have been confusing)
169             pv => protectedValues
170             rootObjectForImp => getRootObject (overloaded for JSObject* and Interpreter*)
171             rootObjectForInterpreter => getRootObject (ditto)
172             findReferenceSet => getProtectCountSet
173             imp => jsObject
174         
175         (KJS::Bindings::getRootObjectMap): Changed to take advantage of built-in
176         facility for initializing static variables.
177
178         (KJS::Bindings::getProtectCountSet):
179         (KJS::Bindings::destroyProtectCountSet): Added. Helps encapsulate the fact
180         that getting a ProtectCountSet entails adding a RootObject to a hash table,
181         and destroying one entails the reverse.
182
183         (KJS::Bindings::getRootObject): Removed spurious NULL check.
184         
185         (KJS::Bindings::findReferenceSet): Renamed. Changed to use getRootObject()
186         instead of iterating on its own.
187
188         (KJS::Bindings::addNativeReference): Changed to use an early return instead
189         of indenting the whole function.
190         (KJS::Bindings::removeNativeReference): Ditto.
191
192 2007-01-11  Geoffrey Garen  <ggaren@apple.com>
193
194         Reviewed by Anders Carlsson.
195
196         Even more cleanup in preparation for fixing <rdar://problem/4608404> 
197         WebScriptObject's _executionContext lack of ownership policy causes 
198         crashes (e.g., in Dashcode)
199         
200         Layout tests pass.
201         
202         Renames:
203             findRootObjectForNativeHandleFunction => createRootObject
204             FindRootObjectForNativeHandleFunctionPtr => CreateRootObjectFunction
205             
206         Also removed unnecessary use of "Bindings::" prefix.
207
208         * JavaScriptCore.exp:
209         * bindings/jni/jni_jsobject.cpp:
210         (JavaJSObject::createNative):
211         (JavaJSObject::convertValueToJObject):
212         (JavaJSObject::convertJObjectToValue):
213         * bindings/runtime_root.cpp:
214         (KJS::Bindings::RootObject::setCreateRootObject):
215         * bindings/runtime_root.h:
216         (KJS::Bindings::RootObject::createRootObject):
217
218 2007-01-11  George Staikos  <staikos@kde.org>
219
220         Reviewed by Maciej
221
222         Appears to be Mac specific right now.
223
224         * kjs/config.h:
225
226 2007-01-10  Lars Knoll <lars@trolltech.com>
227
228         Reviewed by Zack
229
230         Use the new functionality in Qt 4.3, to make
231         the methods closer compliant with the Unicode
232         spec.
233
234         Keep the old code so that it still compiles against
235         Qt 4.2.
236
237         * wtf/unicode/qt4/UnicodeQt4.h:
238         (WTF::Unicode::toLower):
239         (WTF::Unicode::toUpper):
240         (WTF::Unicode::toTitleCase):
241         (WTF::Unicode::foldCase):
242         (WTF::Unicode::isFormatChar):
243         (WTF::Unicode::isPrintableChar):
244         (WTF::Unicode::isSeparatorSpace):
245         (WTF::Unicode::isPunct):
246         (WTF::Unicode::isDigit):
247         (WTF::Unicode::isLower):
248         (WTF::Unicode::isUpper):
249         (WTF::Unicode::digitValue):
250         (WTF::Unicode::mirroredChar):
251         (WTF::Unicode::combiningClass):
252         (WTF::Unicode::decompositionType):
253         (WTF::Unicode::umemcasecmp):
254         (WTF::Unicode::direction):
255         (WTF::Unicode::category):
256
257 2007-01-09  Darin Adler  <darin@apple.com>
258
259         - update 2007 Apple copyright for the new company name
260
261         * kjs/DateMath.cpp:
262
263 2007-01-09  Darin Adler  <darin@apple.com>
264
265         - fix build
266
267         * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction):
268         Actually compile it this time.
269
270 2007-01-09  Darin Adler  <darin@apple.com>
271
272         - fix build
273
274         * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction):
275         Change types.
276
277 2007-01-09  Darin Adler  <darin@apple.com>
278
279         - fix build on platforms where Unicode::UChar is != uint16_t
280
281         * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction):
282         Change types.
283
284 2007-01-09  Mitz Pettel  <mitz@webkit.org>
285
286         Reviewed by Darin.
287
288         - changes for http://bugs.webkit.org/show_bug.cgi?id=11078
289           Forms Don't Submit (ASP Pages)
290
291         * JavaScriptCore.exp:
292         * kjs/value.cpp:
293         (KJS::JSValue::toInt32): Folded toInt32Inline into this method, which was its
294         only caller.
295         (KJS::JSValue::toUInt32): Added a variant that reports if the conversion has
296         succeeded.
297         * kjs/value.h:
298
299 2007-01-09  Darin Adler  <darin@apple.com>
300
301         Reviewed by Maciej.
302
303         - fix http://bugs.webkit.org/show_bug.cgi?id=12174
304           improve Unicode use (less WTF::Unicode:: prefix, centralized character names)
305
306         * wtf/unicode/icu/UnicodeIcu.h: Change parameter and return types
307         to UChar32 and UChar. Removed unneeded type casts and added some
308         const to functions that lacked it. Removed WTF::Unicode::memcmp.
309         (WTF::Unicode::umemcasecmp): Renamed from strcasecmp since this
310         doesn't work on 0-terminated strings as the str functions do.
311         * wtf/unicode/qt4/UnicodeQt4.h: Ditto.
312
313         - got rid of namespace prefixes from most uses of WTF::Unicode
314
315         * kjs/function.cpp:
316         (KJS::isStrWhiteSpace):
317         (KJS::escapeStringForPrettyPrinting):
318         * kjs/lexer.cpp:
319         (KJS::Lexer::isWhiteSpace):
320         (KJS::Lexer::isIdentStart):
321         (KJS::Lexer::isIdentPart):
322         * kjs/string_object.cpp:
323         (KJS::StringProtoFunc::callAsFunction):
324
325 2007-01-07  David Kilzer  <ddkilzer@webkit.org>
326
327         Reviewed by Darin.
328
329         - fix http://bugs.webkit.org/show_bug.cgi?id=11917
330           setlocale() can return null
331
332         * kjs/date_object.cpp:
333         (KJS::DateProtoFunc::callAsFunction): Removed dead code.
334
335 2007-01-07  David Carson  <dacarson@gmail.com>
336
337         Reviewed by Darin.
338
339         - fix http://bugs.webkit.org/show_bug.cgi?id=12100
340           JNI bindings should be available to non-Mac platforms that have JNI
341
342         Change JNI so that it is not wrapped in the PLATFORM(MAC) ifdef, enabling
343         other platforms who have JNI to use it.
344
345         * bindings/jni/jni_instance.h:  
346           Removed unnecessary include of <CoreFoundation/CoreFoundation.h>
347         * bindings/jni/jni_utility.cpp:
348         (KJS::Bindings::setJavaVM):
349         * bindings/jni/jni_utility.h:
350           Added new method for clients to set the JavaVM
351         * bindings/runtime.cpp:
352         (KJS::Bindings::Instance::createBindingForLanguageInstance):
353           Changed code to utilize new #if HAVE(JNI)
354         * kjs/config.h:
355           Added new #define for JNI, ie HAVE_JNI
356
357 2007-01-07  David Carson  <dacarson@gmail.com>
358
359         Reviewed by Darin.
360
361         Fix http://bugs.webkit.org/show_bug.cgi?id=11431
362         ARM platform has some byte alignment issues
363
364         Fix for NaN being 4 bytes and it must start on a byte boundary
365         for ARM architectures.
366
367         * kjs/fpconst.cpp:
368         (KJS::):
369
370 2007-01-04  David Kilzer  <ddkilzer@webkit.org>
371
372         Reviewed by Kevin McCullough.
373
374         - fix http://bugs.webkit.org/show_bug.cgi?id=12070
375           REGRESSION: KJS::getUTCOffset() caches UTC offset but ignores time zone changes
376
377         * kjs/DateMath.cpp:
378         (KJS::getUTCOffset): Don't cache UTC offset.
379
380 2007-01-02  Darin Adler  <darin@apple.com>
381
382         - minor tweak (hope this doesn't re-break Windows)
383
384         * pcre/pcre_compile.c: Removed use of const pcre_uchar const * -- Mitz probably
385         meant const pcre_uchar *const, but I think we can do without the explicit const here.
386
387         * pcre/pcre_internal.h: Re-enabled warning C4114.
388
389 2007-01-02  David Kilzer  <ddkilzer@webkit.org>
390
391         Reviewed by NOBODY (Windows build fix).
392
393         The MSVC compiler requires variables to be declared at the top of the enclosing block in C source.
394
395         Disable this warning to prevent MSVC from complaining about the 'const pcre_uchar const *' type:
396         warning C4114: same type qualifier used more than once
397
398         * pcre/pcre_compile.c:
399         (pcre_compile2): Moved variable declarations to top of their respective enclosing blocks.
400         * pcre/pcre_internal.h: Added pragma to disable compiler warning.
401
402 2007-01-01  Mitz Pettel  <mitz@webkit.org>
403
404         Reviewed by Darin.
405
406         - fix http://bugs.webkit.org/show_bug.cgi?id=11849
407           REGRESSION (r18182): Google Calendar is broken (a regular expression containing a null character is not parsed correctly)
408
409         Modified pcre_compile() (and the functions that it calls) to work with patterns
410         containing null characters.
411
412         Covered by JavaScriptCore tests ecma_3/RegExp/octal-002.js and ecma_3/RegExp/regress-85721.js
413
414         * kjs/regexp.cpp:
415         (KJS::RegExp::RegExp): Changed to not null-terminate the pattern string and instead
416         pass its length to pcre_compile.
417         * pcre/pcre.h:
418         * pcre/pcre_compile.c:
419         (check_escape):
420         (get_ucp):
421         (is_counted_repeat):
422         (check_posix_syntax):
423         (compile_branch):
424         (compile_regex):
425         (pcre_compile): Added a parameter specifying the length of the pattern, which
426         is no longer required to be null-terminated and may contain null characters. 
427         (pcre_compile2):
428         * pcre/pcre_internal.h:
429         * tests/mozilla/expected.html: Updated for the two tests that this patch
430         fixes. Also updated failing results for ecma_3/RegExp/regress-100199.js
431         which were not updated after bug 6257 was fixed.
432
433 2007-01-01  David Kilzer  <ddkilzer@webkit.org>
434
435         Reviewed by Darin.
436
437         - fix http://bugs.webkit.org/show_bug.cgi?id=12057
438           REGRESSION: JavaScript Date Is One Day In The Future in GMT time zone
439
440         Because Mac OS X returns geographically and historically accurate time zone information,
441         converting Jan 02, 1970 12:00:00 AM to local time then subtracting 24 hours did not work
442         in GMT (London - England) since it was in BST (+0100) all year in 1970[1].  Instead, the
443         UTC offset is calculated by converting Jan 01, 2000 12:00:00 AM to local time then
444         subtracting that from the same date in UTC.
445
446         [1] http://en.wikipedia.org/wiki/British_Summer_Time
447
448         * kjs/DateMath.cpp:
449         (KJS::getUTCOffset): Updated UTC offset calculation.
450         (KJS::getDSTOffset): Improved comment.
451
452 2006-12-31  David Kilzer  <ddkilzer@webkit.org>
453
454         Reviewed by Geoff.
455
456         Update embedded pcre library from version 6.2 to 6.4.  Changes from pcre 6.2 to 6.3
457         did not include any files in JavaScriptCore/pcre.
458
459         All changes include renaming EXPORT to PCRE_EXPORT, renaming of ucp_findchar() to
460         _pcre_ucp_findchar(), or comment changes.  Additional changes noted below.
461
462         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Updated source file list.
463         * JavaScriptCore.xcodeproj/project.pbxproj: Renamed pcre_printint.c to pcre_printint.src
464         and changed it from a source file to a header file.
465         * JavaScriptCoreSources.bkl: Updated source file list.
466         * pcre/CMakeLists.txt: Updated source file list.
467         * pcre/pcre-config.h:
468         * pcre/pcre.h: Updated version.
469         * pcre/pcre.pri: Updated source file list.
470         * pcre/pcre_compile.c: Include pcre_printint.src #if DEBUG.
471         (pcre_compile2):
472         * pcre/pcre_config.c:
473         * pcre/pcre_exec.c:
474         (match):
475         * pcre/pcre_fullinfo.c:
476         * pcre/pcre_info.c:
477         * pcre/pcre_internal.h: Added header guard.  Removed export of _pcre_printint().
478         * pcre/pcre_ord2utf8.c:
479         * pcre/pcre_printint.c: Renamed to pcre_printint.src.
480         * pcre/pcre_printint.src: Added.  Renamed _pcre_printint() to pcre_printint().
481         * pcre/pcre_refcount.c:
482         * pcre/pcre_study.c:
483         * pcre/pcre_tables.c:
484         * pcre/pcre_try_flipped.c:
485         * pcre/pcre_ucp_findchar.c: Added contents of ucp_findchar.c.
486         * pcre/pcre_version.c:
487         * pcre/pcre_xclass.c:
488         (_pcre_xclass):
489         * pcre/ucp.h: Removed export of ucp_findchar().
490         * pcre/ucp_findchar.c: Removed.  Contents moved to pcre_ucp_findchar.c.
491
492 2006-12-29  David Kilzer  <ddkilzer@webkit.org>
493
494         Reviewed by Geoff.
495
496         Update embedded pcre library from version 6.1 to 6.2.  From the pcre ChangeLog:
497
498         3. Added "b" to the 2nd argument of fopen() in dftables.c, for non-Unix-like
499            operating environments where this matters.
500
501         5. Named capturing subpatterns were not being correctly counted when a pattern
502            was compiled. This caused two problems: (a) If there were more than 100
503            such subpatterns, the calculation of the memory needed for the whole
504            compiled pattern went wrong, leading to an overflow error. (b) Numerical
505            back references of the form \12, where the number was greater than 9, were
506            not recognized as back references, even though there were sufficient
507            previous subpatterns.
508
509         * pcre/dftables.c: Item 3.
510         (main):
511         * pcre/pcre.h: Updated version.
512         * pcre/pcre_compile.c: Item 5.
513         (read_repeat_counts):
514         (pcre_compile2):
515
516 2006-12-29  Geoffrey Garen  <ggaren@apple.com>
517
518         Reviewed by Brian Dash... err... Mark Rowe.
519
520         More cleanup in preparation for fixing <rdar://problem/4608404> 
521         WebScriptObject's _executionContext lack of ownership policy causes 
522         crashes (e.g., in Dashcode)
523         
524         The key change here is to RootObject::RootObject().
525         
526         * JavaScriptCore.exp:
527
528         * bindings/c/c_utility.cpp:
529         (KJS::Bindings::convertValueToNPVariant): Changed to use new constructor.
530
531         * bindings/jni/jni_jsobject.cpp:
532         (JavaJSObject::createNative): Changed to use new constructor. Replaced
533         large 'if' followed by default condition with "if !" and explicit default
534         condition.
535
536         * bindings/objc/objc_runtime.mm:
537         (convertValueToObjcObject): Changed to use new constructor.
538
539         * bindings/runtime_root.cpp:
540         (KJS::Bindings::RootObject::destroy): "removeAllNativeReferences" => "destroy"
541         because this function actually destroys the RootObject.
542
543         * bindings/runtime_root.h: Changed Interpreter* to RefPtr<Interpreter>
544         to prevent a RootObject from holding a stale Interperter*.
545         
546         (KJS::Bindings::RootObject::RootObject): Changed constructor to take an 
547         Interpreter*, since it's pointless to create a RootObject without one.
548         Removed setRootObjectImp() and rootObjectImp() because they were just
549         a confusing way of setting and getting the Interpreter's global object.
550
551         (KJS::Bindings::RootObject::nativeHandle): "_nativeHandle" => "m_nativeHandle"
552         (KJS::Bindings::RootObject::interpreter): "_interpreter" => "m_interpreter"
553
554 2006-12-28  George Staikos  <staikos@kde.org>
555
556         Reviewed by Olliej.
557
558         * bindings/qt/qt_instance.cpp: build
559         (KJS::Bindings::QtInstance::QtInstance):
560
561 2006-12-28  Geoffrey Garen  <ggaren@apple.com>
562
563         Reviewed by Oliver Hunt.
564         
565         More cleanup. Layout tests pass.
566         
567         Use a helper function to initialize and access WebUndefined and WebScriptObject.
568
569         * bindings/objc/objc_runtime.h:
570         * bindings/objc/objc_runtime.mm:
571         (KJS::Bindings::webScriptObjectClass):
572         (KJS::Bindings::webUndefinedClass):
573         (convertValueToObjcObject):
574         * bindings/objc/objc_utility.mm:
575         (KJS::Bindings::convertValueToObjcValue):
576         (KJS::Bindings::convertObjcValueToValue):
577
578 2006-12-28  Geoffrey Garen  <ggaren@apple.com>
579
580         Reviewed by Brady Eidson.
581         
582         Some cleanup in preparation for fixing <rdar://problem/4608404> 
583         WebScriptObject's _executionContext lack of ownership policy causes 
584         crashes (e.g., in Dashcode)
585         
586         I'm just trying to make heads or tails of this baffling code.
587         
588         Renamed "root" | "execContext" | "executionContext" => "rootObject", because
589         that's the object's (admittedly vague) type name.
590         
591         * bindings/runtime.cpp: Removed createLanguageInstanceForValue
592         because I'll give you a dollar if you can explain to me what it actually did.
593         
594         * bindings/runtime_root.cpp: Put everything in the KJS::Bindings namespace,
595         removing the KJS::Bindings prefix from individual functions and datatypes.
596         This matches the header and eliminates a lot of syntax cruft.
597         
598         * bindings/c/c_utility.cpp:
599         (KJS::Bindings::convertValueToNPVariant): Replaced use of createLanguageInstanceForValue
600         with call to _NPN_CreateScriptObject because that's what createLanguageInstanceForValue
601         actually did (but don't ask me for that dollar now; that's cheating.)
602
603         * bindings/objc/objc_utility.h:
604         * bindings/objc/objc_utility.mm:
605         (KJS::Bindings::convertValueToObjcValue): Removed. Its only purpose was 
606         to call a single function for WebKit, which WebKit can do on its own.
607
608         * kjs/interpreter.h: Removed rtti() because it was unused, and this class
609         is scheduled for demolition anyway.
610         
611         * kjs/interpreter.cpp: Removed createLanguageInstanceForValue because it had
612         nothing to do with the Interpreter, and nothing makes Chuck Norris more mad
613         than a function whose sole purpose is to call another function of the same
614         name. (Really, I asked him.)
615
616 2006-12-26  Geoffrey Garen  <ggaren@apple.com>
617
618         Reviewed by Eric Seidel.
619
620         Some cleanup in preparation for fixing <rdar://problem/4740328> Safari 
621         crash on quit in _NPN_ReleaseObject from KJS::Bindings::CInstance::~CInstance
622
623         * bindings/c/c_instance.cpp:
624         * bindings/c/c_instance.h: Removed unused copy constructor and assignment
625         operator. They made tracking data flow more difficult. Unused code is also 
626         dangerous because it can succumb to bit rot with the stealth of a Ninja.
627         
628         Replaced #include with forward declaration to reduce header dependency.
629         
630         * bindings/npruntime.cpp: Sorted #includes.
631         (_NPN_GetStringIdentifier): Replaced assert with ASSERT.
632         (_NPN_GetStringIdentifiers): ditto
633         (_NPN_ReleaseVariantValue): ditto
634         (_NPN_CreateObject): ditto
635         (_NPN_RetainObject): ditto
636         (_NPN_ReleaseObject): ditto
637         (_NPN_DeallocateObject): ditto
638
639 2006-12-20  Anders Carlsson  <acarlsson@apple.com>
640
641         * kjs/string_object.cpp:
642         (localeCompare):
643         Another speculative Win32 fix.
644
645 2006-12-20  Anders Carlsson  <acarlsson@apple.com>
646
647         * kjs/string_object.cpp:
648         (localeCompare):
649         Speculative Win32 fix.
650
651 2006-12-20  Anders Carlsson  <acarlsson@apple.com>
652
653         Reviewed by Darin.
654
655         <rdar://problem/4235733>
656         <http://bugs.webkit.org/?show_bug.cgi?id=10193>
657         support String.localeCompare.
658         
659         Implement localeCompare.
660         
661         * JavaScriptCore.xcodeproj/project.pbxproj:
662         * kjs/string_object.cpp:
663         (localeCompare):
664         (StringProtoFunc::callAsFunction):
665         * kjs/string_object.h:
666         (KJS::StringProtoFunc::):
667
668 2006-12-20  Timothy Hatcher  <timothy@apple.com>
669
670         Reviewed by Mark Rowe.
671
672         * JavaScriptCore.xcodeproj/project.pbxproj: use GCC 4.0 for all the other test targets
673
674 2006-12-20  Timothy Hatcher  <timothy@apple.com>
675
676         Reviewed by Mark Rowe.
677
678         <rdar://problem/4871613> JavaScriptCore-421.31's dftables target needs to override default compiler and use gcc-4.0
679
680         * JavaScriptCore.xcodeproj/project.pbxproj:
681
682 2006-12-20  Lars Knoll <lars@trolltech.com>
683
684         Reviewed by David Hyatt
685
686         Added support to bind QObject's to 
687         JavaScript.
688
689         * JavaScriptCore.pro:
690         * bindings/qt/qt_class.cpp: Added.
691         (KJS::Bindings::QtClass::QtClass):
692         (KJS::Bindings::QtClass::~QtClass):
693         (KJS::Bindings::QtClass::classForObject):
694         (KJS::Bindings::QtClass::name):
695         (KJS::Bindings::QtClass::methodsNamed):
696         (KJS::Bindings::QtClass::fieldNamed):
697         * bindings/qt/qt_class.h: Added.
698         (KJS::Bindings::QtClass::constructorAt):
699         (KJS::Bindings::QtClass::numConstructors):
700         * bindings/qt/qt_instance.cpp: Added.
701         (KJS::Bindings::QtInstance::QtInstance):
702         (KJS::Bindings::QtInstance::~QtInstance):
703         (KJS::Bindings::QtInstance::operator=):
704         (KJS::Bindings::QtInstance::getClass):
705         (KJS::Bindings::QtInstance::begin):
706         (KJS::Bindings::QtInstance::end):
707         (KJS::Bindings::QtInstance::implementsCall):
708         (KJS::Bindings::QtInstance::invokeMethod):
709         (KJS::Bindings::QtInstance::invokeDefaultMethod):
710         (KJS::Bindings::QtInstance::defaultValue):
711         (KJS::Bindings::QtInstance::stringValue):
712         (KJS::Bindings::QtInstance::numberValue):
713         (KJS::Bindings::QtInstance::booleanValue):
714         (KJS::Bindings::QtInstance::valueOf):
715         * bindings/qt/qt_instance.h: Added.
716         (KJS::Bindings::QtInstance::getObject):
717         * bindings/qt/qt_runtime.cpp: Added.
718         (KJS::Bindings::convertValueToQVariant):
719         (KJS::Bindings::convertQVariantToValue):
720         (KJS::Bindings::QtField::name):
721         (KJS::Bindings::QtField::valueFromInstance):
722         (KJS::Bindings::QtField::setValueToInstance):
723         * bindings/qt/qt_runtime.h: Added.
724         (KJS::Bindings::QtField::QtField):
725         (KJS::Bindings::QtField::type):
726         (KJS::Bindings::QtMethod::QtMethod):
727         (KJS::Bindings::QtMethod::name):
728         (KJS::Bindings::QtMethod::numParameters):
729         * bindings/runtime.cpp:
730         (KJS::Bindings::Instance::createBindingForLanguageInstance):
731         * bindings/runtime.h:
732         (KJS::Bindings::Instance::):
733         * bindings/testbindings.pro: Added.
734         * bindings/testqtbindings.cpp: Added.
735         (MyObject::MyObject):
736         (MyObject::setTestString):
737         (MyObject::setTestInt):
738         (MyObject::testString):
739         (MyObject::testInt):
740         (MyObject::foo):
741         (Global::className):
742         (main):
743
744 2006-12-19  Anders Carlsson  <acarlsson@apple.com>
745
746         Reviewed by Geoff.
747
748         Add -p option to testkjs which pretty prints the files instead of executing them.
749
750         * JavaScriptCore.exp:
751         * JavaScriptCore.xcodeproj/project.pbxproj:
752         * kjs/Parser.cpp:
753         (KJS::Parser::prettyPrint):
754         * kjs/Parser.h:
755         * kjs/testkjs.cpp:
756         (doIt):
757
758 2006-12-19  Brady Eidson  <beidson@apple.com>
759
760         Rubberstamped by Lou
761         
762         Removed unneccessary "else"
763
764         * wtf/Assertions.cpp:
765
766 2006-12-19  Timothy Hatcher  <timothy@apple.com>
767
768         Reviewed by Darin.
769
770         <rdar://problem/4891774> Local WebCore/WebBrowser builds fail in 9A328 due to warning about ObjC-2.0 language features
771
772         * JavaScriptCore.xcodeproj/project.pbxproj:
773
774 2006-12-17  Simon Hausmann  <hausmann@kde.org>
775
776         Reviewed by Zack.
777
778         * kjs/testkjs.pro: Oops, make it also build on machines other than
779         mine :)
780
781 2006-12-17  Simon Hausmann  <hausmann@kde.org>
782
783         Reviewed by Rob Buis.
784
785         * kjs/testkjs.pro: Added .pro file to build testkjs.
786
787 2006-12-16  Alexey Proskuryakov  <ap@webkit.org>
788
789         Reviewed by Rob.
790
791         A deleted object was accessed to prepare RegExp construction error messages.
792
793         * kjs/regexp_object.cpp:
794         (RegExpObjectImp::construct): Wrap the RegExp into an OwnPtr.
795
796 2006-12-16  Mitz Pettel  <mitz@webkit.org>
797
798         Reviewed by Alexey.
799
800         - fix http://bugs.webkit.org/show_bug.cgi?id=11814
801           REGRESSION(r18098): Find does not work with capital letters
802
803         Test: editing/execCommand/findString-3.html
804
805         * wtf/unicode/icu/UnicodeIcu.h:
806         (WTF::Unicode::foldCase): Changed to not return an error if the result fits
807         in the buffer without a null terminator.
808
809 2006-12-13  Maciej Stachowiak  <mjs@apple.com>
810
811         Reviewed by Anders.
812         
813         - added equality and inequality operations for HashMap and Vector, useful for comparing more complex types
814
815         * wtf/HashMap.h:
816         (WTF::operator==):
817         (WTF::operator!=):
818         * wtf/Vector.h:
819         (WTF::operator==):
820         (WTF::operator!=):
821
822 2006-12-12  Alexey Proskuryakov  <ap@webkit.org>
823
824         Reviewed by Geoff. Based on a patch by Maks Orlovich.
825
826         http://bugs.webkit.org/show_bug.cgi?id=6257
827         Throw errors on invalid expressions (KJS merge)
828
829         * kjs/regexp.cpp:
830         (KJS::RegExp::RegExp):
831         (KJS::RegExp::~RegExp):
832         (KJS::RegExp::match):
833         * kjs/regexp.h:
834         (KJS::RegExp::flags):
835         (KJS::RegExp::isValid):
836         (KJS::RegExp::errorMessage):
837         (KJS::RegExp::subPatterns):
838         Remember and report RegExp construction failures. Renamed data members not to start with underscores.
839
840         * kjs/regexp_object.cpp:
841         (RegExpObjectImp::construct): Raise an exception if RegExp construction fails.
842         (RegExpObjectImp::callAsFunction): Removed an obsolete comment.
843
844         * tests/mozilla/ecma_3/RegExp/regress-119909.js: Reduced the number of nested parentheses to 
845         a value supported by PCRE.
846
847 2006-12-11  Alexey Proskuryakov  <ap@webkit.org>
848
849         Reviewed by Darin.
850
851         http://bugs.webkit.org/show_bug.cgi?id=9673
852         Add support for window.atob() and window.btoa()
853
854         * JavaScriptCore.exp: Export UString::is8Bit().
855         * JavaScriptCore.xcodeproj/project.pbxproj: Added StringExtras.h as 
856         a private header.
857
858 2006-12-11  Darin Adler  <darin@apple.com>
859
860         Reviewed by Brady.
861
862         * JavaScriptCore.xcodeproj/project.pbxproj: Let Xcode update this
863         (I think Hyatt is using an old Xcode).
864
865 2006-12-11  David Hyatt  <hyatt@apple.com>
866
867         Fix the failing layout test.  Just remove Unicode::isSpace and
868         revert StringImpl to do the same thing it was doing before.
869
870         Reviewed by darin
871
872         * wtf/unicode/icu/UnicodeIcu.h:
873         * wtf/unicode/qt4/UnicodeQt4.h:
874
875 2006-12-09  George Staikos  <staikos@kde.org>
876
877         Reviewed by Zack.
878
879         Fix bison again on qmake build.
880
881         * JavaScriptCore.pro:
882
883 2006-12-09  Lars Knoll <lars@trolltech.com>
884
885         Reviewed by Zack
886
887         Make it possible to build WebKit with qmake.
888
889         * JavaScriptCore.pro: Added.
890         * kjs/kjs.pro: Removed.
891         * pcre/pcre.pri: Added.
892
893 2006-12-09  Zack Rusin  <zack@kde.org>
894
895         Fixing the compilation with platform kde after the icu changes.
896
897         * CMakeLists.txt:
898
899 2006-12-09  Adam Roben  <aroben@apple.com>
900
901         Reviewed by Darin.
902
903         Some updates in reaction to r18098.
904
905         * wtf/unicode/icu/UnicodeIcu.h: Use !! to convert UBool to bool in all
906         cases.
907         (WTF::Unicode::toLower):
908         (WTF::Unicode::toUpper):
909         (WTF::Unicode::isDigit):
910         (WTF::Unicode::isSpace):
911         (WTF::Unicode::isPunct):
912         (WTF::Unicode::isLower):
913         (WTF::Unicode::isUpper):
914         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
915         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
916
917 2006-12-09  George Staikos  <staikos@kde.org>
918
919         Patch by Lars Knoll, comment out ICU dependency on Qt platform (unused code).
920
921         Reviewed by Darin.
922
923         * bindings/c/c_utility.cpp:
924         (KJS::Bindings::convertUTF8ToUTF16):
925
926 2006-12-08  David Hyatt  <hyatt@apple.com>
927
928         Land the new ICU abstraction layer.  Patch by Lars.
929
930         Reviewed by me
931
932         * JavaScriptCore.xcodeproj/project.pbxproj:
933         * wtf/Platform.h:
934         * wtf/unicode/UnicodeCategory.h: Removed.
935         * wtf/unicode/UnicodeDecomposition.h: Removed.
936         * wtf/unicode/UnicodeDirection.h: Removed.
937         * wtf/unicode/icu/UnicodeIcu.h:
938         (WTF::Unicode::):
939         (WTF::Unicode::foldCase):
940         (WTF::Unicode::toLower):
941         (WTF::Unicode::toUpper):
942         (WTF::Unicode::toTitleCase):
943         (WTF::Unicode::isDigit):
944         (WTF::Unicode::isSpace):
945         (WTF::Unicode::isPunct):
946         (WTF::Unicode::mirroredChar):
947         (WTF::Unicode::category):
948         (WTF::Unicode::direction):
949         (WTF::Unicode::isLower):
950         (WTF::Unicode::isUpper):
951         (WTF::Unicode::digitValue):
952         (WTF::Unicode::combiningClass):
953         (WTF::Unicode::decompositionType):
954         (WTF::Unicode::strcasecmp):
955         (WTF::Unicode::memset):
956         * wtf/unicode/qt4/UnicodeQt4.cpp: Removed.
957         * wtf/unicode/qt4/UnicodeQt4.h:
958         (WTF::Unicode::):
959         (WTF::Unicode::toLower):
960         (WTF::Unicode::toUpper):
961         (WTF::Unicode::toTitleCase):
962         (WTF::Unicode::foldCase):
963         (WTF::Unicode::isPrintableChar):
964         (WTF::Unicode::isLower):
965         (WTF::Unicode::isUpper):
966         (WTF::Unicode::digitValue):
967         (WTF::Unicode::combiningClass):
968         (WTF::Unicode::decompositionType):
969         (WTF::Unicode::strcasecmp):
970         (WTF::Unicode::memset):
971         (WTF::Unicode::direction):
972         (WTF::Unicode::category):
973
974 === Safari-521.32 ===
975
976 2006-12-08  Adam Roben  <aroben@apple.com>
977
978         Reviewed by Anders.
979
980         This is a mo' better fix for ensuring we don't use macro definitions
981         of min/max.
982
983         * kjs/config.h:
984         * wtf/Vector.h:
985
986 2006-12-07  Kevin Fyure  <digdog@macports.org>
987
988         Reviewed by Darin.
989
990         http://bugs.webkit.org/show_bug.cgi?id=11545
991         Disable the testcases do not follow the ECMA-262v3 specification.
992         
993         * tests/mozilla/expected.html: Update Results.
994         * tests/mozilla/js1_2/String/concat.js:
995         4 tests disabled. The result of concat Array object is not followinig
996         ECMA 15.5.4.6
997         * tests/mozilla/js1_2/function/Number.js:
998         1 test disabled. The result of Array object to Number object conversion 
999         is not following ECMA 9.3. And the test was duplicated in 
1000         ecma/TypeConversion/9.3-1.js
1001         * tests/mozilla/js1_2/function/String.js:
1002         2 tests disabled. The result of Object/Array object to String object 
1003         conversion is not following ECMA 15.5.1.1 and ECMA 9.8
1004
1005 2006-11-30  Steve Falkenburg  <sfalken@apple.com>
1006
1007         Reviewed by Oliver.
1008         
1009         Move WTF from JavaScriptCore project into a new WTF project.
1010
1011         * JavaScriptCore.vcproj/JavaScriptCore.sln: Add WTF.vcproj to sln
1012         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Remove WTF source files
1013         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added.
1014         * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Add dependency on WTF.lib
1015
1016 2006-11-30  Geoffrey Garen  <ggaren@apple.com>
1017
1018         Reviewed by Beth Dakin.
1019         
1020         Fixed up garbage collection at window close time.
1021
1022         * kjs/interpreter.cpp:
1023         (KJS::Interpreter::~Interpreter): Garbage collect here, since
1024         destroying the interpreter frees the global object and 
1025         therefore creates a lot of garbage.
1026
1027 2006-11-20  W. Andy Carrel  <wac@google.com>
1028
1029         Reviewed by Maciej.
1030
1031         http://bugs.webkit.org/show_bug.cgi?id=11501
1032         REGRESSION: \u no longer escapes metacharacters in RegExps
1033         http://bugs.webkit.org/show_bug.cgi?id=11502
1034         Serializing RegExps doesn't preserve Unicode escapes
1035
1036         * kjs/lexer.cpp:
1037         (Lexer::Lexer):
1038         (Lexer::setCode):
1039         (Lexer::shift):
1040         (Lexer::scanRegExp):
1041         Push \u parsing back down into the RegExp object rather than in the
1042         parser. This backs out r17354 in favor of a new fix that better 
1043         matches the behavior of other browsers.
1044
1045         * kjs/lexer.h:
1046         * kjs/regexp.cpp:
1047         (KJS::RegExp::RegExp):
1048         (KJS::sanitizePattern):
1049         (KJS::isHexDigit):
1050         (KJS::convertHex):
1051         (KJS::convertUnicode):
1052         * kjs/regexp.h:
1053         Translate \u escaped unicode characters for the benefit of pcre.
1054
1055         * kjs/ustring.cpp:
1056         (KJS::UString::append):
1057         Fix failure to increment length on the first UChar appended to a 
1058         UString that was copy-on-write.
1059
1060         * tests/mozilla/ecma_2/RegExp/properties-001.js:
1061         Adjust tests back to the uniform standards.
1062
1063 2006-11-20  Samuel Weinig  <sam@webkit.org>
1064
1065         Reviewed by Maciej.
1066
1067         Fix for http://bugs.webkit.org/show_bug.cgi?id=11647
1068         Fix Win32 build
1069
1070         * kjs/config.h: define NOMINMAX instead of min/max
1071         as themselves.
1072         * wtf/Vector.h: put back hack to ensure that min/max
1073         are not defined as macros.
1074
1075 2006-11-19  Simon Hausmann  <hausmann@kde.org>
1076
1077         Reviewed by Zack.
1078
1079         http://bugs.webkit.org/show_bug.cgi?id=11649
1080         Fix CMake Qt-only build without KDE CMake files
1081
1082         * CMakeLists.txt:
1083         * pcre/CMakeLists.txt:
1084
1085 2006-11-17  Anders Carlsson  <acarlsson@apple.com>
1086
1087         Reviewed by Adam.
1088
1089         Make sure that we always use std::min and std::max instead of macros.
1090         
1091         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1092         * kjs/config.h:
1093         * wtf/Vector.h:
1094
1095 === Safari-521.31 ===
1096
1097 2006-11-12  Geoffrey Garen  <ggaren@apple.com>
1098
1099         Reviewed by Beth Dakin.
1100         
1101         Added project-wide setting to disable Microsoft's made-up deprecation 
1102         warnings related to std:: functions. (Doesn't have any affect yet,
1103         since we currently disable all deprecation warnings.)
1104
1105         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1106
1107 2006-11-12  Mark Rowe  <bdash@webkit.org>
1108
1109         Reviewed by Mitz.
1110
1111         Clean up of JavaScriptCore bakefiles.
1112
1113         * JavaScriptCoreSources.bkl:
1114         * jscore.bkl:
1115
1116 2006-11-11  Alexey Proskuryakov  <ap@webkit.org>
1117
1118         Reviewed by Maciej.
1119
1120         http://bugs.webkit.org/show_bug.cgi?id=11508
1121         Undisable some warnings for JSImmediate.h
1122
1123         Fix suggested by Don Gibson.
1124
1125         * kjs/JSImmediate.h:
1126         Re-enable all MSVC warnings, move the remaining runtime checks
1127         to compile-time.
1128
1129 2006-11-10  Zalan Bujtas  <zalan.bujtas@nokia.com>
1130
1131         Reviewed by Maciej.
1132
1133         Added s60/symbian platform defines.
1134         http://bugs.webkit.org/show_bug.cgi?id=11540
1135
1136         * wtf/Platform.h:
1137
1138 === Safari-521.30 ===
1139
1140 2006-11-08  Ada Chan  <adachan@apple.com>
1141
1142         Reviewed by darin.
1143         
1144         Added a method to delete all the keys in a HashMap.
1145
1146         * wtf/HashMap.h:
1147         (WTF::deleteAllPairFirsts):
1148         (WTF::deleteAllKeys):
1149
1150 2006-11-07  Anders Carlsson  <acarlsson@apple.com>
1151
1152         Reviewed by Geoff.
1153
1154         * API/JSClassRef.cpp:
1155         (OpaqueJSClass::OpaqueJSClass):
1156         Initialize cachedPrototype to 0.
1157
1158 2006-11-06  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1159
1160         Reviewed by Maciej.
1161
1162         Remove warning about garbage after #else. #else clause applies for all
1163         non-mac platforms, not only win.
1164
1165         * kjs/date_object.cpp:
1166
1167 2006-11-06  Mark Rowe  <bdash@webkit.org>
1168
1169         Reviewed by the wonderful Mitz Pettel.
1170
1171         http://bugs.webkit.org/show_bug.cgi?id=11524
1172         Bug 11524: REGRESSION(r9842): Array.prototype.join should use ToString operator rather than calling toString on each element
1173
1174         * kjs/array_object.cpp:
1175         (ArrayProtoFunc::callAsFunction): Use ToString operator on each element rather than calling their toString method.
1176
1177 2006-11-03  Steve Falkenburg  <sfalken@apple.com>
1178
1179         Fix build
1180
1181         * kjs/JSImmediate.h:
1182
1183 2006-11-03  Alexey Proskuryakov  <ap@nypop.com>
1184
1185         Reviewed by Darin.
1186
1187         http://bugs.webkit.org/show_bug.cgi?id=11504
1188         Fix warnings on non 32 bit platforms
1189
1190         * kjs/JSImmediate.h:
1191         (KJS::JSImmediate::NanAsBits):
1192         (KJS::JSImmediate::oneAsBits):
1193         Rewrite in a way that moves runtime checks to compile-time.
1194
1195         (KJS::):
1196         (KJS::JSImmediate::fromDouble):
1197         (KJS::JSImmediate::toDouble):
1198
1199 2006-11-02  George Staikos <staikos@kde.org>
1200
1201         Reviewed by Maciej.
1202
1203         * collector.cpp:
1204         Remove a deprecated pthreads call.
1205
1206 2006-11-02  Anders Carlsson  <acarlsson@apple.com>
1207
1208         Reviewed by Maciej, landed by Anders.
1209
1210         * CMakeLists.txt:
1211         Make KDE support optional.
1212
1213 2006-11-01  Kevin McCullough  <KMcCullough@apple.com>
1214
1215         Reviewed by Brady.
1216
1217         - Fixes many JavaScriptCore tests in other timezones.  The root problem is that on mac localtime() returns historically accurate information for DST, but the JavaScript spec explicitly states to not take into account historical information but rather to interpolate from valid years.
1218
1219         * kjs/DateMath.cpp:
1220         (KJS::equivalentYearForDST):
1221         (KJS::getDSTOffsetSimple):
1222         (KJS::getDSTOffset):
1223
1224 2006-10-31  Geoffrey Garen  <ggaren@apple.com>
1225
1226         Reviewed by Beth.
1227         
1228         Fixed http://bugs.webkit.org/show_bug.cgi?id=11477
1229         REGRESSION: GMail crashes in KJS::FunctionImp::callerGetter
1230
1231         * kjs/function.cpp:
1232         (KJS::FunctionImp::argumentsGetter): Removed unnecessary braces.
1233         (KJS::FunctionImp::callerGetter): More logical NULL checking.
1234
1235 2006-10-31  Oliver Hunt  <oliver@apple.com>
1236
1237         Reviewed by Geoff.
1238
1239         Adding definition for PLATFORM(CI)
1240
1241         * wtf/Platform.h:
1242
1243 2006-10-31  Vladimir Olexa  <vladimir.olexa@gmail.com>
1244
1245         Reviewed by Geoff.
1246
1247         http://bugs.webkit.org/show_bug.cgi?id=4166
1248         Function object does not support caller property
1249
1250         Test: fast/js/caller-property.html
1251
1252         * kjs/function.cpp: 
1253         (KJS::FunctionImp::callerGetter): added
1254         (KJS::FunctionImp::getOwnPropertySlot): added if statement to handle callerGetter()
1255         * kjs/function.h: added callerGetter() declaration
1256         * kjs/identifier.h: added caller property macro
1257         * tests/mozilla/expected.html: 
1258
1259 2006-10-30  Kevin McCullough  <KMcCullough@apple.com>
1260
1261         Reviewed by Adam.
1262
1263         - Fix some timezone issues and JavaScriptCore date tests.  Addresses bugzilla 4930.
1264
1265         * kjs/DateMath.h:
1266         (KJS::GregorianDateTime::GregorianDateTime): Here's the fix, to add parenthesis for order of precedence.
1267         * kjs/date_object.cpp:
1268         (KJS::DateProtoFunc::callAsFunction): 
1269         (KJS::DateObjectImp::construct): memset not needed as GregorianDateTime initializes itself.
1270
1271 2006-10-30  Darin Adler  <darin@apple.com>
1272
1273         Reviewed by John Sullivan.
1274
1275         * kjs/SavedBuiltins.h: Added needed include.
1276         * wtf/OwnPtr.h: (WTF::OwnPtr::set): Fixed mistake in assertion.
1277
1278 2006-10-28  Darin Adler  <darin@apple.com>
1279
1280         Reviewed by Maciej.
1281
1282         - renamed PassRefPtr::release to releaseRef to make it clearer that
1283           it's the counterpart of adoptRef, and to make it harder to confuse
1284           it with the safer-to-use RefPtr::release
1285
1286         * kjs/identifier.cpp:
1287         (KJS::CStringTranslator::translate):
1288         (KJS::UCharBufferTranslator::translate):
1289         * kjs/ustring.cpp:
1290         (KJS::UString::Rep::create):
1291         * wtf/PassRefPtr.h:
1292         (WTF::PassRefPtr::PassRefPtr):
1293         (WTF::PassRefPtr::~PassRefPtr):
1294         (WTF::PassRefPtr::get):
1295         (WTF::PassRefPtr::releaseRef):
1296         (WTF::PassRefPtr::operator->):
1297         (WTF::PassRefPtr::operator=):
1298         (WTF::adoptRef):
1299         (WTF::static_pointer_cast):
1300         (WTF::const_pointer_cast):
1301         * wtf/RefPtr.h:
1302         (WTF::RefPtr::RefPtr):
1303         (WTF::RefPtr::operator=):
1304
1305 2006-10-28  Darin Adler  <darin@apple.com>
1306
1307         Reviewed by Steve.
1308
1309         * kjs/grammar.y: Add definitions of YYMALLOC and YYFREE to fix
1310         a warning some people see (not sure why others don't see it).
1311
1312         * JavaScriptCore.vcproj/JavaScriptCore/grammarWrapper.cpp: Touch
1313         this file to force it to re-build grammar.cpp.
1314
1315 2006-10-28  Darin Adler  <darin@apple.com>
1316
1317         Reviewed by Geoff.
1318
1319         - made changes so the code compiles with the highest warning level
1320           under MSVC (disabling some warnings, making some code fixes)
1321
1322         * API/JSCallbackConstructor.cpp:
1323         (KJS::JSCallbackConstructor::construct):
1324         * API/JSCallbackFunction.cpp:
1325         (KJS::JSCallbackFunction::callAsFunction):
1326         * API/JSCallbackObject.cpp:
1327         (KJS::JSCallbackObject::init):
1328         (KJS::JSCallbackObject::construct):
1329         (KJS::JSCallbackObject::callAsFunction):
1330         * API/JSObjectRef.cpp:
1331         (JSPropertyNameArrayGetNameAtIndex):
1332         * API/JSStringRef.cpp:
1333         (JSStringCreateWithCharacters):
1334         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1335         * bindings/c/c_utility.cpp:
1336         (KJS::Bindings::convertUTF8ToUTF16):
1337         (KJS::Bindings::coerceValueToNPVariantStringType):
1338         (KJS::Bindings::convertValueToNPVariant):
1339         * kjs/DateMath.h:
1340         (KJS::GregorianDateTime::GregorianDateTime):
1341         * kjs/ExecState.h:
1342         (KJS::ExecState::hadException):
1343         * kjs/JSImmediate.h:
1344         (KJS::JSImmediate::fromDouble):
1345         (KJS::JSImmediate::toDouble):
1346         (KJS::JSImmediate::NanAsBits):
1347         (KJS::JSImmediate::oneAsBits):
1348         * kjs/Parser.h:
1349         * kjs/PropertyNameArray.h:
1350         (KJS::PropertyNameArray::size):
1351         * kjs/array_object.cpp:
1352         (ArrayObjectImp::callAsFunction):
1353         * kjs/bool_object.cpp:
1354         (BooleanObjectImp::callAsFunction):
1355         * kjs/collector.cpp:
1356         (KJS::Collector::allocate):
1357         (KJS::Collector::markCurrentThreadConservatively):
1358         (KJS::Collector::collect):
1359         * kjs/completion.h:
1360         (KJS::Completion::isValueCompletion):
1361         * kjs/date_object.cpp:
1362         (KJS::findMonth):
1363         * kjs/debugger.cpp:
1364         (Debugger::sourceParsed):
1365         (Debugger::sourceUnused):
1366         (Debugger::exception):
1367         (Debugger::atStatement):
1368         (Debugger::callEvent):
1369         (Debugger::returnEvent):
1370         * kjs/dtoa.cpp:
1371         * kjs/error_object.cpp:
1372         (ErrorObjectImp::callAsFunction):
1373         (NativeErrorImp::callAsFunction):
1374         * kjs/function.cpp:
1375         (KJS::FunctionImp::processVarDecls):
1376         (KJS::GlobalFuncImp::callAsFunction):
1377         * kjs/function_object.cpp:
1378         (FunctionPrototype::callAsFunction):
1379         * kjs/grammar.y:
1380         * kjs/identifier.cpp:
1381         (KJS::CStringTranslator::translate):
1382         (KJS::Identifier::add):
1383         * kjs/internal.h:
1384         * kjs/lexer.cpp:
1385         (Lexer::lex):
1386         (Lexer::isIdentStart):
1387         (Lexer::isIdentPart):
1388         (isDecimalDigit):
1389         (Lexer::isHexDigit):
1390         (Lexer::isOctalDigit):
1391         (Lexer::matchPunctuator):
1392         (Lexer::singleEscape):
1393         (Lexer::convertOctal):
1394         (Lexer::convertHex):
1395         (Lexer::convertUnicode):
1396         (Lexer::record8):
1397         * kjs/lexer.h:
1398         * kjs/math_object.cpp:
1399         (MathFuncImp::callAsFunction):
1400         * kjs/number_object.cpp:
1401         (integer_part_noexp):
1402         (intPow10):
1403         (NumberProtoFunc::callAsFunction):
1404         (NumberObjectImp::callAsFunction):
1405         * kjs/object.cpp:
1406         (KJS::JSObject::deleteProperty):
1407         (KJS::JSObject::callAsFunction):
1408         (KJS::JSObject::toBoolean):
1409         (KJS::JSObject::toObject):
1410         * kjs/object.h:
1411         (KJS::JSObject::getPropertySlot):
1412         * kjs/property_map.cpp:
1413         (KJS::isValid):
1414         (KJS::PropertyMap::put):
1415         (KJS::PropertyMap::insert):
1416         (KJS::PropertyMap::containsGettersOrSetters):
1417         * kjs/property_map.h:
1418         (KJS::PropertyMap::hasGetterSetterProperties):
1419         * kjs/property_slot.h:
1420         * kjs/string_object.cpp:
1421         (StringInstance::getPropertyNames):
1422         (StringObjectImp::callAsFunction):
1423         (StringObjectFuncImp::callAsFunction):
1424         * kjs/ustring.cpp:
1425         (KJS::UString::Rep::computeHash):
1426         (KJS::UString::UString):
1427         (KJS::UString::from):
1428         (KJS::UString::append):
1429         (KJS::UString::ascii):
1430         (KJS::UString::operator=):
1431         (KJS::UString::find):
1432         (KJS::UString::rfind):
1433         * kjs/ustring.h:
1434         (KJS::UChar::high):
1435         (KJS::UChar::low):
1436         (KJS::UCharReference::low):
1437         (KJS::UCharReference::high):
1438         * kjs/value.cpp:
1439         (KJS::JSValue::toUInt16):
1440         * kjs/value.h:
1441         * pcre/pcre_compile.c:
1442         (get_othercase_range):
1443         * pcre/pcre_exec.c:
1444         (match):
1445         * pcre/pcre_internal.h:
1446         * wtf/HashFunctions.h:
1447         (WTF::intHash):
1448         (WTF::PtrHash::hash):
1449         * wtf/MathExtras.h:
1450         (isnan):
1451         (lround):
1452         (lroundf):
1453         * wtf/StringExtras.h:
1454         (strncasecmp):
1455         * wtf/unicode/icu/UnicodeIcu.h:
1456         (WTF::Unicode::isPrintableChar):
1457
1458 2006-10-26  W. Andy Carrel  <wac@google.com>
1459
1460         Reviewed by Maciej.
1461
1462         - Fix http://bugs.webkit.org/show_bug.cgi?id=7445 /
1463           <rdar://problem/4614195> (and 7253 / <rdar://4694011>) by changing
1464           inline regexps so that they can have \u escaped Unicode sequences and
1465           still work properly.
1466
1467         * kjs/lexer.cpp:
1468         (Lexer::Lexer): 
1469         (Lexer::setCode):
1470         (Lexer::shift): Looking ahead one additional character for the benefit
1471         of scanRegExp
1472         (Lexer::scanRegExp): Change code to support unicode escapes in inline 
1473         regexps.
1474         * kjs/lexer.h: Extra lookahead added.
1475
1476 === Safari-521.29 ===
1477
1478 2006-10-26  Nikolas Zimmermann  <zimmermann@kde.org>
1479
1480         Reviewed by Darin.
1481
1482         Fix build with older gcc 3.3.4.
1483
1484         * kjs/DateMath.cpp: Remove inline prefix.
1485         (KJS::equivalentYearForDST):
1486
1487 2006-10-26  Darin Adler  <darin@apple.com>
1488
1489         Reviewed by John.
1490
1491         - fix iteration of properties of string objects (found because of a warning
1492           emitted by the MSVC compiler)
1493
1494         * kjs/string_object.cpp: (StringInstance::getPropertyNames): Change code that
1495         wants to format a number as a string to use UString::from. Before it was using
1496         the UString constructor that makes a string from a character!
1497
1498         * kjs/ustring.h:
1499         * kjs/ustring.cpp: Remove the dangerous and not all that helpful UString(char)
1500         constructor.
1501
1502         * kjs/grammar.y: Change code to not depend on the UString(char) constructor.
1503         This is potentially more efficient anyway because we could overload the + operator
1504         some day to handle char* directly instead of creating a UString.
1505
1506         * kjs/nodes2string.cpp: (SourceStream::operator<<): Change code to not depend on
1507         the UString(char) constructor.
1508
1509 2006-10-25  Kevin McCullough  <KMcCullough@apple.com>
1510
1511         Reviewed by Steve (rubber stamp).
1512
1513         - Link against your local build of JavaScriptCore.lib first, this fixes some errors on release builds of testkjs.
1514
1515         * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:
1516
1517 2006-10-25  Geoffrey Garen  <ggaren@apple.com>
1518
1519         Reviewed by Lou.
1520         
1521         Removed duplicate symbol declaration.
1522
1523         * JavaScriptCore.xcodeproj/project.pbxproj:
1524         * kjs/grammar.y:
1525
1526 2006-10-24  Steve Falkenburg  <sfalken@apple.com>
1527
1528         Build config change
1529
1530         * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:
1531
1532 2006-10-24  Kevin McCullough  <KMcCullough@apple.com>
1533
1534         Reviewed by Brady.
1535
1536         - Fixes a date formatting issue on win.  Specifically strftime cannot handle some ranges of time so we shift time call strftime and then manipulate the returned string, if needed.
1537
1538         * kjs/date_object.cpp:
1539         (KJS::):
1540         (KJS::formatLocaleDate):
1541         (KJS::DateProtoFunc::callAsFunction):
1542
1543 2006-10-23  Kevin McCullough  <KMcCullough@apple.com>
1544
1545         Reviewed by 
1546
1547        - Build fix
1548
1549         * JavaScriptCore.xcodeproj/project.pbxproj:
1550         * kjs/grammar.y:
1551
1552 2006-10-23  Kevin McCullough  <KMcCullough@apple.com>
1553
1554         Reviewed by Maciej.
1555
1556         - Makes the toTM function an operator.  Was going to piggy back on a patch but the patch needs more work.
1557
1558         * kjs/DateMath.cpp:
1559         (KJS::equivalentYearForDST):
1560         * kjs/DateMath.h:
1561         (KJS::GregorianDateTime::operator tm):
1562         * kjs/date_object.cpp:
1563         (KJS::formatTime):
1564         (KJS::DateProtoFunc::callAsFunction):
1565
1566 2006-10-23  Kevin McCullough  <KMcCullough@apple.com>
1567
1568         Reviewed by Maciej.
1569
1570        - Fixes two regressions on win.  Both are stack overflows. For one the number of recursions is capped at 100, and for the other, nested parenthesis pairs are not evaluated (since they would evaluate to whatever is in them anyway).
1571
1572         * kjs/grammar.y:
1573         * kjs/object.cpp:
1574
1575 2006-10-21  Steve Falkenburg  <sfalken@apple.com>
1576
1577         Reviewed by Adam.
1578         
1579         Add minimal compatibility with MSVCRT leak checker
1580
1581         * wtf/FastMalloc.h:
1582
1583 2006-10-23  Kevin McCullough  <KMcCullough@apple.com>
1584
1585         Reviewed by Geof.
1586
1587         - Sets the lowercase range correctly in the test and consolidates a variable to make the test more readable.
1588
1589        * tests/mozilla/ecma/String/15.5.4.11-2.js:
1590
1591 2006-10-21  Darin Adler  <darin@apple.com>
1592
1593         Reviewed by Anders.
1594
1595         - http://bugs.webkit.org/show_bug.cgi?id=11377
1596           swap(Vector, Vector) should be O(1) instead of O(n)
1597
1598         * wtf/Vector.h:
1599         (WTF::VectorBuffer::swap): Added.
1600         (WTF::Vector::swap): Added.
1601         (WTF::swap): Added overload that takes two Vector objects.
1602
1603 2006-10-21  Darin Adler  <darin@apple.com>
1604
1605         Reviewed by Adam.
1606
1607         - http://bugs.webkit.org/show_bug.cgi?id=11376
1608           build scripts should invoke make with "-j" option for multiple processors
1609
1610         * JavaScriptCore.xcodeproj/project.pbxproj: Pass -j `sysctl -n hw.ncpu` to make.
1611
1612 2006-10-19  Kevin McCullough  <KMcCullough@apple.com>
1613
1614         Reviewed by Geof.
1615
1616         Changed test to make us pass Georgian case changing for Unicode 4.0 and 5.0.  This incorporates changes from the 1.4 revision of the same mozilla test.
1617         On Tiger we are still using Unicode 4.0 but on win and Leopard we are using Unicode 5.0, so this test currently allows for either answer.
1618
1619         * tests/mozilla/ecma/String/15.5.4.11-2.js:
1620
1621 2006-10-18  Maciej Stachowiak  <mjs@apple.com>
1622
1623         Reviewed by Geoff.
1624         
1625         - remove vestiges of KXMLCore name (former name of WTF).
1626
1627         * wtf/Assertions.h:
1628         * wtf/FastMalloc.h:
1629         (operator new):
1630         (operator delete):
1631         (operator new[]):
1632         (operator delete[]):
1633         * wtf/FastMallocInternal.h:
1634         * wtf/Forward.h:
1635         * wtf/GetPtr.h:
1636         * wtf/HashCountedSet.h:
1637         * wtf/HashFunctions.h:
1638         * wtf/HashMap.h:
1639         * wtf/HashSet.h:
1640         * wtf/HashTable.h:
1641         * wtf/HashTraits.h:
1642         * wtf/ListRefPtr.h:
1643         * wtf/MathExtras.h:
1644         * wtf/Noncopyable.h:
1645         * wtf/OwnArrayPtr.h:
1646         * wtf/OwnPtr.h:
1647         * wtf/PassRefPtr.h:
1648         * wtf/Platform.h:
1649         * wtf/RefPtr.h:
1650         * wtf/StringExtras.h:
1651         (snprintf):
1652         * wtf/UnusedParam.h:
1653         * wtf/Vector.h:
1654         * wtf/VectorTraits.h:
1655
1656 2006-10-17  Steve Falkenburg  <sfalken@apple.com>
1657
1658         Reviewed by Maciej.
1659         
1660         Adjust include paths
1661
1662         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1663
1664 2006-10-17  Kevin McCullough  <KMcCullough@apple.com>
1665
1666         Reviewed by Darin.
1667
1668         Fixed a date issue where the UTC offset was not set in win.
1669
1670         * kjs/DateMath.cpp:
1671         (KJS::getDSTOffsetSimple):
1672         (KJS::getDSTOffset):
1673         (KJS::msToGregorianDateTime):
1674         * kjs/DateMath.h:
1675         (KJS::):
1676         (KJS::GregorianDateTime::GregorianDateTime):
1677
1678 2006-10-17  Kevin McCullough  <KMcCullough@apple.com>
1679
1680         Reviewed by Brady.
1681
1682         Fixes a JavaScriptCore math issue on win.
1683
1684         * kjs/math_object.cpp:
1685         (MathFuncImp::callAsFunction):
1686         * wtf/MathExtras.h:
1687         (wtf_atan2):
1688
1689 2006-10-16  Kevin McCullough  <kmccullough@apple.com>
1690
1691         Reviewed by Geof.
1692
1693         Removed unecessary global specifiers.
1694
1695         * kjs/math_object.cpp:
1696         (MathFuncImp::callAsFunction):
1697
1698 2006-10-16  Kevin McCullough  <KMcCullough@apple.com>
1699
1700         Reviewed by John.
1701
1702         Fixes a compile order issue for testkjs on win.
1703
1704         * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:
1705
1706 2006-10-15  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1707
1708         Reviewed by Anders.
1709
1710         Remove junk (as gcc calls it) after #else clause.
1711
1712         * wtf/FastMalloc.cpp:
1713         (WTF::do_free):
1714
1715 2006-10-14  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1716
1717         Reviewed by Maciej.
1718
1719         Define KXMLCORE_USE_CURL for platforms that wish to use CURL as
1720         networking, and set it for GDK build
1721
1722         * wtf/Platform.h:
1723
1724 2006-10-13  Marvin Decker  <marv.decker@gmail.com>
1725
1726         Reviewed by Kevin McCullough.
1727
1728         Fixes http://bugs.webkit.org/show_bug.cgi?id=11283
1729         Fixes Qt/Linux and Windows build
1730
1731         * kjs/DateMath.cpp:
1732         * kjs/DateMath.h:
1733         * kjs/date_object.cpp:
1734         (KJS::DateProtoFunc::callAsFunction):
1735
1736 2006-10-13  Kevin McCullough  <KMcCullough@apple.com>
1737
1738         Reviewed by Adam, Geoff, Darin.
1739
1740        Fixed displaying the UTC offset and time zone string, as well as renamed the GregorianDateTime structure and clean up. 
1741
1742         * ChangeLog:
1743         * kjs/DateMath.cpp:
1744         (KJS::getUTCOffset):
1745         (KJS::getDSTOffsetSimple):
1746         (KJS::gregorianDateTimeToMS):
1747         (KJS::msToGregorianDateTime):
1748         * kjs/DateMath.h:
1749         (KJS::GregorianDateTime::GregorianDateTime):
1750         (KJS::GregorianDateTime::~GregorianDateTime):
1751         (KJS::GregorianDateTime::toTM):
1752         * kjs/date_object.cpp:
1753         (KJS::gmtoffset):
1754         (KJS::formatDate):
1755         (KJS::formatDateUTCVariant):
1756         (KJS::formatTime):
1757         (KJS::fillStructuresUsingTimeArgs):
1758         (KJS::fillStructuresUsingDateArgs):
1759         (KJS::DateInstance::getTime):
1760         (KJS::DateInstance::getUTCTime):
1761         (KJS::DateProtoFunc::callAsFunction):
1762         (KJS::DateObjectImp::construct):
1763         (KJS::DateObjectImp::callAsFunction):
1764         (KJS::DateObjectFuncImp::callAsFunction):
1765         (KJS::parseDate):
1766         * kjs/date_object.h:
1767
1768 2006-10-13  Kevin McCullough  <KMcCullough@apple.com>
1769
1770         Reviewed by Adam.
1771
1772         Gets JavaScripCore tests running on windows.
1773
1774         * Scripts/run-javascriptcore-tests:
1775         * Scripts/webkitdirs.pm:
1776
1777 2006-10-12  Geoffrey Garen  <ggaren@apple.com>
1778
1779         Reviewed by Maciej.
1780         
1781         Removed JSObjectMakeWithPrototype, clarified some comments. We really
1782         don't want people to manage their own prototypes, so we don't want an
1783         extra function in the API devoted to just that. People can still manage
1784         their own prototypes if they really want by using JSObjectSetPrototype.
1785
1786         * API/JSClassRef.cpp:
1787         (OpaqueJSClass::createNoAutomaticPrototype):
1788         (OpaqueJSClass::create):
1789         * API/JSClassRef.h:
1790         * API/JSObjectRef.cpp:
1791         (JSClassCreate):
1792         (JSObjectMake):
1793         * API/JSObjectRef.h:
1794         * API/testapi.c:
1795         (main):
1796         * JavaScriptCore.exp:
1797
1798 2006-10-12  Kevin McCullough  <KMcCullough@apple.com>
1799
1800         Reviewed by Adam.
1801
1802         Build breakage fix
1803
1804         * kjs/DateMath.cpp:
1805         (KJS::msToTM):
1806         * kjs/date_object.cpp:
1807         (KJS::gmtoffset):
1808
1809 2006-10-11  Kevin McCullough  <KMcCullough@apple.com>
1810
1811         Reviewed by Geoff.
1812
1813         Added our own tm struct to have a consistent set of fields, which lets us display the DST offset and timezone strings correctly.  Also there is some code cleanup.
1814
1815         * kjs/DateMath.cpp:
1816         (KJS::timeToMS):
1817         (KJS::getUTCOffset):
1818         (KJS::getDSTOffsetSimple):
1819         (KJS::dateToMS):
1820         (KJS::msToTM):
1821         (KJS::tmToKJStm):
1822         (KJS::KJStmToTm):
1823         * kjs/DateMath.h:
1824         * kjs/date_object.cpp: 
1825         (KJS::gmtoffset): 
1826         (KJS::formatTime): 
1827         (KJS::DateProtoFunc::callAsFunction): 
1828         (KJS::DateObjectImp::construct):
1829         (KJS::DateObjectImp::callAsFunction):
1830         (KJS::DateObjectFuncImp::callAsFunction):
1831         (KJS::parseDate):
1832         * kjs/date_object.h:
1833
1834 2006-10-09  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1835
1836         Reviewed by Geoff.
1837
1838         Improve gdk build compiler flags (show warning, no rtti and exceptions).
1839
1840         * jscore.bkl:
1841
1842 2006-10-06  Kevin McCullough  <KMcCullough@apple.com>
1843
1844         Reviewed by Brady.
1845
1846         DST and TimeZones were wrong in some cases, specifically on some of the dates where DST changes.
1847
1848         * kjs/DateMath.cpp:
1849         (KJS::equivalentYearForDST):
1850         (KJS::getUTCOffset):
1851         (KJS::getDSTOffsetSimple):
1852         (KJS::getDSTOffset):
1853         (KJS::dateToMseconds):
1854         (KJS::msToTM):
1855         * kjs/DateMath.h:
1856         * kjs/date_object.cpp:
1857         (KJS::gmtoffset):
1858
1859 2006-10-05  Darin Adler  <darin@apple.com>
1860
1861         Reviewed by Kevin McCullough.
1862
1863         * wtf/Assertions.cpp: Fix build when _DEBUG is not defined.
1864
1865 2006-10-04  Kevin McCullough  <KMcCullough@apple.com>
1866
1867         Reviewed by Adam.
1868
1869         - Removed an unnecessary assert that was stopping many pages.  tm_gmtoff was not set for UTC time in mozilla but is always set for us.
1870
1871         * kjs/DateMath.cpp:
1872         (KJS::getUTCOffset):
1873         (KJS::msToTM):
1874         * kjs/date_object.cpp:
1875         (KJS::gmtoffset):
1876         (KJS::formatTime):
1877
1878 2006-10-04  Geoffrey Garen  <ggaren@apple.com>
1879
1880         Patch by Darin and me, reviewed by Maciej.
1881
1882         Fixed <rdar://problem/4518397> REGRESSION(?): Oft-seen but unrepro crash 
1883               in JavaScript garbage collection (KJS::Collector::collect())
1884                <rdar://problem/4752492> Crash in KJS::collect
1885               
1886         The issue here was allocating one garbage-collected object in the midst 
1887         of allocating a second garbage-collected object. In such a case, the
1888         zeroIfFree word lies.
1889
1890         * kjs/collector.cpp:
1891         (KJS::Collector::allocate):
1892         (KJS::Collector::collect):
1893
1894 2006-10-04  Kevin McCullough  <KMcCullough@apple.com>
1895
1896         Reviewed by Adam.
1897
1898         - Layout test fix
1899
1900         * kjs/DateMath.cpp:
1901         (KJS::dateToDayInYear): accept and correctly handle negative months
1902
1903 2006-10-05  Kevin McCullough  <KMcCullough@apple.com>
1904
1905        build fix
1906
1907         * kjs/DateMath.cpp:
1908         (KJS::dateToDayInYear):
1909
1910 2006-10-05  Mark Rowe  <bdash@webkit.org>
1911
1912         Reviewed by maculloch.
1913
1914         Gdk build fix.
1915
1916         * JavaScriptCoreSources.bkl: Add DateMath.cpp to file list.
1917
1918 2006-10-05  Kevin McCullough  <KMcCullough@apple.com>
1919
1920         Reviewed by aroben
1921
1922         - build fix
1923
1924         * JavaScriptCore.xcodeproj/project.pbxproj:
1925
1926 2006-10-04  Nikolas Zimmermann  <zimmermann@kde.org>
1927
1928         Reviewed by Mitz.
1929
1930         Fix Qt/Linux build by adding DateMath.cpp to compilation.
1931
1932         * CMakeLists.txt: Also replace tabs with spaces.
1933
1934 2006-10-04  Kevin McCullough  <KMcCullough@apple.com>
1935
1936         Reviewed by DethBakin.
1937
1938         - 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.
1939
1940         * kjs/DateMath.cpp:
1941         (KJS::msToYear):
1942         (KJS::dayInYear):
1943         (KJS::dateToDayInYear):
1944
1945 2006-10-05  Darin Adler  <darin@apple.com>
1946
1947         Reviewed by Adam.
1948
1949         * wtf/Assertions.cpp: Changed assertion formatting to omit the "======"
1950         lines so you can see more assertions in less space. Also improved format
1951         of file/line information so it works with more development environments.
1952
1953 2006-10-04  Kevin McCullough  <KMcCullough@apple.com>
1954
1955         Reviewed by Tim H.
1956
1957         - The build machine is more sensitive about automatic conversions.  These fixes exp
1958 licitly cast or change the input and return types of functions to avoid conversions.
1959
1960         * JavaScriptCore.xcodeproj/project.pbxproj:
1961         * kjs/DateMath.cpp:
1962         (KJS::):
1963         (KJS::msToDays):
1964         (KJS::msToYear):
1965         (KJS::dayInYear):
1966         (KJS::monthToDayInYear):
1967         (KJS::dateToDayInYear):
1968         (KJS::getDSTOffsetSimple):
1969         (KJS::getDSTOffset):
1970         (KJS::dateToMseconds):
1971         (KJS::msToTM):
1972
1973 2006-10-04  Kevin McCullough  <KMcCullough@apple.com>
1974
1975         Reviewed by GGaren
1976
1977         - 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.
1978
1979         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1980         * JavaScriptCore.xcodeproj/project.pbxproj:
1981         * kjs/DateMath.cpp: Added.
1982         (KJS::):
1983         (KJS::daysInYear):
1984         (KJS::daysFrom1970ToYear):
1985         (KJS::msFrom1970ToYear):
1986         (KJS::msToDays):
1987         (KJS::msToYear):
1988         (KJS::isLeapYear):
1989         (KJS::isInLeapYear):
1990         (KJS::dayInYear):
1991         (KJS::msToMilliseconds):
1992         (KJS::msToWeekDay):
1993         (KJS::msToSeconds):
1994         (KJS::msToMinutes):
1995         (KJS::msToHours):
1996         (KJS::msToMonth):
1997         (KJS::msToDayInMonth):
1998         (KJS::monthToDayInYear):
1999         (KJS::timeToMseconds):
2000         (KJS::dateToDayInYear):
2001         (KJS::equivalentYearForDST):
2002         (KJS::getUTCOffset):
2003         (KJS::getDSTOffsetSimple):
2004         (KJS::getDSTOffset):
2005         (KJS::localTimeToUTC):
2006         (KJS::UTCToLocalTime):
2007         (KJS::dateToMseconds):
2008         (KJS::msToTM):
2009         (KJS::isDST):
2010         * kjs/DateMath.h: Added.
2011         (KJS::):
2012         * kjs/date_object.cpp:
2013         (KJS::gmtoffset):
2014         (KJS::formatTime):
2015         (KJS::DateInstance::getTime):
2016         (KJS::DateInstance::getUTCTime):
2017         (KJS::DateProtoFunc::callAsFunction):
2018         (KJS::DateObjectImp::construct):
2019         (KJS::DateObjectFuncImp::callAsFunction):
2020         (KJS::parseDate):
2021         * kjs/testkjs.cpp:
2022         * os-win32/stdint.h:
2023
2024 2006-10-02  Nikolas Zimmermann  <zimmermann@kde.org>
2025
2026         Reviewed/landed by Adam.
2027
2028         Build testkjs on Qt/Linux.
2029
2030         * CMakeLists.txt:
2031
2032 2006-10-02  Nikolas Zimmermann  <zimmermann@kde.org>
2033
2034         Reviewed by eseidel.  Landed by eseidel.
2035
2036         Fix win32 build, which has no inttypes.h
2037
2038         * wtf/Assertions.h:
2039
2040 2006-10-02  Nikolas Zimmermann <zimmermann@kde.org>
2041
2042         Reviewed by eseidel & mjs.  Landed by eseidel.
2043
2044         Fix Qt/Linux build with older gcc 3.3.4.
2045         http://bugs.webkit.org/show_bug.cgi?id=11116
2046  
2047         * kjs/lookup.h: Move cacheGlobalObject into KJS namespace.
2048         (KJS::cacheGlobalObject): Also remove GCC_ROOT_NS_HACK.
2049         * wtf/Assertions.h: Include inttypes.h for uintptr_t.
2050
2051 2006-09-28  Steve Falkenburg  <sfalken@apple.com>
2052
2053         Reviewed by Maciej.
2054         
2055         Use $(ConfigSuffix) set via vsprops files to add _debug
2056         to end of debug filenames.
2057
2058         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2059         * JavaScriptCore.vcproj/debug.vsprops: Added.
2060         * JavaScriptCore.vcproj/dftables/dftables.vcproj:
2061         * JavaScriptCore.vcproj/release.vsprops: Added.
2062         * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:
2063
2064 2006-09-28  Darin Adler  <darin@apple.com>
2065
2066         Reviewed by Alice.
2067
2068         - support for change that should fix <rdar://problem/4733044>
2069           REGRESSION: XML iBench shows 10% perf. regression (copying
2070           strings while decoding)
2071
2072         * wtf/Vector.h: Changed VectorBuffer so that the general case
2073         contains an instance of the 0 case, since deriving from it
2074         was violating the Liskov Substitution Principle.
2075         (WTF::VectorBuffer::releaseBuffer): Added. Releases the buffer so it can
2076         be adopted by another data structure that uses the FastMalloc.h allocator.
2077         Returns 0 if the internal buffer was being used.
2078         (WTF::Vector::releaseBuffer): Added. Releases the buffer as above or creates
2079         a new one in the case where the internal buffer was being used.
2080
2081 2006-09-28  Maciej Stachowiak  <mjs@apple.com>
2082
2083         Reviewed by Geoff.
2084         
2085         - change garbage collection to happen at increments proportional to number of live objects, not always
2086         every 1000 allocations
2087
2088         * kjs/collector.cpp:
2089         (KJS::Collector::allocate):
2090
2091 2006-09-28  Maciej Stachowiak  <mjs@apple.com>
2092
2093         Reviewed by Mitz.
2094
2095         - fixed REGRESSION (r16606): javascriptCore Crash on website load
2096         
2097         Plus style fixes.
2098         
2099             - fixed some possible off-by-one bugs
2100             - use indexing, not iterators, for Vectors
2101             - store Vector by pointer instead of by value to avoid blowing out FunctionImp size
2102         
2103         * kjs/function.cpp:
2104         (KJS::FunctionImp::addParameter):
2105         (KJS::FunctionImp::parameterString):
2106         (KJS::FunctionImp::processParameters):
2107         (KJS::FunctionImp::lengthGetter):
2108         (KJS::FunctionImp::getParameterName):
2109         * kjs/function.h:
2110
2111 2006-09-27  Steve Falkenburg  <sfalken@apple.com>
2112
2113         Reviewed by Maciej.
2114         
2115         More build tweaks
2116
2117         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2118         * JavaScriptCore.vcproj/JavaScriptCore/dstroot-to-sdk.cmd: Removed.
2119
2120 2006-09-27  John Sullivan  <sullivan@apple.com>
2121
2122         * kjs/function.cpp:
2123         (KJS::FunctionImp::getParameterName):
2124         removed assertion that displeased gcc 4.0.1 (build 5420):
2125         ASSERT(static_cast<size_t>(index) == index);
2126
2127 2006-09-27  Kevin McCullough  <KMcCullough@apple.com>
2128
2129         Reviewed by GGaren.
2130
2131         Cleanup of previous fix which was to address Radar: 4752492
2132
2133         * kjs/function.cpp:
2134         (KJS::FunctionImp::addParameter):
2135         (KJS::FunctionImp::parameterString):
2136         (KJS::FunctionImp::processParameters):
2137         (KJS::FunctionImp::lengthGetter):
2138         (KJS::FunctionImp::getParameterName):
2139         * kjs/function.h:
2140
2141 2006-09-27  Kevin McCullough  <KMcCullough@apple.com>
2142
2143         Reviewed by Adele.
2144
2145         Fixes a GC stack overflow crash.
2146         The change is to move from a linked list implementation of Parameters to a Vector.
2147         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. 
2148
2149         * kjs/function.cpp:
2150         (KJS::Parameter::Parameter):
2151         (KJS::FunctionImp::addParameter):
2152         (KJS::FunctionImp::parameterString):
2153         (KJS::FunctionImp::processParameters):
2154         (KJS::FunctionImp::lengthGetter):
2155         (KJS::FunctionImp::getParameterName):
2156         * kjs/function.h:
2157
2158 2006-09-27  Steve Falkenburg  <sfalken@apple.com>
2159
2160         Fix last path fix.
2161
2162         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2163
2164 2006-09-27  Steve Falkenburg  <sfalken@apple.com>
2165
2166         Set path before build.
2167
2168         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2169
2170 2006-09-27  Sean Gies  <seangies@apple.com>
2171
2172         Reviewed by Adam Roben.
2173
2174         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Debug config should link to debug runtime.
2175         * JavaScriptCore.vcproj/dftables/dftables.vcproj: Debug config should link to debug runtime.
2176
2177 2006-09-27  Don Melton  <gramps@apple.com>
2178
2179         Reviewed by Adam Roben.
2180
2181         Changed line ending from DOS to UNIX format so it doesn't die running
2182         on my machine. ;)
2183
2184         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
2185
2186 2006-09-23  Alexey Proskuryakov  <ap@nypop.com>
2187
2188         Reviewed by Maciej.
2189
2190         http://bugs.webkit.org/show_bug.cgi?id=10183
2191         REGRESSION: obfuscated JS decoding breaks because of soft hyphen removal
2192         (Fanfiction.net author pages not listing stories)
2193
2194         Rolled out the fix for bug 4139.
2195
2196         * kjs/lexer.cpp:
2197         (Lexer::setCode):
2198         (Lexer::shift):
2199         * tests/mozilla/ecma/Array/15.4.5.1-1.js:
2200         * tests/mozilla/expected.html:
2201
2202 2006-09-22  Steve Falkenburg  <sfalken@apple.com>
2203
2204         Build fix.
2205
2206         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2207
2208 2006-09-22  Darin Adler  <darin@apple.com>
2209
2210         Reviewed by Alice.
2211
2212         * wtf/Vector.h: Add an append that takes a pointer and length.
2213         Generalize the existing Vector append to work on vectors with
2214         any value for inlineCapacity. Change the append algorithm so
2215         it doesn't check capacity each time through the loop.
2216
2217 2006-09-22  Steve Falkenburg  <sfalken@apple.com>
2218
2219         Fix release build.
2220
2221         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2222
2223 2006-09-21  Geoffrey Garen  <ggaren@apple.com>
2224
2225         Reviewed by Maciej.
2226
2227         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2228         Updated to include the right path.
2229         * wtf/FastMalloc.h: #include Platform.h, since we use Platform macros.
2230
2231 === Safari-521.27 ===
2232
2233 2006-09-20  Anders Carlsson  <acarlsson@apple.com>
2234
2235         Reviewed by Dave Hyatt.
2236
2237         * wtf/MathExtras.h:
2238         Get rid of lrint.
2239
2240 2006-09-20  Sean Gies  <seangies@apple.com>
2241
2242         Reviewed by Steve Falkenburg.
2243
2244         * wtf/Assertions.cpp: Debug messages should go into debugger console.
2245
2246 2006-09-20  David Hyatt  <hyatt@apple.com>
2247
2248         Add an implementation of lrint for Win32.
2249
2250         Reviewed by anders
2251
2252         * wtf/MathExtras.h:
2253         (lrint):
2254
2255 2006-09-15  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2256
2257         Reviewed by Adam.
2258
2259         http://bugs.webkit.org/show_bug.cgi?id=10864
2260         Bug 10864: Linux\GDK build fixes
2261
2262         * JavaScriptCoreSources.bkl:
2263         * jscore.bkl:
2264
2265 2006-09-15  Adam Roben  <aroben@apple.com>
2266
2267         Windows build fix.
2268
2269         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
2270
2271 2006-09-15  Anders Carlsson  <acarlsson@apple.com>
2272
2273         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2274         Fix the release build.
2275
2276 2006-09-15  Anders Carlsson  <acarlsson@apple.com>
2277
2278         Reviewed by Steve.
2279
2280         Add JavaScriptCore API to the build.
2281         * API/JSBase.cpp:
2282         * API/JSCallbackConstructor.cpp:
2283         * API/JSCallbackFunction.cpp:
2284         * API/JSCallbackObject.cpp:
2285         * API/JSClassRef.cpp:
2286         * API/JSContextRef.cpp:
2287         * API/JSObjectRef.cpp:
2288         * API/JSStringRef.cpp:
2289         * API/JSValueRef.cpp:
2290         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2291         * os-win32/stdbool.h: Added.
2292
2293 2006-09-12  Steve Falkenburg  <sfalken@apple.com>
2294
2295         Reviewed by Ada.
2296         
2297         Build tweaks (doing JavaScriptCore now since it doesn't have
2298         dependencies).
2299
2300         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2301         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
2302         * JavaScriptCore.vcproj/JavaScriptCore/dstroot-to-sdk.cmd: Added.
2303         * JavaScriptCore.vcproj/dftables/dftables.vcproj:
2304         * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:
2305
2306 2006-09-11  Brady Eidson  <beidson@apple.com>
2307
2308         Build fix - I think Tim's last checkin wasn't tested on Tiger, possibly.  I simply
2309         commented out the undefined constants until he can have a chance to make the right call
2310
2311         * bindings/objc/objc_utility.mm:
2312         (KJS::Bindings::objcValueTypeForType): Commented out undefined symbols
2313
2314 2006-09-11  Timothy Hatcher  <timothy@apple.com>
2315
2316         Reviewed by Tim O. and Darin.
2317
2318         Add support for more method signatures affecting ObjC methods called from JavaScript:
2319         - Added unsigned types and long long.
2320         - Allow methods that use const, oneway, bycopy and byref type modifiers.
2321
2322         * bindings/objc/objc_instance.mm:
2323         (ObjcInstance::invokeMethod):
2324         * bindings/objc/objc_utility.h:
2325         (KJS::Bindings::):
2326         * bindings/objc/objc_utility.mm:
2327         (KJS::Bindings::convertValueToObjcValue):
2328         (KJS::Bindings::convertObjcValueToValue):
2329         (KJS::Bindings::objcValueTypeForType):
2330
2331 2006-09-05  Timothy Hatcher  <timothy@apple.com>
2332
2333         Reviewed by Tim O.
2334
2335         <rdar://problem/4715840> SEL is not char*
2336
2337         * bindings/objc/objc_class.mm:
2338         (KJS::Bindings::ObjcClass::methodsNamed): use sel_getName instead of a char* cast.
2339         * bindings/objc/objc_runtime.mm:
2340         (ObjcFallbackObjectImp::callAsFunction): ditto
2341
2342 2006-09-03  Alexey Proskuryakov  <ap@nypop.com>
2343
2344         Reviewed by Tim H.
2345
2346         http://bugs.webkit.org/show_bug.cgi?id=10693
2347         Convert JavaScript arrays to AppleScript lists
2348
2349         * JavaScriptCore.exp: Export ArrayInstance::info and ArrayInstance::getItem().
2350         * kjs/array_instance.h:
2351         * kjs/array_object.cpp:
2352         (ArrayInstance::getItem): Added a method to access array items from C++.
2353
2354 2006-09-02  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2355
2356         Reviewed by Tim H.
2357
2358         Bug 10454: Unix bakefile fixes
2359         http://bugs.webkit.org/show_bug.cgi?id=10454
2360
2361         * JavaScriptCoreSources.bkl:
2362
2363 2006-09-01  Nikolas Zimmermann  <zimmermann@kde.org>
2364
2365         Reviewed by hyatt.  Landed by eseidel.
2366
2367         Fix build on Linux.
2368
2369         * pcre/CMakeLists.txt: Add wtf/ include.
2370
2371 2006-09-01  Nikolas Zimmermann  <zimmermann@kde.org>
2372
2373         Reviewed and landed by ap.
2374
2375         Fix build on Linux (C89 without gcc extensions enabled).
2376
2377         * pcre/pcre_internal.h: Use C style comments.
2378         * wtf/Assertions.h: Use C style comments.
2379         * wtf/Platform.h: Use C style comments.
2380
2381 2006-09-01  Steve Falkenburg  <sfalken@apple.com>
2382
2383         Fix build.
2384
2385         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2386         * JavaScriptCore.vcproj/dftables/dftables.vcproj:
2387
2388 2006-08-31  Anders Carlsson  <acarlsson@apple.com>
2389
2390         Reviewed by Darin.
2391         
2392         Add new portability functions to MathExtras.h and add StringExtras.h which is for
2393         string portability functions.
2394         
2395         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2396         * bindings/c/c_instance.cpp:
2397         * kjs/date_object.cpp:
2398         * wtf/MathExtras.h:
2399         (copysign):
2400         (isfinite):
2401         * wtf/StringExtras.h: Added.
2402         (snprintf):
2403         (strncasecmp):
2404
2405 2006-08-31  Anders Carlsson  <acarlsson@apple.com>
2406
2407         Reviewed by Tim H.
2408         
2409         Fix Windows build.
2410         
2411         * JavaScriptCore.vcproj/dftables/dftables.vcproj:
2412         * pcre/pcre_internal.h:
2413
2414 2006-08-31  Timothy Hatcher  <timothy@apple.com>
2415
2416         Reviewed by Geoff.
2417
2418         Band-aid fix for PCRE to compile for ppc64 and x86_64 now that
2419         we use -Wshorten-64-to-32. Adds an INT_CAST macro that ASSERTs
2420         the value <= INT_MAX.
2421
2422         I filed <rdar://problem/4712064> to track the need to verify
2423         PCRE's 64-bit compliance.
2424
2425         * pcre/pcre_compile.c:
2426         (complete_callout):
2427         (compile_branch):
2428         (compile_regex):
2429         (pcre_compile2):
2430         * pcre/pcre_exec.c:
2431         (match):
2432         (pcre_exec):
2433         * pcre/pcre_get.c:
2434         (pcre_get_substring_list):
2435         * pcre/pcre_internal.h:
2436         * pcre/pcre_tables.c:
2437         * pcre/pcre_try_flipped.c:
2438         (_pcre_try_flipped):
2439
2440 2006-08-30  Darin Adler  <darin@apple.com>
2441
2442         Reviewed by Tim Hatcher.
2443
2444         - add WTF::getPtr, a function template that makes it possible to write
2445           generic code that gets a raw pointer out of any of our pointer types
2446
2447         * JavaScriptCore.xcodeproj/project.pbxproj:
2448         * wtf/GetPtr.h: Added.
2449         * wtf/ListRefPtr.h: (WTF::getPtr): Added.
2450         * wtf/OwnArrayPtr.h: (WTF::getPtr): Added.
2451         * wtf/OwnPtr.h: (WTF::getPtr): Added.
2452         * wtf/PassRefPtr.h: (WTF::getPtr): Added.
2453         * wtf/RefPtr.h: (WTF::getPtr): Added.
2454
2455 2006-08-29  waylonis  <waylonis@google.com>
2456
2457         Reviewed, tweaked by ggaren.
2458
2459         - Added storage and accessor functions for ExecState as a fix for
2460           http://bugs.webkit.org/show_bug.cgi?id=10114
2461         
2462         * kjs/ExecState.cpp:
2463         (KJS::ExecState::ExecState):
2464         * kjs/ExecState.h:
2465         * kjs/context.h:
2466         (KJS::Context::setExecState):
2467         (KJS::Context::execState):
2468
2469 2006-08-30  Nikolas Zimmermann  <zimmermann@kde.org>
2470
2471         Reviewed by Tim H.
2472
2473         Commit KDE related tweaks, to be able to
2474         differentiate between a Qt-only or a KDE build.
2475
2476         * CMakeLists.txt: Install wtf-unity library.
2477         * wtf/Platform.h: Add define for the KDE platform.
2478
2479 2006-08-28  Darin Adler  <darin@apple.com>
2480
2481         Reviewed by Geoff.
2482
2483         * kjs/list.h: Use explicit in constructor (as appropriate).
2484
2485 2006-08-24  Nikolas Zimmermann  <zimmermann@kde.org>
2486
2487         Reviewed, tweaked and landed by ap
2488
2489         http://bugs.webkit.org/show_bug.cgi?id=10467
2490         WebKit should have Qt platform support (Part II)
2491
2492         * CMakeLists.txt: Adjust to Anders' build fixes.
2493         * wtf/Platform.h: Fix define for the Qt platform (we don't use/need Cairo.)
2494
2495 2006-08-23  David Hyatt  <hyatt@apple.com>
2496
2497         Fix Platform.h to include #defines for graphics features.
2498
2499         Reviewed by darin
2500
2501         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2502         * wtf/Platform.h:
2503
2504 2006-08-23  Anders Carlsson  <acarlsson@apple.com>
2505
2506         Reviewed by Darin.
2507
2508         Make the bindings compile without CoreFoundation.
2509         
2510         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2511         * bindings/c/c_instance.cpp:
2512         * bindings/c/c_utility.cpp:
2513         (KJS::Bindings::convertUTF8ToUTF16):
2514         * bindings/npapi.h:
2515         * bindings/runtime.cpp:
2516         (KJS::Bindings::Instance::createBindingForLanguageInstance):
2517         (KJS::Bindings::Instance::createLanguageInstanceForValue):
2518         * bindings/runtime_root.cpp:
2519         * bindings/runtime_root.h:
2520         * kjs/interpreter.cpp:
2521         (KJS::Interpreter::createLanguageInstanceForValue):
2522         * kjs/interpreter.h:
2523
2524 2006-08-22  Anders Carlsson  <acarlsson@apple.com>
2525
2526         Reviewed by Darin.
2527
2528         Move the npruntime code over to using HashMap and the runtime_root code over to using 
2529         HashMap and HashCountedSet.
2530         
2531         * bindings/NP_jsobject.cpp:
2532         * bindings/c/c_utility.cpp:
2533         (KJS::Bindings::identifierFromNPIdentifier):
2534         * bindings/c/c_utility.h:
2535         * bindings/jni/jni_jsobject.cpp:
2536         (JavaJSObject::invoke):
2537         * bindings/npruntime.cpp:
2538         (getStringIdentifierMap):
2539         (getIntIdentifierMap):
2540         (_NPN_GetStringIdentifier):
2541         (_NPN_GetIntIdentifier):
2542         * bindings/runtime_root.cpp:
2543         (getReferencesByRootMap):
2544         (getReferencesSet):
2545         (KJS::Bindings::findReferenceSet):
2546         (KJS::Bindings::rootForImp):
2547         (KJS::Bindings::rootForInterpreter):
2548         (KJS::Bindings::addNativeReference):
2549         (KJS::Bindings::removeNativeReference):
2550         (RootObject::removeAllNativeReferences):
2551         * bindings/runtime_root.h:
2552
2553 2006-08-22  Anders Carlsson  <acarlsson@apple.com>
2554
2555         Reviewed by Geoff.
2556         
2557         Switch over the NPAPI and Java bindings to using HashMaps instead of dictionaries.
2558         
2559         * JavaScriptCore.xcodeproj/project.pbxproj:
2560         * bindings/c/c_class.cpp:
2561         (KJS::Bindings::CClass::CClass):
2562         (KJS::Bindings::CClass::~CClass):
2563         (KJS::Bindings::CClass::classForIsA):
2564         (KJS::Bindings::CClass::methodsNamed):
2565         (KJS::Bindings::CClass::fieldNamed):
2566         * bindings/c/c_class.h:
2567         * bindings/jni/jni_class.cpp:
2568         (JavaClass::JavaClass):
2569         (JavaClass::~JavaClass):
2570         (JavaClass::methodsNamed):
2571         (JavaClass::fieldNamed):
2572         * bindings/jni/jni_class.h:
2573         * bindings/objc/objc_class.h:
2574         * bindings/objc/objc_class.mm:
2575         (KJS::Bindings::deleteMethod):
2576         (KJS::Bindings::deleteField):
2577         (KJS::Bindings::):
2578         (KJS::Bindings::ObjcClass::methodsNamed):
2579         (KJS::Bindings::ObjcClass::fieldNamed):
2580         * bindings/runtime.cpp:
2581         * bindings/runtime.h:
2582         * bindings/runtime_object.cpp:
2583         (RuntimeObjectImp::fieldGetter):
2584         (RuntimeObjectImp::getOwnPropertySlot):
2585         (RuntimeObjectImp::put):
2586         (RuntimeObjectImp::canPut):
2587
2588 2006-08-21  Vladimir Olexa  <vladimir.olexa@gmail.com>
2589
2590         Reviewed by Darin.
2591
2592         http://bugs.webkit.org/show_bug.cgi?id=6252
2593         JavaScript 1.6 Array.lastIndexOf
2594
2595         Test: fast/js/array-lastIndexOf.html
2596
2597         * kjs/array_object.cpp:
2598         (ArrayProtoFunc::callAsFunction): Added a LastIndexOf case.
2599         * kjs/array_object.h:
2600         (KJS::ArrayProtoFunc::): Added LastIndexOf to enum.
2601         * tests/mozilla/expected.html: Two more tests now pass.
2602
2603 2006-08-20  Nikolas Zimmermann  <zimmermann@kde.org>
2604
2605         Reviewed by Maciej. Landed by rwlbuis.
2606
2607         Fixes parts of: http://bugs.webkit.org/show_bug.cgi?id=10463
2608         WebKit should have Qt platform support
2609
2610         Removing obsolete QConstString/QString constructors in kjs code.
2611
2612         * kjs/identifier.h:
2613         * kjs/ustring.h:
2614
2615 2006-08-17  Nikolas Zimmermann  <zimmermann@kde.org>
2616
2617         Reviewed by Maciej. Landed by rwlbuis.
2618
2619         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10463
2620         WTF Changes needed for Qt platform code.
2621
2622         * wtf/Platform.h:
2623         * wtf/unicode/UnicodeDecomposition.h: Added.
2624         (WTF::Unicode::):
2625         * wtf/unicode/UnicodeDirection.h: Added.
2626         (WTF::Unicode::):
2627         * wtf/unicode/qt4/UnicodeQt4.cpp: Added.
2628         (WTF::Unicode::direction):
2629         (WTF::Unicode::category):
2630         (WTF::Unicode::decomposition):
2631         * wtf/unicode/qt4/UnicodeQt4.h:
2632         (WTF::Unicode::toLower):
2633         (WTF::Unicode::toUpper):
2634         (WTF::Unicode::isPrintableChar):
2635         (WTF::Unicode::isSpace):
2636         (WTF::Unicode::isPunct):
2637         (WTF::Unicode::isDigit):
2638         (WTF::Unicode::mirroredChar):
2639         (WTF::Unicode::compare):
2640
2641 2006-08-17  Nikolas Zimmermann  <zimmermann@kde.org>
2642
2643         Reviewed by Eric. Landed by rwlbuis.
2644
2645         Fixes: http://bugs.webkit.org/show_bug.cgi?id=10464
2646         Offer a cmake build system for Qt platform.
2647
2648         * CMakeLists.txt: Added.
2649         * pcre/CMakeLists.txt: Added.
2650
2651 2006-08-17  Anders Carlsson  <acarlsson@apple.com>
2652
2653         Reviewed by Maciej.
2654
2655         * bindings/npapi.h:
2656         Fix ifdef.
2657
2658 2006-08-15  Steve Falkenburg  <sfalken@apple.com>
2659
2660         Reviewed by mjs.
2661         
2662         Build fix.
2663
2664         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2665         * wtf/Assertions.h:
2666
2667 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
2668
2669         Reviewed by Tim H.
2670
2671         Build fix:  DWARF and -gfull are incompatible with symbol separation.
2672
2673         * JavaScriptCore.xcodeproj/project.pbxproj:
2674
2675 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
2676
2677         Reviewed by Tim H.
2678
2679         http://bugs.webkit.org/show_bug.cgi?id=10394
2680         Bug 10394: WebKit Release and Production configurations should enable dead code stripping
2681
2682         * JavaScriptCore.xcodeproj/project.pbxproj:
2683
2684 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
2685
2686         Reviewed by Tim H.
2687
2688         http://bugs.webkit.org/show_bug.cgi?id=10384
2689         Bug 10384: Switch to DWARF for Release configuration
2690
2691         * JavaScriptCore.xcodeproj/project.pbxproj:
2692
2693 2006-08-13  Maks Orlovich  <maksim@kde.org>
2694
2695         Reviewed (and tweaked a little) by Maciej.
2696         
2697         - shrank the size of JSObject by 8 bytes and made the corresponding reduction to the cell size, resulting
2698         in a 1.2% speed improvement on JS iBench (and probably overall memory savings).
2699
2700         This was done by removing _scope and _internalValue data members
2701         from JSObject and moving them only to the subclasses that actually
2702         make use of them.
2703         
2704         * kjs/object.cpp: 
2705         (KJS::JSObject::mark): No need to mark scope or internal value here.
2706         * kjs/object.h:
2707         (KJS::JSObject::JSObject): Don't initialize them.
2708         * kjs/JSWrapperObject.cpp: Added. New base class for object types that
2709         wrap primitive values (Number, String, Boolean, Date).
2710         (KJS::JSWrapperObject::mark): 
2711         * kjs/JSWrapperObject.h: Added.
2712         (KJS::JSWrapperObject::JSWrapperObject):
2713         (KJS::JSWrapperObject::internalValue):
2714         (KJS::JSWrapperObject::setInternalValue):
2715         * kjs/array_object.cpp:
2716         (ArrayPrototype::ArrayPrototype): Don't set useless internal value.
2717         * kjs/bool_object.cpp:
2718         (BooleanInstance::BooleanInstance): Inherit from JSWrapperObject.
2719         (BooleanProtoFunc::callAsFunction): Fixed to account for fact that not all
2720         JSObjects have an internal value.
2721         (BooleanObjectImp::construct): ditto.
2722         * kjs/bool_object.h:
2723         * kjs/collector.cpp: Lowered cell size to 48.
2724         (KJS::Collector::allocate): meaningless whitespace change
2725         * kjs/date_object.cpp:
2726         (KJS::DateInstance::DateInstance): Inherit from JSWrapperObject.
2727         (KJS::DateProtoFunc::callAsFunction): adjusted for move of internalValue
2728         (KJS::DateObjectImp::construct): ditto
2729         * kjs/date_object.h:
2730         * kjs/error_object.cpp:
2731         (ErrorPrototype::ErrorPrototype): don't set internal value
2732         * kjs/function.cpp: move _scope and related handling here
2733         (KJS::FunctionImp::mark): mark scope
2734         * kjs/function.h:
2735         (KJS::FunctionImp::scope): moved here from JSObject
2736         (KJS::FunctionImp::setScope): ditto
2737         * kjs/number_object.cpp:
2738         (NumberInstance::NumberInstance): inherit from JSWrapperObject
2739         (NumberProtoFunc::callAsFunction): adjusted
2740         (NumberObjectImp::construct): adjusted
2741         * kjs/number_object.h: shring RegExp-related objects a little
2742         * kjs/regexp_object.cpp:
2743         (RegExpPrototype::RegExpPrototype): Adjust for size tweaks
2744         (RegExpObjectImp::RegExpObjectImp): ditto
2745         * kjs/regexp_object.h:
2746         * kjs/string_object.cpp:
2747         (StringInstance::StringInstance): inherit from JSWrapperObject
2748         (StringProtoFunc::callAsFunction): adjusted
2749         * kjs/string_object.h:
2750         * JavaScriptCore.exp: Exported new methods as needed.
2751         * JavaScriptCore.xcodeproj/project.pbxproj: Added new files to build.
2752
2753 2006-08-04  Brady Eidson  <beidson@apple.com>
2754
2755         Reviewed by Geoff's rubber stamp
2756
2757         Fix a build break on Intel hardware causes by adapting stricter
2758         compiler warnings (-Wshorten-64-to-32)
2759
2760         * API/testapi.c:
2761         (assertEqualsAsNumber): manually cast some doubles to floats
2762         (main): ditto
2763
2764 2006-08-04  Sam Weinig  <sam.weinig@gmail.com>
2765
2766         Reviewed by Darin.
2767
2768         - patch for http://bugs.webkit.org/show_bug.cgi?id=10192
2769           Make WebCore (and friends) compile with -Wshorten-64-to-32
2770
2771           * Adds -Wshorten-64-to-32 flag to Xcode project.
2772           * Adds explicit casts where OK.
2773
2774         * API/JSNodeList.c:
2775         (JSNodeList_item):
2776         (JSNodeList_getProperty):
2777         * JavaScriptCore.xcodeproj/project.pbxproj:
2778
2779 2006-08-04  Adam Roben  <aroben@apple.com>
2780
2781         Reviewed by Anders.
2782
2783         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Convert
2784         spaces to tabs
2785
2786 2006-08-03  Sam Weinig  <sam.weinig@gmail.com>
2787
2788         Reviewed by Darin.
2789
2790         - patch for http://bugs.webkit.org/show_bug.cgi?id=10176
2791           Make WebCore compile with -Wundef
2792
2793           * Adds -Wundef flag to Xcode project
2794           * Converts #ifs to #ifdef and #ifndefs where needed.
2795           * Added #define YYMAXDEPTH 10000 in kjs/grammar.y
2796             to fix a warning from within Bison.
2797
2798         * JavaScriptCore.xcodeproj/project.pbxproj:
2799         * bindings/jni/jni_jsobject.cpp:
2800         (JavaJSObject::getSlot):
2801         (JavaJSObject::setSlot):
2802         * bindings/npapi.h:
2803         * bindings/objc/objc_class.mm:
2804         (KJS::Bindings::ObjcClass::methodsNamed):
2805         (KJS::Bindings::ObjcClass::fieldNamed):
2806         * bindings/objc/objc_instance.mm:
2807         (ObjcInstance::invokeMethod):
2808         * bindings/objc/objc_runtime.mm:
2809         (ObjcMethod::getMethodSignature):
2810         (ObjcField::name):
2811         (ObjcField::type):
2812         * kjs/grammar.y:
2813         * kjs/identifier.h:
2814
2815 2006-08-03  Anders Carlsson  <acarlsson@apple.com>
2816
2817         Reviewed by John Sullivan.
2818
2819        * wtf/HashSet.h:
2820         (WTF::::operator):
2821         Return *this in operator=
2822
2823 2006-08-03  Adam Roben  <aroben@apple.com>
2824
2825         Reviewed by Anders.
2826
2827         - Fixed Windows build
2828
2829         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2830         * wtf/MathExtras.h: Implement inline versions of these functions
2831         (nextafter):
2832         (nextafterf):
2833
2834 2006-08-02  Adam Roben  <aroben@apple.com>
2835
2836         Reviewed by Darin.
2837
2838         - Fixed build
2839
2840         * kjs/date_object.cpp:
2841         (KJS::formatTime):
2842
2843 2006-07-29  Darin Adler  <darin@apple.com>
2844
2845         - Removed tabs from these source files that still had them.
2846           We don't use them; that way source files look fine in editors
2847           that have tabs set to 8 spaces or to 4 spaces.
2848         - Removed allow-tabs Subversion property from the files too.
2849
2850         * bindings/NP_jsobject.cpp:
2851         * bindings/c/c_utility.cpp:
2852         * bindings/jni/jni_runtime.cpp:
2853         * bindings/jni/jni_utility.cpp:
2854         * bindings/objc/objc_utility.mm:
2855         * bindings/runtime.cpp:
2856         * bindings/runtime_method.cpp:
2857         * bindings/testbindings.cpp:
2858         * bindings/testbindings.mm:
2859         * kjs/date_object.cpp:
2860         * kjs/function.cpp:
2861         * kjs/list.cpp:
2862         * kjs/nodes.cpp:
2863         * kjs/nodes.h:
2864         * kjs/string_object.cpp:
2865         * kjs/ustring.cpp:
2866
2867 2006-07-29  Darin Adler  <darin@apple.com>
2868
2869         * tests/mozilla/expected.html: Update test results now that regress-185165.js
2870         is succeeding. I suspect Anders fix for bug 4620655 is the reason.
2871
2872 2006-07-29  Sam Weinig  <sam.weinig@gmail.com>
2873
2874         Reviewed by Darin.
2875
2876         - patch for http://bugs.webkit.org/show_bug.cgi?id=10080
2877           Adopt pedantic changes from the Unity project to improve 
2878           cross-compiler compatibility
2879
2880           Changes include:
2881           * Removing trailing semicolon from namespace braces.
2882           * Removing trailing comma from last enum declaration.
2883           * Updating to match style guidelines.
2884           * Adding missing newline to the end of the file.
2885           * Turning on gcc warning for missing newline at the end of a source file
2886             (GCC_WARN_ABOUT_MISSING_NEWLINE in Xcode, -Wnewline in gcc).
2887           * Alphabetical sorting of Xcode source list files. 
2888           * Replace use of non-portable variable-size array with Vector.
2889           * Use C-style comments instead of C++ comments in files that might
2890             be included by either C or C++ files.
2891
2892         * API/JSCallbackConstructor.cpp:
2893         (KJS::JSCallbackConstructor::construct):
2894         * API/JSCallbackFunction.cpp:
2895         (KJS::JSCallbackFunction::callAsFunction):
2896         * API/JSCallbackObject.cpp:
2897         (KJS::JSCallbackObject::construct):
2898         (KJS::JSCallbackObject::callAsFunction):
2899         * JavaScriptCore.xcodeproj/project.pbxproj:
2900         * JavaScriptCorePrefix.h:
2901         * bindings/jni/jni_class.cpp:
2902         (JavaClass::fieldNamed):
2903         * bindings/jni/jni_class.h:
2904         * bindings/jni/jni_instance.cpp:
2905         (JavaInstance::JavaInstance):
2906         (JavaInstance::valueOf):
2907         * bindings/jni/jni_objc.mm:
2908         (KJS::Bindings::dispatchJNICall):
2909         * bindings/jni/jni_runtime.cpp:
2910         (JavaParameter::JavaParameter):
2911         (JavaArray::JavaArray):
2912         * bindings/jni/jni_runtime.h:
2913         * bindings/jni/jni_utility.h:
2914         * bindings/objc/objc_instance.h:
2915         * bindings/runtime_array.h:
2916         * kjs/collector.h:
2917         * kjs/config.h:
2918         * kjs/ustring.cpp:
2919         * wtf/Platform.h:
2920
2921 2006-07-29  Mike Emmel  <mike.emmel@gmail.com>
2922
2923         Reviewed by Darin.
2924
2925         - fixes for Linux build
2926
2927         * JavaScriptCoreSources.bkl: Added new files to build, kjs/PropertyNameArray.cpp
2928         and kjs/testkjs.cpp, and removed old files.
2929
2930 2006-07-24  Dan Waylonis  <waylonis@google.com>
2931
2932         Reviewed and tweaked a bit by Darin.
2933
2934         - fix http://bugs.webkit.org/show_bug.cgi?id=9902
2935           jsNull and NSNull not properly converted between JS and ObjC
2936
2937         * bindings/objc/objc_utility.mm: (KJS::Bindings::convertObjcValueToValue):
2938         Added case for converting NSNull to jsNull.
2939
2940 2006-07-24  Rob Buis  <buis@kde.org>
2941
2942         Reviewed by Darin.
2943
2944         http://bugs.webkit.org/show_bug.cgi?id=4258
2945         Date().toString() only includes GMT offset, not timezone string
2946
2947         Use the info in tm_zone to append timezone abbreviation
2948         to Date().toString().
2949
2950         * kjs/date_object.cpp:
2951         (KJS::formatTime):
2952
2953 2006-07-24  Rob Buis  <buis@kde.org>
2954
2955         Reviewed by Darin.
2956
2957         http://bugs.webkit.org/show_bug.cgi?id=5257
2958         setYear() does not match FireFox/IE behavior
2959
2960         Make sure the right values end up in tm_year.
2961
2962         * kjs/date_object.cpp:
2963         (KJS::formatTime):
2964
2965 2006-07-23  Mark Rowe  <opendarwin.org@bdash.net.nz>
2966
2967         Reviewed by Maciej.
2968
2969         Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
2970         http://bugs.webkit.org/show_bug.cgi?id=9686
2971
2972         JavaScriptCore portion of the fix.
2973
2974         * JavaScriptCore.exp: Update symbol for change in argument type.
2975         * kjs/debugger.cpp:
2976         (Debugger::detach): Clear map of recent exceptions.
2977         (Debugger::hasHandledException): Track the most recent exception
2978         thrown by an interpreter.
2979         (Debugger::exception): Change exception argument to a JSValue.
2980         * kjs/debugger.h:
2981         * kjs/nodes.cpp:
2982         (Node::debugExceptionIfNeeded): Notify the debugger of an exception
2983         if it hasn't seen it before.
2984         (ThrowNode::execute): Notify the debugger that an exception is being thrown.
2985         * kjs/nodes.h:
2986
2987     2006-07-23  Geoffrey Garen  <ggaren@apple.com>
2988
2989         Patch by Eric Albert, reviewed by Darin and me.
2990         
2991         - Fixed <rdar://problem/4645931> JavaScriptCore stack-scanning code 
2992         crashes (Collector::markStackObjectsConservatively)
2993         
2994         * bindings/jni/jni_jsobject.cpp: On 64bit systems, jint is a long, not an
2995         int.
2996         (JavaJSObject::getSlot):
2997         (JavaJSObject::setSlot):
2998         * kjs/collector.cpp:
2999         (KJS::Collector::markCurrentThreadConservatively): Use a pointer instead of
3000         an int as 'dummy,' because on LP64 systems, an int is not pointer-aligned,
3001         and we want to scan the stack for pointers.
3002         * JavaScriptCore.xcodeproj/project.pbxproj: After a tense cease-fire, the 
3003         XCode war has started up again!
3004
3005 === Safari-521.20 ===
3006
3007 2006-07-21  Geoffrey Garen  <ggaren@apple.com>
3008
3009         Reviewed by Darin.
3010
3011         <rdar://problem/4507265> REGRESSION: overlays don't work on HousingMaps.com (Google Maps-based site)
3012
3013         - Added support for strings that masquerade as undefined. Currently used
3014         by WebCore to implement undetectable style.filter.
3015         
3016         The name is a little long, but it's only used in one line of code, so I
3017         thought clarity should win over brevity.
3018
3019         * JavaScriptCore.exp:
3020         * JavaScriptCore.xcodeproj/project.pbxproj:
3021         * kjs/object.h:
3022         * kjs/string_object.h:
3023         (KJS::StringInstanceThatMasqueradesAsUndefined::StringInstanceThatMasqueradesAsUndefined):
3024         (KJS::StringInstanceThatMasqueradesAsUndefined::masqueradeAsUndefined):
3025         (KJS::StringInstanceThatMasqueradesAsUndefined::toBoolean):
3026
3027 === Safari-521.19 ===
3028
3029 2006-07-20  Steve Falkenburg  <sfalken@apple.com>
3030
3031         Fix the build
3032
3033         * kjs/function.cpp:
3034         (KJS::escapeStringForPrettyPrinting):
3035
3036 2006-07-19  Anders Carlsson  <acarlsson@apple.com>
3037
3038         Reviewed by Darin.
3039
3040         <rdar://problem/4620655> REGRESSION(10.4.7-10.5): preview button for a blogger.com post doesn't work
3041         
3042         * kjs/nodes2string.cpp:
3043         (StringNode::streamTo):
3044         Return the escaped string.
3045         
3046         (RegExpNode::streamTo):
3047         Use the correct syntax.
3048         
3049         * kjs/function.cpp:
3050         (KJS::escapeStringForPrettyPrinting):
3051         * kjs/function.h:
3052         Add escape function which escapes a string for pretty-printing so it can be parsed again.
3053         
3054         * wtf/unicode/icu/UnicodeIcu.h:
3055         (WTF::Unicode::isPrintableChar):
3056         New function.
3057
3058 2006-07-18  Maciej Stachowiak  <mjs@apple.com>
3059
3060         Reviewed by Adele Peterson.
3061         
3062         <rdar://problem/4589530> REGRESSION: null character in JS string causes parse error (works in Tiger and in other browsers)
3063
3064         * kjs/lexer.cpp:
3065         (Lexer::shift):
3066         (Lexer::lex):
3067         (Lexer::record16):
3068         (Lexer::scanRegExp):
3069         * kjs/lexer.h:
3070
3071 2006-07-18  Tim Omernick  <timo@apple.com>
3072
3073         Reviewed by Tim Hatcher.
3074
3075         Removed a misleading comment; we recently added support for the NPNVPluginElementNPObject
3076         variable.
3077
3078         * bindings/npapi.h:
3079
3080 === Safari-521.18 ===
3081
3082 2006-07-18  Timothy Hatcher  <timothy@apple.com>
3083
3084         Made the following headers public:
3085
3086         * JavaScriptCore.h
3087         * JSBase.h
3088         * JSContextRef.h
3089         * JSObjectRef.h
3090         * JSStringRef.h
3091         * JSValueRef.h
3092
3093         * JavaScriptCore.xcodeproj/project.pbxproj:
3094
3095 2006-07-17  Geoffrey Garen  <ggaren@apple.com>
3096
3097         Reviewed by Maciej.
3098         
3099         - Added automatic prototype creation for classes.
3100         
3101         A class stores a weak reference to a prototype, which is cleared when
3102         the prototype is garbage collected, to avoid a reference cycle.
3103         
3104         We now have an attributes field in JSClassDefinition, that currently is
3105         used only to override automatic prototype creation when you want to manage your
3106         own prototypes, but can be extended in the future for other nefarious purposes.
3107         
3108         Similarly, we have JSObjectMake and JSObjectMakeWithPrototype, the latter
3109         allowing you to manage your own prototypes.
3110         
3111         JSObjectMakeConstructor is more interesting now, able to make a constructor
3112         on your behalf if you just give it a class.
3113         
3114         - Removed bogus old code from minidom.js.
3115         
3116         - Tweaked the headerdocs.
3117         
3118         - Added more GC testing, which caught some leaks, and tested more funny 
3119         edge cases in lookup, which caught a lookup bug. Removed some testing 
3120         we used to do with MyObject because it was redundant with the new, cool 
3121         stuff.
3122         
3123         While fixing the lookup bug I retracted this change:
3124         
3125             "If a static setProperty callback returns 'false', to indicate that the
3126             property was not set, we no longer forward the set request up the class
3127             chain, because that's almost certainly not what the programmer expected."
3128
3129         Returning false when setting a static property is a little silly, but you can see
3130         it being useful when shadowing a base class's static properties, and, regardless
3131         of usefullness, this is the defined behavior of the setProperty callback.
3132         
3133         - Plus a little ASCII art, for the kids.
3134
3135 2006-07-17  Timothy Hatcher  <timothy@apple.com>
3136
3137         Reviewed by Maciej.
3138
3139         <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit
3140
3141         Moves WebScriptObject and WebUndefined up to WebCore.
3142         This change does create an upwards-dependancy on WebScriptObject existing
3143         in the loaded process, but this code path in JavaScriptCore does not get used
3144         unless it is through WebKit/WebCore. Moving all of the binding code out of
3145         JavaScriptCore might make sense in the future.
3146
3147         * JavaScriptCore.exp:
3148         * JavaScriptCore.xcodeproj/project.pbxproj:
3149         * bindings/objc/WebScriptObject.h: Replaced.
3150         * bindings/objc/WebScriptObject.mm: Removed.
3151         * bindings/objc/WebScriptObjectPrivate.h: Removed.
3152         * bindings/objc/objc_class.h:
3153         * bindings/objc/objc_instance.h:
3154         * bindings/objc/objc_instance.mm:
3155         (ObjcInstance::~ObjcInstance):
3156         * bindings/objc/objc_runtime.h:
3157         * bindings/objc/objc_runtime.mm:
3158         (convertValueToObjcObject):
3159         * bindings/objc/objc_utility.mm:
3160         (KJS::Bindings::convertValueToObjcValue):
3161         (KJS::Bindings::convertObjcValueToValue):
3162         (KJS::Bindings::createObjcInstanceForValue):
3163
3164 2006-07-17  Darin Adler  <darin@apple.com>
3165
3166         * API/JSBase.h: Fix comment formatting where things used to be lined up but
3167         are now ragged. Got rid of spaces that attempted to line things up.
3168         * API/JSObjectRef.h: Ditto. Also add missing periods for a couple of comments.
3169
3170 2006-07-17  Geoffrey Garen  <ggaren@apple.com>
3171
3172         Reviewed by Maciej.
3173         
3174         - Removed the exception parameter from the initialize callback and, by extension,
3175         JSObjectMake. We have never had a need for exceptions when iniitializing,
3176         so the parameter seemed likely to "get in the way." 
3177         
3178         Also, an exception in JavaScript is thrown in response to input -- 
3179         "invalid URL", "index not a number", etc., so it's the job of the 
3180         constructor function, not the initialize method, to throw.
3181         
3182         If initialize *really* wants to throw, it can communicate the throw to
3183         the constructor through the constructed object's private data (e.g., set
3184         it to NULL, signaling to the consntructor that initialization failed.)
3185         
3186         - Added JSObjectMakeWithData, which enables a constructor to set private
3187         data on an object *before* it has been initialized. That way, the initialize
3188         methods can properly operate on the data. 
3189
3190         * API/JSNode.c: Moved ref into the initialize method, for better encapsulation,
3191         now that it's possible.
3192         * API/JSNodeList.c: ditto
3193         * API/minidom.c:
3194         (main): Do more aggressive garbage collection to test ref/deref and 
3195         initialize/finalize.
3196         * API/minidom.js: store childNodes in a temporary so it doesn't get re-created
3197         like a thousand times. This makes debugging ref/deref easier
3198
3199 2006-07-17  Geoffrey Garen  <ggaren@apple.com>
3200
3201         Reviewed by Maciej.
3202         
3203         - Changed the initialize callback to run from least derived class (parent
3204         class) to most derived class. This enables C++ style initialization,
3205         and derived class overriding of member data.
3206         
3207         - Added excpetion propopgation to JSObjectMake, to support initialize
3208         exceptions, and generally round out our policy of making function
3209         signatures as long as possible.
3210
3211         * API/JSCallbackObject.h: Use ExecState instead of ContextRef, cuz we're
3212         in C++ land now.
3213
3214 2006-07-17  Geoffrey Garen  <ggaren@apple.com>
3215
3216         Reviewed by Maciej.
3217         
3218         - Changed JSObjectMakeConstructor to JSObjectMakeConstructorWithCallback,
3219         to match JSObjectMakeFunctionWithCallback.
3220         
3221         - Added prototype parameter, so the generated constructor
3222         automatically works with hasInstance / instanceof
3223         
3224         - Moved hasInstance implementation from InternalFunctionImp to JSObject
3225         so that subclasses can inherit it without inheriting function-related baggage.
3226         More refactoring here would be good, but this seems like a good short-term
3227         solution.
3228
3229         (KJS::JSCallbackFunction::implementsHasInstance): override and return false,
3230         because callback functions aren't constructors.
3231
3232 2006-07-17  Maciej Stachowiak  <mjs@apple.com>
3233
3234         Reviewed by Geoff.
3235         
3236         - add a JSContextRef parameter to all JSValueRef, JSObjectRef, and JSContextRef operations;
3237         except JSObject{Get,Set}PrivateData which can be assumed to be simple pure accessors.
3238         
3239         Also renamed the parameter "context" to "ctx" because it makes the code read better with this pervasive
3240         but usually uninteresting parameter.
3241
3242         * API/JSBase.cpp:
3243         (JSEvaluateScript):
3244         (JSCheckScriptSyntax):
3245         (JSGarbageCollect):
3246         * API/JSBase.h:
3247         * API/JSCallbackObject.cpp:
3248         (KJS::JSCallbackObject::JSCallbackObject):
3249         (KJS::JSCallbackObject::init):
3250         (KJS::JSCallbackObject::getOwnPropertySlot):
3251         (KJS::JSCallbackObject::put):
3252         (KJS::JSCallbackObject::deleteProperty):
3253         (KJS::JSCallbackObject::toNumber):
3254         (KJS::JSCallbackObject::toString):
3255         * API/JSContextRef.cpp:
3256         (JSGlobalContextCreate):
3257         (JSGlobalContextRetain):
3258         (JSGlobalContextRelease):
3259         (JSContextGetGlobalObject):
3260         * API/JSContextRef.h:
3261         * API/JSNode.c:
3262         (JSNodePrototype_appendChild):
3263         (JSNodePrototype_removeChild):
3264         (JSNodePrototype_replaceChild):
3265         (JSNode_getNodeType):
3266         (JSNode_getFirstChild):
3267         (JSNode_prototype):
3268         * API/JSNodeList.c:
3269         (JSNodeListPrototype_item):
3270         (JSNodeList_length):
3271         (JSNodeList_getProperty):
3272         (JSNodeList_prototype):
3273         * API/JSObjectRef.cpp:
3274         (JSObjectMake):
3275         (JSObjectMakeFunctionWithCallback):
3276         (JSObjectMakeConstructor):
3277         (JSObjectMakeFunction):
3278         (JSObjectGetPrototype):
3279         (JSObjectSetPrototype):
3280         (JSObjectHasProperty):
3281         (JSObjectGetProperty):
3282         (JSObjectSetProperty):
3283         (JSObjectGetPropertyAtIndex):
3284         (JSObjectSetPropertyAtIndex):
3285         (JSObjectDeleteProperty):
3286         (JSObjectIsFunction):
3287         (JSObjectCallAsFunction):
3288         (JSObjectIsConstructor):
3289         (JSObjectCallAsConstructor):
3290         (JSObjectCopyPropertyNames):
3291         * API/JSObjectRef.h:
3292         * API/JSStringRef.cpp:
3293         * API/JSValueRef.cpp:
3294         (JSValueGetType):
3295         (JSValueIsUndefined):
3296         (JSValueIsNull):
3297         (JSValueIsBoolean):
3298         (JSValueIsNumber):
3299         (JSValueIsString):
3300         (JSValueIsObject):
3301         (JSValueIsObjectOfClass):
3302         (JSValueIsEqual):
3303         (JSValueIsStrictEqual):
3304         (JSValueIsInstanceOfConstructor):
3305         (JSValueMakeUndefined):
3306         (JSValueMakeNull):
3307         (JSValueMakeBoolean):
3308         (JSValueMakeNumber):
3309         (JSValueMakeString):
3310         (JSValueToBoolean):
3311         (JSValueToNumber):
3312         (JSValueToStringCopy):
3313         (JSValueToObject):
3314         (JSValueProtect):
3315         (JSValueUnprotect):
3316         * API/JSValueRef.h:
3317         * API/minidom.c:
3318         (print):
3319         * API/testapi.c:
3320         (MyObject_getProperty):
3321         (MyObject_deleteProperty):
3322         (MyObject_callAsFunction):
3323         (MyObject_callAsConstructor):
3324         (MyObject_convertToType):
3325         (print_callAsFunction):
3326         (main):
3327
3328 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
3329
3330         Approved by Maciej, RS by Beth.
3331         
3332         JSObjectMakeFunction -> JSObjectMakeFunctionWithCallback
3333         JSObjectMakeFunctionWithBody -> JSObjectMakeFunction
3334         
3335         because the latter is more common, and more fundamental, than the former.
3336
3337         * API/APICast.h:
3338         (toJS):
3339         * API/JSBase.h:
3340         * API/JSCallbackObject.cpp:
3341         (KJS::JSCallbackObject::getOwnPropertySlot):
3342         (KJS::JSCallbackObject::put):
3343         (KJS::JSCallbackObject::deleteProperty):
3344         (KJS::JSCallbackObject::getPropertyNames):
3345         (KJS::JSCallbackObject::staticValueGetter):
3346         (KJS::JSCallbackObject::staticFunctionGetter):
3347         * API/JSClassRef.cpp:
3348         (OpaqueJSClass::OpaqueJSClass):
3349         (OpaqueJSClass::~OpaqueJSClass):
3350         * API/JSClassRef.h:
3351         * API/JSObjectRef.cpp:
3352         (JSClassCreate):
3353         (JSObjectMakeFunctionWithCallback):
3354         (JSObjectMakeFunction):
3355         (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
3356         (JSObjectCopyPropertyNames):
3357         * API/JSObjectRef.h:
3358         * API/minidom.c:
3359         (main):
3360         * API/testapi.c:
3361         (main):
3362         * ChangeLog:
3363         * JavaScriptCore.exp:
3364
3365 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
3366
3367         Laughed at by Beth.
3368         
3369         Replace __JS with OpaqueJS because the former, while used by CF, is
3370         a prefix that's triply-reserved by the compiler. (_* is reserved in global 
3371         names, _[A-Z] is reserved in all names, and __ is reserved in all names 
3372         in C++.)
3373         
3374         Opaque is an alternative used by other Mac OS X framewokrs.
3375
3376         * API/APICast.h:
3377         (toJS):
3378         * API/JSBase.h:
3379         * API/JSCallbackObject.cpp:
3380         (KJS::JSCallbackObject::getOwnPropertySlot):
3381         (KJS::JSCallbackObject::put):
3382         (KJS::JSCallbackObject::deleteProperty):
3383         (KJS::JSCallbackObject::getPropertyNames):
3384         (KJS::JSCallbackObject::staticValueGetter):
3385         (KJS::JSCallbackObject::staticFunctionGetter):
3386         * API/JSClassRef.cpp:
3387         (OpaqueJSClass::OpaqueJSClass):
3388         (OpaqueJSClass::~OpaqueJSClass):
3389         * API/JSClassRef.h:
3390         * API/JSObjectRef.cpp:
3391         (JSClassCreate):
3392         (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
3393         (JSObjectCopyPropertyNames):
3394
3395 2006-07-16  Darin Adler  <darin@apple.com>
3396
3397         - try to fix Windows build
3398
3399         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3400         Added some recently added files, removed some recently removed.
3401
3402 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
3403
3404         Reviewed by Maciej.
3405         
3406         - Change getProperty* to return undefined, rather than NULL, for missing
3407         properties, since that's what the spec says. Also added exception out
3408         parameters to the *Index functions, because they can call through to the
3409         regular functions, which can throw for custom objects.
3410
3411         * API/JSObjectRef.cpp:
3412         (JSObjectGetProperty):
3413         (JSObjectGetPropertyAtIndex):
3414         (JSObjectSetPropertyAtIndex):
3415         * API/JSObjectRef.h:
3416         * API/testapi.c:
3417         (main):
3418
3419 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
3420
3421         Reviewed by Maciej.
3422         
3423         - Properly document and handle NULL callbacks for static properties. We
3424         throw an exception in any case other than a ReadOnly property with a NULL
3425         setProperty callback, because a NULL callback almost certainly indicates 
3426         a programming error. Also throw an exception if hasProperty returns true
3427         for a property that getProperty can't get.
3428         
3429         - If a static setProperty callback returns 'false', to indicate that the
3430         property was not set, we no longer forward the set request up the class
3431         chain, because that's almost certainly not what the programmer expected.
3432
3433         * API/JSCallbackObject.cpp:
3434         (KJS::JSCallbackObject::getOwnPropertySlot):
3435         (KJS::JSCallbackObject::put):
3436         (KJS::JSCallbackObject::staticValueGetter):
3437         (KJS::JSCallbackObject::staticFunctionGetter):
3438         (KJS::JSCallbackObject::callbackGetter):
3439         * API/JSObjectRef.h:
3440         * API/minidom.js:
3441         * API/testapi.c:
3442         (MyObject_hasProperty):
3443         * API/testapi.js:
3444
3445 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
3446
3447         Reviewed by Maciej.
3448         
3449         - Added names to functions.
3450         
3451         - Removed GetPrivate/SetPrivate from callbackFunctions and callbackConstructors.
3452         The private data idiom is that a JS object stores its native implementation
3453         as private data. For functions and constructors, the native implementation is nothing
3454         more than the callback they already store, so supporting private data, too,
3455         confuses the idiom. If you *really* want, you can still create a custom 
3456         function with private data.
3457
3458         * API/JSCallbackConstructor.cpp:
3459         * API/JSCallbackConstructor.h:
3460         * API/JSCallbackFunction.cpp:
3461         (KJS::JSCallbackFunction::JSCallbackFunction):
3462         * API/JSCallbackFunction.h:
3463         * API/JSCallbackObject.cpp:
3464         (KJS::JSCallbackObject::staticFunctionGetter):
3465         * API/JSObjectRef.cpp:
3466         (JSObjectMakeFunction):
3467         (JSObjectMakeFunctionWithBody):
3468         (JSObjectGetPrivate):
3469         (JSObjectSetPrivate):
3470         * API/JSObjectRef.h:
3471         * API/minidom.c:
3472         (main):
3473         * API/testapi.c:
3474         (main):
3475
3476 2006-07-15  Maciej Stachowiak  <mjs@apple.com>
3477
3478         Reviewed by Darin.
3479         
3480         - switch property lists to be vector+set of Identifiers instead of list of References
3481         
3482         This has the following benefits:
3483         
3484         - no duplicates in property lists
3485         - simplifies API calls
3486         - probably more efficient, since linked list is gone
3487         - entirely removed Reference, ReferenceList and ProtectedReference types from the API
3488
3489         * kjs/PropertyNameArray.cpp: Added.
3490         (KJS::PropertyNameArray::add): Check set, if not already there, add to
3491         vector.
3492         * kjs/PropertyNameArray.h: Added.
3493         (KJS::PropertyNameArray::PropertyNameArray): Newly added type, combines
3494         a set and a vector to make a unique but ordered list of identifiers.
3495         (KJS::PropertyNameArray::begin): ditto
3496         (KJS::PropertyNameArray::end): ditto
3497         (KJS::PropertyNameArray::size): ditto
3498         (KJS::PropertyNameArray::operator[]): ditto
3499         * kjs/array_instance.h:
3500         * kjs/array_object.cpp:
3501         (ArrayInstance::getPropertyNames): renamed from getPropertyList, updated
3502         for PropertyNameArray
3503         (ArrayInstance::setLength): updated for PropertyNameArray
3504         (ArrayInstance::pushUndefinedObjectsToEnd): ditto
3505         * kjs/nodes.cpp:
3506         (ForInNode::execute): updated for PropertyNameArray
3507         * kjs/nodes.h:
3508         * kjs/object.cpp:
3509         (KJS::JSObject::getPropertyNames): renamed from getPropertyList, updated
3510         for PropertyNameArray
3511         * kjs/object.h:
3512         * kjs/property_map.cpp:
3513         (KJS::PropertyMap::getEnumerablePropertyNames): updated for PropertyNameArray
3514         (KJS::PropertyMap::getSparseArrayPropertyNames): ditto
3515         * kjs/property_map.h:
3516         * kjs/protected_reference.h: Removed.
3517         * kjs/reference.cpp: Removed.
3518         * kjs/reference.h: Removed.
3519         * kjs/reference_list.cpp: Removed.
3520         * kjs/reference_list.h: Removed.
3521         * kjs/scope_chain.cpp:
3522         (KJS::ScopeChain::print): Use PropertyNamesArray instead of ReferenceList.
3523         * kjs/string_object.cpp:
3524         (StringInstance::getPropertyNames): Updated for new approach.
3525         * kjs/string_object.h:
3526         * kjs/ustring.h:
3527         * API/APICast.h:
3528         (toJS): Added overload for PropertyNameAccumulatorRef / PropertyNameArray*
3529         (toRef): ditto
3530         * API/JSBase.h:
3531         * API/JSCallbackObject.cpp:
3532         (KJS::JSCallbackObject::getPropertyNames): Fixed for new API.
3533         * API/JSCallbackObject.h:
3534         * API/JSObjectRef.cpp:
3535         (__JSPropertyNameArray::__JSPropertyNameArray): Type used for a publicly vended
3536         JSPropertyNameArrayRef.
3537         (JSObjectCopyPropertyNames): New API call - renamed / refactored from 
3538         JSObjectCreatePropertyList
3539         (JSPropertyNameArrayRetain): new retain call for JSPropertyNameArray.
3540         (JSPropertyNameArrayRelease): new release call for - " -.
3541         (JSPropertyNameArrayGetCount): Instead of having to use a stateful enumerator you
3542         can now get the count and items in any order.
3543         (JSPropertyNameArrayGetNameAtIndex): See above.
3544         (JSPropertyNameAccumulatorAddName): What you add properties to is now an opaque 
3545         accumulator object.
3546         * API/JSObjectRef.h: Prototyped new functions, removed old ones
3547         * JavaScriptCore.exp: Updated exported symbols.
3548         * JavaScriptCore.xcodeproj/project.pbxproj: Added new files, removed old.
3549         * API/testapi.c:
3550         (MyObject_getPropertyNames): Renamed / fixed callback to fit new paradigm.
3551         (main): Updated for new API.
3552
3553 2006-07-15  Darin Adler  <darin@apple.com>
3554
3555         - oops, missed a few more arrays that had to be const
3556
3557         * API/JSNode.c:
3558         (JSNodePrototype_appendChild): Added const.
3559         (JSNodePrototype_removeChild): Ditto.
3560         (JSNodePrototype_replaceChild): Ditto.
3561         (JSNode_construct): Ditto.
3562         * API/JSNodeList.c:
3563         (JSNodeListPrototype_item): Ditto.
3564         * API/JSObjectRef.cpp:
3565         (JSObjectMakeFunctionWithBody): Ditto.
3566         (JSObjectCallAsFunction): Ditto.
3567         (JSObjectCallAsConstructor): Ditto.
3568         * API/minidom.c:
3569         (print): Ditto.
3570         * API/testapi.c:
3571         (MyObject_callAsFunction): Ditto.
3572         (MyObject_callAsConstructor): Ditto.
3573         (print_callAsFunction): Ditto.
3574         (myConstructor_callAsConstructor): Ditto.
3575
3576 2006-07-15  Darin Adler  <darin@apple.com>
3577
3578         Reviewed by Maciej.
3579
3580         * API/JSNode.h: Made an array parameter const.
3581         * API/JSObjectRef.h: Made array parameters const. Fixed a comment.
3582
3583 2006-07-15  Geoffrey Garen  <ggaren@apple.com>
3584
3585         Reviewed by Maciej.
3586         
3587         - JSObjectMakeFunctionWithBody includes a function name and named parameters now.
3588
3589         * API/JSObjectRef.cpp:
3590         (JSObjectMakeFunctionWithBody):
3591         * API/JSObjectRef.h:
3592         * API/testapi.c:
3593         (assertEqualsAsUTF8String): More informative failure reporting.
3594         (main): Test more function cases.
3595
3596 2006-07-15  Geoffrey Garen  <ggaren@apple.com>
3597
3598         Reviewed by Maciej.
3599
3600         - Moved the arguments passed to JSClassCreate into a single structure,
3601         called JSClassDefinition. This will enable easier structure 
3602         migration/versioning in the future, if necessary.
3603         
3604         - Added support for class names.
3605         
3606         - kJSClassDefinitionNull replaces kJSObjectCallbacksNone.
3607         
3608         - JSClass is becoming a fairly complex struct, so I migrated all of its
3609         implementation other than reference counting to the sruct.
3610