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