ChangeLog-2003-10-25 54.6 KB
Newer Older
vicki's avatar
vicki committed
1 2
=== Safari-111 ===

mjs's avatar
mjs committed
3 4 5 6 7 8
2003-10-22  Maciej Stachowiak  <mjs@apple.com>

        Fix broken build.

        * kjs/simple_number.h:

9 10 11 12 13 14 15 16 17 18 19 20 21 22
2003-10-22  Maciej Stachowiak  <mjs@apple.com>

	Merged 64-bit compilation fixes, and fixes for handling negative 0
	from upstream kjs.
	
        * kjs/internal.cpp:
        * kjs/simple_number.h:
        (KJS::SimpleNumber): fixed constants; added negZero constant. 
        (KJS::SimpleNumber::is): adjusted to use long and not int.
        (KJS::SimpleNumber::value): ditto.
	(KJS::SimpleNumber::fits): ditto; also don't allow -0 to fit, so
	we don't lose the distinction between -0 and +0.
        (KJS::SimpleNumber::make): adjusted to use long.

darin's avatar
darin committed
23 24 25 26 27 28 29 30 31 32 33
2003-10-18  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3367015 -- interdependent variable declarations in for loop don't work (they go backwards)

        * kjs/nodes.h: (KJS::ForNode::ForNode): Add a new overload of the constructor for when the
        first parameter is a variable declaration list. Call reverseList as we do in other constructors
        that take lists that are built backwards.
        * kjs/nodes.cpp: (ForNode::reverseList): Added. New helper function.

vicki's avatar
vicki committed
34 35
=== Safari-110 ===

vicki's avatar
vicki committed
36 37
=== Safari-109 ===

darin's avatar
darin committed
38 39 40 41 42 43 44 45 46 47 48 49
2003-10-06  Darin Adler  <darin@apple.com>

        * kjs/create_hash_table: Remove stray semicolon.

        * kjs/array_object.lut.h:
        * kjs/date_object.lut.h:
        * kjs/lexer.lut.h:
        * kjs/math_object.lut.h:
        * kjs/number_object.lut.h:
        * kjs/string_object.lut.h:
        Regenerated.

vicki's avatar
vicki committed
50 51
=== Safari-108 ===

darin's avatar
darin committed
52 53 54 55 56 57 58 59 60 61
2003-10-02  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3441656 -- constructor bad for objs created w/ function as prototype (www.moock.org/asdg/codedepot)

        * kjs/nodes.cpp: (FuncDeclNode::processFuncDecl): Set up the constructor as
        as specified in the JavaScript spec. We were already doing this right in the
        other place we make functions.

darin's avatar
darin committed
62 63 64 65 66 67 68 69
2003-09-30  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        Rolled in Harri Porten's change to accept non-breaking space in JavaScript.

        * kjs/lexer.cpp: (Lexer::isWhiteSpace): Accept 00A0 as "whitespace".

