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