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