mjs's avatar
mjs committed
70 71 72 73 74 75 76
2003-09-25  Maciej Stachowiak  <mjs@apple.com>

	Roll out build system change since it did not actually work. :-(
	
        * JavaScriptCore.pbproj/project.pbxproj:
        * Makefile.am:

mjs's avatar
mjs committed
77 78 79 80 81 82 83 84 85
2003-09-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        * JavaScriptCore.pbproj/project.pbxproj: Don't hack install name. Instead
	of embedding into Safari, embed into WebKit as sub-umbrella.
        * Makefile.am: Don't forget to rebuild if the user removes
	JavaScript.framework from symroots manually.

vicki's avatar
vicki committed
86 87
=== Safari-107 ===

darin's avatar
darin committed
88 89 90 91 92 93 94 95 96
2003-09-24  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        - fixed 3421107 -- some dates that other browsers can parse can't be parsed by KJS's Date.parse()

        * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Added code to be more strict about month names,
        to allow a time zone after date even if the date omits the time, and to understand AM and PM.

darin's avatar
darin committed
97 98 99 100
2003-09-22  Darin Adler  <darin@apple.com>

        * JavaScriptCore.pbproj/project.pbxproj: Rename Mixed build style to OptimizedWithSymbols.

darin's avatar
darin committed
101 102 103 104 105 106 107
2003-09-22  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

        * kjs/config.h: Added HAVE_SYS_PARAM_H, since KJS does look for this header, and we do
        indeed have it. Just something I noticed in passing while cleaning up configure.in.

darin's avatar
darin committed
108 109 110 111 112 113 114 115 116 117
2003-09-20  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3419380 -- JavaScript Date.getTimezoneOffset is off by one hour (during daylight savings)

        * kjs/date_object.cpp: (DateProtoFuncImp::call): The daylight savings correction
        in here was incorrect. Perhaps I should have corrected it for the non-BSD case too,
        but I'm not sure the issue is the same.

darin's avatar
darin committed
118 119 120 121 122 123 124 125
2003-09-17  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        * kjs/date_object.cpp: Removed our CF-based implementations of gmtime, localtime,
        mktime, timegm, and time, since they no longer have the slow "hit the filesystem
        every time" behavior.

vicki's avatar
vicki committed
126 127
=== Safari-100 ===

vicki's avatar
vicki committed
128 129
=== Safari-99 ===

vicki's avatar
vicki committed
130 131
=== Safari-98 ===

vicki's avatar
vicki committed
132 133
=== Safari-97 ===

vicki's avatar
vicki committed
134 135
=== Safari-96 ===

mjs's avatar
mjs committed
136 137 138 139 140 141 142 143 144 145
2003-08-27  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John

	- fixed rdar://problem/3397316 - sherlock crash: KJS::Collector::allocate(unsigned long)
	
	* kjs/internal.cpp:
        (InterpreterImp::InterpreterImp): Hold the lock a bit longer, so
	the call to initGlobalObject is covered.

vicki's avatar
vicki committed
146 147
=== Safari-95 ===

darin's avatar
darin committed
148 149 150 151 152 153 154 155 156 157
2003-08-24  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed 3098350 -- opt. params to date methods are ignored (can't set end date in Exchange/Outlook web cal.)

        * kjs/date_object.cpp: (DateProtoFuncImp::call): Added code to handle the optional parameters.
        Strangely, the table of functions already had the right number of parameters listed, but the
        code to look at the parameter values was missing.

sheridan's avatar
sheridan committed
158 159
=== Safari-94 ===

darin's avatar
darin committed
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
2003-08-17  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3247528 -- encodeURI missing from JavaScriptCore (needed by Crystal Reports)
        - fixed 3381297 -- escape method does not escape the null character
        - fixed 3381299 -- escape method produces incorrect escape sequences ala WinIE, rather than correct ala Gecko
        - fixed 3381303 -- unescape method treats escape sequences as Latin-1 ala WinIE rather than as UTF-8 ala Gecko
        - fixed 3381304 -- unescape method garbles strings with bad escape sequences in them

        * kjs/function.h: Added constants for decodeURI, decodeURIComponent, encodeURI, and
        encodeURIComponent.
        * kjs/function.cpp:
        (encode): Added. New helper function for escape, encodeURI, and encodeURIComponent.
        (decode): Added. New helper function for unescape, decodeURI, and decodeURIComponent.
        (GlobalFuncImp::call): Added decodeURI, decodeURIComponent, encodeURI, and encodeURIComponent 
        implementations. Changed escape and unescape to use new helper functions, which fixes
        the four problems above.

        * kjs/internal.cpp: (InterpreterImp::initGlobalObject): Add decodeURI, decodeURIComponent,
        encodeURI, and encodeURIComponent to the global object.

        * kjs/ustring.h: Added a length to the CString class so it can hold strings with null
        characters in them, not just null-terminated strings. This allows a null character from
        a UString to survive the process of UTF-16 to UTF-8 decoding. Added overloads to
        UString::append, UString::UTF8String, UTF8SequenceLength, decodeUTF8Sequence,
        convertUTF16OffsetsToUTF8Offsets, and convertUTF8OffsetsToUTF16Offsets.
        
        * kjs/ustring.cpp:
        (CString::CString): Set up the length properly in all the constructors. Also add a new
        constructor that takes a length.
        (CString::append): Use and set the length properly.
        (CString::operator=): Use and set the length properly.
        (operator==): Use and the length and memcmp instead of strcmp.
        (UString::append): Added new overloads for const char * and for a single string to make
        it more efficient to build up a UString from pieces. The old way, a UString was created
        and destroyed each time you appended.
        (UTF8SequenceLength): New. Helper for decoding UTF-8.
        (decodeUTF8Sequence): New. Helper for decoding UTF-8.
        (UString::UTF8String): New. Decodes from UTF-16 to UTF-8. Same as the function that
        was in regexp.cpp, except has proper handling for UTF-16 surrogates.
        (compareStringOffsets): Moved from regexp.cpp.
        (createSortedOffsetsArray): Moved from regexp.cpp.
        (convertUTF16OffsetsToUTF8Offsets): New. Converts UTF-16 offsets to UTF-8 offsets, given
        a UTF-8 string. Same as the function that was in regexp.cpp, except has proper handling
        for UTF-16 surrogates.
        (convertUTF8OffsetsToUTF16Offsets): New. Converts UTF-8 offsets to UTF-16 offsets, given
        a UTF-8 string. Same as the function that was in regexp.cpp, except has proper handling
        for UTF-16 surrogates.

        - fixed 3381296 -- regular expression matches with UTF-16 surrogates will treat sequences as two characters

        * kjs/regexp.cpp:
        (RegExp::RegExp): Use the new UString::UTF8String function instead a function in this file.
        (RegExp::match): Use the new convertUTF16OffsetsToUTF8Offsets (and the corresponding
        reverse) instead of convertCharacterOffsetsToUTF8ByteOffsets in this file.

sheridan's avatar
sheridan committed
217 218
=== Safari-93 ===

vicki's avatar
vicki committed
219 220 221 222 223 224
2003-08-14  Vicki Murley  <vicki@apple.com>

        Reviewed by John. 

        * JavaScriptCore.pbproj/project.pbxproj: deleted JavaScriptCore.order from the project.

vicki's avatar
vicki committed
225 226 227 228 229 230 231
2003-08-14  Vicki Murley  <vicki@apple.com>

        Reviewed by John. 

        * JavaScriptCore.order: Removed.  We now link to the order file at /AppleInternal/OrderFiles.
        * JavaScriptCore.pbproj/project.pbxproj: change sectorder flag to point to /AppleInternal/OrderFiles/JavaScriptCore.order

232 233
=== JavaScriptCore-92.1 ===

darin's avatar
darin committed
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
2003-08-07  Darin Adler  <darin@apple.com>

        Reviewed by John Sullivan.

        - fixed 3365527 -- subscripting JavaScript strings does not work (leads to hang at www.newmagna.com.au)

        The JavaScript specification says nothing about this, but other browsers seem to give
        read-only access to the characters in a string as if the string was an array of characters.

        * kjs/array_object.cpp:
        (ArrayInstanceImp::get): Update to use a public toArrayIndex function instead of our own getArrayIndex
        function, so we can share with string.
        (ArrayInstanceImp::put): Ditto.
        (ArrayInstanceImp::hasProperty): Ditto.
        (ArrayInstanceImp::setLength): Ditto.

        * kjs/ustring.h: Add toArrayIndex.
        * kjs/ustring.cpp: (UString::toArrayIndex): Added. Implements the rule from array.
        * kjs/identifier.h: Add a forwarding function so we can use toArrayIndex.

        * kjs/string_object.cpp:
        (StringInstanceImp::get): Return a single character string if the property name is an array index.
        (StringInstanceImp::hasProperty): Return true for property names that are suitable array indices.

        * JavaScriptCore.pbproj/project.pbxproj: Let Xcode be Xcode.

sheridan's avatar
sheridan committed
260 261
=== Safari-92 ===

mjs's avatar
mjs committed
262 263 264 265 266 267 268 269 270 271 272
2003-08-07  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3366975 - repro hang in KJS::Value::Value entering text at eil.com
	
        * kjs/string_object.cpp:
        (StringProtoFuncImp::call): When doing a match against a regexp
	with the global flag set, make sure to return null rather than an
	empty array when there is no match. This is what other browsers do.

mjs's avatar
mjs committed
273 274 275 276 277 278 279 280 281
2003-08-05  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

        * kjs/list.cpp:
	(List::copyTail): Test for loop termination with < instead of !=,
	since i starts at 1 but size could be 0. Do the same for the other
	loop for consistency's sake.
	
mjs's avatar
mjs committed
282 283 284 285 286 287 288 289 290
2003-08-01  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3222621 - Cryptic "anonymous function hack" messages in console (10.2.4)
	
        * kjs/lexer.cpp:
        (Lexer::lex): Remove useless debug spew.

sheridan's avatar
sheridan committed
291 292
=== Safari-91 ===

darin's avatar
darin committed
293 294 295 296 297 298 299 300 301 302 303 304 305 306
2003-07-30  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed problem where some JavaScriptCore symbols had no namespace or prefix

        * kjs/grammar.y: Added a define for yylloc to make it use the kjs prefix.
        This is the same thing done for the rest of the symbols automatically by yacc,
        but for some reason it's not done for yyloc. Also make automatic() function static.
        * kjs/grammar.cpp: Regenerated.
        * kjs/lexer.cpp: Use kjsyylloc instead of yyloc.

        * pcre/pcre.h: Add defines to prepend kjs prefixes for all the PCRE functions.

307 308 309 310
2003-07-30  Darin Adler  <darin@apple.com>

        * Makefile.am: Include the subdirectory with the PCRE code in it.

sullivan's avatar
sullivan committed
311 312 313 314 315 316 317 318 319 320
2003-07-30  John Sullivan  <sullivan@apple.com>

	- JavaScriptCore part of fix for 3284525 -- AutoFill fills in 
	only e-mail address field of New Account form on Apple Store Japan

        Reviewed by Darin

        * JavaScriptCore.pbproj/project.pbxproj:
	Mark pcre.h as a Private header

mjs's avatar
mjs committed
321 322 323 324 325 326 327 328 329 330 331
2003-07-28  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Richard.

	- fixed 3240814 - LEAK: 120 byte leak in JavaScript parser in Sherlock Movies channel
	
        * kjs/internal.cpp:
        (Parser::parse): ref() and deref() the program node, to make sure to clean up properly,
	before deleting it.
        (InterpreterImp::checkSyntax): Likewise.

sheridan's avatar
sheridan committed
332 333
=== Safari-90 ===

mjs's avatar
mjs committed
334 335 336 337 338 339 340 341
2003-07-22  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	Remove -seg_addr_table_filename to fix build.

        * JavaScriptCore.pbproj/project.pbxproj:

mjs's avatar
mjs committed
342 343 344 345 346 347 348 349 350
2003-07-17  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3330344 - Please change allowable client to "JavaScriptGlue" from "JSGlue"

        * JavaScriptCore.pbproj/project.pbxproj: Changed allowable client
	to "JavaScriptGlue"

darin's avatar
darin committed
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368
2003-07-13  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - do some improvements Maciej suggested while reviewing the array index change

        * kjs/array_object.cpp:
        (getArrayIndex): Return a flag to say whether the index was value separately, to avoid
        in-band signalling.
        (ArrayInstanceImp::get): Update for new getArrayIndex parameters.
        (ArrayInstanceImp::put): Ditto.
        (ArrayInstanceImp::hasProperty): Ditto.
        (ArrayInstanceImp::setLength): Ditto.
        
        * kjs/ustring.cpp: (UString::toStrictUInt32): Check for overflow in a way that avoids doing
        a divide every time through the loop. But note that it adds an extra branch to the loop.
        I wonder which is worse.

darin's avatar
darin committed
369 370 371 372 373 374 375
2003-07-12  Darin Adler  <darin@apple.com>

        Fixed broken build.

        * kjs/identifier.h: Add toULong back. It's still used in WebCore (and maybe in JavaScriptGlue,
        for all I know).

darin's avatar
darin committed
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399
2003-07-12  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3272777 -- array object indices treated as integers by Safari, but as strings in other web browsers

        JavaScriptCore did not implement the proper rule for what an array index is.

        * kjs/array_object.cpp:
        (getArrayIndex): Added. Implements the rule from the specification, which also provides a handy
        "not an array index" value of 2^32-1.
        (ArrayInstanceImp::get): Use getArrayIndex.
        (ArrayInstanceImp::put): Ditto.
        (ArrayInstanceImp::hasProperty): Ditto.
        (ArrayInstanceImp::setLength): Ditto.

        * kjs/identifier.h: Removed now-unused toULong, and added toStrictUInt32, in both cases forwarding
        functions that forward to UString.

        * kjs/ustring.h: Added toStringUInt32.
        * kjs/ustring.cpp: (UString::toStrictUInt32): Added. Converts a string to a 32-bit unsigned integer,
        and rejects any string that does not exactly match the way the integer would be formatted on output.
        This is the rule documented in the ECMA language standard.

vicki's avatar
vicki committed
400 401
=== Safari-89 ===

mjs's avatar
mjs committed
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423
2003-07-10  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3302021 - v74 and v85 hang with http://e-www.motorola.com/

	The crux of this was saving and restoring the prototype objects
	for all the standard types when saving and restoring for the page
	cache.
	
        * kjs/internal.cpp:
        (InterpreterImp::saveBuiltins):
        (InterpreterImp::restoreBuiltins):
        * kjs/internal.h:
        * kjs/interpreter.cpp:
        (Interpreter::saveBuiltins):
        (Interpreter::restoreBuiltins):
        (SavedBuiltins::SavedBuiltins):
        (SavedBuiltins::~SavedBuiltins):
        * kjs/interpreter.h:
        * kjs/property_map.cpp:

mjs's avatar
mjs committed
424 425 426 427 428 429 430 431
2003-07-07  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by John.

	- fixed 3295916 - b/c JavaScriptCore and WebCore are installing in wrong location, private headers are public

        * WebCore.pbproj/project.pbxproj: Install in WebKit.framework/Versions/A/Frameworks.

vicki's avatar
vicki committed
432 433
=== Safari-88 ===

mjs's avatar
mjs committed
434 435 436 437 438 439 440 441 442 443 444
2003-07-02  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	- fixed 3096961 - JavaScriptCore should link only to what it uses, shouldn't drag in Cocoa.framework

        * JavaScriptCore.pbproj/project.pbxproj: Don't link Cocoa.framework;
	just pull in CoreFoundation and CoreServices.
        * kjs/date_object.cpp: Include CoreServices.h instead of Carbon.h
	(the stuff we want is in CarbonCore).

darin's avatar
darin committed
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460
2003-06-20  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - improved the property map sorting technique so that the indices
          are separate for each property map, and also preserve the ordering
          when property maps are saved and restored

        * kjs/property_map.cpp:
        (PropertyMap::put): Don't bother setting the index for _singleEntry, since there's
        no need to sort a single entry. Use the per-table lastIndexUsed instead of a global.
        (PropertyMap::expand): Don't use the index (uninitialized now) out of a _singleEntry
        when putting it in a newly-created map; just use 0. Compute a value for the new map's
        lastIndexUsed as we walk through the elements we are adding to it (using the same old
        indices from the old map).

sheridan's avatar
sheridan committed
461 462
=== Safari-85.1 ===

sheridan's avatar
sheridan committed
463 464
=== Safari-85 ===

darin's avatar
darin committed
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480
2003-06-13  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3178438 -- return elements in order of addition in for..in loop (other browsers seem to)
	- fixed 3292067 -- REGRESSION (64-65): albertsons.com "Shop A to Z" menus are not sorted alphabetically

        * kjs/property_map.h: Add index field to hash table entry and index parameter to insert function.
        * kjs/property_map.cpp:
        (PropertyMap::put): Set an index for new map entries to an ever-increasing number based on a global.
        (PropertyMap::insert): Take an index parameter.
        (PropertyMap::expand): Preserve the indices as we rehash the table.
        (comparePropertyMapEntryIndices): Added. Compares two property map entries by index.
        (PropertyMap::addEnumerablesToReferenceList): Sort the proprty map entries by index before adding
        them to the reference list.

sheridan's avatar
sheridan committed
481 482
=== Safari-84 ===

vicki's avatar
vicki committed
483 484 485 486 487 488
2003-06-10  Vicki Murley  <vicki@apple.com>

        Reviewed by john.

        * JavaScriptCore.order: new order file for 1.0

sheridan's avatar
sheridan committed
489 490
=== Safari-83 ===

darin's avatar
darin committed
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514
2003-06-04  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

	- fixed 3224031 -- can't search at rakuten.co.jp b/c of extra characters inserted by regexp replace (8-bit char)

        Use PCRE UTF-8 regular expressions instead of just chopping off high bytes.

        * kjs/regexp.h: Redo field names, remove some unused stuff.
        * kjs/regexp.cpp:
        (convertToUTF8): Added.
        (compareStringOffsets): Added.
        (createSortedOffsetsArray): Added.
        (convertCharacterOffsetsToUTF8ByteOffsets): Added.
        (convertUTF8ByteOffsetsToCharacterOffsets): Added.
        (RegExp::RegExp): Set the PCRE_UTF8 flag, and convert the UString to UTF-8 instead of
        using ascii() on it.
        (RegExp::~RegExp): Remove unneeded if statement (pcre_free is 0-tolerant as free is).
        (RegExp::match): Convert the UString to UTF-8 and convert the character offsets to and
        from UTF-8 byte offsets. Also do fixes for the "no offset vector" case so we get the
        correct position and matched string.

        * JavaScriptCore.pbproj/project.pbxproj: Add a PCRE header that was missing before.

sheridan's avatar
sheridan committed
515 516
=== Safari-82 ===

sheridan's avatar
sheridan committed
517 518
=== Safari-81 ===

vicki's avatar
vicki committed
519 520 521 522 523 524 525 526
2003-05-21  Vicki Murley  <vicki@apple.com>

        Reviewed by john 
	- fixed 3234553: Safari and its frameworks should link using order files

        * JavaScriptCore.order: Added.
        * JavaScriptCore.pbproj/project.pbxproj: set SECTORDER_FLAGS = -sectorder __TEXT __text JavaScriptCore.order

sheridan's avatar
sheridan committed
527 528
=== Safari-80 ===

mjs's avatar
mjs committed
529 530 531 532 533 534 535
2003-05-19  Maciej Stachowiak  <mjs@apple.com>

	- fixed 3261096 - Make WebKit an umbrella framework
	
        * JavaScriptCore.pbproj/project.pbxproj: In a B&I build, compile as a
	sub-umbrella of WebKit.

mjs's avatar
mjs committed
536 537 538 539 540 541 542 543 544 545 546 547
2003-05-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	- fixed 3254063 - REGRESSION: hang in KJS PropertyMap with many items in iDisk pictures folder

        * kjs/property_map.cpp:
	(PropertyMap::expand): Fixed to maintain key count properly - otherwise the hashtable
	could get completely full, resulting in disaster.
	(PropertyMap::checkConsistency): Fixed compilation. Fixed to know about deleted
	sentinel. Fixed to search with double-hashing instead of linear probing.
	
sheridan's avatar
sheridan committed
548 549
=== Safari-79 ===

mjs's avatar
mjs committed
550 551 552 553 554 555 556 557 558 559
2003-05-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Chris.

	- fixed 3259673 - REGRESSION: marvel.com thinks I don't have the flash plugin any more

        * kjs/nodes.cpp:
        (ContinueNode::execute): Return a Continue completion, not a Break
	completion, in the normal non-exception case.

mjs's avatar
mjs committed
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585
2003-05-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3254484 - Add a way to print JavaScript exceptions to the console via the debug menu
	- improved JavaScript error message format
	
        * kjs/error_object.cpp:
        (ErrorProtoFuncImp::call): Include line number in toString output.
        * kjs/internal.cpp:
        (Parser::parse): Remove redundant fprintf.
        * kjs/interpreter.cpp:
        (Interpreter::evaluate): Log if the flag is on. Include filename in log output.
        (Interpreter::shouldPrintExceptions): Check the global flag.
        (Interpreter::setShouldPrintExceptions): Set the global flag.
        * kjs/interpreter.h:
        * kjs/nodes.cpp:
        (Node::throwError): Add variants that include value and expression or label in format.
        (NewExprNode::evaluate): Improve error message.
        (FunctionCallNode::evaluate): Improve error message.
        (RelationalNode::evaluate): Improve error message.
        (ContinueNode::execute): Improve error message.
        (BreakNode::execute): Improve error message.
        (LabelNode::execute): Improve error message.
        * kjs/nodes.h:

sheridan's avatar
sheridan committed
586 587
=== Safari-78 ===

vicki's avatar
vicki committed
588 589 590 591 592 593 594 595
2003-05-07  Vicki Murley  <vicki@apple.com>

        Reviewed by darin.
	
	- modify the Mixed build style to build optimized with symbols
        
	* JavaScriptCore.pbproj/project.pbxproj:  removed OPTIMIZATION_CFLAGS

mjs's avatar
mjs committed
596 597 598 599 600 601 602 603 604 605
2003-05-05  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Don.

	- fixed 3239961 - www.phiffer.com doesn't work; uses "var top; top = n;"
	
        * kjs/nodes.cpp:
        (VarDeclNode::evaluate): Check if the property exists with
	getDirect() instead of hasProperty().

sheridan's avatar
sheridan committed
606 607
=== Safari-77 ===

darin's avatar
darin committed
608
2003-04-29  Darin Adler  <darin@apple.com>
darin's avatar
darin committed
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640

        Reviewed by John.

	- fixed 2959353 -- eliminate globally initialized objects from JavaScriptCore

        * JavaScriptCore.pbproj/project.pbxproj: Added fpconst.cpp.
        * kjs/fpconst.cpp: Added. Defines KJS::NaN and KJS::Inf in a way that does not require a
        framework init routine.

        * kjs/identifier.h: Use a new KJS_IDENTIFIER_EACH_GLOBAL macro so we can do things to
        the entire set of identifiers easily. Also added an init function that sets up these globals
        in a way that does not require a framework init routine.
        * kjs/identifier.cpp: (Identifier::init): Initialize the property ane globals in a way that
        does not require a framework init routine.

        * kjs/internal.cpp: (InterpreterImp::initGlobalObject): Call Identifier::init.
        
        * kjs/ustring.h: Remove UChar::null and UString::null, and add UString::null(). We can't have
        a global object of a class that has a constructor if we want to avoid framework init routines,
        and luckily very little code relies on these.
        * kjs/ustring.cpp:
        (UCharReference::ref): Use our own global specific to this function rather than returning
        UChar::null when past the end of the string. This is dangerous because if the caller modifies
        it, that affects what all subsequent callers will see.
        (UString::Rep::create): Added assertions.
        (UString::UString): Got rid of code here that used to set up UString::null.
        (UString::null): Added. Returns a global null string, and can be used in some of the places
        where we used to use the UString::null global.
        (UString::operator[]): Fixed case where this used to return UChar::null to return '\0' instead.

        * kjs/regexp.cpp: (RegExp::match): Change uses of UString::null to UString::null().

641 642 643 644 645 646 647 648
2003-04-25  Darin Adler  <darin@apple.com>

	- fixed 3241344 -- REGRESSION: top of page missing on wired.com and cnn.com

        Caused by the ResolveNode speedup. Roll it out until I can figure out why.

        * kjs/nodes.cpp: (ResolveNode::evaluate): Go back to using evaluateReference.

darin's avatar
darin committed
649 650 651 652 653 654 655 656 657 658 659 660
2003-04-25  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - a couple improvements that give a 6.6% speedup on iBench JavaScript

        * kjs/nodes.cpp: (ResolveNode::evaluate): Don't use evaluateReference.
        
        * kjs/object.cpp: (ObjectImp::get): Do the prototype work with the ValueImp, not a wrapper.
        Contributes a tiny bit to the speedup, but cleaner anyway.
        (ObjectImp::hasProperty): Same thing here.

darin's avatar
darin committed
661 662 663 664 665 666 667 668 669 670 671 672 673
2003-04-25  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - move from linear probing to double hashing, gives an 0.7% speedup in iBench JavaScript

        * kjs/property_map.h: Remove the hash function.
        * kjs/property_map.cpp: Added statistics for rehashes and removes.
        Moved from linear probing to double hashing, using the hash modulo
        (table size minus one) plus one for the probing distance.

        * kjs/ustring.h: Use unsigned instead of int for hash function result.

sheridan's avatar
sheridan committed
674 675
=== Safari-75 ===

mjs's avatar
mjs committed
676 677 678 679 680 681 682 683 684
2003-04-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	Improved List pool for 3% speed improvement on cvs-js-ibench

        * kjs/list.cpp: Replaced the roving cursor with a free list and
	raised the high water mark to 384.

mjs's avatar
mjs committed
685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705
2003-04-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Don.

	- JavaScriptCore part of fix for 3158769 - JavaScript triggers not as async as they used to be

	Added a way to get the current interpreter lock count, so Sherlock
	can unlock the interpreter inside JS method implementations that
	spend a long time waiting for I/O, allowing more efficient
	multi-threaded operation.

        * kjs/internal.cpp:
        (lockInterpreter):
        (unlockInterpreter):
        (InterpreterImp::lock):
        (InterpreterImp::lockCount):
        * kjs/internal.h:
        * kjs/interpreter.cpp:
        (Interpreter::lockCount):
        * kjs/interpreter.h:

sheridan's avatar
sheridan committed
706 707
=== Safari-73 ===

sheridan's avatar
sheridan committed
708 709
=== Safari-72 ===

sheridan's avatar
sheridan committed
710 711
=== Safari-71 ===

712 713 714 715 716
2003-03-31  Darin Adler  <darin@apple.com>

        * English.lproj/InfoPlist.strings: Changed "1.0 Beta" to "1.0 Beta 2".
        * JavaScriptCore.pbproj/project.pbxproj: Changed "1.0 Beta" to "1.0 Beta 2".

sheridan's avatar
sheridan committed
717 718
=== Safari-69 ===

trey's avatar
trey committed
719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743
2003-03-24  Trey Matteson  <trey@apple.com>

	Pass -seg_addr_table_filename <FILENAME> to ld.  This makes our frameworks in
	SYMROOT actually work for symbol resolution because they will have the correct
	prebinding address.  It also fixes obscure B&I problems with prebinding
	reported by Matt Reda.

	Note the reason all this is tricky for our projects is that we have a different
	install location for Jaguar and Panther.  The purpose of this arg is to declare
	at link time our eventual location, which allows the prebinding address to be
	found in /AppleInternal/Developer/seg_addr_table.  We use a funky back-tick
	expression within OTHER_LDFLAGS to get a conditional value depending on the
	build train we are in.

	This can all go away once we only build on Panther and don't embed the
	frameworks inside the Safari.app wrapper.

 	In addition I fixed the OTHER_LDFLAGS settings in our build styles to be
	additive instead of overriding, so we have the args we used for B&I in force
	when building outside of B&I.

	Reviewed by Maciej.

        * JavaScriptCore.pbproj/project.pbxproj:

sheridan's avatar
sheridan committed
744 745
=== Safari-68 ===

trey's avatar
trey committed
746 747 748 749 750 751 752 753 754 755 756 757
2003-03-16  Trey Matteson  <trey@apple.com>

	3198135 - need to fix our projects so SYMROOT is not stripped

	Tweaked stripping options:  B&I build does not COPY_PHASE_STRIP.
	Deployment build still does.
	We strip manually as part of the install that we do ourselves.

        Reviewed by Maciej.

        * JavaScriptCore.pbproj/project.pbxproj:

sheridan's avatar
sheridan committed
758 759
=== Safari-67 ===

760 761
=== Safari-66 ===

darin's avatar
darin committed
762 763 764 765 766 767 768 769
2003-03-10  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3193099 -- date parsing can't handle the time zone format that date formatting produces

        * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Allow a "GMT" prefix before the time zone offset.

sheridan's avatar
sheridan committed
770 771
=== Safari-65 ===

darin's avatar
darin committed
772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787
2003-03-04  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - got rid of some framework initialization (working on bug 2959353)

        * kjs/identifier.h: Turn Identifier:null into Identifier:null().
        * kjs/identifier.cpp: Removed Identifier:null and added Identifier:null().

        * kjs/internal.cpp: Made NaN_Bytes and Inf_Bytes const.

        * kjs/completion.h: Use Identifier:null() instead of Identifier:null.
        * kjs/function.h: Ditto.
        * kjs/function_object.cpp: (FunctionObjectImp::construct): Ditto.
        * kjs/nodes.cpp: (FuncExprNode::evaluate): Use Identifier:null() instead of Identifier:null.

mjs's avatar
mjs committed
788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806
2003-03-02  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Trey.

	- fixed 3158833 - ebay prefs page is so slow, it seems like a hang.

	92% speed improvement on ebay prefs page.
	1% speed improvement on js-ibench and js-performance plt suites.
	
	There were a couple of problems with the identifier hash table that
	I fixed:
	
        * kjs/identifier.cpp:
	(void Identifier::remove): Adjust the shrink threshold to avoid
	constantly growing and shrinking.
        * kjs/ustring.cpp:
        (UString::Rep::computeHash): Use a better hash function that
	avoids collisions for obvious data sets.

sheridan's avatar
sheridan committed
807 808
=== Safari-64 ===

sheridan's avatar
sheridan committed
809 810
=== Safari-63 ===

mjs's avatar
mjs committed
811 812 813 814 815 816 817 818 819 820
2003-02-26  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3156705 - REGRESSION: javascript menus improperly placed at umich.edu store

        * kjs/nodes.cpp:
        (StatListNode::execute): If the first statement's completion is
	not normal, return immediately.

darin's avatar
darin committed
821 822 823 824 825 826 827 828 829 830 831 832
2003-02-21  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3142355 -- nil-deref in CFTimeZoneCopyAbbreviation

        The real problem wasn't with the current time zone, but with the UTC time zone.
        The poor sod had a broken /usr/share/zoneinfo directory, with a 0-byte-long UTC file.

        * kjs/date_object.cpp: (UTCTimeZone): Use CFTimeZoneCreateWithTimeIntervalFromGMT(NULL, 0.0)
        to get the universal time zone instead of getting it by name.

sheridan's avatar
sheridan committed
833 834
=== Safari-62 ===

darin's avatar
darin committed
835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851
2003-02-18  Darin Adler  <darin@apple.com>

        Reviewed by Trey and Ken.

        - fixed 3142355 -- nil-deref in CFTimeZoneCopyAbbreviation

        Although I can't reproduce this bug, it seems that it's caused by CFTimeZoneCopyDefault returning NULL.
        I'm almost certain that the UTC time zone will be created successfully in this case, so I'll just use that.

        * kjs/date_object.cpp:
        (UTCTimeZone): Added. Gets the UTC time zone (once in a global).
        (CopyLocalTimeZone): Added. Gets the local time zone, but falls back to UTC.
        (gmtimeUsingCF): Use UTCTimeZone.
        (localtimeUsingCF): Use CopyLocalTimeZone.
        (mktimeUsingCF): Use CopyLocalTimeZone.
        (timegmUsingCF): Use UTCTimeZone.

darin's avatar
darin committed
852 853 854 855 856 857 858 859 860
2003-02-12  Darin Adler  <darin@apple.com>

        Reviewed by Dave.

        - fixed 3145442 -- toString(16) is not working, causing non-ASCII characters in mac.com homepage to be munged

        * kjs/number_object.cpp: (NumberProtoFuncImp::call): Add handling for toString with a radix other than
        10 passed as an argument.

trey's avatar
trey committed
861 862 863 864 865 866 867 868 869 870 871
2003-02-11  Trey Matteson  <trey@apple.com>

	Set -seg1addr in our build styles, but not for the B&I build.
	This makes our SYMROOTS from B&I usable to determine symbols from crash
	logs from the field.
	Also nuked DeploymentFat build style.

        Reviewed by Ken.

        * JavaScriptCore.pbproj/project.pbxproj:

mjs's avatar
mjs committed
872 873 874 875 876 877 878
2003-02-04  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        * JavaScriptCore.pbproj/project.pbxproj: Updated to build the framework
	standalone instead of embedded when doing a B&I build for Panther.

sheridan's avatar
sheridan committed
879 880
=== Safari-55 ===

darin's avatar
darin committed
881 882 883 884 885 886 887
2003-01-29  Darin Adler  <darin@apple.com>

        Reviewed by John.

        * kjs/scope_chain.cpp: Rolled out the fix to bug 3137084.
        It caused a massive storage leak, and probably didn't even fix the bug.

darin's avatar
darin committed
888 889 890 891 892 893 894 895 896 897
2003-01-28  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- fixed 3157318 -- hang at time zone page after clicking on map at www.time.gov

        * kjs/date_object.cpp: (KJS::KRFCDate_parseDate): Allow a comma after the day.
        Given how this code is structured, it allows commas in unwanted contexts too, but
        that's almost certainly harmless.

darin's avatar
darin committed
898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917
2003-01-28  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fixed 3144918 -- Can't drill down multiple levels of categories when selling on ebay
        if first item in list is chosen
        
        The bug was caused by having array values in the property map past the storageLength cutoff
        in an array object; those values would not be seen when you do a get.

        * kjs/array_object.cpp:
        (ArrayInstanceImp::put): Implement a new rule for resizing the storage that is independent
        of the length. The old rule would sometimes make the storage very big if you added two elements
        in a row that both had large, but consecutive indexes. This eliminates any cases where we
        make sparse entries in the property map below the sparse array cutoff.
        (ArrayInstanceImp::resizeStorage): Don't ever make storage size bigger than the cutoff unless
        the caller specifically requests it.
        (ArrayInstanceImp::setLength): Change this so it only makes the storage smaller, never larger.
        We will actually enlarge the storage when putting elements in.

darin's avatar
darin committed
918 919 920 921 922 923
2003-01-25  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        * kjs/Makefile.am: Add dependencies so the .lut.h files get rebuilt if the script changes.

sheridan's avatar
sheridan committed
924 925
=== Safari-54 ===

darin's avatar
darin committed
926 927 928 929 930 931 932 933 934 935
2003-01-22  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3137084 -- Many non-reproducible crashers in ContextImp::mark / ScopeChain::mark

        * kjs/scope_chain.cpp: (ScopeChain::push): Add assertion.
        (ScopeChain::release): Fix while loop so that it decrements refCount of the first node in
        the chain too.

936 937 938 939
2003-01-21  Darin Adler  <darin@apple.com>

        - correct our copyrights to 2003; copyright is based on year of publication, not year worked on

mjs's avatar
mjs committed
940 941 942 943 944 945 946 947 948 949 950 951
2003-01-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- made minor tweaks to work better with Mozilla's JavaScript tests.

        * kjs/testkjs.cpp:
        (VersionFunctionImp::call): Implemented 
        (main): Ignore files named -f (hack to match -f <filename syntax
	that moz JavaScript tests expect). Also use return code 3 instead
	of 1 for uncaught exception.

952 953 954 955 956
2003-01-16  Darin Adler  <darin@apple.com>

        * kjs/number_object.cpp: (NumberObjectImp::construct):
	Fix build, remove stray space.

darin's avatar
darin committed
957 958 959 960 961 962 963 964 965 966 967 968
2003-01-16  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- rolled in a change from the KJS folks

        * kjs/number_object.h: Use ObjectImp *, not Object, for the proto.
        * kjs/number_object.cpp:
        (NumberInstanceImp::NumberInstanceImp): Use ObjectImp *, not Object, for the proto.
        (NumberPrototypeImp::NumberPrototypeImp): Pass ObjectImp.
        (NumberObjectImp::construct): Use ObjectImp.

sheridan's avatar
sheridan committed
969 970
=== Safari-52 ===

darin's avatar
darin committed
971 972 973 974 975 976 977 978 979 980 981 982 983 984
2003-01-14  Darin Adler  <darin@apple.com>

        Reviewed by Ken.

	- rolled in a change from the KJS folks

	Fixes a bug where the date functions would not accept non-strings.
	And provides a bit of a speedup.

        * kjs/date_object.h: Change parameter type for parseDate.
        * kjs/date_object.cpp:
        (DateObjectFuncImp::call): Always call toString, don't check the type.
        (KJS::parseDate): Take a UString parameter, not a String parameter.

985 986 987 988
2003-01-13  Darin Adler  <darin@apple.com>

        * kjs/ustring.h: Fix spelling of occurrence.

darin's avatar
darin committed
989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033
2003-01-12  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- turned more recursion into iteration, and fixed some backwards stuff

        * kjs/grammar.y: Use the normal idiom for CaseClauses and FormalParameterList
	rather than using append().
        * kjs/grammar.cpp: Regenerated.

        * kjs/nodes.h: Change ClauseListNode and ParameterNode to use the normal idiom,
	and got rid of append methods. Also added friend declarations and calls to reverseList().
        * kjs/nodes.cpp:
        (StatListNode::ref): Iteration, not recursion.
        (StatListNode::deref): Iteration, not recursion.
        (StatListNode::execute): Iteration, not recursion.
        (StatListNode::processVarDecls): Iteration, not recursion.
        (CaseClauseNode::reverseList): Added.
        (ClauseListNode::ref): Iteration, not recursion.
        (ClauseListNode::deref): Iteration, not recursion.
        (ClauseListNode::processVarDecls): Iteration, not recursion.
        (CaseBlockNode::reverseLists): Added.
        (ParameterNode::ref): Iteration, not recursion.
        (ParameterNode::deref): Iteration, not recursion.
        (FuncDeclNode::reverseParameterList): Added.
        (FuncExprNode::reverseParameterList): Added.
        (SourceElementsNode::ref): Iteration, not recursion.
        (SourceElementsNode::deref): Iteration, not recursion.
        (SourceElementsNode::execute): Use variable name of n to match other functions.
        (SourceElementsNode::processFuncDecl): Ditto.
        (SourceElementsNode::processVarDecls): Ditto.

        * kjs/nodes2string.cpp:
        (SourceStream::operator<<): Used a switch statement for a bit of added clarity.
        (ElementNode::streamTo): Iteration, not recursion.
        (PropertyValueNode::streamTo): Iteration, not recursion.
        (ArgumentListNode::streamTo): Iteration, not recursion.
        (StatListNode::streamTo): Iteration, not recursion, and fixed order.
        (VarDeclListNode::streamTo): Iteration, not recursion.
        (ClauseListNode::streamTo): Used for statement to match other functions.
        (CaseBlockNode::streamTo): Used for statement to match other functions.
        (ParameterNode::streamTo): Iteration, not recursion.
        (SourceElementsNode::streamTo): Iteration, not recursion, and fixed order that has been
	backwards since I changed how this works in nodes.cpp.

darin's avatar
darin committed
1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055
2003-01-11  Darin Adler  <darin@apple.com>

        Reviewed by John.

	- changes inspired by things I noticed reviewing diffs vs. KDE when preparing the tarball

        * kjs/function.cpp: (GlobalFuncImp::call): Use strtol when strtoll is
	not available. Do #ifndef NDEBUG, not #if !NDEBUG.
        * kjs/function.h: Do #ifndef NDEBUG, not #if !NDEBUG.
        * kjs/internal.cpp:
        (InterpreterImp::initGlobalObject): Do #ifndef NDEBUG, not #if !NDEBUG.
        (KJS::printInfo): Remove case for ListType and remove default case that just
	ends up suppressing the "missing case" warning and does no good.
        * kjs/interpreter.cpp: (Interpreter::evaluate): Do #ifndef NDEBUG, not #if !NDEBUG.
        * kjs/nodes.cpp:
        (Node::finalCheck): Fix accidentally-deleted code in an ifdef we never compile.
        (FunctionCallNode::evaluate): Remove bogus XXX comment. Maciej put this comment in,
        and together we determined it's not needed.
        (TypeOfNode::evaluate): Ditto.
        * kjs/object.cpp: Remove assert that refers to ListType.
        * kjs/value.h: Remove ListType.

darin's avatar
darin committed
1056 1057 1058 1059 1060 1061 1062 1063
2003-01-09  Darin Adler  <darin@apple.com>

        * JavaScriptCore.pbproj/project.pbxproj: Add the year 2003, remove CFBundleIconFile,
	bump marketing version to 0.8.1 and version to 52u to keep up with the branch,
	remove CFHumanReadableCopyright, remove NSPrincipalClass.

        * English.lproj/InfoPlist.strings: Updated to match above changes.

mjs's avatar
mjs committed
1064 1065 1066 1067 1068 1069 1070 1071
2003-01-05  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by no one cause I'm just changing copyright strings.

        * JavaScriptCore.pbproj/project.pbxproj: Added non-Apple copyrights to
	copyright strings.
        * English.lproj/InfoPlist.strings: Likewise.

darin's avatar
darin committed
1072 1073 1074 1075 1076
2003-01-05  Darin Adler  <darin@apple.com>

        * JavaScriptCore.pbproj/project.pbxproj: Fix "Apple Compupter" typo.
	Remove unneeded CFBundleLongVersionString we don't use anywhere else.

darin's avatar
darin committed
1077 1078 1079 1080 1081 1082 1083 1084
2003-01-02  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

	- fixed 3138213 -- browser hangs trying to open Apple travel site

        * kjs/date_object.cpp: (timetUsingCF): Check for very-negative year numbers too.

kocienda's avatar
kocienda committed
1085 1086
=== Alexander-48 ===

kocienda's avatar
kocienda committed
1087 1088
=== Alexander-47 ===

darin's avatar
darin committed
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112
2002-12-30  Darin Adler  <darin@apple.com>

        Reviewed by Don and Maciej.

	- follow-on to my fix for 3134693 that fixes one more case of recursion and simplifies further

        * kjs/grammar.y: Remove SourceElementNode and just use a StatementNode instead.
	Reverse SourceElements rule so the recursive rule comes first as in the original
	KJS code (avoids actual parser recursion).

        * kjs/grammar.cpp: Regenerated.
        * kjs/grammar.cpp.h: Regenerated.
        * kjs/grammar.h: Regenerated.

        * kjs/nodes.h: Make processFuncDecl a virtual function in StatementNode so that we can
	use a StatementNode instead of a SourceElementNode. Add a call to reverseList in BlockNode
	to correct the order of the linked list in SourceElementsNode, to replace the technique
	where we reversed it in the parser. Remove SourceElementNode class, and make the element in
	SourceElementsNode be a StatementNode instead.
        * kjs/nodes.cpp: Remove SourceElementNode code.
        (StatementNode::processFuncDecl): Added empty function.
        (BlockNode::reverseList): Added. Used to make the SourceElements list ordered correctly.
        * kjs/nodes2string.cpp: Remove SourceElementNode code.

kocienda's avatar
kocienda committed
1113 1114
=== Alexander-46 ===

1115
2002-12-28  Darin Adler  <darin@apple.com>
kocienda's avatar
kocienda committed
1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176

        Reviewed by Gramps and Ken.
	Checked in by Ken.

	- fixed 3134693 -- carsdirect.com crash on used car search, due to large JavaScript array

	The parser was using recursion to handle many types of lists.
	This meant that we crashed out of stack space when any of the lists were extra big.
	I applied the same sort of fix we had already applied a while back for argument lists for
	all the other types of lists, including the list of ElementNode that was the reason for
	the crash reported here.

        * kjs/grammar.y: Removed ElisionNode altogether and just use a count.
	Use specific node types for PropertyNameAndValueList and PropertyName.

        * kjs/grammar.cpp: Regenerated.
        * kjs/grammar.cpp.h: Regenerated.
        * kjs/grammar.h: Regenerated.

        * kjs/nodes.h: Elide "ElisionNode", changing objects to keep elision counts instead.
	Make the ObjectLiteralNode list field be PropertyValueNode, not just Node.
	Make PropertyValueNode fields have specific types. Add new reverse list functions, calls
	to those functions in the constructors, and friend declarations as needed so the class
	that holds the head of a list can reverse the list during parsing.
        * kjs/nodes.cpp:
        (ElementNode::ref): Use iteration instead of recursion. Also elide "elision".
        (ElementNode::deref): Ditto.
        (ElementNode::evaluate): Use iteration instead of recursion, taking advantage of
	the fact that the linked list is reversed. Also use the elision count rather than
	an elision list.
        (ArrayNode::reverseElementList): Reverse the list so we can iterate normally.
        (ArrayNode::ref): Elide "elision".
        (ArrayNode::deref): Ditto.
        (ArrayNode::evaluate): Use elision count instead of elision list.
        (ObjectLiteralNode::reverseList): Reverse the list so we can iterate normally.
        (PropertyValueNode::ref): Use iteration instead of recursion.
        (PropertyValueNode::deref): Use iteration instead of recursion.
        (PropertyValueNode::evaluate): Use iteration instead of recursion, taking advantage
	of the fact that the linked list is reversed.
        (ArgumentListNode::ref): Change code to match the other similar cases we had to revise.
        (ArgumentListNode::deref): Ditto.
        (ArgumentListNode::evaluateList): Ditto.
        (ArgumentsNode::reverseList): Ditto.
        (VarDeclListNode::ref): Use iteration instead of recursion.
        (VarDeclListNode::deref): Ditto.
        (VarDeclListNode::evaluate): Use iteration instead of recursion, taking advantage
	of the fact that the linked list is reversed.
        (VarDeclListNode::processVarDecls): Ditto.
        (VarStatementNode::reverseList): Reverse the list so we can iterate normally.
        (FunctionBodyNode::FunctionBodyNode): Use BlockNode as the base class, removing
	most of the FunctionBodyNode class.

        * kjs/nodes2string.cpp:
        (ElementNode::streamTo): Update for using a count for elision, and reverse linking.
        (ArrayNode::streamTo): Update for using a count for elision.
        (PropertyValueNode::streamTo): Update for reverse linking.
        (ArgumentListNode::streamTo): Update for reverse linking. This has been wrong for
	a while, since we added the reverse a long time ago.
        (VarDeclListNode::streamTo): Update for reverse linking.
        (ParameterNode::streamTo): Update for reverse linking.

kocienda's avatar
kocienda committed
1177 1178
=== Alexander-45 ===

darin's avatar
darin committed
1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212
2002-12-22  Darin Adler  <darin@apple.com>

        Reviewed by Don and John.

	- fixed 3134449 -- Date.UTC returns NaN (invalid date)

	Did more testing of the date functions and made them behave like the other browsers.
	There were three problems:

            1) We did a validity check that other browsers don't do (hence the NaN).
            2) We treated passed-in dates as local time even in Date.UTC (hence a wrong result
               once I fixed the NaN).
            3) The results of ToUTCString (and ToGMTString) weren't formatted quite the same
	       as other browsers.

	Also found a couple of silly but unrelated coding mistakes.

        * kjs/date_object.cpp:
        (timetUsingCF): Added. Has the guts of mktimeUsingCF, but without the CFGregorianDateIsValid
        check. Other browsers accept invalid dates. Also takes a time zone parameter.
        (mktimeUsingCF): Calls timetUsingCF with the current time zone.
        (timegmUsingCF): Calls timetUsingCF with the UTC time zone.
        (formatDate): Remove the includeComma flag.
        (formatDateUTCVariant): Added. For use instead of formatDate with the includeComma flag.
	Puts the day before the month name.
        (DateProtoFuncImp::call): Use the new formatDateUTCVariant for ToGMTString and ToUTCString.
	Without this change the date didn't match other browsers.
        (DateObjectImp::DateObjectImp): Use UTCPropertyName. Somehow I declared this and didn't use
	it before.
        (DateObjectImp::construct): Pass -1 for is_dst literally instead of using invalidDate.
	Changing this to invalidDate was just a mistake (although no real difference in compiled
	code since invalidDate is just -1).
        (DateObjectFuncImp::call): Call timegm for the UTC case instead of mktime.

