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