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