sheridan's avatar
sheridan committed
1213 1214
=== Alexander-44 ===

sheridan's avatar
sheridan committed
1215 1216
=== Alexander-43 ===

trey's avatar
trey committed
1217 1218 1219 1220 1221 1222 1223 1224 1225
2002-12-20  Trey Matteson  <trey@apple.com>

	We now build with symbols the B&I.  Deployment builds are without symbols,
	so it is easy to generate a non-huge app as a one-off.

        Reviewed by Darin

        * JavaScriptCore.pbproj/project.pbxproj:

sheridan's avatar
sheridan committed
1226 1227
=== Alexander-42 ===

sheridan's avatar
sheridan committed
1228 1229
=== Alexander-41 ===

sheridan's avatar
sheridan committed
1230 1231
=== Alexander-40 ===

mjs's avatar
mjs committed
1232 1233 1234 1235 1236 1237 1238 1239 1240
2002-12-18  Maciej Stachowiak  <mjs@apple.com>

	Reviewed by John.

	- fixed 3131171 - Change Alex versions to satisfy both marketing and B&I requirements
	
        * English.lproj/InfoPlist.strings:
        * JavaScriptCore.pbproj/project.pbxproj:

darin's avatar
darin committed
1241 1242 1243 1244 1245 1246
2002-12-17  Darin Adler  <darin@apple.com>

        Reviewed by Trey.

        * JavaScriptCore.pbproj/project.pbxproj: Removed signature.

