initial import
[vuplus_webkit] / Source / JavaScriptCore / ChangeLog-2003-10-25
1 === Safari-111 ===
2
3 2003-10-22  Maciej Stachowiak  <mjs@apple.com>
4
5         Fix broken build.
6
7         * kjs/simple_number.h:
8
9 2003-10-22  Maciej Stachowiak  <mjs@apple.com>
10
11         Merged 64-bit compilation fixes, and fixes for handling negative 0
12         from upstream kjs.
13         
14         * kjs/internal.cpp:
15         * kjs/simple_number.h:
16         (KJS::SimpleNumber): fixed constants; added negZero constant. 
17         (KJS::SimpleNumber::is): adjusted to use long and not int.
18         (KJS::SimpleNumber::value): ditto.
19         (KJS::SimpleNumber::fits): ditto; also don't allow -0 to fit, so
20         we don't lose the distinction between -0 and +0.
21         (KJS::SimpleNumber::make): adjusted to use long.
22
23 2003-10-18  Darin Adler  <darin@apple.com>
24
25         Reviewed by Dave.
26
27         - fixed 3367015 -- interdependent variable declarations in for loop don't work (they go backwards)
28
29         * kjs/nodes.h: (KJS::ForNode::ForNode): Add a new overload of the constructor for when the
30         first parameter is a variable declaration list. Call reverseList as we do in other constructors
31         that take lists that are built backwards.
32         * kjs/nodes.cpp: (ForNode::reverseList): Added. New helper function.
33
34 === Safari-110 ===
35
36 === Safari-109 ===
37
38 2003-10-06  Darin Adler  <darin@apple.com>
39
40         * kjs/create_hash_table: Remove stray semicolon.
41
42         * kjs/array_object.lut.h:
43         * kjs/date_object.lut.h:
44         * kjs/lexer.lut.h:
45         * kjs/math_object.lut.h:
46         * kjs/number_object.lut.h:
47         * kjs/string_object.lut.h:
48         Regenerated.
49
50 === Safari-108 ===
51
52 2003-10-02  Darin Adler  <darin@apple.com>
53
54         Reviewed by Dave.
55
56         - fixed 3441656 -- constructor bad for objs created w/ function as prototype (www.moock.org/asdg/codedepot)
57
58         * kjs/nodes.cpp: (FuncDeclNode::processFuncDecl): Set up the constructor as
59         as specified in the JavaScript spec. We were already doing this right in the
60         other place we make functions.
61
62 2003-09-30  Darin Adler  <darin@apple.com>
63
64         Reviewed by Dave.
65
66         Rolled in Harri Porten's change to accept non-breaking space in JavaScript.
67
68         * kjs/lexer.cpp: (Lexer::isWhiteSpace): Accept 00A0 as "whitespace".
69
70 2003-09-25  Maciej Stachowiak  <mjs@apple.com>
71
72         Roll out build system change since it did not actually work. :-(
73         
74         * JavaScriptCore.pbproj/project.pbxproj:
75         * Makefile.am:
76
77 2003-09-25  Maciej Stachowiak  <mjs@apple.com>
78
79         Reviewed by Darin.
80
81         * JavaScriptCore.pbproj/project.pbxproj: Don't hack install name. Instead
82         of embedding into Safari, embed into WebKit as sub-umbrella.
83         * Makefile.am: Don't forget to rebuild if the user removes
84         JavaScript.framework from symroots manually.
85
86 === Safari-107 ===
87
88 2003-09-24  Darin Adler  <darin@apple.com>
89
90         Reviewed by Ken.
91
92         - fixed 3421107 -- some dates that other browsers can parse can't be parsed by KJS's Date.parse()
93
94         * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Added code to be more strict about month names,
95         to allow a time zone after date even if the date omits the time, and to understand AM and PM.
96
97 2003-09-22  Darin Adler  <darin@apple.com>
98
99         * JavaScriptCore.pbproj/project.pbxproj: Rename Mixed build style to OptimizedWithSymbols.
100
101 2003-09-22  Darin Adler  <darin@apple.com>
102
103         Reviewed by Ken.
104
105         * kjs/config.h: Added HAVE_SYS_PARAM_H, since KJS does look for this header, and we do
106         indeed have it. Just something I noticed in passing while cleaning up configure.in.
107
108 2003-09-20  Darin Adler  <darin@apple.com>
109
110         Reviewed by Dave.
111
112         - fixed 3419380 -- JavaScript Date.getTimezoneOffset is off by one hour (during daylight savings)
113
114         * kjs/date_object.cpp: (DateProtoFuncImp::call): The daylight savings correction
115         in here was incorrect. Perhaps I should have corrected it for the non-BSD case too,
116         but I'm not sure the issue is the same.
117
118 2003-09-17  Darin Adler  <darin@apple.com>
119
120         Reviewed by Maciej.
121
122         * kjs/date_object.cpp: Removed our CF-based implementations of gmtime, localtime,
123         mktime, timegm, and time, since they no longer have the slow "hit the filesystem
124         every time" behavior.
125
126 === Safari-100 ===
127
128 === Safari-99 ===
129
130 === Safari-98 ===
131
132 === Safari-97 ===
133
134 === Safari-96 ===
135
136 2003-08-27  Maciej Stachowiak  <mjs@apple.com>
137
138         Reviewed by John
139
140         - fixed rdar://problem/3397316 - sherlock crash: KJS::Collector::allocate(unsigned long)
141         
142         * kjs/internal.cpp:
143         (InterpreterImp::InterpreterImp): Hold the lock a bit longer, so
144         the call to initGlobalObject is covered.
145
146 === Safari-95 ===
147
148 2003-08-24  Darin Adler  <darin@apple.com>
149
150         Reviewed by John.
151
152         - fixed 3098350 -- opt. params to date methods are ignored (can't set end date in Exchange/Outlook web cal.)
153
154         * kjs/date_object.cpp: (DateProtoFuncImp::call): Added code to handle the optional parameters.
155         Strangely, the table of functions already had the right number of parameters listed, but the
156         code to look at the parameter values was missing.
157
158 === Safari-94 ===
159
160 2003-08-17  Darin Adler  <darin@apple.com>
161
162         Reviewed by Maciej.
163
164         - fixed 3247528 -- encodeURI missing from JavaScriptCore (needed by Crystal Reports)
165         - fixed 3381297 -- escape method does not escape the null character
166         - fixed 3381299 -- escape method produces incorrect escape sequences ala WinIE, rather than correct ala Gecko
167         - fixed 3381303 -- unescape method treats escape sequences as Latin-1 ala WinIE rather than as UTF-8 ala Gecko
168         - fixed 3381304 -- unescape method garbles strings with bad escape sequences in them
169
170         * kjs/function.h: Added constants for decodeURI, decodeURIComponent, encodeURI, and
171         encodeURIComponent.
172         * kjs/function.cpp:
173         (encode): Added. New helper function for escape, encodeURI, and encodeURIComponent.
174         (decode): Added. New helper function for unescape, decodeURI, and decodeURIComponent.
175         (GlobalFuncImp::call): Added decodeURI, decodeURIComponent, encodeURI, and encodeURIComponent 
176         implementations. Changed escape and unescape to use new helper functions, which fixes
177         the four problems above.
178
179         * kjs/internal.cpp: (InterpreterImp::initGlobalObject): Add decodeURI, decodeURIComponent,
180         encodeURI, and encodeURIComponent to the global object.
181
182         * kjs/ustring.h: Added a length to the CString class so it can hold strings with null
183         characters in them, not just null-terminated strings. This allows a null character from
184         a UString to survive the process of UTF-16 to UTF-8 decoding. Added overloads to
185         UString::append, UString::UTF8String, UTF8SequenceLength, decodeUTF8Sequence,
186         convertUTF16OffsetsToUTF8Offsets, and convertUTF8OffsetsToUTF16Offsets.
187         
188         * kjs/ustring.cpp:
189         (CString::CString): Set up the length properly in all the constructors. Also add a new
190         constructor that takes a length.
191         (CString::append): Use and set the length properly.
192         (CString::operator=): Use and set the length properly.
193         (operator==): Use and the length and memcmp instead of strcmp.
194         (UString::append): Added new overloads for const char * and for a single string to make
195         it more efficient to build up a UString from pieces. The old way, a UString was created
196         and destroyed each time you appended.
197         (UTF8SequenceLength): New. Helper for decoding UTF-8.
198         (decodeUTF8Sequence): New. Helper for decoding UTF-8.
199         (UString::UTF8String): New. Decodes from UTF-16 to UTF-8. Same as the function that
200         was in regexp.cpp, except has proper handling for UTF-16 surrogates.
201         (compareStringOffsets): Moved from regexp.cpp.
202         (createSortedOffsetsArray): Moved from regexp.cpp.
203         (convertUTF16OffsetsToUTF8Offsets): New. Converts UTF-16 offsets to UTF-8 offsets, given
204         a UTF-8 string. Same as the function that was in regexp.cpp, except has proper handling
205         for UTF-16 surrogates.
206         (convertUTF8OffsetsToUTF16Offsets): New. Converts UTF-8 offsets to UTF-16 offsets, given
207         a UTF-8 string. Same as the function that was in regexp.cpp, except has proper handling
208         for UTF-16 surrogates.
209
210         - fixed 3381296 -- regular expression matches with UTF-16 surrogates will treat sequences as two characters
211
212         * kjs/regexp.cpp:
213         (RegExp::RegExp): Use the new UString::UTF8String function instead a function in this file.
214         (RegExp::match): Use the new convertUTF16OffsetsToUTF8Offsets (and the corresponding
215         reverse) instead of convertCharacterOffsetsToUTF8ByteOffsets in this file.
216
217 === Safari-93 ===
218
219 2003-08-14  Vicki Murley  <vicki@apple.com>
220
221         Reviewed by John. 
222
223         * JavaScriptCore.pbproj/project.pbxproj: deleted JavaScriptCore.order from the project.
224
225 2003-08-14  Vicki Murley  <vicki@apple.com>
226
227         Reviewed by John. 
228
229         * JavaScriptCore.order: Removed.  We now link to the order file at /AppleInternal/OrderFiles.
230         * JavaScriptCore.pbproj/project.pbxproj: change sectorder flag to point to /AppleInternal/OrderFiles/JavaScriptCore.order
231
232 === JavaScriptCore-92.1 ===
233
234 2003-08-07  Darin Adler  <darin@apple.com>
235
236         Reviewed by John Sullivan.
237
238         - fixed 3365527 -- subscripting JavaScript strings does not work (leads to hang at www.newmagna.com.au)
239
240         The JavaScript specification says nothing about this, but other browsers seem to give
241         read-only access to the characters in a string as if the string was an array of characters.
242
243         * kjs/array_object.cpp:
244         (ArrayInstanceImp::get): Update to use a public toArrayIndex function instead of our own getArrayIndex
245         function, so we can share with string.
246         (ArrayInstanceImp::put): Ditto.
247         (ArrayInstanceImp::hasProperty): Ditto.
248         (ArrayInstanceImp::setLength): Ditto.
249
250         * kjs/ustring.h: Add toArrayIndex.
251         * kjs/ustring.cpp: (UString::toArrayIndex): Added. Implements the rule from array.
252         * kjs/identifier.h: Add a forwarding function so we can use toArrayIndex.
253
254         * kjs/string_object.cpp:
255         (StringInstanceImp::get): Return a single character string if the property name is an array index.
256         (StringInstanceImp::hasProperty): Return true for property names that are suitable array indices.
257
258         * JavaScriptCore.pbproj/project.pbxproj: Let Xcode be Xcode.
259
260 === Safari-92 ===
261
262 2003-08-07  Maciej Stachowiak  <mjs@apple.com>
263
264         Reviewed by Darin.
265
266         - fixed 3366975 - repro hang in KJS::Value::Value entering text at eil.com
267         
268         * kjs/string_object.cpp:
269         (StringProtoFuncImp::call): When doing a match against a regexp
270         with the global flag set, make sure to return null rather than an
271         empty array when there is no match. This is what other browsers do.
272
273 2003-08-05  Maciej Stachowiak  <mjs@apple.com>
274
275         Reviewed by John.
276
277         * kjs/list.cpp:
278         (List::copyTail): Test for loop termination with < instead of !=,
279         since i starts at 1 but size could be 0. Do the same for the other
280         loop for consistency's sake.
281         
282 2003-08-01  Maciej Stachowiak  <mjs@apple.com>
283
284         Reviewed by John.
285
286         - fixed 3222621 - Cryptic "anonymous function hack" messages in console (10.2.4)
287         
288         * kjs/lexer.cpp:
289         (Lexer::lex): Remove useless debug spew.
290
291 === Safari-91 ===
292
293 2003-07-30  Darin Adler  <darin@apple.com>
294
295         Reviewed by Dave.
296
297         - fixed problem where some JavaScriptCore symbols had no namespace or prefix
298
299         * kjs/grammar.y: Added a define for yylloc to make it use the kjs prefix.
300         This is the same thing done for the rest of the symbols automatically by yacc,
301         but for some reason it's not done for yyloc. Also make automatic() function static.
302         * kjs/grammar.cpp: Regenerated.
303         * kjs/lexer.cpp: Use kjsyylloc instead of yyloc.
304
305         * pcre/pcre.h: Add defines to prepend kjs prefixes for all the PCRE functions.
306
307 2003-07-30  Darin Adler  <darin@apple.com>
308
309         * Makefile.am: Include the subdirectory with the PCRE code in it.
310
311 2003-07-30  John Sullivan  <sullivan@apple.com>
312
313         - JavaScriptCore part of fix for 3284525 -- AutoFill fills in 
314         only e-mail address field of New Account form on Apple Store Japan
315
316         Reviewed by Darin
317
318         * JavaScriptCore.pbproj/project.pbxproj:
319         Mark pcre.h as a Private header
320
321 2003-07-28  Maciej Stachowiak  <mjs@apple.com>
322
323         Reviewed by Richard.
324
325         - fixed 3240814 - LEAK: 120 byte leak in JavaScript parser in Sherlock Movies channel
326         
327         * kjs/internal.cpp:
328         (Parser::parse): ref() and deref() the program node, to make sure to clean up properly,
329         before deleting it.
330         (InterpreterImp::checkSyntax): Likewise.
331
332 === Safari-90 ===
333
334 2003-07-22  Maciej Stachowiak  <mjs@apple.com>
335
336         Reviewed by John.
337
338         Remove -seg_addr_table_filename to fix build.
339
340         * JavaScriptCore.pbproj/project.pbxproj:
341
342 2003-07-17  Maciej Stachowiak  <mjs@apple.com>
343
344         Reviewed by John.
345
346         - fixed 3330344 - Please change allowable client to "JavaScriptGlue" from "JSGlue"
347
348         * JavaScriptCore.pbproj/project.pbxproj: Changed allowable client
349         to "JavaScriptGlue"
350
351 2003-07-13  Darin Adler  <darin@apple.com>
352
353         Reviewed by Maciej.
354
355         - do some improvements Maciej suggested while reviewing the array index change
356
357         * kjs/array_object.cpp:
358         (getArrayIndex): Return a flag to say whether the index was value separately, to avoid
359         in-band signalling.
360         (ArrayInstanceImp::get): Update for new getArrayIndex parameters.
361         (ArrayInstanceImp::put): Ditto.
362         (ArrayInstanceImp::hasProperty): Ditto.
363         (ArrayInstanceImp::setLength): Ditto.
364         
365         * kjs/ustring.cpp: (UString::toStrictUInt32): Check for overflow in a way that avoids doing
366         a divide every time through the loop. But note that it adds an extra branch to the loop.
367         I wonder which is worse.
368
369 2003-07-12  Darin Adler  <darin@apple.com>
370
371         Fixed broken build.
372
373         * kjs/identifier.h: Add toULong back. It's still used in WebCore (and maybe in JavaScriptGlue,
374         for all I know).
375
376 2003-07-12  Darin Adler  <darin@apple.com>
377
378         Reviewed by Dave.
379
380         - fixed 3272777 -- array object indices treated as integers by Safari, but as strings in other web browsers
381
382         JavaScriptCore did not implement the proper rule for what an array index is.
383
384         * kjs/array_object.cpp:
385         (getArrayIndex): Added. Implements the rule from the specification, which also provides a handy
386         "not an array index" value of 2^32-1.
387         (ArrayInstanceImp::get): Use getArrayIndex.
388         (ArrayInstanceImp::put): Ditto.
389         (ArrayInstanceImp::hasProperty): Ditto.
390         (ArrayInstanceImp::setLength): Ditto.
391
392         * kjs/identifier.h: Removed now-unused toULong, and added toStrictUInt32, in both cases forwarding
393         functions that forward to UString.
394
395         * kjs/ustring.h: Added toStringUInt32.
396         * kjs/ustring.cpp: (UString::toStrictUInt32): Added. Converts a string to a 32-bit unsigned integer,
397         and rejects any string that does not exactly match the way the integer would be formatted on output.
398         This is the rule documented in the ECMA language standard.
399
400 === Safari-89 ===
401
402 2003-07-10  Maciej Stachowiak  <mjs@apple.com>
403
404         Reviewed by Darin.
405
406         - fixed 3302021 - v74 and v85 hang with http://e-www.motorola.com/
407
408         The crux of this was saving and restoring the prototype objects
409         for all the standard types when saving and restoring for the page
410         cache.
411         
412         * kjs/internal.cpp:
413         (InterpreterImp::saveBuiltins):
414         (InterpreterImp::restoreBuiltins):
415         * kjs/internal.h:
416         * kjs/interpreter.cpp:
417         (Interpreter::saveBuiltins):
418         (Interpreter::restoreBuiltins):
419         (SavedBuiltins::SavedBuiltins):
420         (SavedBuiltins::~SavedBuiltins):
421         * kjs/interpreter.h:
422         * kjs/property_map.cpp:
423
424 2003-07-07  Maciej Stachowiak  <mjs@apple.com>
425
426         Reviewed by John.
427
428         - fixed 3295916 - b/c JavaScriptCore and WebCore are installing in wrong location, private headers are public
429
430         * WebCore.pbproj/project.pbxproj: Install in WebKit.framework/Versions/A/Frameworks.
431
432 === Safari-88 ===
433
434 2003-07-02  Maciej Stachowiak  <mjs@apple.com>
435
436         Reviewed by Ken.
437
438         - fixed 3096961 - JavaScriptCore should link only to what it uses, shouldn't drag in Cocoa.framework
439
440         * JavaScriptCore.pbproj/project.pbxproj: Don't link Cocoa.framework;
441         just pull in CoreFoundation and CoreServices.
442         * kjs/date_object.cpp: Include CoreServices.h instead of Carbon.h
443         (the stuff we want is in CarbonCore).
444
445 2003-06-20  Darin Adler  <darin@apple.com>
446
447         Reviewed by Maciej.
448
449         - improved the property map sorting technique so that the indices
450           are separate for each property map, and also preserve the ordering
451           when property maps are saved and restored
452
453         * kjs/property_map.cpp:
454         (PropertyMap::put): Don't bother setting the index for _singleEntry, since there's
455         no need to sort a single entry. Use the per-table lastIndexUsed instead of a global.
456         (PropertyMap::expand): Don't use the index (uninitialized now) out of a _singleEntry
457         when putting it in a newly-created map; just use 0. Compute a value for the new map's
458         lastIndexUsed as we walk through the elements we are adding to it (using the same old
459         indices from the old map).
460
461 === Safari-85.1 ===
462
463 === Safari-85 ===
464
465 2003-06-13  Darin Adler  <darin@apple.com>
466
467         Reviewed by Dave.
468
469         - fixed 3178438 -- return elements in order of addition in for..in loop (other browsers seem to)
470         - fixed 3292067 -- REGRESSION (64-65): albertsons.com "Shop A to Z" menus are not sorted alphabetically
471
472         * kjs/property_map.h: Add index field to hash table entry and index parameter to insert function.
473         * kjs/property_map.cpp:
474         (PropertyMap::put): Set an index for new map entries to an ever-increasing number based on a global.
475         (PropertyMap::insert): Take an index parameter.
476         (PropertyMap::expand): Preserve the indices as we rehash the table.
477         (comparePropertyMapEntryIndices): Added. Compares two property map entries by index.
478         (PropertyMap::addEnumerablesToReferenceList): Sort the proprty map entries by index before adding
479         them to the reference list.
480
481 === Safari-84 ===
482
483 2003-06-10  Vicki Murley  <vicki@apple.com>
484
485         Reviewed by john.
486
487         * JavaScriptCore.order: new order file for 1.0
488
489 === Safari-83 ===
490
491 2003-06-04  Darin Adler  <darin@apple.com>
492
493         Reviewed by Dave.
494
495         - fixed 3224031 -- can't search at rakuten.co.jp b/c of extra characters inserted by regexp replace (8-bit char)
496
497         Use PCRE UTF-8 regular expressions instead of just chopping off high bytes.
498
499         * kjs/regexp.h: Redo field names, remove some unused stuff.
500         * kjs/regexp.cpp:
501         (convertToUTF8): Added.
502         (compareStringOffsets): Added.
503         (createSortedOffsetsArray): Added.
504         (convertCharacterOffsetsToUTF8ByteOffsets): Added.
505         (convertUTF8ByteOffsetsToCharacterOffsets): Added.
506         (RegExp::RegExp): Set the PCRE_UTF8 flag, and convert the UString to UTF-8 instead of
507         using ascii() on it.
508         (RegExp::~RegExp): Remove unneeded if statement (pcre_free is 0-tolerant as free is).
509         (RegExp::match): Convert the UString to UTF-8 and convert the character offsets to and
510         from UTF-8 byte offsets. Also do fixes for the "no offset vector" case so we get the
511         correct position and matched string.
512
513         * JavaScriptCore.pbproj/project.pbxproj: Add a PCRE header that was missing before.
514
515 === Safari-82 ===
516
517 === Safari-81 ===
518
519 2003-05-21  Vicki Murley  <vicki@apple.com>
520
521         Reviewed by john 
522         - fixed 3234553: Safari and its frameworks should link using order files
523
524         * JavaScriptCore.order: Added.
525         * JavaScriptCore.pbproj/project.pbxproj: set SECTORDER_FLAGS = -sectorder __TEXT __text JavaScriptCore.order
526
527 === Safari-80 ===
528
529 2003-05-19  Maciej Stachowiak  <mjs@apple.com>
530
531         - fixed 3261096 - Make WebKit an umbrella framework
532         
533         * JavaScriptCore.pbproj/project.pbxproj: In a B&I build, compile as a
534         sub-umbrella of WebKit.
535
536 2003-05-16  Maciej Stachowiak  <mjs@apple.com>
537
538         Reviewed by Ken.
539
540         - fixed 3254063 - REGRESSION: hang in KJS PropertyMap with many items in iDisk pictures folder
541
542         * kjs/property_map.cpp:
543         (PropertyMap::expand): Fixed to maintain key count properly - otherwise the hashtable
544         could get completely full, resulting in disaster.
545         (PropertyMap::checkConsistency): Fixed compilation. Fixed to know about deleted
546         sentinel. Fixed to search with double-hashing instead of linear probing.
547         
548 === Safari-79 ===
549
550 2003-05-15  Maciej Stachowiak  <mjs@apple.com>
551
552         Reviewed by Chris.
553
554         - fixed 3259673 - REGRESSION: marvel.com thinks I don't have the flash plugin any more
555
556         * kjs/nodes.cpp:
557         (ContinueNode::execute): Return a Continue completion, not a Break
558         completion, in the normal non-exception case.
559
560 2003-05-12  Maciej Stachowiak  <mjs@apple.com>
561
562         Reviewed by Darin.
563
564         - fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
565         - improved JavaScript error message format
566         
567         * kjs/error_object.cpp:
568         (ErrorProtoFuncImp::call): Include line number in toString output.
569         * kjs/internal.cpp:
570         (Parser::parse): Remove redundant fprintf.
571         * kjs/interpreter.cpp:
572         (Interpreter::evaluate): Log if the flag is on. Include filename in log output.
573         (Interpreter::shouldPrintExceptions): Check the global flag.
574         (Interpreter::setShouldPrintExceptions): Set the global flag.
575         * kjs/interpreter.h:
576         * kjs/nodes.cpp:
577         (Node::throwError): Add variants that include value and expression or label in format.
578         (NewExprNode::evaluate): Improve error message.
579         (FunctionCallNode::evaluate): Improve error message.
580         (RelationalNode::evaluate): Improve error message.
581         (ContinueNode::execute): Improve error message.
582         (BreakNode::execute): Improve error message.
583         (LabelNode::execute): Improve error message.
584         * kjs/nodes.h:
585
586 === Safari-78 ===
587
588 2003-05-07  Vicki Murley  <vicki@apple.com>
589
590         Reviewed by darin.
591         
592         - modify the Mixed build style to build optimized with symbols
593         
594         * JavaScriptCore.pbproj/project.pbxproj:  removed OPTIMIZATION_CFLAGS
595
596 2003-05-05  Maciej Stachowiak  <mjs@apple.com>
597
598         Reviewed by Don.
599
600         - fixed 3239961 - www.phiffer.com doesn't work; uses "var top; top = n;"
601         
602         * kjs/nodes.cpp:
603         (VarDeclNode::evaluate): Check if the property exists with
604         getDirect() instead of hasProperty().
605
606 === Safari-77 ===
607
608 2003-04-29  Darin Adler  <darin@apple.com>
609
610         Reviewed by John.
611
612         - fixed 2959353 -- eliminate globally initialized objects from JavaScriptCore
613
614         * JavaScriptCore.pbproj/project.pbxproj: Added fpconst.cpp.
615         * kjs/fpconst.cpp: Added. Defines KJS::NaN and KJS::Inf in a way that does not require a
616         framework init routine.
617
618         * kjs/identifier.h: Use a new KJS_IDENTIFIER_EACH_GLOBAL macro so we can do things to
619         the entire set of identifiers easily. Also added an init function that sets up these globals
620         in a way that does not require a framework init routine.
621         * kjs/identifier.cpp: (Identifier::init): Initialize the property ane globals in a way that
622         does not require a framework init routine.
623
624         * kjs/internal.cpp: (InterpreterImp::initGlobalObject): Call Identifier::init.
625         
626         * kjs/ustring.h: Remove UChar::null and UString::null, and add UString::null(). We can't have
627         a global object of a class that has a constructor if we want to avoid framework init routines,
628         and luckily very little code relies on these.
629         * kjs/ustring.cpp:
630         (UCharReference::ref): Use our own global specific to this function rather than returning
631         UChar::null when past the end of the string. This is dangerous because if the caller modifies
632         it, that affects what all subsequent callers will see.
633         (UString::Rep::create): Added assertions.
634         (UString::UString): Got rid of code here that used to set up UString::null.
635         (UString::null): Added. Returns a global null string, and can be used in some of the places
636         where we used to use the UString::null global.
637         (UString::operator[]): Fixed case where this used to return UChar::null to return '\0' instead.
638
639         * kjs/regexp.cpp: (RegExp::match): Change uses of UString::null to UString::null().
640
641 2003-04-25  Darin Adler  <darin@apple.com>
642
643         - fixed 3241344 -- REGRESSION: top of page missing on wired.com and cnn.com
644
645         Caused by the ResolveNode speedup. Roll it out until I can figure out why.
646
647         * kjs/nodes.cpp: (ResolveNode::evaluate): Go back to using evaluateReference.
648
649 2003-04-25  Darin Adler  <darin@apple.com>
650
651         Reviewed by Maciej.
652
653         - a couple improvements that give a 6.6% speedup on iBench JavaScript
654
655         * kjs/nodes.cpp: (ResolveNode::evaluate): Don't use evaluateReference.
656         
657         * kjs/object.cpp: (ObjectImp::get): Do the prototype work with the ValueImp, not a wrapper.
658         Contributes a tiny bit to the speedup, but cleaner anyway.
659         (ObjectImp::hasProperty): Same thing here.
660
661 2003-04-25  Darin Adler  <darin@apple.com>
662
663         Reviewed by Maciej.
664
665         - move from linear probing to double hashing, gives an 0.7% speedup in iBench JavaScript
666
667         * kjs/property_map.h: Remove the hash function.
668         * kjs/property_map.cpp: Added statistics for rehashes and removes.
669         Moved from linear probing to double hashing, using the hash modulo
670         (table size minus one) plus one for the probing distance.
671
672         * kjs/ustring.h: Use unsigned instead of int for hash function result.
673
674 === Safari-75 ===
675
676 2003-04-18  Maciej Stachowiak  <mjs@apple.com>
677
678         Reviewed by Ken.
679
680         Improved List pool for 3% speed improvement on cvs-js-ibench
681
682         * kjs/list.cpp: Replaced the roving cursor with a free list and
683         raised the high water mark to 384.
684
685 2003-04-12  Maciej Stachowiak  <mjs@apple.com>
686
687         Reviewed by Don.
688
689         - JavaScriptCore part of fix for 3158769 - JavaScript triggers not as async as they used to be
690
691         Added a way to get the current interpreter lock count, so Sherlock
692         can unlock the interpreter inside JS method implementations that
693         spend a long time waiting for I/O, allowing more efficient
694         multi-threaded operation.
695
696         * kjs/internal.cpp:
697         (lockInterpreter):
698         (unlockInterpreter):
699         (InterpreterImp::lock):
700         (InterpreterImp::lockCount):
701         * kjs/internal.h:
702         * kjs/interpreter.cpp:
703         (Interpreter::lockCount):
704         * kjs/interpreter.h:
705
706 === Safari-73 ===
707
708 === Safari-72 ===
709
710 === Safari-71 ===
711
712 2003-03-31  Darin Adler  <darin@apple.com>
713
714         * English.lproj/InfoPlist.strings: Changed "1.0 Beta" to "1.0 Beta 2".
715         * JavaScriptCore.pbproj/project.pbxproj: Changed "1.0 Beta" to "1.0 Beta 2".
716
717 === Safari-69 ===
718
719 2003-03-24  Trey Matteson  <trey@apple.com>
720
721         Pass -seg_addr_table_filename <FILENAME> to ld.  This makes our frameworks in
722         SYMROOT actually work for symbol resolution because they will have the correct
723         prebinding address.  It also fixes obscure B&I problems with prebinding
724         reported by Matt Reda.
725
726         Note the reason all this is tricky for our projects is that we have a different
727         install location for Jaguar and Panther.  The purpose of this arg is to declare
728         at link time our eventual location, which allows the prebinding address to be
729         found in /AppleInternal/Developer/seg_addr_table.  We use a funky back-tick
730         expression within OTHER_LDFLAGS to get a conditional value depending on the
731         build train we are in.
732
733         This can all go away once we only build on Panther and don't embed the
734         frameworks inside the Safari.app wrapper.
735
736         In addition I fixed the OTHER_LDFLAGS settings in our build styles to be
737         additive instead of overriding, so we have the args we used for B&I in force
738         when building outside of B&I.
739
740         Reviewed by Maciej.
741
742         * JavaScriptCore.pbproj/project.pbxproj:
743
744 === Safari-68 ===
745
746 2003-03-16  Trey Matteson  <trey@apple.com>
747
748         3198135 - need to fix our projects so SYMROOT is not stripped
749
750         Tweaked stripping options:  B&I build does not COPY_PHASE_STRIP.
751         Deployment build still does.
752         We strip manually as part of the install that we do ourselves.
753
754         Reviewed by Maciej.
755
756         * JavaScriptCore.pbproj/project.pbxproj:
757
758 === Safari-67 ===
759
760 === Safari-66 ===
761
762 2003-03-10  Darin Adler  <darin@apple.com>
763
764         Reviewed by Ken.
765
766         - fixed 3193099 -- date parsing can't handle the time zone format that date formatting produces
767
768         * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Allow a "GMT" prefix before the time zone offset.
769
770 === Safari-65 ===
771
772 2003-03-04  Darin Adler  <darin@apple.com>
773
774         Reviewed by Maciej.
775
776         - got rid of some framework initialization (working on bug 2959353)
777
778         * kjs/identifier.h: Turn Identifier:null into Identifier:null().
779         * kjs/identifier.cpp: Removed Identifier:null and added Identifier:null().
780
781         * kjs/internal.cpp: Made NaN_Bytes and Inf_Bytes const.
782
783         * kjs/completion.h: Use Identifier:null() instead of Identifier:null.
784         * kjs/function.h: Ditto.
785         * kjs/function_object.cpp: (FunctionObjectImp::construct): Ditto.
786         * kjs/nodes.cpp: (FuncExprNode::evaluate): Use Identifier:null() instead of Identifier:null.
787
788 2003-03-02  Maciej Stachowiak  <mjs@apple.com>
789
790         Reviewed by Trey.
791
792         - fixed 3158833 - ebay prefs page is so slow, it seems like a hang.
793
794         92% speed improvement on ebay prefs page.
795         1% speed improvement on js-ibench and js-performance plt suites.
796         
797         There were a couple of problems with the identifier hash table that
798         I fixed:
799         
800         * kjs/identifier.cpp:
801         (void Identifier::remove): Adjust the shrink threshold to avoid
802         constantly growing and shrinking.
803         * kjs/ustring.cpp:
804         (UString::Rep::computeHash): Use a better hash function that
805         avoids collisions for obvious data sets.
806
807 === Safari-64 ===
808
809 === Safari-63 ===
810
811 2003-02-26  Maciej Stachowiak  <mjs@apple.com>
812
813         Reviewed by Darin.
814
815         - fixed 3156705 - REGRESSION: javascript menus improperly placed at umich.edu store
816
817         * kjs/nodes.cpp:
818         (StatListNode::execute): If the first statement's completion is
819         not normal, return immediately.
820
821 2003-02-21  Darin Adler  <darin@apple.com>
822
823         Reviewed by Maciej.
824
825         - fixed 3142355 -- nil-deref in CFTimeZoneCopyAbbreviation
826
827         The real problem wasn't with the current time zone, but with the UTC time zone.
828         The poor sod had a broken /usr/share/zoneinfo directory, with a 0-byte-long UTC file.
829
830         * kjs/date_object.cpp: (UTCTimeZone): Use CFTimeZoneCreateWithTimeIntervalFromGMT(NULL, 0.0)
831         to get the universal time zone instead of getting it by name.
832
833 === Safari-62 ===
834
835 2003-02-18  Darin Adler  <darin@apple.com>
836
837         Reviewed by Trey and Ken.
838
839         - fixed 3142355 -- nil-deref in CFTimeZoneCopyAbbreviation
840
841         Although I can't reproduce this bug, it seems that it's caused by CFTimeZoneCopyDefault returning NULL.
842         I'm almost certain that the UTC time zone will be created successfully in this case, so I'll just use that.
843
844         * kjs/date_object.cpp:
845         (UTCTimeZone): Added. Gets the UTC time zone (once in a global).
846         (CopyLocalTimeZone): Added. Gets the local time zone, but falls back to UTC.
847         (gmtimeUsingCF): Use UTCTimeZone.
848         (localtimeUsingCF): Use CopyLocalTimeZone.
849         (mktimeUsingCF): Use CopyLocalTimeZone.
850         (timegmUsingCF): Use UTCTimeZone.
851
852 2003-02-12  Darin Adler  <darin@apple.com>
853
854         Reviewed by Dave.
855
856         - fixed 3145442 -- toString(16) is not working, causing non-ASCII characters in mac.com homepage to be munged
857
858         * kjs/number_object.cpp: (NumberProtoFuncImp::call): Add handling for toString with a radix other than
859         10 passed as an argument.
860
861 2003-02-11  Trey Matteson  <trey@apple.com>
862
863         Set -seg1addr in our build styles, but not for the B&I build.
864         This makes our SYMROOTS from B&I usable to determine symbols from crash
865         logs from the field.
866         Also nuked DeploymentFat build style.
867
868         Reviewed by Ken.
869
870         * JavaScriptCore.pbproj/project.pbxproj:
871
872 2003-02-04  Maciej Stachowiak  <mjs@apple.com>
873
874         Reviewed by Darin.
875
876         * JavaScriptCore.pbproj/project.pbxproj: Updated to build the framework
877         standalone instead of embedded when doing a B&I build for Panther.
878
879 === Safari-55 ===
880
881 2003-01-29  Darin Adler  <darin@apple.com>
882
883         Reviewed by John.
884
885         * kjs/scope_chain.cpp: Rolled out the fix to bug 3137084.
886         It caused a massive storage leak, and probably didn't even fix the bug.
887
888 2003-01-28  Darin Adler  <darin@apple.com>
889
890         Reviewed by Ken.
891
892         - fixed 3157318 -- hang at time zone page after clicking on map at www.time.gov
893
894         * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Allow a comma after the day.
895         Given how this code is structured, it allows commas in unwanted contexts too, but
896         that's almost certainly harmless.
897
898 2003-01-28  Darin Adler  <darin@apple.com>
899
900         Reviewed by Maciej.
901
902         - fixed 3144918 -- Can't drill down multiple levels of categories when selling on ebay
903         if first item in list is chosen
904         
905         The bug was caused by having array values in the property map past the storageLength cutoff
906         in an array object; those values would not be seen when you do a get.
907
908         * kjs/array_object.cpp:
909         (ArrayInstanceImp::put): Implement a new rule for resizing the storage that is independent
910         of the length. The old rule would sometimes make the storage very big if you added two elements
911         in a row that both had large, but consecutive indexes. This eliminates any cases where we
912         make sparse entries in the property map below the sparse array cutoff.
913         (ArrayInstanceImp::resizeStorage): Don't ever make storage size bigger than the cutoff unless
914         the caller specifically requests it.
915         (ArrayInstanceImp::setLength): Change this so it only makes the storage smaller, never larger.
916         We will actually enlarge the storage when putting elements in.
917
918 2003-01-25  Darin Adler  <darin@apple.com>
919
920         Reviewed by Maciej.
921
922         * kjs/Makefile.am: Add dependencies so the .lut.h files get rebuilt if the script changes.
923
924 === Safari-54 ===
925
926 2003-01-22  Darin Adler  <darin@apple.com>
927
928         Reviewed by Maciej.
929
930         - fixed 3137084 -- Many non-reproducible crashers in ContextImp::mark / ScopeChain::mark
931
932         * kjs/scope_chain.cpp: (ScopeChain::push): Add assertion.
933         (ScopeChain::release): Fix while loop so that it decrements refCount of the first node in
934         the chain too.
935
936 2003-01-21  Darin Adler  <darin@apple.com>
937
938         - correct our copyrights to 2003; copyright is based on year of publication, not year worked on
939
940 2003-01-16  Maciej Stachowiak  <mjs@apple.com>
941
942         Reviewed by Darin.
943
944         - made minor tweaks to work better with Mozilla's JavaScript tests.
945
946         * kjs/testkjs.cpp:
947         (VersionFunctionImp::call): Implemented 
948         (main): Ignore files named -f (hack to match -f <filename syntax
949         that moz JavaScript tests expect). Also use return code 3 instead
950         of 1 for uncaught exception.
951
952 2003-01-16  Darin Adler  <darin@apple.com>
953
954         * kjs/number_object.cpp: (NumberObjectImp::construct):
955         Fix build, remove stray space.
956
957 2003-01-16  Darin Adler  <darin@apple.com>
958
959         Reviewed by Maciej.
960
961         - rolled in a change from the KJS folks
962
963         * kjs/number_object.h: Use ObjectImp *, not Object, for the proto.
964         * kjs/number_object.cpp:
965         (NumberInstanceImp::NumberInstanceImp): Use ObjectImp *, not Object, for the proto.
966         (NumberPrototypeImp::NumberPrototypeImp): Pass ObjectImp.
967         (NumberObjectImp::construct): Use ObjectImp.
968
969 === Safari-52 ===
970
971 2003-01-14  Darin Adler  <darin@apple.com>
972
973         Reviewed by Ken.
974
975         - rolled in a change from the KJS folks
976
977         Fixes a bug where the date functions would not accept non-strings.
978         And provides a bit of a speedup.
979
980         * kjs/date_object.h: Change parameter type for parseDate.
981         * kjs/date_object.cpp:
982         (DateObjectFuncImp::call): Always call toString, don't check the type.
983         (KJS::parseDate): Take a UString parameter, not a String parameter.
984
985 2003-01-13  Darin Adler  <darin@apple.com>
986
987         * kjs/ustring.h: Fix spelling of occurrence.
988
989 2003-01-12  Darin Adler  <darin@apple.com>
990
991         Reviewed by Maciej.
992
993         - turned more recursion into iteration, and fixed some backwards stuff
994
995         * kjs/grammar.y: Use the normal idiom for CaseClauses and FormalParameterList
996         rather than using append().
997         * kjs/grammar.cpp: Regenerated.
998
999         * kjs/nodes.h: Change ClauseListNode and ParameterNode to use the normal idiom,
1000         and got rid of append methods. Also added friend declarations and calls to reverseList().
1001         * kjs/nodes.cpp:
1002         (StatListNode::ref): Iteration, not recursion.
1003         (StatListNode::deref): Iteration, not recursion.
1004         (StatListNode::execute): Iteration, not recursion.
1005         (StatListNode::processVarDecls): Iteration, not recursion.
1006         (CaseClauseNode::reverseList): Added.
1007         (ClauseListNode::ref): Iteration, not recursion.
1008         (ClauseListNode::deref): Iteration, not recursion.
1009         (ClauseListNode::processVarDecls): Iteration, not recursion.
1010         (CaseBlockNode::reverseLists): Added.
1011         (ParameterNode::ref): Iteration, not recursion.
1012         (ParameterNode::deref): Iteration, not recursion.
1013         (FuncDeclNode::reverseParameterList): Added.
1014         (FuncExprNode::reverseParameterList): Added.
1015         (SourceElementsNode::ref): Iteration, not recursion.
1016         (SourceElementsNode::deref): Iteration, not recursion.
1017         (SourceElementsNode::execute): Use variable name of n to match other functions.
1018         (SourceElementsNode::processFuncDecl): Ditto.
1019         (SourceElementsNode::processVarDecls): Ditto.
1020
1021         * kjs/nodes2string.cpp:
1022         (SourceStream::operator<<): Used a switch statement for a bit of added clarity.
1023         (ElementNode::streamTo): Iteration, not recursion.
1024         (PropertyValueNode::streamTo): Iteration, not recursion.
1025         (ArgumentListNode::streamTo): Iteration, not recursion.
1026         (StatListNode::streamTo): Iteration, not recursion, and fixed order.
1027         (VarDeclListNode::streamTo): Iteration, not recursion.
1028         (ClauseListNode::streamTo): Used for statement to match other functions.
1029         (CaseBlockNode::streamTo): Used for statement to match other functions.
1030         (ParameterNode::streamTo): Iteration, not recursion.
1031         (SourceElementsNode::streamTo): Iteration, not recursion, and fixed order that has been
1032         backwards since I changed how this works in nodes.cpp.
1033
1034 2003-01-11  Darin Adler  <darin@apple.com>
1035
1036         Reviewed by John.
1037
1038         - changes inspired by things I noticed reviewing diffs vs. KDE when preparing the tarball
1039
1040         * kjs/function.cpp: (GlobalFuncImp::call): Use strtol when strtoll is
1041         not available. Do #ifndef NDEBUG, not #if !NDEBUG.
1042         * kjs/function.h: Do #ifndef NDEBUG, not #if !NDEBUG.
1043         * kjs/internal.cpp:
1044         (InterpreterImp::initGlobalObject): Do #ifndef NDEBUG, not #if !NDEBUG.
1045         (KJS::printInfo): Remove case for ListType and remove default case that just
1046         ends up suppressing the "missing case" warning and does no good.
1047         * kjs/interpreter.cpp: (Interpreter::evaluate): Do #ifndef NDEBUG, not #if !NDEBUG.
1048         * kjs/nodes.cpp:
1049         (Node::finalCheck): Fix accidentally-deleted code in an ifdef we never compile.
1050         (FunctionCallNode::evaluate): Remove bogus XXX comment. Maciej put this comment in,
1051         and together we determined it's not needed.
1052         (TypeOfNode::evaluate): Ditto.
1053         * kjs/object.cpp: Remove assert that refers to ListType.
1054         * kjs/value.h: Remove ListType.
1055
1056 2003-01-09  Darin Adler  <darin@apple.com>
1057
1058         * JavaScriptCore.pbproj/project.pbxproj: Add the year 2003, remove CFBundleIconFile,
1059         bump marketing version to 0.8.1 and version to 52u to keep up with the branch,
1060         remove CFHumanReadableCopyright, remove NSPrincipalClass.
1061
1062         * English.lproj/InfoPlist.strings: Updated to match above changes.
1063
1064 2003-01-05  Maciej Stachowiak  <mjs@apple.com>
1065
1066         Reviewed by no one cause I'm just changing copyright strings.
1067
1068         * JavaScriptCore.pbproj/project.pbxproj: Added non-Apple copyrights to
1069         copyright strings.
1070         * English.lproj/InfoPlist.strings: Likewise.
1071
1072 2003-01-05  Darin Adler  <darin@apple.com>
1073
1074         * JavaScriptCore.pbproj/project.pbxproj: Fix "Apple Compupter" typo.
1075         Remove unneeded CFBundleLongVersionString we don't use anywhere else.
1076
1077 2003-01-02  Darin Adler  <darin@apple.com>
1078
1079         Reviewed by Maciej.
1080
1081         - fixed 3138213 -- browser hangs trying to open Apple travel site
1082
1083         * kjs/date_object.cpp: (timetUsingCF): Check for very-negative year numbers too.
1084
1085 === Alexander-48 ===
1086
1087 === Alexander-47 ===
1088
1089 2002-12-30  Darin Adler  <darin@apple.com>
1090
1091         Reviewed by Don and Maciej.
1092
1093         - follow-on to my fix for 3134693 that fixes one more case of recursion and simplifies further
1094
1095         * kjs/grammar.y: Remove SourceElementNode and just use a StatementNode instead.
1096         Reverse SourceElements rule so the recursive rule comes first as in the original
1097         KJS code (avoids actual parser recursion).
1098
1099         * kjs/grammar.cpp: Regenerated.
1100         * kjs/grammar.cpp.h: Regenerated.
1101         * kjs/grammar.h: Regenerated.
1102
1103         * kjs/nodes.h: Make processFuncDecl a virtual function in StatementNode so that we can
1104         use a StatementNode instead of a SourceElementNode. Add a call to reverseList in BlockNode
1105         to correct the order of the linked list in SourceElementsNode, to replace the technique
1106         where we reversed it in the parser. Remove SourceElementNode class, and make the element in
1107         SourceElementsNode be a StatementNode instead.
1108         * kjs/nodes.cpp: Remove SourceElementNode code.
1109         (StatementNode::processFuncDecl): Added empty function.
1110         (BlockNode::reverseList): Added. Used to make the SourceElements list ordered correctly.
1111         * kjs/nodes2string.cpp: Remove SourceElementNode code.
1112
1113 === Alexander-46 ===
1114
1115 2002-12-28  Darin Adler  <darin@apple.com>
1116
1117         Reviewed by Gramps and Ken.
1118         Checked in by Ken.
1119
1120         - fixed 3134693 -- carsdirect.com crash on used car search, due to large JavaScript array
1121
1122         The parser was using recursion to handle many types of lists.
1123         This meant that we crashed out of stack space when any of the lists were extra big.
1124         I applied the same sort of fix we had already applied a while back for argument lists for
1125         all the other types of lists, including the list of ElementNode that was the reason for
1126         the crash reported here.
1127
1128         * kjs/grammar.y: Removed ElisionNode altogether and just use a count.
1129         Use specific node types for PropertyNameAndValueList and PropertyName.
1130
1131         * kjs/grammar.cpp: Regenerated.
1132         * kjs/grammar.cpp.h: Regenerated.
1133         * kjs/grammar.h: Regenerated.
1134
1135         * kjs/nodes.h: Elide "ElisionNode", changing objects to keep elision counts instead.
1136         Make the ObjectLiteralNode list field be PropertyValueNode, not just Node.
1137         Make PropertyValueNode fields have specific types. Add new reverse list functions, calls
1138         to those functions in the constructors, and friend declarations as needed so the class
1139         that holds the head of a list can reverse the list during parsing.
1140         * kjs/nodes.cpp:
1141         (ElementNode::ref): Use iteration instead of recursion. Also elide "elision".
1142         (ElementNode::deref): Ditto.
1143         (ElementNode::evaluate): Use iteration instead of recursion, taking advantage of
1144         the fact that the linked list is reversed. Also use the elision count rather than
1145         an elision list.
1146         (ArrayNode::reverseElementList): Reverse the list so we can iterate normally.
1147         (ArrayNode::ref): Elide "elision".
1148         (ArrayNode::deref): Ditto.
1149         (ArrayNode::evaluate): Use elision count instead of elision list.
1150         (ObjectLiteralNode::reverseList): Reverse the list so we can iterate normally.
1151         (PropertyValueNode::ref): Use iteration instead of recursion.
1152         (PropertyValueNode::deref): Use iteration instead of recursion.
1153         (PropertyValueNode::evaluate): Use iteration instead of recursion, taking advantage
1154         of the fact that the linked list is reversed.
1155         (ArgumentListNode::ref): Change code to match the other similar cases we had to revise.
1156         (ArgumentListNode::deref): Ditto.
1157         (ArgumentListNode::evaluateList): Ditto.
1158         (ArgumentsNode::reverseList): Ditto.
1159         (VarDeclListNode::ref): Use iteration instead of recursion.
1160         (VarDeclListNode::deref): Ditto.
1161         (VarDeclListNode::evaluate): Use iteration instead of recursion, taking advantage
1162         of the fact that the linked list is reversed.
1163         (VarDeclListNode::processVarDecls): Ditto.
1164         (VarStatementNode::reverseList): Reverse the list so we can iterate normally.
1165         (FunctionBodyNode::FunctionBodyNode): Use BlockNode as the base class, removing
1166         most of the FunctionBodyNode class.
1167
1168         * kjs/nodes2string.cpp:
1169         (ElementNode::streamTo): Update for using a count for elision, and reverse linking.
1170         (ArrayNode::streamTo): Update for using a count for elision.
1171         (PropertyValueNode::streamTo): Update for reverse linking.
1172         (ArgumentListNode::streamTo): Update for reverse linking. This has been wrong for
1173         a while, since we added the reverse a long time ago.
1174         (VarDeclListNode::streamTo): Update for reverse linking.
1175         (ParameterNode::streamTo): Update for reverse linking.
1176
1177 === Alexander-45 ===
1178
1179 2002-12-22  Darin Adler  <darin@apple.com>
1180
1181         Reviewed by Don and John.
1182
1183         - fixed 3134449 -- Date.UTC returns NaN (invalid date)
1184
1185         Did more testing of the date functions and made them behave like the other browsers.
1186         There were three problems:
1187
1188             1) We did a validity check that other browsers don't do (hence the NaN).
1189             2) We treated passed-in dates as local time even in Date.UTC (hence a wrong result
1190                once I fixed the NaN).
1191             3) The results of ToUTCString (and ToGMTString) weren't formatted quite the same
1192                as other browsers.
1193
1194         Also found a couple of silly but unrelated coding mistakes.
1195
1196         * kjs/date_object.cpp:
1197         (timetUsingCF): Added. Has the guts of mktimeUsingCF, but without the CFGregorianDateIsValid
1198         check. Other browsers accept invalid dates. Also takes a time zone parameter.
1199         (mktimeUsingCF): Calls timetUsingCF with the current time zone.
1200         (timegmUsingCF): Calls timetUsingCF with the UTC time zone.
1201         (formatDate): Remove the includeComma flag.
1202         (formatDateUTCVariant): Added. For use instead of formatDate with the includeComma flag.
1203         Puts the day before the month name.
1204         (DateProtoFuncImp::call): Use the new formatDateUTCVariant for ToGMTString and ToUTCString.
1205         Without this change the date didn't match other browsers.
1206         (DateObjectImp::DateObjectImp): Use UTCPropertyName. Somehow I declared this and didn't use
1207         it before.
1208         (DateObjectImp::construct): Pass -1 for is_dst literally instead of using invalidDate.
1209         Changing this to invalidDate was just a mistake (although no real difference in compiled
1210         code since invalidDate is just -1).
1211         (DateObjectFuncImp::call): Call timegm for the UTC case instead of mktime.
1212
1213 === Alexander-44 ===
1214
1215 === Alexander-43 ===
1216
1217 2002-12-20  Trey Matteson  <trey@apple.com>
1218
1219         We now build with symbols the B&I.  Deployment builds are without symbols,
1220         so it is easy to generate a non-huge app as a one-off.
1221
1222         Reviewed by Darin
1223
1224         * JavaScriptCore.pbproj/project.pbxproj:
1225
1226 === Alexander-42 ===
1227
1228 === Alexander-41 ===
1229
1230 === Alexander-40 ===
1231
1232 2002-12-18  Maciej Stachowiak  <mjs@apple.com>
1233
1234         Reviewed by John.
1235
1236         - fixed 3131171 - Change Alex versions to satisfy both marketing and B&I requirements
1237         
1238         * English.lproj/InfoPlist.strings:
1239         * JavaScriptCore.pbproj/project.pbxproj:
1240
1241 2002-12-17  Darin Adler  <darin@apple.com>
1242
1243         Reviewed by Trey.
1244
1245         * JavaScriptCore.pbproj/project.pbxproj: Removed signature.
1246
1247 === Alexander-39 ===
1248
1249 === Alexander-38 ===
1250
1251 2002-12-16  Darin Adler  <darin@apple.com>
1252
1253         Reviewed by Don and Maciej.
1254
1255         - fixed 3129115 -- need Apple copyright added to open source documents
1256
1257         * tons of files: Added our copyright to files we modified, and updated all to standard format.
1258
1259         - other changes
1260
1261         * JavaScriptCore.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2.
1262         Also removed completion.cpp.
1263         * kjs/completion.cpp: Removed.
1264         * kjs/completion.h: Made the Completion constructor inline.
1265
1266         * kjs/grammar.y: Removed an obsolete "pretend ifdef". No need to put these in APPLE_CHANGES now.
1267
1268 === Alexander-37 ===
1269
1270 === JavaScriptCore-37u2 ===
1271
1272 2002-12-15  Maciej Stachowiak  <mjs@apple.com>
1273
1274         Reviewed by Darin.
1275
1276         * JavaScriptCore.pbproj/project.pbxproj: Bump version to 37u2.
1277
1278 2002-12-14  Darin Adler  <darin@apple.com>
1279
1280         Reviewed by Maciej.
1281
1282         * JavaScriptCore.pbproj/project.pbxproj: Make dtoa.h visible as an SPI so I can
1283         use it inside QString.
1284
1285 2002-12-14  Maciej Stachowiak  <mjs@apple.com>
1286
1287         Reviewed by Ken.
1288
1289         - further corrections to number printing.
1290
1291         * kjs/ustring.cpp:
1292         (UString::from): Make number printing match the ECMA standard
1293         algorithm.
1294
1295 2002-12-14  Maciej Stachowiak  <mjs@apple.com>
1296
1297         Reviewed by Dave.
1298
1299         - fix toString() conversion for numbers less than 1. Negative
1300         exponents are still wrong though (things like 1E-34).
1301  
1302         * kjs/ustring.cpp:
1303         (UString::from): Don't print empty string for numbers less than 1,
1304         and remember to add extra 0s after the decimal for negative
1305         decimal positions.
1306         
1307 === Alexander-37u1 ===
1308
1309 === Alexander-36 ===
1310
1311 2002-12-12  Maciej Stachowiak  <mjs@apple.com>
1312
1313         Reviewed by Darin.
1314
1315         - fixed 3056449 - can't select state at tucows.com
1316
1317         * kjs/array_instance.h:
1318         * kjs/array_object.cpp:
1319         (ArrayInstanceImp::propList): Add numeric proprties that are in
1320         special storage.
1321         * kjs/array_object.h:
1322         * kjs/object.h: Make propList a virtual method.
1323
1324 2002-12-11  Maciej Stachowiak  <mjs@apple.com>
1325
1326         Reviewed by Don.
1327
1328         - Add kjsprint global function in Development build for ease of debugging.
1329         - Print uncaught JavaScript exceptions to the console in Development.
1330         - Improve wording of exception error messages.
1331         
1332         * kjs/function.cpp:
1333         (GlobalFuncImp::call):
1334         * kjs/function.h:
1335         * kjs/internal.cpp:
1336         (InterpreterImp::initGlobalObject):
1337         * kjs/interpreter.cpp:
1338         (Interpreter::evaluate):
1339         * kjs/nodes.cpp:
1340         (NewExprNode::evaluate):
1341         (FunctionCallNode::evaluate):
1342         (RelationalNode::evaluate):
1343
1344 2002-12-10  John Sullivan  <sullivan@apple.com>
1345
1346         Fixed more "Alexander"s that were lurking in places I forgot 
1347         to look before.
1348
1349         Reviewed by Darin
1350
1351         * Makefile.am:
1352         "rm -rf $(SYMROOTS)/Safari.app/Frameworks/JavaScriptCore.framework"
1353
1354 2002-12-09  Darin Adler  <darin@apple.com>
1355
1356         Reviewed by Maciej.
1357
1358         * JavaScriptCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
1359         * English.lproj/InfoPlist.strings: In here too.
1360
1361 2002-12-09  Maciej Stachowiak  <mjs@apple.com>
1362
1363         Reviewed by Ken.
1364
1365         - fixed 3059637 - all articles missing at excite.com sports page
1366         - fixed 3065903 - most of content missing at excite.com news page
1367
1368         These bugs both came up because a JavaScript function has a var
1369         declaration that collides with a function parameter name.
1370         
1371         * kjs/nodes.cpp:
1372         (VarDeclNode::processVarDecls): Don't set the property to
1373         undefined if a property with that name is already set on the
1374         global object. Otherwise we may clobber function parameters with
1375         undefined even before hitting a possible var initializer.
1376
1377 2002-12-06  Maciej Stachowiak  <mjs@apple.com>
1378
1379         Reviewed by: Darin Adler
1380
1381         - made framework embedding work correctly with buildit
1382
1383         * JavaScriptCore.pbproj/project.pbxproj: Give framework a relative
1384         install path, don't install it the normal way, and copy it
1385         manually to /AppleInternal/Library/Frameworks if installing.
1386
1387 === Alexander-35 ===
1388
1389 2002-12-04  Maciej Stachowiak  <mjs@apple.com>
1390
1391         Reviewed by: Richard Williamson
1392
1393         Added explicit lock/unlock methods so Sherlock can grab the
1394         interpreter lock as needed.
1395         
1396         - partially addressed 3084320 - JavaScriptCore crash
1397         
1398         * kjs/internal.cpp:
1399         (InterpreterImp::InterpreterImp):
1400         (InterpreterImp::lock):
1401         (InterpreterImp::unlock):
1402         * kjs/internal.h:
1403         * kjs/interpreter.cpp:
1404         (Interpreter::lock):
1405         (Interpreter::unlock):
1406         * kjs/interpreter.h:
1407
1408 2002-12-04  Maciej Stachowiak  <mjs@apple.com>
1409
1410         Reviewed by: Darin Adler
1411
1412         Set things up so JavaScriptCore builds in PCRE and uses it for
1413         regular expressions. This fixes many form validation bugs:
1414
1415         - fixed 3103197 - javascript at fidelity.com rejects valid input
1416         - fixed 2942552 - form validation at weather.com fails
1417         - fixed 3079752 - js always reports textarea is empty
1418         - fixed 3079719 - covad.com "check availalbility" fails
1419         
1420         * Makefile.am: Add pcre subdir.
1421         * kjs/config.h: define HAVE_PCREPOSIX to true.
1422         * kjs/regexp.h: Don't include pcreposix.h since nothing from there
1423         is used.
1424         * pcre/.cvsignore: Added.
1425         * pcre/ChangeLog: Removed.
1426         * pcre/INSTALL: Removed.
1427         * pcre/Makefile.am: Added.
1428         * pcre/Makefile.in: Removed.
1429         * pcre/NEWS: Removed.
1430         * pcre/NON-UNIX-USE: Removed.
1431         * pcre/README: Removed.
1432         * pcre/chartables.c: Added.
1433         * pcre/config.guess: Removed.
1434         * pcre/config.in: Removed.
1435         * pcre/config.sub: Removed.
1436         * pcre/configure: Removed.
1437         * pcre/configure.in: Removed.
1438         * pcre/dll.mk: Removed.
1439         * pcre/doc/Tech.Notes: Removed.
1440         * pcre/doc/pcre.3: Removed.
1441         * pcre/doc/pcre.html: Removed.
1442         * pcre/doc/pcre.txt: Removed.
1443         * pcre/doc/pcregrep.1: Removed.
1444         * pcre/doc/pcregrep.html: Removed.
1445         * pcre/doc/pcregrep.txt: Removed.
1446         * pcre/doc/pcreposix.3: Removed.
1447         * pcre/doc/pcreposix.html: Removed.
1448         * pcre/doc/pcreposix.txt: Removed.
1449         * pcre/doc/pcretest.1: Removed.
1450         * pcre/doc/pcretest.html: Removed.
1451         * pcre/doc/pcretest.txt: Removed.
1452         * pcre/doc/perltest.txt: Removed.
1453         * pcre/install-sh: Removed.
1454         * pcre/ltmain.sh: Removed.
1455         * pcre/pcre-config.h: Added.
1456         * pcre/pcre-config.in: Removed.
1457         * pcre/internal.h: Include pcre-config.h instead of config.h
1458         * pcre/pcre.c:
1459         (ord2utf8): Fix warnings.
1460         (pcre_compile): Fix warnings.
1461         * pcre/pcre.def: Removed.
1462         * pcre/pcre.h: Added.
1463         * pcre/pcre.in: Removed.
1464         * JavaScriptCore.pbproj/project.pbxproj: Added pcre files to build.
1465         * JavaScriptCorePrefix.h: Guard c++ headers with #ifdef __cplusplus.
1466
1467 2002-12-04  Maciej Stachowiak  <mjs@apple.com>
1468
1469         Reviewed by: Richard Williamson
1470
1471         * pcre/doc/*: Added.
1472         * pcre/testdata/*: Added.
1473
1474 2002-12-03  Maciej Stachowiak  <mjs@apple.com>
1475
1476         Reviewed by: Darin Adler
1477
1478         - imported PCRE 3.9 into the tree; this isn't actually compiled or
1479         used yet.
1480
1481         * pcre/*: Added.
1482
1483 == Rolled over to ChangeLog-2002-12-03 ==