sheridan's avatar
sheridan committed
1247 1248
=== Alexander-39 ===

sheridan's avatar
sheridan committed
1249 1250
=== Alexander-38 ===

darin's avatar
darin committed
1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267
2002-12-16  Darin Adler  <darin@apple.com>

        Reviewed by Don and Maciej.

	- fixed 3129115 -- need Apple copyright added to open source documents

	* tons of files: Added our copyright to files we modified, and updated all to standard format.

	- other changes

        * JavaScriptCore.pbproj/project.pbxproj: Set MACOSX_DEPLOYMENT_TARGET to 10.2.
	Also removed completion.cpp.
        * kjs/completion.cpp: Removed.
        * kjs/completion.h: Made the Completion constructor inline.

        * kjs/grammar.y: Removed an obsolete "pretend ifdef". No need to put these in APPLE_CHANGES now.

sheridan's avatar
sheridan committed
1268 1269
=== Alexander-37 ===

mjs's avatar
mjs committed
1270 1271 1272 1273 1274 1275 1276 1277
=== JavaScriptCore-37u2 ===

2002-12-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        * JavaScriptCore.pbproj/project.pbxproj: Bump version to 37u2.

darin's avatar
darin committed
1278 1279 1280 1281 1282 1283 1284
2002-12-14  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        * JavaScriptCore.pbproj/project.pbxproj: Make dtoa.h visible as an SPI so I can
	use it inside QString.

mjs's avatar
mjs committed
1285 1286 1287 1288 1289 1290 1291 1292 1293 1294
2002-12-14  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	- further corrections to number printing.

        * kjs/ustring.cpp:
        (UString::from): Make number printing match the ECMA standard
	algorithm.

mjs's avatar
mjs committed
1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306
2002-12-14  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Dave.

	- fix toString() conversion for numbers less than 1. Negative
	exponents are still wrong though (things like 1E-34).
 
        * kjs/ustring.cpp:
	(UString::from): Don't print empty string for numbers less than 1,
	and remember to add extra 0s after the decimal for negative
	decimal positions.
	
1307 1308
=== Alexander-37u1 ===

sheridan's avatar
sheridan committed
1309 1310
=== Alexander-36 ===

mjs's avatar
mjs committed
1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323
2002-12-12  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

	- fixed 3056449 - can't select state at tucows.com

        * kjs/array_instance.h:
        * kjs/array_object.cpp:
	(ArrayInstanceImp::propList): Add numeric proprties that are in
	special storage.
        * kjs/array_object.h:
        * kjs/object.h: Make propList a virtual method.

mjs's avatar
mjs committed
1324 1325
2002-12-11  Maciej Stachowiak  <mjs@apple.com>

mjs's avatar
mjs committed
1326
        Reviewed by Don.
mjs's avatar
mjs committed
1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343

	- Add kjsprint global function in Development build for ease of	debugging.
	- Print uncaught JavaScript exceptions to the console in Development.
	- Improve wording of exception error messages.
	
        * kjs/function.cpp:
        (GlobalFuncImp::call):
        * kjs/function.h:
        * kjs/internal.cpp:
        (InterpreterImp::initGlobalObject):
        * kjs/interpreter.cpp:
        (Interpreter::evaluate):
        * kjs/nodes.cpp:
        (NewExprNode::evaluate):
        (FunctionCallNode::evaluate):
        (RelationalNode::evaluate):

sullivan's avatar
sullivan committed
1344 1345 1346 1347 1348 1349 1350 1351 1352 1353
2002-12-10  John Sullivan  <sullivan@apple.com>

	Fixed more "Alexander"s that were lurking in places I forgot 
	to look before.

        Reviewed by Darin

        * Makefile.am:
	"rm -rf $(SYMROOTS)/Safari.app/Frameworks/JavaScriptCore.framework"

darin's avatar
darin committed
1354 1355 1356 1357 1358 1359 1360
2002-12-09  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        * JavaScriptCore.pbproj/project.pbxproj: Bump versions to 0.8 and 35u.
	* English.lproj/InfoPlist.strings: In here too.

mjs's avatar
mjs committed
1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376
2002-12-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Ken.

	- fixed 3059637 - all articles missing at excite.com sports page
	- fixed 3065903 - most of content missing at excite.com news page

	These bugs both came up because a JavaScript function has a var
	declaration that collides with a function parameter name.
	
        * kjs/nodes.cpp:
        (VarDeclNode::processVarDecls): Don't set the property to
	undefined if a property with that name is already set on the
	global object. Otherwise we may clobber function parameters with
	undefined even before hitting a possible var initializer.

mjs's avatar
mjs committed
1377 1378 1379 1380 1381 1382 1383 1384 1385 1386
2002-12-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: Darin Adler

	- made framework embedding work correctly with buildit

        * JavaScriptCore.pbproj/project.pbxproj: Give framework a relative
	install path, don't install it the normal way, and copy it
	manually to /AppleInternal/Library/Frameworks if installing.

sheridan's avatar
sheridan committed
1387 1388
=== Alexander-35 ===

mjs's avatar
mjs committed
1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407
2002-12-04  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: Richard Williamson

	Added explicit lock/unlock methods so Sherlock can grab the
	interpreter lock as needed.
	
	- partially addressed 3084320 - JavaScriptCore crash
	
        * kjs/internal.cpp:
        (InterpreterImp::InterpreterImp):
        (InterpreterImp::lock):
        (InterpreterImp::unlock):
        * kjs/internal.h:
        * kjs/interpreter.cpp:
        (Interpreter::lock):
        (Interpreter::unlock):
        * kjs/interpreter.h:

mjs's avatar
mjs committed
1408 1409
2002-12-04  Maciej Stachowiak  <mjs@apple.com>

mjs's avatar
mjs committed
1410
        Reviewed by: Darin Adler
mjs's avatar
mjs committed
1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466

	Set things up so JavaScriptCore builds in PCRE and uses it for
	regular expressions. This fixes many form validation bugs:

	- fixed 3103197 - javascript at fidelity.com rejects valid input
	- fixed 2942552 - form validation at weather.com fails
	- fixed 3079752 - js always reports textarea is empty
	- fixed 3079719 - covad.com "check availalbility" fails
	
        * Makefile.am: Add pcre subdir.
        * kjs/config.h: define HAVE_PCREPOSIX to true.
	* kjs/regexp.h: Don't include pcreposix.h since nothing from there
	is used.
	* pcre/.cvsignore: Added.
        * pcre/ChangeLog: Removed.
        * pcre/INSTALL: Removed.
        * pcre/Makefile.am: Added.
        * pcre/Makefile.in: Removed.
        * pcre/NEWS: Removed.
        * pcre/NON-UNIX-USE: Removed.
        * pcre/README: Removed.
        * pcre/chartables.c: Added.
        * pcre/config.guess: Removed.
        * pcre/config.in: Removed.
        * pcre/config.sub: Removed.
        * pcre/configure: Removed.
        * pcre/configure.in: Removed.
        * pcre/dll.mk: Removed.
        * pcre/doc/Tech.Notes: Removed.
        * pcre/doc/pcre.3: Removed.
        * pcre/doc/pcre.html: Removed.
        * pcre/doc/pcre.txt: Removed.
        * pcre/doc/pcregrep.1: Removed.
        * pcre/doc/pcregrep.html: Removed.
        * pcre/doc/pcregrep.txt: Removed.
        * pcre/doc/pcreposix.3: Removed.
        * pcre/doc/pcreposix.html: Removed.
        * pcre/doc/pcreposix.txt: Removed.
        * pcre/doc/pcretest.1: Removed.
        * pcre/doc/pcretest.html: Removed.
        * pcre/doc/pcretest.txt: Removed.
        * pcre/doc/perltest.txt: Removed.
        * pcre/install-sh: Removed.
        * pcre/ltmain.sh: Removed.
        * pcre/pcre-config.h: Added.
        * pcre/pcre-config.in: Removed.
        * pcre/internal.h: Include pcre-config.h instead of config.h
        * pcre/pcre.c:
        (ord2utf8): Fix warnings.
        (pcre_compile): Fix warnings.
        * pcre/pcre.def: Removed.
        * pcre/pcre.h: Added.
        * pcre/pcre.in: Removed.
        * JavaScriptCore.pbproj/project.pbxproj: Added pcre files to build.
        * JavaScriptCorePrefix.h: Guard c++ headers with #ifdef __cplusplus.

mjs's avatar
mjs committed
1467 1468 1469 1470 1471 1472 1473
2002-12-04  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: Richard Williamson

        * pcre/doc/*: Added.
        * pcre/testdata/*: Added.

mjs's avatar
mjs committed
1474 1475 1476 1477 1478 1479 1480 1481 1482
2002-12-03  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by: Darin Adler

	- imported PCRE 3.9 into the tree; this isn't actually compiled or
	used yet.

        * pcre/*: Added.

1483
== Rolled over to ChangeLog-2002-12-03 ==